830400 Commits

Author SHA1 Message Date
claxten10
66a734f272 misc: mtk/flashlight: Import Xiaomi changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:02 +00:00
claxten10
8fbfe8e1a6 misc: mtk/imgsensor: Import Xiaomi changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:02 +00:00
claxten10
a143f6854f misc: mtk/cam_cal: Import Xiaomi changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:02 +00:00
claxten10
db384a5081 misc: mtk/base: power: Import Xiaomi changes
* From sea-t-oss

Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
a2d5f3c186 drivers: mtk/btif: Import Xiaomi changes
* from sea-t-oss

Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
8d0828e20a net: ipv4: Import Xiaomi changes
* from sea-t-oss

Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
acbdd7459d misc: mtk/nfc: Import Xiaomi changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
8fcf8deaad drivers: mtk/pmic: Import Xiaomi changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
cf7b1dea29 misc: mtk/power: Import Xiaomi changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
1b8e8fa7d0 sound: Import Xiaomi changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
d3428aa37f gpu: Import Xiaomi Changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
044486a957 spi: Import Xiaomi changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
631b4d89cd char: Import Xiaomi changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
3786093947 drivers: misc: mtk: typec: Import Xiaomi changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
4e2cb2ad7e drivers: power: Import Xiaomi Changes
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
b5a87d9fbe arch: arm64: boot: Generate cust.dtsi
* dws made following stock dtbo and a few
  changes from sea-t-oss

* Generated using https://github.com/Mashopy/android_tools_dct

Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:01 +00:00
claxten10
956e134f7e arch: arm64: Import fleur DTS/I
* Matches closely to stock dtb

Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:00 +00:00
Peter Oskolkov
53570fa708 sched/fair: Tweak pick_next_entity()
Currently, pick_next_entity(...) has the following structure
(simplified):

  [...]
  if (last_buddy_ok())
    result = last_buddy;
  if (next_buddy_ok())
    result = next_buddy;
  [...]

The intended behavior is to prefer next buddy over last buddy;
the current code somewhat obfuscates this, and also wastes
cycles checking the last buddy when eventually the next buddy is
picked up.

So this patch refactors two 'ifs' above into

  [...]
  if (next_buddy_ok())
      result = next_buddy;
  else if (last_buddy_ok())
      result = last_buddy;
  [...]

Signed-off-by: Peter Oskolkov <posk@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guitttot@linaro.org>
Link: https://lkml.kernel.org/r/20200930173532.1069092-1-posk@google.com
Signed-off-by: John Vincent <git@tenseventyseven.cf>
2025-10-18 10:51:00 +00:00
claxten10
fdff989fe2 teei: Disable MicroTrust TZ MTK BootProf
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:00 +00:00
claxten10
abf0db11b6 tee: teei: Disable MicroTrust Dynamic Core
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:00 +00:00
Lina Wang
9ad0fda089 [ALPS08037839] ccmni:fix SIOCACKPRIO KE
When ioctl cmd--SIOCACKPRIO is called, ctlb->ccmni_inst[21] is null, so
ctlb->ccmni_inst[21]->ack_prio_en will pop up KE, fix this bug.

MTK-Commit-Id: cc19ea9df04826bd8645aca0f93ee6935bcb9af9

CR-Id: ALPS08037839
Feature: ccmni
Change-Id: I0f2f265b9f09613060b1d206724a342413d07378
Signed-off-by: Lina Wang <lina.wang@mediatek.com>
(cherry-pick from 34a53470dae04f636f379f89b9bea733f80e380a)
2025-10-18 10:51:00 +00:00
LinkBoi00
bba5960695 {kernel, net}: Disable useless kernel modules
Signed-off-by: LinkBoi00 <linkdevel@protonmail.com>
2025-10-18 10:51:00 +00:00
claxten10
458b208fa3 sound: soc: codecs: Stop building Accessory Detection
* Unneeded and fixes:

