Commit Graph

99 Commits

Author SHA1 Message Date
qiankun.wang ea49ee09c0 debug: optimize module_param nodes. [1/1]
PD#SWPL-109963

Problem:
All module_param nodes are deleted in kernel_6.6.

Solution:
Commit the nodes that need to be used.

Verify:
SC2

Change-Id: I3a43fd622e983cf6429e8d94edb6b020c0618f08
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2024-02-01 07:51:39 -07:00
qiankun.wang 39148c4643 iotrace: iotrace vendor hooks and optimization [1/1]
PD#SWPL-149337

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-29 04:02:16 -07:00
Wanwei Jiang ba45b5379c kernel: upgrade on 20240122 [1/1]
PD#SWPL-155082

Problem:
upgrade on 20240122

Solution:
upgrade on 20240122

Verify:
a4/a5 sc2

Change-Id: Ic1a3a420615107dec3847c7cc3a84d324c248844
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2024-01-22 19:41:35 +08:00
Wanwei Jiang dbcad9eacb audio: fixed kernel panic [1/1]
PD#SWPL-154489

Problem:
kernel panic

Solution:
modify the type of the kunmap function parameter to struct *page

Verify:
soddy

Change-Id: If7e6aebfc5f423061af4af65a3b25ca802dcc4ea
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2024-01-19 08:17:30 -07:00
Hanjie Lin 8e35d620c0 debug: sched: bringup [1/1]
PD#SWPL-150085

Problem:
debug sched compatible

Solution:
debug sched compatible

Verify:
sc2/a5

Change-Id: I4d4d70dd03655a4f8a2beb034aae4826fd82fec8
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2024-01-16 20:29:42 -07:00
Wanwei Jiang 9e97825b1e kernel: upgrade on 20240112 [1/2]
PD#SWPL-153832

Problem:
upgrade on 20240112

Solution:
upgrade on 20240112

Verify:
a4/a5 sc2

Change-Id: Ia5fafbfd5e2e31f06ebf6f5a1cc973b40ab922f1
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2024-01-12 11:52:01 +08:00
Dezhen Wang bcfa0ee2e4 bring up: revert compatibility code for kernel 6.6 [1/1]
PD#SWPL-151245

Problem:
kernel6.6 will not distinguish different versions of kernel.
so we do not make compatibility code in 6.6.

Solution:
revert compatibility code for kernel 6.6.

Verify:
local

Test:
local

Change-Id: I24b8acac62cec05ffb2f637a86f91789f1d0b905
Signed-off-by: Dezhen Wang <dezhen.wang@amlogic.com>
2024-01-11 18:46:45 -07:00
Wanwei Jiang c73f5afdef module: disable module_param [1/1]
PD#SWPL-151470

Problem:
many of module parameters are no longer in use, but have not been deleted,
which affects memory and performance. all module parameters are now
disabled and can only be used after the application is approved.

Solution:
disabled all module parameters

Verify:
a4 a5

Test:
none

Change-Id: I27ee98a0437542d7b8a3da437c1525e0afded6b1
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2024-01-09 19:58:31 +08:00
qiankun.wang 407be5ff67 iotrace: notify_call update core_layout base. [1/1]
PD#SWPL-150084

Problem:
the vendor hooks "module_base_hook" was deleted
in kernel6.6.

Solution:
update module curr core_layout base by function
"blocking_notifier_call_chain".

Verify:
sc2_ah212

Change-Id: I058678a8ef29ade90da3f6d59d89578cc7fd7952
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2024-01-03 20:12:09 -07:00
qiankun.wang 31a56804f0 apu: compatible cpu_isolate function. [1/1]
PD#SWPL-150130

Problem:
"enum hk_flags" does not exist "linux/sched/isolation.h"
in kernel6.6.

Solution:
use "int" to replace it.

Verify:
sc2_ah212

Change-Id: I5def0e6618b2dc0492ba13e0f6fe1242a3093113
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-12-29 01:20:55 -07:00
Dezhen Wang e93cf9ea7f kernel6.6: bring up fix some code problem [1/1]
PD#SWPL-150782

Problem:
bring up kernel6.6

Solution:
fix some code problem

Verify:
sc2 c2 a4 a5

Test:
local

