linux_dsm_epyc7002/arch/csky/abiv2/inc/abi
Guo Ren 900897591b csky: Fixup CONFIG_PREEMPT panic
log:
[    0.13373200] Calibrating delay loop...
[    0.14077600] ------------[ cut here ]------------
[    0.14116700] WARNING: CPU: 0 PID: 0 at kernel/sched/core.c:3790 preempt_count_add+0xc8/0x11c
[    0.14348000] DEBUG_LOCKS_WARN_ON((preempt_count() < 0))Modules linked in:
[    0.14395100] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.6.0 #7
[    0.14410800]
[    0.14427400] Call Trace:
[    0.14450700] [<807cd226>] dump_stack+0x8a/0xe4
[    0.14473500] [<80072792>] __warn+0x10e/0x15c
[    0.14495900] [<80072852>] warn_slowpath_fmt+0x72/0xc0
[    0.14518600] [<800a5240>] preempt_count_add+0xc8/0x11c
[    0.14544900] [<807ef918>] _raw_spin_lock+0x28/0x68
[    0.14572600] [<800e0eb8>] vprintk_emit+0x84/0x2d8
[    0.14599000] [<800e113a>] vprintk_default+0x2e/0x44
[    0.14625100] [<800e2042>] vprintk_func+0x12a/0x1d0
[    0.14651300] [<800e1804>] printk+0x30/0x48
[    0.14677600] [<80008052>] lockdep_init+0x12/0xb0
[    0.14703800] [<80002080>] start_kernel+0x558/0x7f8
[    0.14730000] [<800052bc>] csky_start+0x58/0x94
[    0.14756600] irq event stamp: 34
[    0.14775100] hardirqs last  enabled at (33): [<80067370>] ret_from_exception+0x2c/0x72
[    0.14793700] hardirqs last disabled at (34): [<800e0eae>] vprintk_emit+0x7a/0x2d8
[    0.14812300] softirqs last  enabled at (32): [<800655b0>] __do_softirq+0x578/0x6d8
[    0.14830800] softirqs last disabled at (25): [<8007b3b8>] irq_exit+0xec/0x128

The preempt_count of reg could be destroyed after csky_do_IRQ without reload
from memory.

After reference to other architectures (arm64, riscv), we move preempt entry
into ret_from_exception and disable irq at the beginning of
ret_from_exception instead of RESTORE_ALL.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Reported-by: Lu Baoquan <lu.baoquan@intellif.com>
2020-05-28 00:18:36 +00:00
..
cacheflush.h csky: Add flush_icache_mm to defer flush icache all 2020-02-21 15:43:24 +08:00
ckmmu.h csky: Use generic asid algorithm to implement switch_mm 2019-07-19 14:21:36 +08:00
elf.h csky: ELF and module probe 2018-10-26 00:54:23 +08:00
entry.h csky: Fixup CONFIG_PREEMPT panic 2020-05-28 00:18:36 +00:00
fpu.h csky: Fixup init_fpu compile warning with __init 2020-03-08 20:55:14 +08:00
page.h csky: MMU and page table management 2018-10-25 23:36:19 +08:00
pgtable-bits.h csky: fixup abiv2 mmap(... O_SYNC) failed. 2018-12-31 10:56:45 +08:00
reg_ops.h csky: Misc headers 2018-10-26 00:54:26 +08:00
regdef.h csky: Add perf_arch_fetch_caller_regs support 2019-04-22 13:44:57 +08:00
string.h csky: Library functions 2018-10-26 00:54:24 +08:00
switch_context.h csky: fixup save hi,lo,dspcr regs in switch_stack. 2018-12-31 22:57:27 +08:00
vdso.h csky: VDSO and rt_sigreturn 2018-10-26 00:54:22 +08:00