Commit Graph

59 Commits

Author SHA1 Message Date
Wanwei Jiang 4573701caa audio_utils: optimize exception handling [1/1]
PD#SWPL-123408

Problem:
reboot testing will result in kernel panic

Solution:
1. modify kmap_atomic to kmap and kumap_atomic to kunmap
2. optimize exception handling

Verify:
sc2

Change-Id: I37e043cedcf08191de6e5b86d516f24386cf8533
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-05-12 03:55:52 -07:00
Hanjie Lin 03454cd6d9 smp: add APU support [2/2]
PD#SWPL-119162

Problem:
APU should not be seen except audio

Solution:
add APU support

Verify:
t5m

Change-Id: I0c4267b362f3d0bf398484b2318c88bdf0b00588
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-05-08 02:30:25 -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
Wanwei Jiang 9b2038bba3 audio: exception handling and optimization log [1/1]
PD#SWPL-121815

Problem:
exception handling and optimization log

Solution:
exception handling and optimization log

Verify:
local

Change-Id: Ife94f13be53fd7791d9492f8272bda9576328407
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-04-28 14:48:52 -07:00
Jianxin Pan 11155146ab zapper: remove unused code of media module. [1/1]
PD#SWPL-116862

Problem:
media module memory optimization.

Solution:
disable the unused code for zapper.
reduce vmalloc used size from 17324k to 12556k.

Verify:
t215.

Test:
play video normally.

Change-Id: Iaa4c95c6641d76f80a11493c5c84f624cdac6424
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2023-04-27 21:24:07 -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
Jianxiong Pan fedeacaae5 kconfig: enable amlogic env debug. [1/1]
PD#SWPL-116862

Problem:
accidentally turned off the env debug config.

Solution:
enable amlogic env debug config.

Verify:
build pass.

Change-Id: I03d4e6fb79b0b6a8835f4d54b3d3b9b6f2664fd8
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2023-04-20 23:10:58 -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
Jianxin Pan e1710a5aa6 zapper: remove zapper unused. [1/1]
PD#SWPL-116862

Problem:
memory optimization for zapper.

Solution:
remove zapper unnecessary code in the media module.

Verify:
t215.

Change-Id: I835a52262ff8e68d744b051507ba9fdbd4b279d9
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
2023-04-19 03:15:57 -07:00
Dezhen Wang 40f4e2261e init: dump env/args if too many [1/2]
PD#SWPL-119265

Problem:
kernel will panic if too many boot args

Solution:
dump them for debug

Verify:
t7

Change-Id: Ib78ee8d997836f02df0d4f8092c87435d4b15e29
Signed-off-by: Dezhen Wang <dezhen.wang@amlogic.com>
2023-04-17 19:25:18 -07:00
Lei Zhang 5da53b86b7 softirq: not check if CPU has a RT task [1/1]
PD#SWPL-115695

Problem:
softirq be processed in ksoftirqd

Solution:
not check if CPU has a RT task

Verify:
on T3

Change-Id: I821f0bf6c32db8ccdfc752b60f50e703f95cdfb9
Signed-off-by: Lei Zhang <lei.zhang@amlogic.com>
2023-04-17 19:25:15 -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 eb313db403 watchdog: optimize hardlockup detect precision [1/1]
PD#SWPL-104071

Problem:
Hardlockup detect precision is from 8s to 24s and
too insufficient.

Solution:
Hardlockup detect precision is 9-11s.

Verify:
SC2

Change-Id: Ic035a3e8dafde891f2c428213c1c51a77adebed3
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-03-16 02:22:24 -07:00
Hanjie Lin db6c055628 sched: fix duplicate __pick_first_entity compile error [1/1]
PD#SWPL-106817

Problem:
drivers/debug/sched.c added __pick_first_entity()

Solution:
remove

Verify:
ah212

Change-Id: Iff8b56054da62f2a4698dd08570e4ccd5aa33ba7
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-03-03 04:17:37 -08: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
qinglin.li 101e177c32 gki_20: modify break gki_20 [2/3]
PD#SWPL-101048

