Sultan Alsawaf
7a02051d8c
soc/google/cpif: Don't pin workers onto CPU2
...
There's no reason to pin workers onto CPU2. Instead, allow the workers to
run where the workqueue sees fit, most likely on the CPU which enqueues the
worker, which is better than always dumping the workers onto CPU2.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2025-01-23 19:49:06 +01:00
Ksawlii
c8aa677b57
Revert "drivers: soc: samsung: acpm: disable lto"
...
This reverts commit 3a31abaa32
.
2025-01-22 20:36:33 +01:00
Ksawlii
6dd26e10cb
Revert "drivers: cal-if: fix build without CONFIG_CMUCAL_DEBUG"
...
This reverts commit 2d84789050
.
2025-01-22 20:36:26 +01:00
Sultan Alsawaf
f5e2e1c94e
acpm_dvfs: Remove sched_clock() calls
...
Calling the architected timer adds nontrivial overhead as observed in perf
top, especially since the DVFS functions are hot paths.
Remove all of the sched_clock() calls since they're unneeded by ACPM.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2025-01-22 12:05:44 +01:00
Nahuel Gómez
a5f833d5c7
cal-if: acpm_dvfs: guard secdbg_freq_check usage
...
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2025-01-22 12:05:26 +01:00
xxmustafacooTR
3a31abaa32
drivers: soc: samsung: acpm: disable lto
2025-01-22 10:51:10 +01:00
Nahuel Gómez
2d84789050
drivers: cal-if: fix build without CONFIG_CMUCAL_DEBUG
...
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2025-01-22 10:49:20 +01:00
Nahuel Gómez
4d8a45c523
Revert "drivers: soc: samsung: acpm: disable lto"
...
This was applied to fix a suspected reboot issue, but it turns out this was not the source of it.
This reverts commit ed828ec374bbd9f3a538a0c92421e9e0074b078f.
2025-01-21 21:30:36 +01:00
Nahuel Gómez
f8342c269f
fvmap: remove G3D undervolting
...
As can be seen in the device-tree, this domain is unused for our device:
devfreq_g3d {
dm-index = <0x08>;
available = "false";
cal_id = <0xb040008>;
dm_type_name = "dm_gpu";
};
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2025-01-21 21:19:39 +01:00
Nahuel Gómez
f4634f8802
fvmap: move undervolting settings to Kconfig
...
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2025-01-15 16:40:04 +01:00
Ksawlii
40426ac858
drivers: fvmap.c: Deprecate voltage_offset
...
Forgot to nuke this dangerous shit, anyways moved undervolt to Kconfig (Thanks @Flopster101) so it can be controlled in defconfig without issues
2025-01-15 16:39:06 +01:00
78cce1edd9
drivers: samsung: exynos-cpupm.c: Fully nuke cpupm_debug
2024-12-18 18:43:43 +01:00
94813c91ed
drivers: samsung: exynos-cpupm.c: Fully nuke cpupm_debug_info
2024-12-18 18:41:51 +01:00
8e2888567b
drivers: samsung: exynos-cpupm.c: Add #ifdef CONFIG__EXYNOS_DEBUG_INFO
2024-12-18 18:38:09 +01:00
041f237b67
drivers: samsung: exynos-cpupm.c: Switch from sched_clock to ktime_get
2024-12-18 18:32:21 +01:00
ae83e3b222
drivers: samsung: exynos-cpupm.c: Switch from cpu_clock to sched_clock
2024-12-18 18:31:07 +01:00
146859f714
drivers: samsung: exynos-cpupm.c: Switch from local_clock to ktime_get_ns
2024-12-18 18:30:28 +01:00
4780062b8a
drivers: samsung: exynos-ehld.c: Nuke ehld->sjtag_en = dbg_snapshot_get_sjtag_status();
2024-12-18 18:27:27 +01:00
87f1a878dc
drivers: samsung: exynos-adv-tracer.c: Switch from local_clock to ktime_get_ns
2024-12-18 18:24:34 +01:00
Samuel Pascua
04ff6cbc91
drivers: soc: acpm: Prevent optimization of 'acpm_initdata'
...
More optimization issues when compiling with Clang. Panics happen when the device goes into standby with the following report.
<6>[ 1470.900859] [0: Binder:4157_2: 8735] EXYNOS-PM:: MIF down. cur_count: 5, acc_count: 5
<6>[ 1470.900859] [0: Binder:4157_2: 8735] EXYNOS-PM:: MIF_UP history:
<6>[ 1470.900859] [0: Binder:4157_2: 8735] EXYNOS-PM: mifuser: 0x540000, time: 5:35:40, latency: 1955[usec]
<6>[ 1470.900859] [0: Binder:4157_2: 8735] EXYNOS-PM: mifuser: 0x400000, time: 5:35:40, latency: 1956[usec]
<6>[ 1470.900859] [0: Binder:4157_2: 8735] EXYNOS-PM: mifuser: 0x100000, time: 5:35:41, latency: 1954[usec]
<6>[ 1470.900859] [0: Binder:4157_2: 8735] EXYNOS-PM: mifuser: 0x400000, time: 5:35:41, latency: 1955[usec]
<6>[ 1470.900859] [0: Binder:4157_2: 8735] EXYNOS-PM: mifuser: 0x100000, time: 5:35:41, latency: 1955[usec]
<0>[ 1470.900859] [0: Binder:4157_2: 8735] Unable to handle kernel paging request at virtual address ffffff800b346f9c
<2>[ 1470.900859] [0: Binder:4157_2: 8735] sec_debug_set_extra_info_fault = KERN / 0xffffff800b346f9c
<1>[ 1470.900859] [0: Binder:4157_2: 8735] Mem abort info:
<1>[ 1470.900859] [0: Binder:4157_2: 8735] Exception class = DABT (current EL), IL = 32 bits
<1>[ 1470.900859] [0: Binder:4157_2: 8735] SET = 0, FnV = 0
<1>[ 1470.900859] [0: Binder:4157_2: 8735] EA = 0, S1PTW = 0
<1>[ 1470.900859] [0: Binder:4157_2: 8735] Data abort info:
<1>[ 1470.900859] [0: Binder:4157_2: 8735] ISV = 0, ISS = 0x00000061
<1>[ 1470.900859] [0: Binder:4157_2: 8735] CM = 0, WnR = 1
<1>[ 1470.900859] [0: Binder:4157_2: 8735] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff800a66a000
<1>[ 1470.900859] [0: Binder:4157_2: 8735] [ffffff800b346f9c] *pgd=000000097cdfe003, *pud=000000097cdfe003, *pmd=00000009740b7003, *pte=00e800000203f707
<0>[ 1470.900859] [0: Binder:4157_2: 8735] Internal error: Oops: 96000061 [#1 ] PREEMPT SMP
<4>[ 1470.900859] [0: Binder:4157_2: 8735] Modules linked in:
<0>[ 1470.900859] [0: Binder:4157_2: 8735] Process Binder:4157_2 (pid: 8735, stack limit = 0xffffff8039708000)
<0>[ 1470.900859] [0: Binder:4157_2: 8735] debug-snapshot: core register saved(CPU:0)
<0>[ 1470.900859] [0: Binder:4157_2: 8735] L2ECTLR_EL1: 0000000000000007
<0>[ 1470.900859] [0: Binder:4157_2: 8735] L2ECTLR_EL1 valid_bit(30) is NOT set (0x0)
<0>[ 1470.900859] [0: Binder:4157_2: 8735] CPUMERRSR: 0000000008000001, L2MERRSR: 0000000010200c00
<0>[ 1470.900859] [0: Binder:4157_2: 8735] CPUMERRSR valid_bit(31) is NOT set (0x0)
<0>[ 1470.900859] [0: Binder:4157_2: 8735] L2MERRSR valid_bit(31) is NOT set (0x0)
<0>[ 1470.900859] [0: Binder:4157_2: 8735] debug-snapshot: context saved(CPU:0)
<6>[ 1470.900859] [0: Binder:4157_2: 8735] debug-snapshot: item - log_kevents is disabled
<6>[ 1470.900859] [0: Binder:4157_2: 8735] TIF_FOREIGN_FPSTATE: 1, FP/SIMD depth 0, cpu: 0
<4>[ 1470.900859] [0: Binder:4157_2: 8735] CPU: 0 PID: 8735 Comm: Binder:4157_2 Not tainted 4.14.113 - Fresh Core-user #1
<4>[ 1470.900859] [0: Binder:4157_2: 8735] Hardware name: Samsung A50 LTN OPEN rev04 board based on Exynos9610 (DT)
<4>[ 1470.900859] [0: Binder:4157_2: 8735] task: ffffffc0466d6000 task.stack: ffffff8039708000
<4>[ 1470.900859] [0: Binder:4157_2: 8735] PC is at acpm_get_inform+0x90/0x100
<4>[ 1470.900859] [0: Binder:4157_2: 8735] LR is at acpm_get_inform+0x7c/0x100
<4>[ 1470.900859] [0: Binder:4157_2: 8735] pc : [<ffffff8008505cd4>] lr : [<ffffff8008505cc0>] pstate: 604001c5
<4>[ 1470.900859] [0: Binder:4157_2: 8735] sp : ffffff803970bac0
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x29: ffffff803970bac0 x28: ffffffc0466d6000
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x27: ffffff8008e44b64 x26: ffffff8008e44b3e
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x25: ffffff8009e5f210 x24: 0000000010624dd3
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x23: 0000000000000029 x22: 0000000000000018
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x21: ffffff8009e2c000 x20: ffffff8008ef6785
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x19: ffffff8008ef674c x18: 00000000000000a0
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x17: ffffff8009b3023c x16: 0000000000000001
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x15: ffffff8008c8a964 x14: 202c303030303031
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x13: 7830203a72657375 x12: 0000000000000000
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x11: 0000000000000000 x10: ffffffffffffffff
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x9 : ffffff800b346f00 x8 : ffffff800b346f00
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x7 : 203a79636e657461 x6 : ffffff80f615273c
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x5 : 000000000000221f x4 : 000000000000000c
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x3 : 000000000000000a x2 : 0000000000000000
<4>[ 1470.900859] [0: Binder:4157_2: 8735] x1 : 00000000000001c0 x0 : 0000000000000041
Similar solution as d855e6f. Make the structs volatile to prevent optimization.
Signed-off-by: John Vincent <git@tensevntysevn.cf>
Signed-off-by: Samuel Pascua <sgpascua@ngcp.ph>
2024-12-18 15:02:50 +01:00
xxmustafacooTR
5843cd8543
drivers: soc: samsung: acpm: disable lto
2024-12-18 15:02:45 +01:00
xxmustafacooTR
9ca91577b1
fvmap: optimize voltages
2024-12-18 15:02:40 +01:00
Redick Lin
70c79241d2
soc: samsung: acpm: extend the timeout for acpm ipc retry
...
Extend it from 15ms to 200ms
Bug: 172883429
Change-Id: I39e8e860dfeaa4d1d3b702f06dca51dd01bc8367
Signed-off-by: Redick Lin <redicklin@google.com>
2024-12-18 15:02:36 +01:00
Nahuel Gómez
e52d6db0bf
fvmap: set undervolt to -4%
...
This should be more stable for all users.
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 19:42:15 +01:00
John Vincent
77940d8531
drivers: soc: cal-if: Prevent optimization of structs on fvmap_copy_from_sram
...
Newer versions of Clang tend to apply heavier optimizations than GCC, especially if -mcpu is set. Because we are applying optimizations to the LITTLE core (see b92e1e70898f515646142736df8d72c43e97e251) kernel panics during boot, citing inability to access memory regions on fvmap_init.
<6>[ 0.664609] [0: swapper/0: 1] fvmap_init:fvmap initialize 0000000000000000
<0>[ 0.664625] [0: swapper/0: 1] Unable to handle kernel paging request at virtual address ffffff800b2f2402
<2>[ 0.664640] [0: swapper/0: 1] sec_debug_set_extra_info_fault = KERN / 0xffffff800b2f2402
<6>[ 0.664657] [0: swapper/0: 1] search_item_by_key: (FTYPE) extra_info is not ready
<2>[ 0.664666] [0: swapper/0: 1] set_item_val: fail to find FTYPE
<6>[ 0.664680] [0: swapper/0: 1] search_item_by_key: (FAULT) extra_info is not ready
<2>[ 0.664688] [0: swapper/0: 1] set_item_val: fail to find FAULT
<6>[ 0.664702] [0: swapper/0: 1] search_item_by_key: (PC) extra_info is not ready
<2>[ 0.664710] [0: swapper/0: 1] set_item_val: fail to find PC
<6>[ 0.664724] [0: swapper/0: 1] search_item_by_key: (LR) extra_info is not ready
<2>[ 0.664732] [0: swapper/0: 1] set_item_val: fail to find LR
<1>[ 0.664746] [0: swapper/0: 1] Mem abort info:
<1>[ 0.664760] [0: swapper/0: 1] Exception class = DABT (current EL), IL = 32 bits
<1>[ 0.664774] [0: swapper/0: 1] SET = 0, FnV = 0
<1>[ 0.664787] [0: swapper/0: 1] EA = 0, S1PTW = 0
<1>[ 0.664799] [0: swapper/0: 1] Data abort info:
<1>[ 0.664814] [0: swapper/0: 1] ISV = 0, ISS = 0x00000021
<1>[ 0.664828] [0: swapper/0: 1] CM = 0, WnR = 0
<1>[ 0.664842] [0: swapper/0: 1] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff800a739000
<1>[ 0.664856] [0: swapper/0: 1] [ffffff800b2f2402] *pgd=000000097cdfe003, *pud=000000097cdfe003, *pmd=00000009742a9003, *pte=00e800000204b707
<0>[ 0.664884] [0: swapper/0: 1] Internal error: Oops: 96000021 [#1 ] PREEMPT SMP
<4>[ 0.664899] [0: swapper/0: 1] Modules linked in:
<0>[ 0.664916] [0: swapper/0: 1] Process swapper/0 (pid: 1, stack limit = 0xffffff80081a8000)
<0>[ 0.664936] [0: swapper/0: 1] debug-snapshot: core register saved(CPU:0)
<0>[ 0.664950] [0: swapper/0: 1] L2ECTLR_EL1: 0000000000000007
<0>[ 0.664959] [0: swapper/0: 1] L2ECTLR_EL1 valid_bit(30) is NOT set (0x0)
<0>[ 0.664978] [0: swapper/0: 1] CPUMERRSR: 0000000008000001, L2MERRSR: 0000000010200c00
<0>[ 0.664992] [0: swapper/0: 1] CPUMERRSR valid_bit(31) is NOT set (0x0)
<0>[ 0.665006] [0: swapper/0: 1] L2MERRSR valid_bit(31) is NOT set (0x0)
<0>[ 0.665020] [0: swapper/0: 1] debug-snapshot: context saved(CPU:0)
<6>[ 0.665088] [0: swapper/0: 1] debug-snapshot: item - log_kevents is disabled
<6>[ 0.665112] [0: swapper/0: 1] TIF_FOREIGN_FPSTATE: 0, FP/SIMD depth 0, cpu: 0
<4>[ 0.665130] [0: swapper/0: 1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.113 - Fresh Core-user #1
<4>[ 0.665144] [0: swapper/0: 1] Hardware name: Samsung A50 LTN OPEN rev04 board based on Exynos9610 (DT)
<4>[ 0.665160] [0: swapper/0: 1] task: ffffffc8f4ce8000 task.stack: ffffff80081a8000
<4>[ 0.665180] [0: swapper/0: 1] PC is at fvmap_init+0xac/0x2c8
<4>[ 0.665195] [0: swapper/0: 1] LR is at fvmap_init+0x70/0x2c8
<4>[ 0.665211] [0: swapper/0: 1] pc : [<ffffff80085e12b8>] lr : [<ffffff80085e127c>] pstate: 20400145
<4>[ 0.665225] [0: swapper/0: 1] sp : ffffff80081abb80
<4>[ 0.665238] [0: swapper/0: 1] x29: ffffff80081abbb0 x28: 0000000000000000
<4>[ 0.665256] [0: swapper/0: 1] x27: ffffff8009efc000 x26: 0000000000000000
<4>[ 0.665273] [0: swapper/0: 1] x25: ffffff800b2e5970 x24: ffffff8008fa7222
<4>[ 0.665291] [0: swapper/0: 1] x23: ffffff800b2e5a60 x22: ffffff8009efb000
<4>[ 0.665307] [0: swapper/0: 1] x21: ffffffc8f3480000 x20: ffffff800b2e0000
<4>[ 0.665324] [0: swapper/0: 1] x19: ffffff800b2f2400 x18: 0000000000000000
<4>[ 0.665341] [0: swapper/0: 1] x17: ffffff8009bff23c x16: 0000000000000000
<4>[ 0.665358] [0: swapper/0: 1] x15: 00000000000000c6 x14: 0000000000000054
<4>[ 0.665375] [0: swapper/0: 1] x13: 000000000000d7b8 x12: 0000000000000000
<4>[ 0.665392] [0: swapper/0: 1] x11: 0000000000000000 x10: ffffffc8f3480000
<4>[ 0.665409] [0: swapper/0: 1] x9 : ffffff800b2f2400 x8 : 0000000000000000
<4>[ 0.665426] [0: swapper/0: 1] x7 : 5b20205d39303634 x6 : ffffffc0117d09b7
<4>[ 0.665443] [0: swapper/0: 1] x5 : 0000000000000001 x4 : 000000000000000c
<4>[ 0.665459] [0: swapper/0: 1] x3 : 0000000000000a30 x2 : ffffffffffffffce
<4>[ 0.665476] [0: swapper/0: 1] x1 : 000000000b040000 x0 : 000000000000000a
Since we need these optimizations for performance reasons, the only way to resolve this is to solve the issue. Samsung already did something similar to cal-if before.
We only needed to make fvmap_header/header volatile and has been tested to work.
Signed-off-by: John Vincent <git@tensevntysevn.cf>
Change-Id: Ic419135d4a80cbe15f0fa71dc59cc6efa73d6141
2024-11-17 23:41:29 +01:00
Sultan Alsawaf
6007c2066e
soc/samsung/cpif: Silence PCI doorbell interrupt log spam
...
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-11-17 17:45:02 +01:00
Sultan Alsawaf
ee1e7f7173
soc/samsung/cpif: Don't affine IRQs when SBalance is enabled
...
Let SBalance handle IRQ affinities when it's enabled for better efficiency
and performance.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-11-17 17:44:58 +01:00
Sultan Alsawaf
5d8a1bc838
exynos_pm_qos: Remove exynos_pm_qos_update_request_timeout()
...
The possibility of a timeout being used with a PM QoS request incurs
overhead for *all* PM QoS requests due to the necessary calls to
cancel_delayed_work_sync().
Furthermore, using a timeout for a PM QoS request can lead to disastrous
results on power consumption. It's always possible to find a fixed scope in
which a PM QoS request should be applied, so timeouts aren't ever strictly
needed; they're usually just a lazy way of using PM QoS.
Remove the timeout API to eliminate the added overhead for non-timeout PM
QoS requests, and so that timeouts cannot be misused.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-11-17 17:44:09 +01:00
Diep Quynh
e9ed6faf2c
acpm: Disable logging by default
...
Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
2024-11-17 17:43:06 +01:00
Gabriel2392
f35c27aba8
s5e8825: Tuning
2024-10-17 12:50:20 -03:00
Gabriel2392
9721b7ac13
treewide: Fix build errors with clang18
2024-06-15 16:28:49 -03:00
Gabriel2392
2de2633674
gpu: exynos: don't read dvfs table from dtb
...
-> Hardcode in kernel module
-> Unlock all frequencies up to 1.2GHz
Signed-off-by: Gabriel2392 <gabriel824m@gmail.com>
2024-06-15 16:28:49 -03:00
Gabriel2392
a839ab2b13
drivers: itmon: Fix error
2024-06-15 16:28:49 -03:00
roynatech2544
c8fe547dae
soc/samsung: Fix strict prototypes
2024-06-15 16:28:48 -03:00
Gabriel2392
7ed7ee9edf
Import A536BXXU9EXDC
2024-06-15 16:02:09 -03:00