Commit Graph

25 Commits

Author SHA1 Message Date
song.han 7629ed7270 lockup: fix fiq dump crash [1/1]
PD#SWPL-175587

Problem:
arm64 aml_flush_cache_all will corrupt some regs

Solution:
save and restore corrupted registers in flush cache

Verify:
S7D

Change-Id: I6e9d7edc4643fa340c592806f725d37666a0b8a6
Signed-off-by: song.han <song.han@amlogic.com>
2024-07-08 04:03:17 -07:00
qiankun.wang 09e6c2d717 arm64: traps: delete the do_undefinstr hook. [1/1]
PD#SWPL-160370

Problem:
Native functions optimize the user_fault
processing process.

Solution:
delete the vendor hook function.

Verify:
sc2

Change-Id: Ie3f3661511313d2ab98da9826dd717e0e730adee
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2024-03-22 00:12:56 -07:00
song.han 76e8391454 iotrace: module init_layout and data structure [1/1]
PD#SWPL-158475

Problem:
delete module layout base function
synchronous release module init layout
modify iotrace data struct

Solution:
as above

Verify:
sc2_ah212

Change-Id: Ifb186f768a4427f32f32625c4df86cd286dc30c5
Signed-off-by: song.han <song.han@amlogic.com>
2024-03-11 02:57:39 -08:00
qiankun.wang 89a73decb1 iotrace: iotrace vendor hooks and optimization [2/2]
PD#SWPL-142603

Problem:
iotrace read/write use vendor hooks.
iotrace optimization

Solution:
iotrace read/write use vendor hooks.
iotrace optimization

Verify:
sc2_ah212

Change-Id: If69ed5dce03ffa53f1c4819659fb80dfcad767c5
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2024-01-25 22:27:19 -07:00
Lei Zhang 8594f23db1 debug: optimize registers and pfn dump [1/1]
PD#SWPL-144211

Problem:
n/a

Solution:
1 not dump registers and pfn when warning
2 enable user fault dump
3 enable pfn pagetrace dump

Verify:
on SC2

Change-Id: Id0329bde1dd2d91fc818c12cd502796c3cdf123d
Signed-off-by: Lei Zhang <lei.zhang@amlogic.com>
2023-12-14 22:31:07 -07:00
song.han 18fc618fcb debug: lockup and panic flow optimize [1/1]
PD#SWPL-144359

Problem:
add debug feature

Solution:
show sysrq't' when rcu stall panic
fiq dump other cpu stack when hardlockup panic
improve watchdog panic notifier priority
disable watchdog when set panic_print

Verify:
s4

Change-Id: I6af43456105a3cf802d54608d62cbb25d327a73e
Signed-off-by: song.han <song.han@amlogic.com>
2023-11-03 04:15:36 -07:00
qiankun.wang afcf37f44f arm64: traps: optimize do_undefinstr print [1/1]
PD#SWPL-136432

Problem:
Native code will perform the 'BUG_ON' process,
and the log isn't favorable for debug.

Solution:
add the vendor hook function to perform the
'show_regs' and 'panic'.

Verify:
T3

Change-Id: I7a0f2c10b5db8ed10207d1fcbc7cc214054c7ae3
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-09-17 22:49:00 -07:00
dongqing.li 26df3302ed ramdump: ker5.15 flush cache all when kernel panic. [1/1]
PD#SWPL-137107

Problem:
The data in the ramdump crash file is abnormal
because the cache data has not been flushed back.

Solution:
1. Use ipi_stop hook to flush online cpu cache.
2. Use panic_notifier to flush panic cpu cache.

Verify:
sc2_ah212

Change-Id: Ifad5bd4203fdde327b8c2b19357aa2d92586063f
Signed-off-by: dongqing.li <dongqing.li@amlogic.com>
2023-08-30 06:18:47 -07:00
qiankun.wang f5412875b9 secmon: modify the wrong config [2/2]
PD#SWPL-135009

Problem:
The config 'CONFIG_AMLOGIC_SEC' has been
converted to CONFIG_AMLOGIC_SECMON.

Solution:
delete the config 'CONFIG_AMLOGIC_SEC',and
add the config 'CONFIG_AMLOGIC_SECMON'.

Verify:
SC2

Change-Id: I664ce36b86af24ff3e92adcf31f6149ecf381dcb
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-08-09 04:29:35 -07:00
song.han e7971b4f06 smc: do not disable preempt with noret smc [1/1]
PD#SWPL-133116

Problem:
noret smc no need to disable preempt

Solution:
do not disable preempt with noret smc

Verify:
s1a_bg209

Change-Id: I0e6faa45b19a4269fe24dc003cce34f816fc9083
Signed-off-by: song.han <song.han@amlogic.com>
2023-08-04 02:18:50 -07:00
Hanjie Lin b257fa1e5d debug: GKI20 clean [2/6]
PD#SWPL-132209

Problem:
GKI20 code clean

Solution:
1, clean irq_check function
2, clean smc_thr and psci smc
3, clean AMLOGIC_BGKI_DEBUG_IOTRACE
4, clean CONFIG_AMLOGIC_BGKI_DEBUG_MISC
5, restore trace_android_vh_ftrace_format_check
6, sched_show_task optimize
7, change cpupri_check_rt kretprobe to kprobe
8, iotrace dump use unbound workqueue

Verify:
sc2

Change-Id: Idcdf9010cfd960b80c493e58b3c81bec8468ac84
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-07-25 22:16:21 -07:00
Jianxiong Pan e61f35dc14 zapper: memory optimization about usb3, defconfig. [2/2]
PD#SWPL-126879

Problem:
memory optimization.

Solution:
disable usb3
delete useless config

Verify:
t215.

