All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug report: Bad mode in FIQ handler detected on CPU0, code 0x56000000
       [not found] <1426298268.23978174.1533818483053.JavaMail.zimbra@redhat.com>
@ 2018-08-09 12:47 ` Chunyu Hu
  2018-08-09 13:16   ` Will Deacon
  0 siblings, 1 reply; 3+ messages in thread
From: Chunyu Hu @ 2018-08-09 12:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi!

I hit an 100% panic when I executed:

perf &
perf top

Logs are as below,

[  123.234492] Bad mode in FIQ handler detected on CPU0, code 0x56000000 -- SVC (AArch64)
[  123.242379] Internal error: Oops - bad mode: 0 [#1] SMP
[  123.247578] Modules linked in: rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache sunrpc vfat fat xgene_hwmon sg gpio_xgene_sb gpio_dwapb xgene_edac mailbox_xgene_slimpro gpio_generic xgene_rng uio_pdrv_genirq uio xfs libcrc32c xgene_enet at803x i2c_xgene_slimpro realtek ahci_xgene libahci_platform mdio_xgene dm_mirror dm_region_hash dm_log dm_mod
[  123.279949] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.18.0-rc8+ #1
[  123.286270] Hardware name: AmpereComputing(R) Mustang/Mustang, BIOS 0ACDY027 06/22/2018
[  123.294235] pstate: 00000085 (nzcv daIf -PAN -UAO)
[  123.299005] pc : __perf_event_enable+0x188/0x1e0
[  123.303599] lr : __perf_event_enable+0x188/0x1e0
[  123.308191] sp : ffff00000800fe80
[  123.311486] x29: ffff00000800fe80 x28: ffff0000092c5640 
[  123.316772] x27: 0000000000000000 x26: 0000000000000000 
[  123.322058] x25: 0000000000000001 x24: 0000000000000000 
[  123.327343] x23: ffff8003c926b000 x22: ffff8003c926b000 
[  123.332629] x21: ffff8003ffdf51a0 x20: ffff8003ffdf51a0 
[  123.337914] x19: ffff8003c926b000 x18: ffff0000092f7104 
[  123.343199] x17: 000000007fff2728 x16: 0000000000000000 
[  123.348485] x15: ffff0000092f7100 x14: 0000000000000000 
[  123.353771] x13: ffff8003a081d1e0 x12: ffff8003a081d208 
[  123.359056] x11: ffff8003a081d2f9 x10: 0000000000000c50 
[  123.364341] x9 : ffff00000928fe30 x8 : 0000000000000001 
[  123.369626] x7 : ffff8003c926b000 x6 : 00000000869b5fc0 
[  123.374912] x5 : 00ffffffffffffff x4 : ffff8003c2ef5500 
[  123.380197] x3 : 0000000000000000 x2 : 0000000000000041 
[  123.385482] x1 : 0000000000000080 x0 : 0000000000000070 
[  123.390769] Process swapper/0 (pid: 0, stack limit = 0x00000000307099b4)
[  123.397436] Call trace:
[  123.399869]  __perf_event_enable+0x188/0x1e0
[  123.404117]  event_function+0x84/0xd0
[  123.407760]  remote_function+0x58/0x68
[  123.411491]  flush_smp_call_function_queue+0x60/0x150
[  123.416516]  generic_smp_call_function_single_interrupt+0x18/0x20
[  123.422581]  handle_IPI+0x110/0x390
[  123.426050]  gic_handle_irq+0xa4/0xa8
[  123.429693]  el1_irq+0xb0/0x140
[  123.432818]  arch_cpu_idle+0x34/0x140
[  123.436462]  do_idle+0x210/0x278
[  123.439673]  cpu_startup_entry+0x2c/0x30
[  123.443576]  rest_init+0xb8/0xc4
[  123.446788]  start_kernel+0x448/0x470
[  123.450432] Code: f100007f 321d0043 1a820062 97ffff77 (17ffffbf) 
[  123.456501] ---[ end trace 7c22327cfccb25ee ]---
[  123.461094] Kernel panic - not syncing: Fatal exception in interrupt
[  123.467417] SMP: stopping secondary CPUs
[  123.471321] Kernel Offset: disabled
[  123.474791] CPU features: 0x20802000
[  123.478347] Memory Limit: none
[  123.481386] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
[  123.488918] Bad mode in FIQ handler detected on CPU0, code 0x56000000 -- SVC (AArch64)

Is this a known issue?

-- 
Regards,
Chunyu Hu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Bug report: Bad mode in FIQ handler detected on CPU0, code 0x56000000
  2018-08-09 12:47 ` Bug report: Bad mode in FIQ handler detected on CPU0, code 0x56000000 Chunyu Hu
@ 2018-08-09 13:16   ` Will Deacon
  2018-08-10  6:30     ` Chunyu Hu
  0 siblings, 1 reply; 3+ messages in thread
From: Will Deacon @ 2018-08-09 13:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Chunyu,

On Thu, Aug 09, 2018 at 08:47:38AM -0400, Chunyu Hu wrote:
> I hit an 100% panic when I executed:
> 
> perf &
> perf top
> 
> Logs are as below,
> 
> [  123.234492] Bad mode in FIQ handler detected on CPU0, code 0x56000000 -- SVC (AArch64)

Oh dear...

We don't support FIQ in Linux, since:

(a) It's seldom available on the non-secure side
(b) It's not necessarily "fast", despite the name
(c) We'd be opening up a can of worms if we allow FIQ to preempt IRQ. Better
    off using SDEI or GIC priorities to implement NMIs.
(d) I don't think FIQs can be described in ACPI or DT

In this case, it looks like the PMU interrupt has been configured as a FIQ.
It should be possible to configure the GIC in firmware (not sure you have
EL3, so maybe in the bootloader) to treat this interrupt as an IRQ instead,
in which case perf top will work correctly as long as the ACPI tables / FDT
accurately describe the interrupt.

Will

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Bug report: Bad mode in FIQ handler detected on CPU0, code 0x56000000
  2018-08-09 13:16   ` Will Deacon
@ 2018-08-10  6:30     ` Chunyu Hu
  0 siblings, 0 replies; 3+ messages in thread
From: Chunyu Hu @ 2018-08-10  6:30 UTC (permalink / raw)
  To: linux-arm-kernel



----- Original Message -----
> From: "Will Deacon" <will.deacon@arm.com>
> To: "Chunyu Hu" <chuhu@redhat.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Sent: Thursday, August 9, 2018 9:16:22 PM
> Subject: Re: Bug report: Bad mode in FIQ handler detected on CPU0, code 0x56000000
> 
> Hi Chunyu,
> 
> On Thu, Aug 09, 2018 at 08:47:38AM -0400, Chunyu Hu wrote:
> > I hit an 100% panic when I executed:
> > 
> > perf &
> > perf top
> > 
> > Logs are as below,
> > 
> > [  123.234492] Bad mode in FIQ handler detected on CPU0, code 0x56000000 --
> > SVC (AArch64)
> 
> Oh dear...
> 
> We don't support FIQ in Linux, since:
> 
> (a) It's seldom available on the non-secure side
> (b) It's not necessarily "fast", despite the name
> (c) We'd be opening up a can of worms if we allow FIQ to preempt IRQ. Better
>     off using SDEI or GIC priorities to implement NMIs.
> (d) I don't think FIQs can be described in ACPI or DT
> 
> In this case, it looks like the PMU interrupt has been configured as a FIQ.
> It should be possible to configure the GIC in firmware (not sure you have
> EL3, so maybe in the bootloader) to treat this interrupt as an IRQ instead,
> in which case perf top will work correctly as long as the ACPI tables / FDT
> accurately describe the interrupt.

Will,

Thank you so much for the explanation. 

> 
> Will
> 

-- 
Regards,
Chunyu Hu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-10  6:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1426298268.23978174.1533818483053.JavaMail.zimbra@redhat.com>
2018-08-09 12:47 ` Bug report: Bad mode in FIQ handler detected on CPU0, code 0x56000000 Chunyu Hu
2018-08-09 13:16   ` Will Deacon
2018-08-10  6:30     ` Chunyu Hu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.