PD# SWPL-4823
Problem:
1. After stack optimization, stack memory cannot be
mapped as dma buffers and thus causing crypto dma failed to
generate correct result.
2. crypto dma was not enabled on G12B
Solution:
1. Move key_iv buffer from stack to memory provided by kzalloc
2. Enable crypto dma on G12B
3. Replace module_param with debugfs
4. Replace pr_err with dev_err
Verify:
verified on G12B
Change-Id: I6de682e3d1fc141f8c6179c7d91f9b4bff165eae
Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com>
Signed-off-by: Mingyen Hung <mingyen.hung@amlogic.com>
PD#TV-9896
Problem:
provide sys interface to get last reboot reason
Solution:
add reboot reason sys infterface
Verify:
test pass on tl1_x301
Change-Id: I6c4046c892eff9f92506fadb0cddee7041c8f882
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
PD#TV-2272
Problem:
can't get corrent reboot reason in system panic
Solution:
get corrent reboot reason in system panic
Verify:
test pass on T962x2_x301
Change-Id: If0fc95c2807d89542b4ccbc8e3709be20f17b03b
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
PD#SWPL-5360
Problem:
According to TL1-core-pin-mux-register-spec.xlsx:
bt656 pins function number is 3 but not 2.
Solution:
bt656 func change 2-->3
Verify:
TL1-sktboard
Change-Id: I740e0a446ef2b6018b2eca706548148b8c9d1156
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
PD#SWPL-4501
Problem:
All platforms but m8b use "gpio_periphs" as gpio pinctrl function, that
breaks consistency.
Solution:
rename m8b pinctrl function "gpio" to "gpio_periphs" to make it
consistent with code and other platform.
ref:
https://patchwork.kernel.org/patch/10720219/
Verify:
m200
Change-Id: I940d1e30882cc8b042c02022ed3435a659aa3921
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
PD#172587
Problem:
some pin groups are not supported
Solution:
update pin groups according to pinmux document v8.
Verify:
TL1 skt board.
Change-Id: I88750e307208fd30c20343c1c5418c1035961b4e
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
PD#SWPL-16531
Problem:
Coverity defect cleanup: memory_ext
Solution:
Modify code according to coverity
Verify:
verify on the board of U212
Change-Id: Ibfba4655938561071f40cd9cd78c7ec0d5c51194
Signed-off-by: changqing.gao <changqing.gao@amlogic.com>
PD#SWPL-14800
Problem:
/proc/pagetrace is not exist in 64bit kernel.
Solution:
Using right macro for create fs node.
Verify:
x301
Change-Id: I27b8db9a349f37db4bc0d6752b06f3d6a6a6c46c
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#TV-10462
Problem:
Memory will allocation fail if play secure vedio source. Usually
seen by zram/wifi driver
Solution:
1, wake up kswapd earlier if water mark without free cma is not ok;
2, using zone-filecache to increace active of lmk. Which can be more
accurate than using global page status;
3, remove some restrict of using cma when allocate movable page by
zram or migrate from cma pool;
4, try allocate hard for atomic request in soft IRQ
Verify:
T950L
Change-Id: Ibf03f3c11a32175e9983ee8a61a14ae4b2436f1e
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#TV-8287
Problem:
Slab memleak is hard to track;
Solution:
Add slab trace to fix it
Verify:
P212
Change-Id: Ie1c44f28d5539c7bf71f9825c617c36af65d8058
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#TV-1924
Problem:
Sticky register which control compress in bl2z will always be set
if ramdump driver probed.
Solution:
If ramdump is disabled by envrioment under uboot. sticky register
should not set for not enter compress under bl2z
Verify:
x301
Change-Id: I1f41c98cebf7957f0dc214046e6d011e08c326de
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#TV-9668
Problem:
If sp address is in linear mapping range, check_sp_fault_again
function in vmap fault handler will still map a new page for it.
This will cause some data in R/W section polluted.
Solution:
Avoid map page if sp is in linear range.
Verify:
TL1 x301
Change-Id: I0e02a2048b586854c528cd3eeafb725751b9dc82
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#SWPL-13281
Problem:
There are 2 types of wrong kasan report after merge change of
save wasted slab.
1, slab-out-of-bounds, which is caused by krealloc set shadow
memory out-of-range, since tail of page was freed.
2, use-after-free, which is caused by kasan_free_pages called
after a page freed. Because this function already called in
free_page, so it marked shadow memory twice.
Solution:
1, make shadow do not out of range if a tail page was freed and
been realloc again.
2, remove call of kasan_free_pages.
Verify:
X301
Change-Id: Ib5bdcbb618a783920009bb97d112c361888b0d7c
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#SWPL-8241
Problem:
** SYNC FROM GOOGLE **
Build failed due to uninitialzed variable
Solution:
Init to reasonable value
Verify:
Build with Android prebuilt toolchain
Change-Id: I09615276b48b6253f8084743a7d50081cfc24ec4
Signed-off-by: Shuide Chen <shuide.chen@amlogic.com>
PD#SWPL-10141
Problem:
if opened kasan with vmap, there will be some wrong kasan reports
Solution:
close vmap if open kasan
Verify:
p212
Change-Id: I37cdcb26cfb6fe87529db1ece3b7740ac072ba1a
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#SWPL-10141
Problem:
When open kasan with vmap stack on ARM32 platform, there
will be a panic issue which pc is running out of range:
[ 56.726530@2] PC is at 0x50
[ 56.729301@2] LR is at 0x0
Solution:
Close kasan when open vmap stack on ARM32
Verify:
TL1
Change-Id: Id82eb27543e8eade86b281cde9e160b8bf4e7878
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#TV-6340
Problem:
When quickly enter live tv just after boot to home, video may display
more than 10 seconds late after sound comeout. The main problem is
cma allocation time too long.
Solution:
1, add a page flag for pages under cma allocating. And do not
increase page-ref count for cma pages under allocating when it
is used by user space again.
2, restrict shmem/swap back pages using cma
3, improve cma using policy check in page allocating process.
4, replace righ page trace for migrated pages.
Change-Id: Ie6b591213a9eda974c3443ca9b491fa8d00cee50
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#SWPL-6193
Problem:
ramdump need write compressed data to persist storage device.
But if we write it under uboot, it may cause journal and block
bitmap mismatch due to different version of file system. This
caused kernel panic after ramdump finished.
Solution:
Write compressed data under kernel.
This change also removed some extern function of ramdump since
we use sticky register to store ramdump information.
Verify:
p212
Change-Id: Idd83ec6ead4783918b90a39cf716fd3117402278
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Conflicts:
arch/arm/boot/dts/amlogic/mesong12b.dtsi
arch/arm/boot/dts/amlogic/mesonsm1.dtsi
arch/arm64/boot/dts/amlogic/mesong12b.dtsi
arch/arm64/boot/dts/amlogic/mesonsm1.dtsi
PD#SWPL-5301
Problem:
When open NUMA config on ARM64, there is compile error
Solution:
fix some compile problems
Verify:
p212
Change-Id: I1ae9ef975c680e3e5545186aac9ca2b57597bfe4
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#SWPL-3902
Problem:
If cma page is unevictable, migrate it will cost long time.
Solution:
1. Recalim unevictable cma file cache pages.
2. Using CMA after first water mark not ok.
Verify:
einstern
Change-Id: I0ecbf5dd535cb034430c4ea623891e7a7ae6e4dd
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#SWPL-4351
Problem:
Our cpu has 4 watch point on each cpu. It can be used for debug
purpose. But currently there is no driver support it.
Solution:
Bring up driver for it.
Verify:
p212
Change-Id: Ifbcb7f9b77e10fcb03b3c1a5e18f06b1a56ec2f0
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#GH-17
Problem:
sometimes cma allocation failed but it's hard to get
failed log and need recompile code.
Solution:
Add /proc/cma_debug to open cma debug message dynamic.
By default, no debug message is printed. If you write a
value large than 0 to this node, debug message will be
printed.
Verify:
p212
Change-Id: Ibcfd1d48be5f33f674f09df713dc2e493748c405
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
PD#GH-17
Problem:
If a task be killed during CMA allocation, then it will abort
cma allocation in function compact_unlock_should_abort. But in
function aml_cma_alloc_range, it will return -EBUSY. Which cause
cma allocation loop won't exit and run again and again.
Solution:
return -EINT for this case to exit cma allocaion loop.
Verify:
newman platform
Change-Id: I6559bb184fc035ae68c8ccd001407767e1e22f0c
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#TV-1924
Problem:
On TL1, ramdump is not enabled.
Solution:
Add ramdump support for TL1 chips in kernel.
Also add sticky register config for other chips
Verify:
tl1_x301_v1
Change-Id: I67a11d128343ff9e615377b19914a3fc77b7acef
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
PD#SWPL-5366
Problem:
g12b cpucore cooling devices hotplug a little core and a big
when hot trippoint trigger, need to update cooling devices that
hotplug one core one hotstep for big core to little core.
Solution:
1.modify cpucore cooling for new solution.
2.modify hotplug core for can hotplug all big core.
3.ipa dts no cluster id, all cpucore is one cooling device
dts have cluster id, one cluster is one cooling devices.
Verify:
test on g12b w400.
Change-Id: I3320b007e35e7ac415cf7623f74f0a5153fed9b5
Signed-off-by: Huan Biao <huan.biao@amlogic.com>
PD#SWPL-17541
Problem:
gp0 is not power-off when suspend
Solution:
switch gp0 to xtal when poweroff
Verify:
passed on tl1_t962x2_x301
Change-Id: I7a6988d7bdb7af446645ac1b71428435d0b2cf33
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
PD#SWPL-18275
Problem:
gp0 is not disabled when suspend
Solution:
disable gp0 when suspend is called
Verify:
passed on tl1
Change-Id: I19013659a5a7c9d565a19197ff59c77059e37c75
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
PD#SWPL-16815
Problem:
commit e9dc698c503b8171e77f631427a360835c387e8e
The code has warning.
Solution:
modify code log2i().
Verify:
TL1
Change-Id: If7f66b8856f791c05781c5eb3f8691e2c63e033d
Signed-off-by: Nan Li <nan.li@amlogic.com>
PD#SWPL-16530
Problem:
The code has coverity warning.
Solution:
modify code.
Verify:
TL1
Change-Id: I0bbd1fc9ae39fb269b35e0a18f8ddeb01f3bffab
Signed-off-by: Nan Li <nan.li@amlogic.com>
PD#SWPL-16036
Problem:
When the system starts up, wifi is turned on.
When we manually turn off wifi and start the
suspend & resume operation, we will find that
the sdio error is reported when we wake up
Solution:
Add the sdio_notify() interface to notify the
sdio controller when wifi is on/off, enabling
the keep_power standard to be configured when suspend.
Verify:
TL1
Change-Id: I48e0c31bf7ea80d3efd4b0d41b4af378e859dc15
Signed-off-by: Nan Li <nan.li@amlogic.com>
PD#SWPL-15797
Problem:
commit a5c3731f5d
this patch has err, the print buf will be out of bounds.
Solution:
Reposition the pointer before each loop.
Verify:
tl1
Change-Id: I8f44269c375147c5290af9c6d84fd5d85be271f0
Signed-off-by: Nan Li <nan.li@amlogic.com>
PD#SWPL-14443
Problem:
sdio tuning print info is too much.
Solution:
optimize tuning print.
Verify:
tl1
Change-Id: Ia0a0315eb30480b0014aa1e35d12b50576221f2e
Signed-off-by: Nan Li <nan.li@amlogic.com>
PD#SWPL-13914
Problem:
G12A TDMA affects the tuning, make tuning process
+/- dly is useless.
Solution:
add pdata save val operation.
Verify:
G12A_u212
Change-Id: I204dd989fae0d400b14725df068378be0262b1cc
Signed-off-by: Nan Li <nan.li@amlogic.com>
PD#SWPL-12209
Problem:
fixed SWPL-11917
When all the sample points are valid,
they fall into the changes of 111917
Solution:
flag is set when all sampling points are valid
so tuning does not enter the changes of 11197
Verify:
txlx
Change-Id: I591993f3007db913b0030b108dcb18c304bf1042
Signed-off-by: Long Yu <long.yu@amlogic.com>
PD#SWPL-4858
Problem:
Soc not support sduart
Solution:
add not supported flag in dts
Verify:
verify by tl1 skt
Change-Id: Ifd1f975bd13b150aac9d99f60423ab4f0b903c98
Signed-off-by: Nan Li <nan.li@amlogic.com>