811279 Commits

Author SHA1 Message Date
Richard Raya
55ae6a0163 Revert "aw8624_haptic: Misc improvements"
This reverts commit ed3425bab089e971abd263fca7377e8450ea5e66.

Change-Id: Ie35c37b4feab62b00e03d81f4a79f783bcf6cd6f
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-20 11:00:58 -03:00
Richard Raya
7497ff494a sysctl: Make capacity margins writeable again
Change-Id: I14cc4327f9d7f85b04d1ac507f64e647c16d258f
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 21:32:31 -03:00
Richard Raya
db95d0f580 Revert "qos: Don't allow userspace to impose restrictions on CPU idle levels"
This reverts commit a42bd2ac50d8e617fb513e0632c759a91285526a.

Change-Id: Icc2feebfdbe53a98c8d6ec150a7f52b32c523846
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 21:32:02 -03:00
Omkar Chandorkar
335b99146c msm: vidc: Enable decode batching feature
This reverts commit 5caa8628e501315ffaaad003594ccca490145661.

Reason for revert: We do not use C2 for video, this is useful for OMX.

Change-Id: I2bdd191313300e86a108087a1854252dc457f54c
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 18:00:04 -03:00
Alexander Winkowski
c787239094 power/supply: smb5: Increase current for non-QC charging
It's useful for me because I have to use standard chargers frequently.

Change-Id: I5aef00ce13f2b89e78c9b6349603be8855ca0917
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 17:59:47 -03:00
Alexander Winkowski
eb51dd0be2 power/supply: bq2597x: Put regs dump under POWER_SUPPLY_DEBUG
Change-Id: I6dbc2144869f6ef06e33d83b9af7814a19534ba6
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 17:59:47 -03:00
Richard Raya
685899aacf defconfig: Switch to ZSTD for zRAM
Change-Id: I7ea7c45de88479d497513ef4e88f6cebdc6c77b8
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 13:55:13 -03:00
Richard Raya
aa6631b944 Revert "ARM64/dts: sdmmagpie: Disable all mitigations"
This reverts commit 1593bd8183dd337c81c5b4eb9ac629c3d90d4a4e.

Change-Id: I4604276fa8a9ea6341017f4c27d8d02328a31ff2
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 13:54:56 -03:00
Richard Raya
9cf49deeb3 defconfig: Disable CASS
Change-Id: I8809d064014a211529049fbf6ebfefca1bbedecd
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 13:54:50 -03:00
Richard Raya
7b810d1c9f Revert "schedutil: Hardcode rate limits to 500/20000 ms"
This reverts commit be3df9c273a934b44a089a498e83718a46e55304.

Change-Id: Ief4f4aea6e2840aa2bd09d613d2abeb5610728ef
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 13:54:48 -03:00
Richard Raya
0bbae0a644 Revert "sched/core: Force trivial, unbound kthreads onto low-power CPUs"
This reverts commit 05bab47794fa05c106068c7f594fb50bb825a377.

Change-Id: Ie12e180bfb50657d8de8a6aa1e8c00e457613f41
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 13:54:47 -03:00
Richard Raya
969575ad6d defconfig: Switch to CAF input boost
Change-Id: Ie581ecee91544e4930263d212a99488e4d4e41ca
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 13:54:41 -03:00
Richard Raya
2214183e6d Revert "drm: Boost CPU upon running an atomic ioctl"
This reverts commit c3058fc912b3ecd2f3ce2ebabf4358dba8289633.

Change-Id: I3e0333af0e8917ab9706470eb4ddce23155a93f2
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 13:54:40 -03:00
Richard Raya
4cba8ab2d7 Revert "drm: Boost DDR bus when a new frame is ready to be committed"
This reverts commit 112243ebc3bbd5fe01d77cdba303be7e02940e0e.

Change-Id: I4542c494340ee6014540e7b29a222e8aa8101ab7
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 13:54:39 -03:00
John Galt
09cae8f066 sched/fair: Decrease migration cost
Change-Id: I7dc33271807facad1e1e33c97e82c9aa69112b78
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 13:54:35 -03:00
Richard Raya
4ebe5e8b7e Revert "sched/fair: Set migration cost to zero to leverage DynamIQ Shared Unit"
This reverts commit f30864ac4b769ae63c2308d84e040ac64a7951c5.

Change-Id: I57de115b27e276106de769dd83506d33991e132e
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 13:54:33 -03:00
Richard Raya
6dc4944b74 Revert "sched/features: Disable CACHE_HOT_BUDDY to leverage DynamIQ Shared Unit"
This reverts commit b0127a3d65c026ed584c0c427f97b3563ce04952.