Change-Id: I6b9affa83e6d46f6b857f4b542991bc70de4bfb5
Signed-off-by: Dezhen Wang <dezhen.wang@amlogic.com>
2023-12-21 00:09:33 -07:00
Wanwei Jiang 43461aec82 kernel6.6: bring up [1/1]
PD#SWPL-145682

Problem:
bring up kernel6.6

Solution:
1. porting kernel6.6
2. compatible with different kernel versions
3. bring up kernel6.6

Verify:
sc2 c2 a4 a5

Test:
None

Change-Id: Ie22af0abc8ea96261e8a8cc7804b58565aedd904
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-12-14 16:55:55 +08:00
qiankun.wang 6360d268f9 apu: t3x: can't enable EAS [1/2]
PD#SWPL-143865

Problem:
t3x can't enable EAS because of apu.

Solution:
t3x can enable EAS when system supports
the hide cpu.

Verify:
t3x

Change-Id: Ie20fa9a01af1da9bcb5e655b5c54ecd9aa322f0f
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-11-09 00:15:26 -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
Jiacai.Liu 4305fac204 common_driver: CB fix kernel compile warn when use gcc 11.4 [1/1]
PD#SWPL-142738

Problem:
kernel compile warn when use gcc 11.4

Solution:
fix the warn error

auto check issue: midagc= min agc, minagc = min agc

Verify:
local

Signed-off-by: Jiacai.Liu <jiacai.liu@amlogic.com>
Change-Id: I3f2ffaac88ef3ad2c92525398fe273776740bc5a
2023-11-01 03:59:56 -07:00
song.han 8cda503afd iotrace: fix dump iotrace log bug [1/1]
PD#SWPL-141645

Problem:
auto dump iotrace log may cause kernel panic

Solution:
fix iotrace bug

Verify:
t5m

Change-Id: I1a30b24672cd8ca5fae641aed5d3837553d72bc9
Signed-off-by: song.han <song.han@amlogic.com>
2023-10-07 02:33:42 -07:00
Lei Zhang cbaf477137 revert "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: Id64d6b284f66a1c079d06acde06503b544360965
Signed-off-by: Lei Zhang <lei.zhang@amlogic.com>
2023-09-21 02:09:44 -07:00
Jianxiong Pan cca80c3423 zapper: rename CONFIG_AMLOGIC_ZAPPER_CUT_C1A. [1/1]
PD#SWPL-140594

Problem:
rename CONFIG_AMLOGIC_ZAPPER_C1A.

Solution:
CONFIG_AMLOGIC_ZAPPER_CUT_C1A.

Verify:
build pass.

Test:
run on s1a board normally.

Change-Id: I3a8ab8d81af2c4d14b51c117ac16d75f3980adac
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2023-09-20 04:40:01 -07:00
song.han 6ddd2f7641 iotrace: record module base on last start [1/1]
PD#SWPL-136207

Problem:
use kprobe to forbid free module init text

Solution:
record module base and use offset to parse
this module symbol

Verify:
SC2_AH212

Change-Id: I43bd306e94e9a6a5afe6411a9cd9e93db0342b7a
Signed-off-by: song.han <song.han@amlogic.com>
2023-09-18 20:08: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
liang.wu 8ac86ed98d zapper: Add CONFIG_AMLOGIC_ZAPPER_NET_CUT [1/2]
PD#SWPL-120856

Problem:
Zapper 2K S1A - 128M DDR - optimization net core

Solution:
define CONFIG_AMLOGIC_ZAPPER_NET_CUT

Verify:
Zapper 2K S1A

Change-Id: Ic8712c8fa62b2fddd577598ec20d22e507dd522a
Signed-off-by: liang.wu <liang.wu@amlogic.com>
2023-09-15 02:53:58 -07:00
qiankun.wang 5304c379e9 reg_detect: postpone the call of 'ioremap'. [1/1]
PD#SWPL-139674

Problem:
the system can't run 'ioremap' without
the Buddy system.

Solution:
set the variable 'check_reg_flag' to
postpone the function call 'ioremap'.

Verify:
T5M

Change-Id: Ieee33ff37a54037e3a3d1c258b127e1cbcd83b5a
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-09-13 00:44:27 -07:00
song.han fae9edad47 iotrace: replace clk/power kprobe [1/1]
PD#SWPL-139455

Problem:
try to replace kprobe hook in iotrace

Solution:
replace clk/power kprobe