Problem:
break GKI 2.0 configs add depends on CONFIG_AMLOGIC_BREAK_GKI_20

Solution:
break GKI 2.0 configs add depends on CONFIG_AMLOGIC_BREAK_GKI_20

Verify:
local

Change-Id: I31aa00603f41a734f881a77a932dbfbbfe1a7a81
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2023-02-28 06:10:46 -08:00
Hanjie Lin e33b2fcffb sched: fix common14-5.15 compile sched_stat_runtime error [1/1]
PD#SWPL-106817

Problem:
common14-5.15 didn't export trace_sched_stat_runtime

Solution:
remove it

Verify:
ah212

Change-Id: I59f5ee43dfaabc1e081772ef1fb8b543b121618e
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-02-27 00:04:37 -08:00
Hanjie Lin d1d550e8c9 sched: scheduler optimize [1/1]
PD#SWPL-106817

Problem:
scheduler profile

Solution:
1, check_preempt_wakeup avoid too frequently preempt
2, pick_next_task_fair try to find long-wait high prio task in big cgroup
3, add place_entity wakeup compensation factor
4, select rt more nice when curr is high prio cfs task

Verify:
aq222

Change-Id: I48324cae9aab49c5bc79a8979c6e88ec0b34f921
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-02-24 03:56:31 -08:00
Lei Zhang 5daeeae0b4 TRACE: add Kconfig dependence for meson atrace [1/1]
PD#SWPL-107451

Problem:
C3 build break

Solution:
add Kconfig dependedce for meson atrace

Verify:
on SC2

Change-Id: I66c2fcd589bb7c0909b19c96ebba73aede6e30d7
Signed-off-by: Lei Zhang <lei.zhang@amlogic.com>
2023-02-09 20:13:49 -08:00
Hanjie Lin ddbdcf7a92 TRACE: optimize meson_atrace function [1/1]
PD#SWPL-107451

Problem:
1, perfetto cannot parse meson_atrace event
2, trace_printk cannot work on release version

Solution:
1, change meson_atrace event to trace_print event
2, porting aml_trace_printk

Verify:
on S905X4 AH212

Change-Id: I2656544038113316dc1e756b3ff57edf33cc5c88
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-02-08 20:45:27 -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 e6fb1070ac printk: caller buffer use over size [1/1]
PD#SWPL-101578

Problem:
caller buffer use over size

Solution:
limit use size

Verify:
s4

Change-Id: I2631feb50f80d3b8242a98eed48d5a1e66620da5
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2022-12-05 21:08:14 -07:00
yufei.huan f070355da9 deinterlace: T3 Kernel 5.15 Android T Bringup - di [1/1]
PD#SWPL-97906

Problem:
T3 Kernel 5.15 Android T Bringup - di

Solution:
sync DI code

Verify:
smith

Change-Id: I590e2d71a453849d48207cccc3442e44da59c2da
Signed-off-by: yufei.huan <yufei.huan@amlogic.com>
2022-12-02 14:04:56 +08:00
qinglin.li e23e9bfc33 printk: use vendor_hook print cpu and irq info [2/3]
PD#SWPL-101578

Problem:
use vendor_hook print cpu and irq info

Solution:
use vendor_hook print cpu and irq info

Verify:
sc2

Change-Id: I52f0474ea55d4136933c0a2c12daf31eff4ab261
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2022-11-21 22:36:36 -07:00
Wanwei Jiang d2a7eeb0c6 audio_utils: media cts test crash [1/3]
PD#SWPL-100953

Problem:
media cts test crash

Solution:
1. change alloc_page flag from GFP_HIGHUSER_MOVABLE to GFP_HIGHUSER
2. add error log

Verify:
ohm

Change-Id: Ib9aefd17bdde01d6cbe99e4600bef089c80e7086
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2022-11-18 04:15:29 -07: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
Wanwei Jiang 0b2a96838a Revert "debug: add filp_open debug function [2/3]"
PD#SWPL-95914

Problem:
it's break gki