Change-Id: Ied7e769dbce1f6c5ab2055dc63b9de3b0b5d083c
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-19 13:54:32 -03:00
Adithya R
6773e62535 binder: Don't stub out binder_user_error
Change-Id: I589b68de57f48f42538d905b021e5ec602e3abf5
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-10 15:13:01 -03:00
Sherry Yang
dc2e3e4670 binder: No outgoing transaction when thread todo has transaction
[ Upstream commit 44b73962cb25f1c8170ea695c4564b05a75e1fd4 ]

When a process dies, failed reply is sent to the sender of any transaction
queued on a dead thread's todo list. The sender asserts that the
received failed reply corresponds to the head of the transaction stack.
This assert can fail if the dead thread is allowed to send outgoing
transactions when there is already a transaction on its todo list,
because this new transaction can end up on the transaction stack of the
original sender. The following steps illustrate how this assertion can
fail.

1. Thread1 sends txn19 to Thread2
   (T1->transaction_stack=txn19, T2->todo+=txn19)
2. Without processing todo list, Thread2 sends txn20 to Thread1
   (T1->todo+=txn20, T2->transaction_stack=txn20)
3. T1 processes txn20 on its todo list
   (T1->transaction_stack=txn20->txn19, T1->todo=<empty>)
4. T2 dies, T2->todo cleanup attempts to send failed reply for txn19, but
   T1->transaction_stack points to txn20 -- assertion failes

Step 2. is the incorrect behavior. When there is a transaction on a
thread's todo list, this thread should not be able to send any outgoing
synchronous transactions. Only the head of the todo list needs to be
checked because only threads that are waiting for proc work can directly
receive work from another thread, and no work is allowed to be queued
on such a thread without waking up the thread. This patch also enforces
that a thread is not waiting for proc work when a work is directly
enqueued to its todo list.

Acked-by: Arve Hjønnevåg <arve@android.com>
Reviewed-by: Martijn Coenen <maco@android.com>
Signed-off-by: Sherry Yang <sherryy@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Change-Id: Ief18e5c6e478ae7347b4e7c4a955edb8841cf17f
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-10 15:12:30 -03:00
Sultan Alsawaf
5739d30c67 binder: Reserve caches for small, high-frequency memory allocations
Most of binder's memory allocations are tiny, and they're allocated
and freed extremely frequently. The latency from going through the page
allocator all the time for such small allocations ends up being quite
high, especially when the system is low on memory. Binder is
performance-critical, so this is suboptimal.

Instead of using kzalloc to allocate a struct every time, reserve caches
specifically for allocating each struct quickly.

Change-Id: I535d8eb25730babf404c1f9c5d917afcebd63f6e
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-10 15:12:29 -03:00
Sultan Alsawaf
9116489404 soc: qcom: watchdog_v2: Optimize IPI pings to reduce system jitter
Sending synchronous IPIs to other CPUs involves spinning with preemption
disabled in order to wait for each IPI to finish. Keeping preemption off
for long periods of time like this is bad for system jitter, not to mention
the watchdog's IPIs are sent and flushed one at a time for each CPU rather
than all at once for all the CPUs to be pinged.

Since the existing IPI ping machinery is quite lacking, rewrite it entirely
to address all of its performance shortcomings. This not only replaces the
synchronous IPIs with asynchronous ones, but also allows the IPIs to run in
parallel. The IPI ping and wait mechanisms are now much more efficient via
the use of generic_exec_single() (since smp_call_function_single_async()
disables preemption when all it really needs is migration disabled), and
by sleeping rather than spinning while waiting for the IPIs to finish.

This also does away with the ping_start and ping_end arrays as they don't
make sense with the parallel, asynchronous execution of the IPIs anymore.
They are instead replaced by a mask indicating which CPUs were pinged so
that a watchdog bark can still print out which CPU(s) stopped responding.

[Ken: Replace migrate_{disable|enable} with preempt_{disable|enable}]

Change-Id: Icf34a7b7e7f390b4db38c31207f7e667eb634eba
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: KenHV <yo@kenharris.xyz>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:51 -03:00
Sultan Alsawaf
d1155d942a smp: Make generic_exec_single() public
generic_exec_single() is quite handy for sending asynchronous IPIs without
the baggage that comes with smp_call_function_single_async(). Make it
public so that it can be (carefully) utilized.

Change-Id: I4fc994e8449895b00c5cd455b01c1bcce5c0aac5
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Richard Raya
889bdb0b06 Revert "soc: qcom: Dump more watchdog data when watchdog bark"
This reverts commit 919eece679cd1097f13cbb9208e3f1f7668fac6a.

