liyi-ibm / linux

Linux kernel source tree
Other
0 stars 1 forks source link

4.14.49-2 kernel cannot respond to 'pdbg -p0 -c1 -t0 sreset' #6

Closed liyi-ibm closed 5 years ago

liyi-ibm commented 6 years ago

While 4.18.0-rc3 kernel can kdump with 'pdbg -p0 -c1 -t0 sreset', in 4.14.49 there isn't any response.

As Nick comments:

the problem is that earlier kernels did not look at SRR1 wake
reason for power save wakeups, and just relied on the interrupt
triggering again when interrupts were enabled. SRESET interrupts
do not re-trigger like this so Linux does not respond to it properly.

These patches are a starting point: 771d4304d07f0 and 78adf6c214f04

Here is output from 4.18.0-rc3:

[root@rom277 ~]# [   48.294939] Oops: System Reset, sig: 6 [#1]^M
[   48.294940] LE SMP NR_CPUS=1024 NUMA PowerNV^M
[   48.294943] Modules linked in: ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables i2c_dev ses enclosure scsi_transport_sas at24 regmap_i2c ipmi_powernv opal_prd ofpart powernv_flash ipmi_devintf i2c_opal ipmi_msghandler mtd ast i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm drm_panel_orientation_quirks i2c_core tg3 aacraid^M
[   48.294975] CPU: 4 PID: 0 Comm: swapper/4 Not tainted 4.18.0-rc3-orig #1^M
[   48.294976] NIP:  c0000000000a6ea8 LR: c0000000000a6ea8 CTR: c00000000003c100^M
[   48.294978] REGS: c0000001fa0b3c00 TRAP: 0100   Not tainted  (4.18.0-rc3-orig)^M
[   48.294979] MSR:  9000000000001033 <SF,HV,ME,IR,DR,RI,LE>  CR: 22004822  XER: 00000000^M
[   48.294984] CFAR: c0000001fa0b3d30 IRQMASK: ba3a2dd80 ^M
[   48.294984] GPR00: c0000000000a6ea8 c0000001fa0b3d60 c0000000014cba00 c0000001fa0b3c00 ^M
[   48.294984] GPR04: b000000000001033 c0000000000a68cc 0000000022004824 0000000000000001 ^M
[   48.294984] GPR08: 004040000182f012 00000000000000ff 0000000000000010 0000000000000000 ^M
[   48.294984] GPR12: 9000000000121001 c0000001ffffa800 c0000001fa0b3f90 0000000000000000 ^M
[   48.294984] GPR16: 0000000000000000 c00000000004a550 c00000000004a550 c000000000ff5280 ^M
[   48.294984] GPR20: 0000000000000006 c0000000013e4c60 c0000001fa0b0000 c0000001fa0b0080 ^M
[   48.294984] GPR24: 0000000000080000 0000000000000000 0000000aa390cfea c0000000013e4c60 ^M
[   48.294984] GPR28: c0000000013e4eb8 c0000000014fc0c8 0000000000000006 0000000000000006 ^M
[   48.295005] NIP [c0000000000a6ea8] power9_idle_type+0x28/0x40^M
[   48.295007] LR [c0000000000a6ea8] power9_idle_type+0x28/0x40^M
[   48.295007] Call Trace:^M
[   48.295010] [c0000001fa0b3d60] [c0000000000a6ea8] power9_idle_type+0x28/0x40 (unreliable)^M
[   48.295013] [c0000001fa0b3d80] [c00000000094f8a4] stop_loop+0x44/0x60^M
[   48.295016] [c0000001fa0b3db0] [c00000000094be54] cpuidle_enter_state+0xc4/0x3c0^M
[   48.295018] [c0000001fa0b3e10] [c000000000157660] call_cpuidle+0x50/0x80^M
[   48.295019] [c0000001fa0b3e30] [c000000000157d28] do_idle+0x318/0x3d0^M
[   48.295021] [c0000001fa0b3ec0] [c000000000157ffc] cpu_startup_entry+0x3c/0x60^M
[   48.295023] [c0000001fa0b3ef0] [c00000000004cb54] start_secondary+0x4e4/0x530^M
[   48.295026] [c0000001fa0b3f90] [c00000000000b270] start_secondary_prolog+0x10/0x14^M
[   48.295027] Instruction dump:^M
[   48.295029] 7c0803a6 4e800020 3c4c0142 38424b80 7c0802a6 f8010010 60000000 7c0802a6
[   48.295033] f8010010 f821ffe1 4bfff9b9 4bf70095 <60000000> 38210020 e8010010 7c0803a6 ^M
[   48.298078] ---[ end trace b58808ac1b9aa603 ]---^M
[   49.900231] ^M
[   51.900233][  268.169005124,5] OPAL: Reboot request...^M
 Kernel panic - not syncing: System Reset^M
liyi-ibm commented 6 years ago

Patch 771d4304d07f0 is already in linux-stable 4.14.49 kernel. And cherry-pick patch 78adf6c214f04 to 4.14.49 kernel. This issue is fixed