• Nicholas Piggin's avatar
    powerpc/powernv: Implement NMI IPI with OPAL_SIGNAL_SYSTEM_RESET · e36d0a2e
    Nicholas Piggin authored
    This allows MSR[EE]=0 lockups to be detected on an OPAL (bare metal)
    system similarly to the hcall NMI IPI on pseries guests, when the
    platform/firmware supports it.
    
    This is an example of CPU10 spinning with interrupts hard disabled:
    
      Watchdog CPU:32 detected Hard LOCKUP other CPUS:10
      Watchdog CPU:10 Hard LOCKUP
      CPU: 10 PID: 4410 Comm: bash Not tainted 4.13.0-rc7-00074-ge89ce1f8-dirty #34
      task: c0000003a82b4400 task.stack: c0000003af55c000
      NIP: c0000000000a7b38 LR: c000000000659044 CTR: c0000000000a7b00
      REGS: c00000000fd23d80 TRAP: 0100   Not tainted  (4.13.0-rc7-00074-ge89ce1f8-dirty)
      MSR: 90000000000c1033 <SF,HV,ME,IR,DR,RI,LE>
      CR: 28422222  XER: 20000000
      CFAR: c0000000000a7b38 SOFTE: 0
      GPR00: c000000000659044 c0000003af55fbb0 c000000001072a00 0000000000000078
      GPR04: c0000003c81b5c80 c0000003c81cc7e8 9000000000009033 0000000000000000
      GPR08: 0000000000000000 c0000000000a7b00 0000000000000001 9000000000001003
      GPR12: c0000000000a7b00 c00000000fd83200 0000000010180df8 0000000010189e60
      GPR16: 0000000010189ed8 0000000010151270 000000001018bd88 000000001018de78
      GPR20: 00000000370a0668 0000000000000001 00000000101645e0 0000000010163c10
      GPR24: 00007fffd14d6294 00007fffd14d6290 c000000000fba6f0 0000000000000004
      GPR28: c000000000f351d8 0000000000000078 c000000000f4095c 0000000000000000
      NIP [c0000000000a7b38] sysrq_handle_xmon+0x38/0x40
      LR [c000000000659044] __handle_sysrq+0xe4/0x270
      Call Trace:
      [c0000003af55fbd0] [c000000000659044] __handle_sysrq+0xe4/0x270
      [c0000003af55fc70] [c000000000659810] write_sysrq_trigger+0x70/0xa0
      [c0000003af55fca0] [c0000000003da650] proc_reg_write+0xb0/0x110
      [c0000003af55fcf0] [c0000000003423bc] __vfs_write+0x6c/0x1b0
      [c0000003af55fd90] [c000000000344398] vfs_write+0xd8/0x240
      [c0000003af55fde0] [c00000000034632c] SyS_write+0x6c/0x110
      [c0000003af55fe30] [c00000000000b220] system_call+0x58/0x6c
    Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
    [mpe: Use kernel types for opal_signal_system_reset()]
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    e36d0a2e
setup.c 7.53 KB