Change-Id: Id71d1a079d09a1aeff9c292f49d2486b28713ea9
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Richard Raya
bfdaa3af2f Revert "soc: qcom: Also dump watchdog data in bite cases"
This reverts commit 5f250a3f69b949eefec8a1062b3d64a32088047a.

Change-Id: I7cc97556c79dc85f0152092c6cdb175a2d48daa6
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Richard Raya
8f25c15578 Revert "soc: qcom: watchdog_v2: Optimize IPI pings to reduce system jitter"
This reverts commit f1786dc2072e9343706e84c5935d156766114c23.

Change-Id: I2c90d025a74f260848e0edc6d31035a282e146e2
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Richard Raya
d414205a86 defconfig: Revert filesystem changes
Change-Id: I2d45fcbf01cc02fe6b71cddecebf74371ab10147
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Fiqri Ardyansyah
054fd0c302 msm: camera: Fix potential buffer overflows
This fixes the -Wfortify-source warning detected on Clang 18.0.0.

../drivers/media/platform/msm/camera/cam_utils/cam_io_util.c:270:4: warning: 'snprintf' will always be truncated; specified size is 12, but format string expands to at least 13 [-Wfortify-source]
  270 |                         snprintf(p_str, 12, "0x%08x: ",
      |                         ^
../drivers/media/platform/msm/camera/cam_utils/cam_io_util.c:275:3: warning: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 11 [-Wfortify-source]
  275 |                 snprintf(p_str, 10, "%08x  ", data);
      |                 ^
../drivers/media/platform/msm/camera/cam_sensor_module/cam_csiphy/cam_csiphy_soc.c:46:4: warning: 'snprintf' will always be truncated; specified size is 12, but format string expands to at least 13 [-Wfortify-source]
   46 |                         snprintf(p_str, 12, "0x%08x: ",
      |                         ^
../drivers/media/platform/msm/camera/cam_sensor_module/cam_csiphy/cam_csiphy_soc.c:51:3: warning: 'snprintf' will always be truncated; specified size is 9, but format string expands to at least 10 [-Wfortify-source]
   51 |                 snprintf(p_str, 9, "%08x ", data);
      |                 ^

Change-Id: Ie444da3af1456d5ca5dc8230768bf172a3ac6ed3
Signed-off-by: Fiqri Ardyansyah <fiqri0927936@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Richard Raya
9a71482a14 Makefile: Rework compiler optimization flags
Change-Id: I7f9851f1c7cc636bc57c3c995733278fc99b1c30
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
John Galt
f4855d37f8 Makefile: Enable machine function split
Change-Id: I74722d41524a0c05141b18ef0d63a1c81e26ae9d
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
John Galt
91f38cd16b Makefile: Utilize unified ThinLTO
Small output size increase and build time increase due to additional vectorization and unrolling

Change-Id: I9b7ad449f7067342fae674a1d8b8efce51d3786c
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
EmanuelCN
ed4d1aba93 Makefile: Use all threads for ThinLTO
Inspired from 0b171aea26

Change-Id: Ia79ab4969a85f6e157c905f12e4a6d7897a21259
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Tashfin Shakeer Rhythm
f0cba8a62b Makefile: Remove overriding of the same flags to LDFLAGS
KBUILD_LDFLAGS and LDFLAGS are the same Makefile variables.
And LDFLAGS was renamed to KBUILD_LDFLAGS in upstream.
Therefore, both of them do the same work, means they both
pass the flags exactly the same to the linker. Therefore,
drop the deprecated variable's usage and the flags that were
passed using it.

Change-Id: I94bfce9681e62b186682c4726cf96854b8c445bb
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Danny Lin
385c62c99f Makefile: Set --lto-O3 LLD linker flag when building with clang LTO
[Tashar02: Add the flags in a CONFIG_LTO_CLANG and don't use cc-name, use just -O3 if not using clang LTO]

Change-Id: I012ddb58dc56881160f8fc7488400b3f4a1dbe52
Co-authored-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Alexander Winkowski
6221af34e6 Makefile: Allow compiler to eliminate useless NULL pointer checks
If any code doesn't work with this optimisation, then it's the
code that should be fixed. One such example is commit 6bf676723ab2a6ade05feb2cd0b5073930f72d7e
("Staging: agnx: Move a dereference below a NULL test").

Change-Id: Idc132837d7173a00dd041af08c4f5ae624d3aae9
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Nathan Chancellor
acc54136de Makefile: Remove '-mno-global-merge'
This flag is specific to clang, where it is only used by the 32-bit and
64-bit ARM backends. In certain situations, the presence of this flag
will cause a warning, as shown by commit 6580c5c18fb3 ("um: clang: Strip
out -mno-global-merge from USER_CFLAGS").

Since commit 61163efae020 ("kbuild: LLVMLinux: Add Kbuild support for
building kernel with Clang") that added this flag back in 2014, there
have been quite a few changes to the GlobalMerge pass in LLVM. Building
several different ARCH=arm and ARCH=arm64 configurations with LLVM 11
(minimum) and 15 (current main version) with this flag removed (i.e.,
with the default of '-mglobal-merge') reveals no modpost warnings, so it
is likely that the issue noted in the comment is no longer relevant due
to changes in LLVM or modpost, meaning this flag can be removed.

If any new warnings show up that are a result of the removal of this
flag, it can be added back under arch/arm{,64}/Makefile to avoid
warnings on other architectures.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: David Gow <davidgow@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Change-Id: Ice39a960619319828b83c8091798fe383395a2b0
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
EmanuelCN
7b67f03fdd Makefile: Increase LTO instr limit to 40
Change-Id: I7a383ce64fe7778c5fbca86101c85b140e5434e3
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Sami Tolvanen
c72a286a63 Makefile: Limit LTO inlining
This change limits function inlining across translation unit boundaries
in order to reduce the binary size with LTO. The -import-instr-limit
flag defines a size limit, as the number of LLVM IR instructions, for
importing functions from other TUs, defaulting to 100.

Based on testing with arm64 defconfig, we found that a limit of 5 is a
reasonable compromise between performance and binary size, reducing the
size of a stripped vmlinux by 11%.

Suggested-by: George Burgess IV <gbiv@google.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20201211184633.3213045-5-samitolvanen@google.com
Change-Id: I1e4694636d2b39a2f9d541a0c7cfd0e5e3de4d3a
Signed-off-by: Divyanshu-Modi <divyan.m05@gmail.com>
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Richard Raya
4e0f1e5166 Makefile: Disable regalloc advisor
Change-Id: I5dae3e0ff340ec6650196ead42afaeaffd04e225
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Richard Raya
34331a1f71 build.sh: Sync Neutron clang version 18.0.0
Change-Id: Iaedc953706f6033ec4880f3773a93466bd78d2cc
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:46 -03:00
Richard Raya
2a888d5292 f2fs: Update congestion timeout for 250Hz
Change-Id: I2b2208705f5eebb7a2fc4af8e1941cabb241b09f
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:04:07 -03:00
Richard Raya
1695ed419b defconfig: Switch to 250Hz scheduler tick rate
Change-Id: I5a272b4c308d3258b9491bd2dcf8ca8a8ac33582
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:04:07 -03:00
Richard Raya
4043298f9a defconfig: Disable MGLRU
Change-Id: Ie1a5efd870ea5bb6142ff30e9bd3d5d8bc320e12
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:04:06 -03:00
Richard Raya
5e9ae9564b defconfig: Disable DAMON
Change-Id: I199c12d14fca974a92779d677dafe27981ca37af
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:04:06 -03:00
Richard Raya
dd6b4657ab defconfig: Bump CPU input boost
Change-Id: I72643abe944d476e195d5fce6bf44c39448a5fa8
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:45 -03:00
Richard Raya
00788611eb defconfig: Bump devfreq CPUBW boost
Change-Id: Id6e6abc840aca3914f5a5fba72cc1f22b9a0a5da
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:45 -03:00
Richard Raya
8f99654e62 defconfig: Bump boost durations to 100ms
Change-Id: I15bc0cffa7427c5f3cbbf160cf313c26e071c223
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:45 -03:00
Richard Raya
1683bf779b defconfig: Enable thermal limits DCVS
Change-Id: I7229679f224a4699be820e214d855967056e4053
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:45 -03:00
Richard Raya
8266652dd0 Revert "ARM64/dts: sdmmagpie-thermal: Switch to user_space governor"
This reverts commit 3dc59ee906e2b005ff5a547ede72a9a7095046c0.

Change-Id: Ic95d637254af23ffaa4157d5f11716f465a3d09b
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:45 -03:00
Yaroslav Furman
5de5097f2c thermal: cpu_cooling: Fix a throttling bug
Without this change throttling would get stuck in enabled state forever.
This leads to a regression in Geekbench 5 single-core score
from 760 to 620 on 2-3 run, forever.

Change-Id: I3aadc768d84f1be61f10e5ba53069d115a267ff7
Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:45 -03:00
Yaroslav Furman
cd8e6ad89c thermal: cpu_cooling: Simplify cpu_limits_set_level
Change-Id: I802cd25298f98e4731b667b2db87895e1091de21
Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-09 00:01:45 -03:00