Solution:
Use other method to implement, so revert old method
This reverts commit 073082327a.

Change-Id: I93e8a56d6e6a354f3d2dd27029913b5c79b797fc
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2022-11-05 12:06:11 +08:00
Wanwei Jiang a7b4df563a utils: support amlogic utils driver [1/1]
PD#SWPL-95914

Problem:
support amlogic utils driver

Solution:
support amlogic utils driver

Verify:
sc2

Change-Id: I47c4dd46997e27380257c2bf31eeaa4a1755b17c
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2022-11-05 12:05:59 +08:00
Lei Zhang 0d49b6cfaf cpu: fix core0 cannot be offline in 32BIT kernel [2/2]
PD#SWPL-98876

Problem:
fix core0 cannot be offline in 32BIT kernel

Solution:
fix core0 cannot be offline in 32BIT kernel

Verify:
on s4_aq222

Signed-off-by: Lei Zhang <lei.zhang@amlogic.com>
Change-Id: I2964a883555622f415fb1c7f70ce9337a8debaee
2022-10-28 06:14:20 -07:00
qinglin.li fc5311d12a debugfile: fix delay time [1/1]
PD#SWPL-94401

Problem:
fix delay time

Solution:
fix delay time

Verify:
sc2

Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
Change-Id: Icac134a3f90f68d0bd814febd890e82ab6146ffd
2022-10-24 20:01:06 -07:00
qinglin.li a6e49c140c debug_file: optimize debugfile with poll [1/1]
PD#SWPL-94401

Problem:
repeat open file crash
read return error

Solution:
repeat open file wait file close
optimize read file poll

Verify:
sc2

Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
Change-Id: Iec70f2461d047f96ccbf80d9508c01ebb5092267
2022-10-24 00:25:58 -07:00
qinglin.li da04048d61 debugfile: build debugfile with module [1/1]
PD#SWPL-94401

Problem:
build debugfile with module
build with gki_10

Solution:
build debugfile with module

Verify:
sc2

Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
Change-Id: I8db0d7e81c93860cdd2ca8cbb5526e529d67da27
2022-10-19 02:18:01 -07:00
Hanjie Lin 908c1c3c19 debug: fix iotrace break gki issue [2/3]
PD#SWPL-94447

Problem:
iotrace break gki10

Solution:
modify iotrace still builtin but not break gki10
also enabled DEBUG_PRINTK

Verify:
sc2

Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
Change-Id: Iffc6a21f28de871b7289ca671c2c226c40e9a66a
2022-10-15 03:28:18 -07:00
Hanjie Lin e6d82ef16c debug: fix gki10 break issue [2/3]
PD#SWPL-94447

Problem:
debug break gki10

Solution:
1, support amlogic_debug build to module, amlogic_debug module
   includes debug_lockup, cpu_mhz and meson_atrace for now.
2, amlogic_debug some function still build in kernel but not break
   gki10, for example: irq_check function on builtin kernel code,
   module_debug, workqueue debug etc.
3, new config CONFIG_AMLOGIC_HARDLOCKUP_DETECTOR still builtin but
   not break gki.
4, other functions for example iotrace still under developing

Verify:
sc2

Signed-off-by: Hanje Lin <hanjie.lin@amlogic.com>
Change-Id: I9c11465e3e879f999ae6fd13dc12c044efd2417a
2022-10-14 16:53:03 -07:00
yao zhang1 37365df098 config: C3 Kernel size optimize. [1/1]
PD#SWPL-95000

Problem:
Kernel size is too big

Solution:
Remove some CONFIGs

Verify:
c3 pass

Signed-off-by: yao zhang1 <yao.zhang1@amlogic.com>
Change-Id: I13303e5e1e967961c6d1cc32a67465c423816276
Signed-off-by: yongbing.he <yongbing.he@amlogic.com>
2022-09-29 19:58:15 +08:00
song.han 5c1df2adb9 scrambler: enable scrambler func in normal reboot [2/2]
PD#SWPL-94581

Problem:
need disable ddr scrambler func for debug