Change-Id: Ie23b7cd2e1ca96100a2534928293d8211917622a
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2023-07-05 21:03:06 -07:00
Lei Zhang 4eac904433 debug: optimize log print [1/1]
PD#SWPL-125874

Problem:
log print deranged when use pr_cont

Solution:
optimize log print

Verify:
on SC2

Change-Id: If71749e1cb88dd19836869b84d86327b86ef0b17
Signed-off-by: Lei Zhang <lei.zhang@amlogic.com>
2023-06-14 18:21:04 -07:00
qiankun.wang 73edbb1b97 debug: arm: fix compile error with --upgrade [1/1]
PD#SWPL-118595

Problem:
'./mk.sh --arch arm --upgrade', an error
occurred during compilation.

Solution:
add a header file and change the function
name.

Verify:
SC2

Change-Id: I660a1d196f4216f0fa48b8ce7c59f2874d7e1a92
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-05-21 19:02:52 -07:00
qiankun.wang 9cf5f36fb8 debug: support FIQ dump debugging when hard lockup. [1/1]
PD#SWPL-118595

Problem:
FIQ dump debugging when hard lockup
TV-60426

Solution:
Support FIQ dump debugging when hard lockup

Verify:
SC2

Change-Id: Ie68d4411e0f714cc04c657d9c5d625c4797cb7a2
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-05-06 01:35:15 -07:00
song.han f411bfdab1 iotrace: hook regmap r/w reg when iotrace ko [1/1]
PD#SWPL-119464

Problem:
when iotrace driver build to ko, it has some register r/w
operation not be hooked

Solution:
hook regmap r/w operation when iotrace build to ko

Verify:
SC2_AH212

Change-Id: I763b90fd91e76e5d4138db8ad1d2268c5b33e873
Signed-off-by: song.han <song.han@amlogic.com>
2023-05-03 22:52:30 -07:00
qiankun.wang c514cc75a9 watchdog: change the interface address [1/1]
PD#SWPL-121006

Problem:
The use of interface that actively triggers
HardLockup is too complex.

Solution:
The interface is 'sysrq-trigger', and in
/sys/kernel/debug/aml_debug/,you can echo
x to this parameter to panic.

Verify:
SC2

Change-Id: Ia49b08dbd9e2fe458d463e79e19cfc438b75b26f
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-04-27 02:51:01 -07:00
song.han 820797e318 iotrace: add ramoops_io_dump support [1/1]
PD#SWPL-119464

Problem:
add ramoops_io_dump support

Solution:
add ramoops_io_dump bootargs to support dump iotrace log

Verify:
SC2_AH212

Change-Id: Ie0eef9bf2cb269f82d2d01872d2515695666bb15
Signed-off-by: song.han <song.han@amlogic.com>
2023-04-25 06:28:18 -07:00
song.han 29925ebc8a debug: iotrace driver follow gki 2.0 [2/2]
PD#SWPL-109963

Problem:
iotrace driver need follow gki 2.0

Solution:
iotrace driver build to ko

Verify:
sc2_ah212

Change-Id: I472bc63b6594c58d7c94f74e1bf1a070978b20fd
Signed-off-by: song.han <song.han@amlogic.com>
2023-04-20 06:15:21 -07:00
qiankun.wang 15c95c9b2d trace: fix crash when open function_graph. [1/1]
PD#SWPL-114246

Problem:
The system crashs when echo function_graph >
current_tracer

Solution:
disable the function of "irq check" when enable
function_graph.

Verify:
SC2

Change-Id: I21247370b50550bce8d4551527a308b49e26b247
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-04-10 06:14:09 -07:00
Lei Zhang df6af177d8 iotrace: __nocfi when read/write register [1/1]
PD#SWPL-115907

Problem:
read/write register cost more time

Solution:
__nocfi when read/write register

Verify:
on SC2 ah212

Change-Id: Id2737b3037f8ee2d57e11fbd195e853fe7c0541f
Signed-off-by: Lei Zhang <lei.zhang@amlogic.com>
2023-03-30 02:13:31 -07:00
Hanjie Lin c2d1f7dd3c debug: optimize smc lockup check [1/1]
PD#SWPL-114679

Problem:
smc call can nest in interrupt, and it may cause wrong long smc
warning by mistake

Solution:
only check smc status in hardlockup

Verify:
sc2

Change-Id: I12f3135e2bd06637a107c4c476e25b79338e0f1c
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-03-17 02:12:34 -07:00
qiankun.wang 6273413c6d watchdog: change the interface address [1/1]
PD#SWPL-104071

Problem:
The interface that actively triggers
HardLockup is at an illegal address.

Solution:
The interface is 'params', and in
/sys/kernel/debug/aml_debug/,you can echo
sysrq=x to this parameter to panic.

Verify:
SC2

Change-Id: I7b8f784f0f0fc2a5674e3c7386e81f13d8ec6d6b
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-03-01 00:56:53 -08:00
Hanjie Lin caa8b668c5 debug: gki optimize [2/4]
PD#SWPL-99365

Problem:
gki optimize

Solution:
1, code optimize
2, watchdog_hld to ko

Verify:
sc2_ah212

Change-Id: Ibb1b16bd61d794defb39d53f17ad86179ba4a661
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2022-12-27 04:32:55 -08:00
qinglin.li aa9cc5449c debug: combine gki_tool and debug modules [1/1]
PD#SWPL-95684

Problem:
combine gki_tool and debug modules

Solution:
result:
	amlogic-debug.ko
original:
	amlogic-debug.ko
	amlogic-gkitool.ko

Verify:
sc2

Change-Id: I4257b8dca30871614d6ba7df6fd79e928045d5b6
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2022-11-05 12:07:06 +08:00