Commit Graph

101 Commits

Author SHA1 Message Date
song.han a9c7776df6 iotrace: call stack support [1/1]
PD#SWPL-175591

Problem:
5.15-u scs can't work
arm 32bit caller_addr can't work

Solution:
arm64 use CALLER_ADDR micro
arm32 support find stack operation

Verify:
SC2

Change-Id: Ic8142284af335f22cf5fe0aceb438e2119ec7373
Signed-off-by: song.han <song.han@amlogic.com>
2024-07-09 10:52:25 +08:00
Hanjie Lin 8b99ee380e debug: sched: place_entity optimize for arm32 [1/1]
PD#SWPL-163170

Problem:
place_entity optimize only take effect in arm64

Solution:
support arm32 too

Verify:
sc2

Change-Id: Ieff1908e72fdb2282866ea1309f480d068772482
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2024-05-14 17:28:24 +08:00
Jiucheng Xu cee8065e88 f2fs: revert f2fs preserve direct write semantics [1/1]
PD#SWPL-165832

Problem:
The patch clean file cache and impact direct IO performance

Solution:
revert to improve direct IO performance.

Verify:
T7

Change-Id: I349d40ac2af425bbd969256c27fda6e810f9085d
Signed-off-by: Jiucheng Xu <jiucheng.xu@amlogic.com>
2024-05-08 19:22:25 +08:00
song.han 1a1249d89d 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 20:40:42 +08:00
Hanjie Lin e379d2c904 isolcpus: don't select isolate cpu for non-bind tasks. [1/1]
PD#SWPL-151292

Problem:
Some tasks have been running in apu before isolating cpu.

Solution:
when tasks were scheduled,if tasks shouldn't be run
on the apu, they will be migrated to other cpus.

Verify:
T5M

Change-Id: I97a91f1a40425a3ab26801de9a6bcb4b19c33019
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2024-02-19 20:45:51 +08:00
qiankun.wang 1ed0f9e18b 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-26 21:02:30 +08:00
Wanwei Jiang 1a6a627295 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-21 09:17:08 +08:00
Hanjie Lin 35c7895173 isolcpus: retry register housekeeping_cpumask kprobe [1/1]
PD#SWPL-146197

Problem:
kprobe some instruction will fail, eg: nop in arm64
different config or compiler may cause register_kprobe fail

Solution:
retry with next instruction

Verify:
t5m

Change-Id: I0a99d459a260e3aefa3565f03106ed4ea04741ee
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2024-01-20 19:47:05 +08:00
Jianxiong Pan d4a6126887 c3: remove c3 irrelevant configuration. [1/1]
PD#SWPL-147493

Problem:
c3 memory optimization.

Solution:
remove c3 irrelevant configuration.

Verify:
build pass.

Change-Id: If75afae10b134d272ba57aaad05e8007c70cd560
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2024-01-20 19:44:01 +08:00
Lei Zhang 6ac359de0d isolcpus: optimize housekeeping_cpumask [1/1]
PD#SWPL-146197

Problem:
kprobe housekeeping_cpumask fail in common14-5.15

Solution:
optimize kprobe address

Verify:
on T5M AY301

Change-Id: Ic39389877cb9029eac9aabec5badc4ebc192dcac
Signed-off-by: Lei Zhang <lei.zhang@amlogic.com>
2024-01-20 18:38:34 +08:00
song.han d199cd7d8b 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>
2024-01-19 23:10:59 +08:00
song.han 635072bc1b 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>
2024-01-18 14:27:22 +08:00
Jiacai.Liu 786f2e05ca 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
2024-01-17 16:30:52 +08:00
qiankun.wang 9d7c41e3c5 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>
2024-01-09 16:55:18 +08:00
Lei Zhang 89189d06c2 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-28 18:57:50 +08:00
qinglin.li 84b0f81d1d printk: enabled debug printk for gki2.0 [1/1]
PD#SWPL-140356

Problem:
debug printk not enabled for gki2.0

Solution:
config AMLOGIC_DEBUG_PRINTK to m for gki2.0

Verify:
ohm

Change-Id: Ife312f1fc5237fd810d192919bf1558fd9255fec
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2023-12-27 19:20:38 +08:00
jian zhou c23b6e64a6 audio: optimize the audio log [1/1]
PD#SWPL-144236

Problem:
optimize the audio log

Solution:
optimize the audio log

Verify:
t5m

Change-Id: Ifc7c4d7e0a60e88aa0894487a2ee540441feff71
Signed-off-by: jian zhou <jian.zhou@amlogic.com>
2023-12-27 19:10:09 +08:00
song.han 0ed0c81593 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-12-21 17:46:45 +08:00
Hanjie Lin 871caaaab5 sched: change sched_task_high_prio from 110 to 118 [1/1]
PD#SWPL-147985

Problem:
little-high-prio interactive task schedule latency maybe very big
when task group schedule enable

Solution:
increase sched_task_high_prio to optimize schedule latency

Verify:
sc2

Change-Id: I9c0448e48c391432fc7d31805970fcbaceb6bb80
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-12-18 20:35:14 +08:00
Hanjie Lin 0a2c4cd09a sched_domain: enable BALANCE_WAKE and disable WAKE_AFFINE [1/1]
PD#SWPL-147985

Problem:
need modify sched_domain flags for GKI20

Solution:
modify

Verify:
sc2

Change-Id: I72d8e5abbdea501a001490402c8cd725c629b73a
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
2023-12-18 20:35:14 +08:00
song.han 4e675645ef 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-06 14:42:38 +08:00
Jianxiong Pan 1f6599c5fd 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-10-09 20:08:39 +08:00
Lei Zhang 8aa540b7c9 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 20:52:20 +08:00
song.han e2ab106c2c 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-19 20:09:48 +08:00
qiankun.wang 051f9dd9dc 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-18 20:18:49 +08:00
qiankun.wang d33a365eea 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-14 21:17:29 +08:00
dongqing.li fee7ee35f1 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-09-13 16:15:37 +08:00
qinglin.li 9d3b531cb4 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-09-05 20:43:25 +08: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