Solution:
only enable scrambler func in normal reboot

Verify:
SC2_AH212

Signed-off-by: song.han <song.han@amlogic.com>
Change-Id: I17fcfcc4b0ef0df195c6464bd742b23758422dfc
2022-09-26 19:47:22 -07:00
song.han b7fc4f5f71 iotrace: add iotrace function [2/2]
PD#SWPL-92722

Problem:
iotrace miss function

Solution:
add function in iotrace driver,like smc/sched/clk/pw

Verify:
S4D_AP222

Change-Id: Ie59bac5863e5a4420b90d95a0ecae0bcb0584fb6
Signed-off-by: song.han <song.han@amlogic.com>
2022-09-22 22:54:00 -07:00
qinglin.li 63feb20c26 debug file: add debug file function [1/2]
PD#SWPL-88882

Problem:
kernel through to user space rw files

Solution:
add debug file function

Verify:
sc2

Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
Change-Id: Ia19a8b071fe63fbcd46ff1a2a8259274e40e805e
2022-09-07 20:06:43 +08:00
qinglin.li 073082327a debug: add filp_open debug function [2/3]
PD#SWPL-88149

Problem:
add filp_open debug function used to relabel

Solution:
add filp_open debug function

Verify:
sc2

Change-Id: Iba99f9008ad475d2666cd25fac2c188c49b4a2dc
2022-09-07 20:06:43 +08:00
qinglin.li 0afabe230c debug file: add debug file function [1/2]
PD#SWPL-88882

Problem:
kernel through to user space rw files

Solution:
add debug file function

Verify:
sc2

Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
Change-Id: I760ac112d21b2ba9d0a86f725771455627d8154f
2022-08-18 20:38:55 +08:00
qinglin.li 0549e5a81a printk: fix insert info crossinglen when lenth than log_line_max [2/2]
PD#SWPL-70486

Problem:
insert info crossinglen when lenth than log_line_max

Solution:
not insert info when lenth than log_line_max

Verify:
c3

Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
Change-Id: Ic9026546f3a0c5c28abfc564ab0b13b192c7e753
2022-07-25 08:53:11 -07:00
song.han 4cfbc0d9b6 debug: enable ddr scrambler key preserve [2/2]
PD#SWPL-88050

Problem:
ddr scrambler key refresh that cause lastk miss

Solution:
enable ddr scrambler key preserve when pstore init

Verify:
C3_AW419

Signed-off-by: song.han <song.han@amlogic.com>
Change-Id: I9076cae2b1533744d41eab8781f8b8a87831910e
2022-07-15 07:14:44 -07:00
song.han daaacc521f atrace: clean coverity error [1/1]
PD#SWPL-87152

Problem:
Coverity error

Solution:
modify code to clean error

Verify:
T5D_AM311

Signed-off-by: song.han <song.han@amlogic.com>
Change-Id: Ifb66b0366c2e87892a1e77b4198c7b5a97984da5
2022-07-11 22:50:03 -07:00
qinglin.li a871f99dc8 ddr_tool: Coverity Errors [1/1]
PD#SWPL-87155

Problem:
Coverity Errors

Solution:
Coverity Errors

Verify:
c2

Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
Change-Id: Id1c3146de17f00338105199b4d85ac6047864eb2
2022-07-07 16:22:51 +08:00
Hanjie Lin 6b683804bc debug_lockup: pr_lockup_info optimize [1/1]
PD#SWPL-71728

Problem:
pr_lockup_info optimize

Solution:
pr_lockup_info optimize

Verify:
s4

Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
Change-Id: I360c2d6d96cd378d2434b5f683625f1f7c8437b1
2022-03-11 04:15:57 -07:00
qinglin.li 99e0de0d10 printk: fix printk length and count Re-add [2/2]
PD#SWPL-70486

Problem:
printk length and count Re-add

Solution:
fix printk length and count Re-add

Verify:
c2

Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
Change-Id: I5ca8b883b4dc931c4d3d61381793fb1917247d23
2022-03-11 01:31:49 -07:00