Re: WARNING: CPU: 0 PID: 0 at drivers/irqchip/irq-gic-v3-its.c

From: Marc Zyngier
Date: Fri Nov 09 2018 - 07:08:06 EST


[+Ard]

On 08/11/18 20:59, Qian Cai wrote:
> Just booting up the latest git master (b00d209) on an aarch64 server and saw
> this. Not sure about the third warning (at kernel/cpu.c:315
> lockdep_assert_cpus_held+0x50/0x60) relates to irqchip or not, but appended it
> to here anyway just in case.
>
> [ÂÂÂÂ0.000000] WARNING: CPU: 0 PID: 0 at drivers/irqchip/irq-gic-v3-its.c:1696
> its_init+0x588/0xb54

It looks like EFI cannot manage to reserve the memory for your GIC
redistributors. Pretty annoying. At the same time, you have reported
other issues with the EFI reservation mechanism, such as:

https://lore.kernel.org/patchwork/patch/1008413/

for which you have given a "Tested-by:". Is that related?

> [ÂÂÂÂ0.000000] Modules linked in:
> [ÂÂÂÂ0.000000] CPU: 0 PID: 0 Comm: swapper/0 Tainted: GÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂT 4.20.0-
> rc1+ #7
> [ÂÂÂÂ0.000000] pstate: 60000085 (nZCv daIf -PAN -UAO)
> [ÂÂÂÂ0.000000] pc : its_init+0x588/0xb54
> [ÂÂÂÂ0.000000] lr : its_init+0x558/0xb54
> [ÂÂÂÂ0.000000] sp : ffff200009ca79d0
> [ÂÂÂÂ0.000000] x29: ffff200009ca79d0 x28: 0000001dc0fb0000Â
> [ÂÂÂÂ0.000000] x27: ffff7fe007703ec0 x26: 3fe2e7a5444e6979Â
> [ÂÂÂÂ0.000000] x25: ffff2000093a8000 x24: 0000000000010000Â
> [ÂÂÂÂ0.000000] x23: ffff200009ce61a0 x22: 1fffe40001394f4eÂ
> [ÂÂÂÂ0.000000] x21: ffff200009f84000 x20: ffff20000c0c3000Â
> [ÂÂÂÂ0.000000] x19: ffff200008fb2000 x18: 000000000000003fÂ
> [ÂÂÂÂ0.000000] x17: 0000000000000000 x16: 0000000000000000Â
> [ÂÂÂÂ0.000000] x15: 0000000000000007 x14: ffff200009ceea80Â
> [ÂÂÂÂ0.000000] x13: ffff200009ceea80 x12: ffff801dc0d60f80Â
> [ÂÂÂÂ0.000000] x11: ffff801dc0d6f080 x10: ffff200009ceea80Â
> [ÂÂÂÂ0.000000] x9 : 0000000000000000 x8 : ffff801dc0fc0000Â
> [ÂÂÂÂ0.000000] x7 : a2a2a2a2a2a2a2a2 x6 : ffff1003b81f7fffÂ
> [ÂÂÂÂ0.000000] x5 : ffff801dc0fbffff x4 : 0000000000000000Â
> [ÂÂÂÂ0.000000] x3 : 000000000000003f x2 : dfff200000000000Â
> [ÂÂÂÂ0.000000] x1 : 0000000000010000 x0 : 6667f74e4ba50b25Â
> [ÂÂÂÂ0.000000] Call trace:
> [ÂÂÂÂ0.000000]ÂÂits_init+0x588/0xb54
> [ÂÂÂÂ0.000000]ÂÂgic_init_bases+0x53c/0x5d4
> [ÂÂÂÂ0.000000]ÂÂgic_acpi_init+0x2cc/0x564
> [ÂÂÂÂ0.000000]ÂÂacpi_match_madt+0x9c/0x15c
> [ÂÂÂÂ0.000000]ÂÂacpi_table_parse_entries_array+0x3e0/0x5d8
> [ÂÂÂÂ0.000000]ÂÂacpi_table_parse_entries+0xbc/0x114
> [ÂÂÂÂ0.000000]ÂÂacpi_table_parse_madt+0x4c/0x80
> [ÂÂÂÂ0.000000]ÂÂ__acpi_probe_device_table+0x134/0x1ec
> [ÂÂÂÂ0.000000]ÂÂirqchip_init+0x48/0x74
> [ÂÂÂÂ0.000000]ÂÂinit_IRQ+0xe4/0x12c
> [ÂÂÂÂ0.000000]ÂÂstart_kernel+0x4d0/0x7d4
> [ÂÂÂÂ0.000000] irq event stamp: 0
> [ÂÂÂÂ0.000000] hardirqs lastÂÂenabled at (0):
> [<0000000000000000>]ÂÂÂÂÂÂÂÂÂÂÂ(null)
> [ÂÂÂÂ0.000000] hardirqs last disabled at (0):
> [<0000000000000000>]ÂÂÂÂÂÂÂÂÂÂÂ(null)
> [ÂÂÂÂ0.000000] softirqs lastÂÂenabled at (0):
> [<0000000000000000>]ÂÂÂÂÂÂÂÂÂÂÂ(null)
> [ÂÂÂÂ0.000000] softirqs last disabled at (0):
> [<0000000000000000>]ÂÂÂÂÂÂÂÂÂÂÂ(null)
> [ÂÂÂÂ0.000000] ---[ end trace f27c5aed63f8afd4 ]---
> [ÂÂÂÂ0.000000] GICv3: using LPI property table @0x0000001dc0fb0000
> [ÂÂÂÂ0.000000] ITS: Using DirectLPI for VPE invalidation
> [ÂÂÂÂ0.000000] ITS: Enabling GICv4 support
> [ÂÂÂÂ0.000000] WARNING: CPU: 0 PID: 0 at drivers/irqchip/irq-gic-v3-its.c:2096
> its_cpu_init_lpis+0x3b4/0x3f0