WARNING: sound/soc/codecs/mt6357-accdet: 'accdet_read_audio_res' exported twice. Previous export was in vmlinux
WARNING: sound/soc/codecs/mt6357-accdet: 'accdet_late_init' exported twice. Previous export was in vmlinux
WARNING: sound/soc/codecs/mt6359-accdet: 'accdet_read_audio_res' exported twice. Previous export was in vmlinux
WARNING: sound/soc/codecs/mt6359-accdet: 'accdet_late_init' exported twice. Previous export was in vmlinux

Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:00 +00:00
claxten10
9ed25e5a0c input: ts: mtk: Resolve Kconfig warnings
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-18 10:51:00 +00:00
HELLINFIX
683f50d471 drivers: clk: Fix section mismatches
WARNING: vmlinux.o(.text+0x4fef5c): Section mismatch in reference from the function clk_mt6781_scpsys_probe() to the function .init.text:init_clk_scpsys()
The function clk_mt6781_scpsys_probe() references
the function __init init_clk_scpsys().
This is often because clk_mt6781_scpsys_probe lacks a __init
annotation or the annotation of init_clk_scpsys is wrong.

Signed-off-by: HELLINFIX <mridulsharma57570@gmail.com>
2025-10-18 10:51:00 +00:00
CloudedQuartz
3fe0008891 drivers: misc: mediatek: sspm v2: fix section mismatch
WARNING: vmlinux.o(.text+0x81f924): Section mismatch in reference from the function sspm_lock_emi_mpu() to the function .init.text:sspm_set_emi_mpu()
The function sspm_lock_emi_mpu() references
the function __init sspm_set_emi_mpu().
This is often because sspm_lock_emi_mpu lacks a __init
annotation or the annotation of sspm_set_emi_mpu is wrong.

Signed-off-by: HELLINFIX <mridulsharma57570@gmail.com>
Change-Id: If7480959031356453967358581fd3e0bccf2352b
2025-10-18 10:51:00 +00:00
Wesley Cheng
added7506d usb: dwc3: gadget: Replace list_for_each_entry_safe() if using giveback
commit bf594d1d0c1d7b895954018043536ffd327844f9 upstream.

The list_for_each_entry_safe() macro saves the current item (n) and
the item after (n+1), so that n can be safely removed without
corrupting the list.  However, when traversing the list and removing
items using gadget giveback, the DWC3 lock is briefly released,
allowing other routines to execute.  There is a situation where, while
items are being removed from the cancelled_list using
dwc3_gadget_ep_cleanup_cancelled_requests(), the pullup disable
routine is running in parallel (due to UDC unbind).  As the cleanup
routine removes n, and the pullup disable removes n+1, once the
cleanup retakes the DWC3 lock, it references a request who was already
removed/handled.  With list debug enabled, this leads to a panic.
Ensure all instances of the macro are replaced where gadget giveback
is used.

Example call stack:

Thread#1:
__dwc3_gadget_ep_set_halt() - CLEAR HALT
  -> dwc3_gadget_ep_cleanup_cancelled_requests()
    ->list_for_each_entry_safe()
    ->dwc3_gadget_giveback(n)
      ->dwc3_gadget_del_and_unmap_request()- n deleted[cancelled_list]
      ->spin_unlock
      ->Thread#2 executes
      ...
    ->dwc3_gadget_giveback(n+1)
      ->Already removed!