Verify:
SC2_AH212

Change-Id: Id53c97a5d0679c118625670a5216ae54e0567aec
Signed-off-by: song.han <song.han@amlogic.com>
2023-09-12 04:04:21 -07:00
song.han 27904ea8df iotrace: fix kasan report in iotrace driver [1/1]
PD#SWPL-137772

Problem:
kasan report when dump iotrace log

Solution:
fix kasan report

Verify:
s4_ap222

Change-Id: I96548430df38007f217c9888e6110901f0184820
Signed-off-by: song.han <song.han@amlogic.com>
2023-08-31 21:58:42 -07:00
qinglin.li 9f54c42bbd break_gki: adjust break gki config [2/2]
PD#SWPL-137861

Problem:
adjust break gki config

Solution:
CONFIG_AMLOGIC_BREAK_GKI_20 only break gki2.0
CONFIG_AMLOGIC_BREAK_GKI break gki 1.0 and 2.0

Verify:
local

Change-Id: Ic86c771027980aa24c638d5f89c014240d65ec91
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2023-08-30 20:13:49 -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
Jianxiong Pan b75016a67d zapper: remove c1a relate code. [1/1]
PD#SWPL-126879

Problem:
memory optimization.

Solution:
remove c1a relate code.

Verify:
s1a.

Test:
run on s1a board normally.

Change-Id: Idbd24a529666278295724f26d10f1a720877ca6a
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2023-08-15 20:09:03 -07:00
Hanjie Lin 875fa4747f isolcpus: add amlogic support and boot optimize [1/1]
PD#SWPL-119598

Problem:
system is too slow because the cpu5 is turned off
at system startup.

Solution:
turn on the cpu5 at system startup.

Verify:
SC2

Change-Id: I738fccb70c96d6495b314fa51cf319d5800c75a0
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-08-09 21:58:46 -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
qiankun.wang 0335d01014 iotrace: save register value in IO-R-E [1/1]
PD#SWPL-129901

Problem:
IO-R-E can't read the register's data.

Solution:
when the "read" action is over, the hook function
will get the value from the action.

Verify:
SC2

Change-Id: I12426209bf92e5c242022041e01ed6a7711808dc
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-06-29 06:56:16 -07:00
qiankun.wang 52a028cac6 ramoops: don't parse ftrace buf when shutdown or cold boot [1/1]
PD#SWPL-128460

Problem:
system shutdown reboot or cold boot,parse ftrace old buf
will cause kernel crash

Solution:
skip parse ftrace old buf when shutdown reboot or cold
boot

Verify:
SC2

Change-Id: Ib2580c0206b97461389369d587f2266a8b3836f2
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-06-28 06:58:47 -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 b6ed5e8381 iotrace: fix reg error [1/1]
PD#SWPL-127124

Problem:
system will record the register twice rather
than the register and the value.

Solution:
record the value

Verify:
SC2

Change-Id: I5de33f780475b2ac3ebeac8c2dfea779900875ce
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-06-13 01:00:39 -07:00
Hanjie Lin 3fcef5de34 kretprobes: disable irq in ret handler [2/3]
PD#SWPL-121806

Problem:
ret handler running in origin task context with preempt_disable
it's not safe for interrupt and may cause nested kprobe and miss

Solution:
disable irq in ret handler
add AMLOGIC_BGKI_KPROBES

Verify:
sc2

Change-Id: I143e874336d87b143d1607b8e9a7588f84d7bc55
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-06-13 01:00:25 -07:00
qiankun.wang 019db657be iotrace: add reg detect [1/1]
PD#SWPL-127124

Problem:
register was accidentally modified by unknown program

Solution:
add reg detect func when write reg

Verify:
SC2

Change-Id: Ia5db45839a7f69fc819e7cfc9843a4e6503ebce9
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-06-12 00:48:11 -07:00
qiankun.wang e6045d91cd sched: vts: vts_kernel_proc_file_api_test [1/2]
PD#SWPL-124519

Problem:
vts_kernel_proc_file_api_test module 3 fail.

Solution:
add 3 proc file interfaces 'sched_latency_ns',
'sched_wakeup_granularity_ns',
'sched_tunable_scaling'.

Verify:
SC2

Change-Id: I88e8d7a91db601d1b1cb773d15583fabe7021a07
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-05-29 23:40:57 -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
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