Same thing here.

> [ÂÂÂÂ0.000000] Modules linked in:
> [ÂÂÂÂ0.000000] CPU: 0 PID: 0 Comm: swapper/0 Tainted: GÂÂÂÂÂÂÂÂWÂÂÂÂÂÂÂT 4.20.0-
> rc1+ #7
> [ÂÂÂÂ0.000000] pstate: 60000085 (nZCv daIf -PAN -UAO)
> [ÂÂÂÂ0.000000] pc : its_cpu_init_lpis+0x3b4/0x3f0
> [ÂÂÂÂ0.000000] lr : its_cpu_init_lpis+0x3b0/0x3f0
> [ÂÂÂÂ0.000000] sp : ffff200009ca7a00
> [ÂÂÂÂ0.000000] x29: ffff200009ca7a00 x28: ffff200009ce6188Â
> [ÂÂÂÂ0.000000] x27: 0000601df1e30000 x26: ffff200009ca7a00Â
> [ÂÂÂÂ0.000000] x25: 0000001dc0fc0000 x24: ffff20000c0c3000Â
> [ÂÂÂÂ0.000000] x23: ffff7fe007703f00 x22: ffff2000093a8000Â
> [ÂÂÂÂ0.000000] x21: ffff20000c180000 x20: ffff200009cd9000Â
> [ÂÂÂÂ0.000000] x19: 1fffe40001394f4c x18: 000000000000003fÂ
> [ÂÂÂÂ0.000000] x17: 0000000000000000 x16: 0000000000000000Â
> [ÂÂÂÂ0.000000] x15: 0000000000000007 x14: ffff2000094f050cÂ
> [ÂÂÂÂ0.000000] x13: ffff2000094f3cac x12: ffff2000094e7248Â
> [ÂÂÂÂ0.000000] x11: ffff2000094e69e0 x10: ffff2000094e9d18Â
> [ÂÂÂÂ0.000000] x9 : 1fffe40001394e5c x8 : ffff040001394edfÂ
> [ÂÂÂÂ0.000000] x7 : 0000000041b58ab3 x6 : 00000000f1f1f1f1Â
> [ÂÂÂÂ0.000000] x5 : 0000000041b58ab3 x4 : 00000000f1f1f1f1Â
> [ÂÂÂÂ0.000000] x3 : ffff040001394f4c x2 : 000000000000ffffÂ
> [ÂÂÂÂ0.000000] x1 : 0000000000010000 x0 : 00000000ffffffedÂ
> [ÂÂÂÂ0.000000] Call trace:
> [ÂÂÂÂ0.000000]ÂÂits_cpu_init_lpis+0x3b4/0x3f0
> [ÂÂÂÂ0.000000]ÂÂits_cpu_init+0xa8/0x220
> [ÂÂÂÂ0.000000]ÂÂgic_init_bases+0x540/0x5d4
> [ÂÂÂÂ0.000000]ÂÂgic_acpi_init+0x2cc/0x564
> [ÂÂÂÂ0.000000]ÂÂacpi_match_madt+0x9c/0x15c
> [ÂÂÂÂ0.000000]ÂÂacpi_table_parse_entries_array+0x3e0/0x5d8
> [ÂÂÂÂ0.000000]ÂÂacpi_table_parse_entries+0xbc/0x114
> [ÂÂÂÂ0.000000]ÂÂacpi_table_parse_madt+0x4c/0x80
> [ÂÂÂÂ0.000000]ÂÂ__acpi_probe_device_table+0x134/0x1ec
> [ÂÂÂÂ0.000000]ÂÂirqchip_init+0x48/0x74
> [ÂÂÂÂ0.000000]ÂÂinit_IRQ+0xe4/0x12c
> [ÂÂÂÂ0.000000]ÂÂstart_kernel+0x4d0/0x7d4
> [ÂÂÂÂ0.000000] irq event stamp: 0
> [ÂÂÂÂ0.000000] hardirqs lastÂÂenabled at (0):
> [<0000000000000000>]ÂÂÂÂÂÂÂÂÂÂÂ(null)
> [ÂÂÂÂ0.000000] hardirqs last disabled at (0):
> [<0000000000000000>]ÂÂÂÂÂÂÂÂÂÂÂ(null)
> [ÂÂÂÂ0.000000] softirqs lastÂÂenabled at (0):
> [<0000000000000000>]ÂÂÂÂÂÂÂÂÂÂÂ(null)
> [ÂÂÂÂ0.000000] softirqs last disabled at (0):
> [<0000000000000000>]ÂÂÂÂÂÂÂÂÂÂÂ(null)
> [ÂÂÂÂ0.000000] ---[ end trace f27c5aed63f8afd5 ]---
> [ÂÂÂÂ0.000000] GICv3: CPU0: using allocated LPI pending table
> @0x0000001dc0fc0000
> [ÂÂÂÂ0.000000] rcu:Â Offload RCU callbacks from CPUs: (none).
> [ÂÂÂÂ0.000000] WARNING: CPU: 0 PID: 0 at kernel/cpu.c:315
> lockdep_assert_cpus_held+0x50/0x60
> [ÂÂÂÂ0.000000] Modules linked in:
> [ÂÂÂÂ0.000000] CPU: 0 PID: 0 Comm: swapper/0 Tainted: GÂÂÂÂÂÂÂÂWÂÂÂÂÂÂÂT 4.20.0-
> rc1+ #7
> [ÂÂÂÂ0.000000] pstate: 20000085 (nzCv daIf -PAN -UAO)
> [ÂÂÂÂ0.000000] pc : lockdep_assert_cpus_held+0x50/0x60
> [ÂÂÂÂ0.000000] lr : lockdep_assert_cpus_held+0x4c/0x60
> [ÂÂÂÂ0.000000] sp : ffff200009ca7b10
> [ÂÂÂÂ0.000000] x29: ffff200009ca7b10 x28: ffff200009e49000Â
> [ÂÂÂÂ0.000000] x27: ffff200009ce1000 x26: ffff200009ce2000Â
> [ÂÂÂÂ0.000000] x25: ffff200009135000 x24: ffff200009cd9868Â
> [ÂÂÂÂ0.000000] x23: ffff200009c8c040 x22: 0000000000001000Â
> [ÂÂÂÂ0.000000] x21: 0000000000000012 x20: ffff200009cd9000Â
> [ÂÂÂÂ0.000000] x19: ffff200009ce5000 x18: 000000000000003fÂ
> [ÂÂÂÂ0.000000] x17: 0000000000000000 x16: 0000000000000000Â
> [ÂÂÂÂ0.000000] x15: 0000000000000007 x14: ffff200009471cccÂ
> [ÂÂÂÂ0.000000] x13: ffff2000094795a0 x12: ffff2000095249acÂ
> [ÂÂÂÂ0.000000] x11: ffff2000094f4470 x10: ffff2000094f0a44Â
> [ÂÂÂÂ0.000000] x9 : ffff200009526aa8 x8 : ffff0ffbffcc4004Â
> [ÂÂÂÂ0.000000] x7 : 1fffeffbffcc4003 x6 : ffff0ffbffcc4003Â
> [ÂÂÂÂ0.000000] x5 : ffff7fdffe62001b x4 : ffff0ffbffcc4004Â
> [ÂÂÂÂ0.000000] x3 : ffff0ffbffcc4004 x2 : dfff200000000000Â
> [ÂÂÂÂ0.000000] x1 : 0000000000000000 x0 : 0000000000000000Â
> [ÂÂÂÂ0.000000] Call trace:
> [ÂÂÂÂ0.000000]ÂÂlockdep_assert_cpus_held+0x50/0x60
> [ÂÂÂÂ0.000000]ÂÂstatic_key_enable_cpuslocked+0x30/0xe8
> [ÂÂÂÂ0.000000]ÂÂarch_timer_check_ool_workaround+0x128/0x2d0

Looks like we're calling static_key_enable_cpuslocked in the wrong
context. That's a separate issue (I'll investigate it).

Thanks,

M.
--
Jazz is not dead. It just smells funny...