Thread#2:
dwc3_gadget_pullup()
  ->waiting for dwc3 spin_lock
  ...
  ->Thread#1 released lock
  ->dwc3_stop_active_transfers()
    ->dwc3_remove_requests()
      ->fetches n+1 item from cancelled_list (n removed by Thread#1)
      ->dwc3_gadget_giveback()
        ->dwc3_gadget_del_and_unmap_request()- n+1 deleted[cancelled_list]
        ->spin_unlock

Fixes: d4f1afe5e896 ("usb: dwc3: gadget: move requests to cancelled_list")
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20220414183521.23451-1-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 241412400
Test: build, boot
Signed-off-by: Jimmy Hu <hhhuuu@google.com>
Change-Id: I03102cdb277db5ccfd29a175df5eff5c77cf7285
2025-10-18 10:51:00 +00:00
raychi
b2e6c63367 usb: dwc3: skip trbs if DWC3_EP_TRANSFER_STARTED is clear
If DWC3_EP_TRANSFER_STARTED is clear, it will do the giveback
without skip trbs. It will cause the trb index wrong
for next request. Therefore, add dwc3_gadget_ep_skip_trbs
here to avoid this problem.

Bug: 160373605

Signed-off-by: raychi <raychi@google.com>
Change-Id: I0ae79667fb46d3a298f4f67c9f461141b2ad9e79
2025-10-18 10:51:00 +00:00
Pavankumar Kondeti
2a7433f75e sched/walt: Fix negative count of sched_asym_cpucapacity static key
The current code sets per-cpu variable sd_asym_cpucapacity while
building sched domains even when there are no asymmetric CPUs.
This is done to make sure that EAS remains enabled on a b.L system
after hotplugging out all big/LITTLE CPUs. However it is causing
the below warning during CPU hotplug.

[13988.932604] pc : static_key_slow_dec_cpuslocked+0xe8/0x150
[13988.932608] lr : static_key_slow_dec_cpuslocked+0xe8/0x150
[13988.932610] sp : ffffffc010333c00
[13988.932612] x29: ffffffc010333c00 x28: ffffff8138d88088
[13988.932615] x27: 0000000000000000 x26: 0000000000000081
[13988.932618] x25: ffffff80917efc80 x24: ffffffc010333c60
[13988.932621] x23: ffffffd32bf09c58 x22: 0000000000000000
[13988.932623] x21: 0000000000000000 x20: ffffff80917efc80
[13988.932626] x19: ffffffd32bf0a3e0 x18: ffffff8138039c38
[13988.932628] x17: ffffffd32bf2b000 x16: 0000000000000050
[13988.932631] x15: 0000000000000050 x14: 0000000000040000
[13988.932633] x13: 0000000000000178 x12: 0000000000000001
[13988.932636] x11: 16a9ca5426841300 x10: 16a9ca5426841300
[13988.932639] x9 : 16a9ca5426841300 x8 : 16a9ca5426841300
[13988.932641] x7 : 0000000000000000 x6 : ffffff813f4edadb
[13988.932643] x5 : 0000000000000000 x4 : 0000000000000004
[13988.932646] x3 : ffffffc010333880 x2 : ffffffd32a683a2c
[13988.932648] x1 : ffffffd329355498 x0 : 000000000000001b
[13988.932651] Call trace:
[13988.932656]  static_key_slow_dec_cpuslocked+0xe8/0x150
[13988.932660]  partition_sched_domains_locked+0x1f8/0x80c
[13988.932666]  sched_cpu_deactivate+0x9c/0x13c
[13988.932670]  cpuhp_invoke_callback+0x6ac/0xa8c
[13988.932675]  cpuhp_thread_fun+0x158/0x1ac
[13988.932678]  smpboot_thread_fn+0x244/0x3e4
[13988.932681]  kthread+0x168/0x178
[13988.932685]  ret_from_fork+0x10/0x18

The mismatch between increment/decrement of sched_asym_cpucapacity
static key is resulting in the above warning. It is due to
the fact that the increment happens only when the system really
has asymmetric capacity CPUs. This check is done by going through
each CPU capacity. So when system becomes SMP during hotplug,
the increment never happens. However the decrement of this static
key is done when any of the currently online CPU has per-cpu variable
sd_asym_cpucapacity value as non-NULL. Since we always set this
variable, we run into this issue.

Our goal was to enable EAS on SMP. To achieve that enable EAS and
build perf domains (required for compute energy) irrespective
of per-cpu variable sd_asym_cpucapacity value. In this way we
no longer have to enable sched_asym_cpucapacity feature on SMP
to enable EAS.

Change-Id: Id46f2b80350b742c75195ad6939b814d4695eb07
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2025-10-18 10:51:00 +00:00
Eric W. Biederman
b2d486cd8f tasks, sched/core: Ensure tasks are available for a grace period after leaving the runqueue
In the ordinary case today the RCU grace period for a task_struct is
triggered when another process wait's for it's zombine and causes the
kernel to call release_task().  As the waiting task has to receive a
signal and then act upon it before this happens, typically this will
occur after the original task as been removed from the runqueue.

Unfortunaty in some cases such as self reaping tasks it can be shown
that release_task() will be called starting the grace period for
task_struct long before the task leaves the runqueue.

Therefore use put_task_struct_rcu_user() in finish_task_switch() to
guarantee that the there is a RCU lifetime after the task
leaves the runqueue.

Besides the change in the start of the RCU grace period for the
task_struct this change may cause perf_event_delayed_put and
trace_sched_process_free.  The function perf_event_delayed_put boils
down to just a WARN_ON for cases that I assume never show happen.  So
I don't see any problem with delaying it.

The function trace_sched_process_free is a trace point and thus
visible to user space.  Occassionally userspace has the strangest
dependencies so this has a miniscule chance of causing a regression.
This change only changes the timing of when the tracepoint is called.
The change in timing arguably gives userspace a more accurate picture
of what is going on.  So I don't expect there to be a regression.

In the case where a task self reaps we are pretty much guaranteed that
the RCU grace period is delayed.  So we should get quite a bit of
coverage in of this worst case for the change in a normal threaded
workload.  So I expect any issues to turn up quickly or not at all.

I have lightly tested this change and everything appears to work
fine.

Change-Id: I8b3d0891c3a68e549c10e7e10bfc814f82138a5d
Inspired-by: Linus Torvalds <torvalds@linux-foundation.org>
Inspired-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Kirill Tkhai <tkhai@yandex.ru>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/87r24jdpl5.fsf_-_@x220.int.ebiederm.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Git-commit: 0ff7b2cfbae36ebcd216c6a5ad7f8534eebeaee2
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
2025-10-18 10:51:00 +00:00
Eric W. Biederman
af0b4b4a83 tasks: Add a count of task RCU users
Add a count of the number of RCU users (currently 1) of the task
struct so that we can later add the scheduler case and get rid of the
very subtle task_rcu_dereference(), and just use rcu_dereference().

As suggested by Oleg have the count overlap rcu_head so that no
additional space in task_struct is required.

Change-Id: Ib1f00439f5e119cce4af2bf712df5a60b47fa81f
Inspired-by: Linus Torvalds <torvalds@linux-foundation.org>
Inspired-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Kirill Tkhai <tkhai@yandex.ru>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/87woebdplt.fsf_-_@x220.int.ebiederm.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Git-commit: 3fbd7ee285b2bbc6eebd15a3c8786d9776a402a8
Git-repo: https://android.googlesource.com/kernel/common/
[quic_spathi@quicinc.com: resolved trivial merge conflicts]
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
2025-10-18 10:50:59 +00:00
Todd Poynor
2f8fb224f3 ANDROID: fs: fuse: Freeze client on suspend when request sent to userspace
Suspend attempts can abort when the FUSE daemon is already frozen
and a client is waiting uninterruptibly for a response, causing
freezing of tasks to fail.

Use the freeze-friendly wait API, but disregard other signals.

Change-Id: Icefb7e4bbc718ccb76bf3c04daaa5eeea7e0e63c
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
2025-10-18 10:50:59 +00:00
Biao Li
e39560ce5a ANDROID: fuse: Allocate zeroed memory for canonical path
The page used to contain the fuse_dentry_canonical_path to be handled in
fuse_dev_do_write is allocated using __get_free_pages(GFP_KERNEL).
The returned page may contain undefined data, that by chance may be
considered as a valid path name that is not in the cache. In that case,
if the FUSE daemon mistakenly doesn't fill the canonical path buffer,
the FUSE driver may fall into two blocking

  request_wait_answer(fuse_dev_write->kern_path->fuse_lookup_name)

causing a deadlock condition.

The stack is as follows:
find            S    0 20511  20117 0x00000000
Call trace:
[<ffffff8008085e78>] __switch_to+0xb8/0xd4
[<ffffff8008a0cac4>] __schedule+0x458/0x714
[<ffffff8008a0ce0c>] schedule+0x8c/0xa8
[<ffffff800833865c>] request_wait_answer+0x74/0x220
[<ffffff8008339f70>] __fuse_request_send+0x8c/0xa0
[<ffffff8008339fe4>] fuse_request_send+0x60/0x6c
[<ffffff800833c1a8>] fuse_dentry_canonical_path+0xb8/0x104
[<ffffff800820b14c>] do_sys_open+0x1b4/0x260
[<ffffff800820b27c>] SyS_openat+0x3c/0x4c
[<ffffff8008083540>] el0_svc_naked+0x34/0x38
mount.ntfs-3g   S    0  5845      1 0x00000000
Call trace:
[<ffffff8008085e78>] __switch_to+0xb8/0xd4
[<ffffff8008a0cac4>] __schedule+0x458/0x714
[<ffffff8008a0ce0c>] schedule+0x8c/0xa8
[<ffffff800833865c>] request_wait_answer+0x74/0x220
[<ffffff8008339f70>] __fuse_request_send+0x8c/0xa0
[<ffffff8008339fe4>] fuse_request_send+0x60/0x6c
[<ffffff800833bdb0>] fuse_simple_request+0x128/0x16c
[<ffffff800833dddc>] fuse_lookup_name+0x104/0x1b0
[<ffffff800833dee4>] fuse_lookup+0x5c/0x11c
[<ffffff800821861c>] lookup_slow+0xfc/0x174
[<ffffff800821b474>] walk_component+0xf0/0x290
[<ffffff800821bbac>] path_lookupat+0xa0/0x128
[<ffffff800821c7f4>] filename_lookup+0x84/0x124
[<ffffff800821c8d8>] kern_path+0x44/0x54
[<ffffff800833b0c8>] fuse_dev_do_write+0x828/0xa0c
[<ffffff800833b610>] fuse_dev_write+0x90/0xb4
[<ffffff800820b770>] do_iter_readv_writev+0xf4/0x13c
[<ffffff800820cc88>] do_readv_writev+0xec/0x220
[<ffffff800820d05c>] vfs_writev+0x60/0x74
[<ffffff800820d0ec>] do_writev+0x7c/0x100
[<ffffff800820e348>] SyS_writev+0x38/0x48
[<ffffff8008083540>] el0_svc_naked+0x34/0x38

Fix by ensuring that the page allocated for the canonical path is zeroed.

Bug: 194856119
Bug: 196051870
Fixes: 24ab59f6bb42 ("ANDROID: fuse: Add support for d_canonical_path")
Signed-off-by: Biao Li <libiao@allwinnertech.com>
Signed-off-by: Shuosheng Huang <huangshuosheng@allwinnertech.com>
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I400815dc1049d90c308f5cf87ce60de97ff82131
2025-10-18 10:50:59 +00:00
Alessio Balsini
2b63db5336 BACKPORT: fs: align IOCB_* flags with RWF_* flags
We have a set of flags that are shared between the two and inherired
in kiocb_set_rw_flags(), but we check and set these individually.
Reorder the IOCB flags so that the bottom part of the space is synced
with the RWF flag space, and then we can do them all in one mask and
set operation.

The only exception is RWF_SYNC, which needs to mark IOCB_SYNC and
IOCB_DSYNC. Do that one separately.

This shaves 15 bytes of text from kiocb_set_rw_flags() for me.

(cherry picked from commit ce71bfea207b4d7c21d36f24ec37618ffcea1da8)
Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Change-Id: Ib6316ae5cb3f8a14fabef5492e79783c9e6d3c4d
Signed-off-by: Alessio Balsini <balsini@google.com>
2025-10-17 23:09:04 +00:00
Christoph Hellwig
bfc81ab6bf BACKPORT: zram: cleanup backing_dev_store
Use blkdev_get_by_dev instead of bdgrab + blkdev_get.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: mrsrimar22 <mar.pashter1922@gmail.com>
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
2025-10-17 23:09:00 +00:00
Andy Shevchenko
74a3a332dd BACKPORT: zcomp: Use ARRAY_SIZE() for backends list
Instead of keeping NULL terminated array switch to use ARRAY_SIZE()
which helps to further clean up.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: http://lkml.kernel.org/r/20200508100758.51644-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Change-Id: Ie21e77b081a2c261370848749b83e75c3c5d67d8
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
2025-10-17 23:08:57 +00:00
Sebastian Andrzej Siewior
2b552e97c3 BACKPORT: zram: Allocate struct zcomp_strm as per-CPU memory
zcomp::stream is a per-CPU pointer, pointing to struct zcomp_strm
which contains two pointers. Having struct zcomp_strm allocated
directly as per-CPU memory would avoid one additional memory
allocation and a pointer dereference. This also simplifies the
addition of a local_lock to struct zcomp_strm.

Allocate zcomp::stream directly as per-CPU memory.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20200527201119.1692513-7-bigeasy@linutronix.de

Change-Id: I1b44f7ac0584ab851d9030d09693699ddbb6c62a
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
2025-10-17 23:08:55 +00:00
Park Ju Hyung
33b56f04b6 cgroup: use kmem_cache pool for struct cgrp_cset_link
These get allocated and freed millions of times on Android.

Use a dedicated kmem_cache pool and avoid costly dynamic memory allocations.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Change-Id: Id0c0c8dfbd835fabf7b13ab9e97322cf6868802c
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
2025-10-17 23:08:52 +00:00
Al Viro
3d43541334 BACKPORT: umount(2): move the flag validity checks first
Unfortunately, there's userland code that used to rely upon these
checks being done before anything else to check for UMOUNT_NOFOLLOW
support.  That broke in 41525f56e256 ("fs: refactor ksys_umount").
Separate those from the rest of checks and move them to ksys_umount();
unlike everything else in there, this can be sanely done there.

Reported-by: Sargun Dhillon <sargun@sargun.me>
Fixes: 41525f56e256 ("fs: refactor ksys_umount")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: mrsrimar22 <mrsrimar22@gmail.com>
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
2025-10-17 23:08:49 +00:00
Christoph Hellwig
1cf0def4f5 BACKPORT: fs: fix a struct path leak in path_umount
Make sure we also put the dentry and vfsmnt in the illegal flags
and !may_umount cases.

Fixes: 41525f56e256 ("fs: refactor ksys_umount")
Reported-by: Vikas Kumar <vikas.kumar2@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: mrsrimar22 <mrsrimar22@gmail.com>
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
2025-10-17 23:08:47 +00:00
Christoph Hellwig
6e946e9b5e BACKPORT: fs: refactor ksys_umount
Factor out a path_umount helper that takes a struct path * instead of the
actual file name.  This will allow to convert the init and devtmpfs code
to properly mount based on a kernel pointer instead of relying on the
implicit set_fs(KERNEL_DS) during early init.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: mrsrimar22 <mrsrimar22@gmail.com>
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
2025-10-17 23:08:43 +00:00
CloudedQuartz
d99a5cd9ff Revert "[ALPS05208480] scsi: ufs: block request before shutdown"
- We already quiesce on ufshcd_mtk_shutdown

This reverts commit c95cc7b.

Change-Id: Id8794e522465c6cf45158d25dadec8843a2ea18b
Signed-off-by: CloudedQuartz <ayan.pande06@gmail.com>
Signed-off-by: claxten10 <claxten10@gmail.com>
2025-10-17 23:08:38 +00:00
bengris32
e8f6ddc79a drivers: {cpufreq,mediatek}: Allow disabling MediaTek CPU policy
Change-Id: I19610741ae7e153d88164798050ede7158d09a12
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2025-10-17 23:08:10 +00:00
xyzuniverse
7a84675fda Revert "drivers: mediatek: ppm: Create individual nodes for each clusters min/max"
This reverts commit d025a0a916cde54d2783fc75a14cee2a00924af2.
2025-10-17 23:08:07 +00:00
Tyler Nijmeh
a5623e82b6 tcp: Disable syncookies
According to a LWN article, syncookies have limited space to encode TCP
handshake options, breaking large windows and selective acknowledgement.

https://lwn.net/Articles/277146/

Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: John Vincent <git@tensevntysevn.cf>
2025-10-17 23:08:03 +00:00
Elias Dimopoulos
e9673d8cf1 drivers: misc-mtk: Kconfig.default: Don't select TCP congestion options
Signed-off-by: Elias Dimopoulos <linkdevel@protonmail.com>
2025-10-17 23:07:59 +00:00
Andrey Ryabinin
76a0ed2576 include/linux/linkage.h: align weak symbols
Since WEAK() supposed to be used instead of ENTRY() to define weak
symbols, but unlike ENTRY() it doesn't have ALIGN directive.  It seems
there is no actual reason to not have, so let's add ALIGN to WEAK() too.

Link: http://lkml.kernel.org/r/20180920135631.23833-1-aryabinin@virtuozzo.com
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Will Deacon <will.deacon@arm.com>, Catalin Marinas <catalin.marinas@arm.com>
Cc: Kyeongdon Kim <kyeongdon.kim@lge.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NotZeetaa <rodrigo2005contente@gmail.com>
2025-10-17 23:07:53 +00:00
Elias Dimopoulos
d5cbfbc349 drivers: gpu: drm-mtk: Exclude GPU DRM interrupts from IRQ balancing
Balancing this IRQ results in laggy video playback on secure content

Signed-off-by: Elias Dimopoulos <linkdevel@protonmail.com>
2025-10-17 23:07:37 +00:00
bengris32
6d076d9a8c drivers: mediatek: thermal: Suppress verbose logging
Change-Id: Ia96e83edd67bec1b26a9621779a5f9272c468713
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2025-10-17 23:07:34 +00:00
bengris32
97a4d52b5e drivers: clk: clk-fmeter: Suppress verbose logging
Change-Id: I5d1ea6797f5f399ba54d095c689f77201c7f6932
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2025-10-17 23:07:31 +00:00