linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: entry.S: add missing trace_hardirqs_off
@ 2015-12-26  5:57 Zhi-zhou Zhang
  2016-01-04 15:18 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: Zhi-zhou Zhang @ 2015-12-26  5:57 UTC (permalink / raw)
  To: linux-arm-kernel

Before calling schedule, we should trace hardirqs correctly. If not,
we get following warning message when enabled CONFIG_DEBUG_LOCKDEP:

[    9.243073] DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled)
[ ... ]
[    9.262681] possible reason: unannotated irqs-off.
[    9.263018] irq event stamp: 256209
[    9.263266] hardirqs last  enabled at (256209): [<ffffffc000085a98>] el0_irq_naked+0x1c/0x24
[    9.263820] hardirqs last disabled at (256207): [<ffffffc0000bad20>] __do_softirq+0x170/0x28c
[    9.264419] softirqs last  enabled at (256208): [<ffffffc0000bad9c>] __do_softirq+0x1ec/0x28c
[    9.264976] softirqs last disabled at (256189): [<ffffffc0000bb194>] irq_exit+0x9c/0xec

Signed-off-by: Zhi-zhou Zhang <zhizhou.zh@gmail.com>
---
 arch/arm64/kernel/entry.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index 7ed3d75..4769190 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -634,6 +634,9 @@ work_pending:
 	bl	do_notify_resume
 	b	ret_to_user
 work_resched:
+#ifdef CONFIG_TRACE_IRQFLAGS
+	bl	trace_hardirqs_off
+#endif
 	bl	schedule
 
 /*
-- 
2.1.4

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

end of thread, other threads:[~2016-01-04 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-26  5:57 [PATCH] arm64: entry.S: add missing trace_hardirqs_off Zhi-zhou Zhang
2016-01-04 15:18 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).