All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Scott Wood <oss@buserror.net>, Nicholas Piggin <npiggin@gmail.com>
Subject: [PATCH 01/10] powerpc/syscall: switch user_exit_irqoff and trace_hardirqs_off order
Date: Mon, 15 Mar 2021 13:17:07 +1000	[thread overview]
Message-ID: <20210315031716.3940350-2-npiggin@gmail.com> (raw)
In-Reply-To: <20210315031716.3940350-1-npiggin@gmail.com>

user_exit_irqoff() -> __context_tracking_exit -> vtime_user_exit
warns in __seqprop_assert due to lockdep thinking preemption is enabled
because trace_hardirqs_off() has not yet been called.

Switch the order of these two calls, which matches their ordering in
interrupt_enter_prepare.

Fixes: 5f0b6ac3905f ("powerpc/64/syscall: Reconcile interrupts")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/kernel/interrupt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c
index c4dd4b8f9cfa..fbabb49888d3 100644
--- a/arch/powerpc/kernel/interrupt.c
+++ b/arch/powerpc/kernel/interrupt.c
@@ -43,11 +43,11 @@ notrace long system_call_exception(long r3, long r4, long r5,
 	if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
 		BUG_ON(irq_soft_mask_return() != IRQS_ALL_DISABLED);
 
+	trace_hardirqs_off(); /* finish reconciling */
+
 	CT_WARN_ON(ct_state() == CONTEXT_KERNEL);
 	user_exit_irqoff();
 
-	trace_hardirqs_off(); /* finish reconciling */
-
 	if (!IS_ENABLED(CONFIG_BOOKE) && !IS_ENABLED(CONFIG_40x))
 		BUG_ON(!(regs->msr & MSR_RI));
 	BUG_ON(!(regs->msr & MSR_PR));
-- 
2.23.0


  reply	other threads:[~2021-03-15  3:17 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15  3:17 [PATCH 00/10] Move 64e to new interrupt return code Nicholas Piggin
2021-03-15  3:17 ` Nicholas Piggin [this message]
2021-03-15  3:17 ` [PATCH 02/10] powerpc/64e/interrupt: always save nvgprs on interrupt Nicholas Piggin
2021-03-15  3:17 ` [PATCH 03/10] powerpc/64e/interrupt: use new interrupt return Nicholas Piggin
2021-03-15  7:50   ` Christophe Leroy
2021-03-15  8:20     ` Christophe Leroy
2021-03-16  7:03     ` Nicholas Piggin
2021-03-15 13:30   ` Christophe Leroy
2021-03-16  7:04     ` Nicholas Piggin
2021-03-16  7:25       ` Nicholas Piggin
2021-03-16  7:29         ` Christophe Leroy
2021-03-16  8:14           ` Nicholas Piggin
2021-03-15  3:17 ` [PATCH 04/10] powerpc/64e/interrupt: NMI save irq soft-mask state in C Nicholas Piggin
2021-03-15  3:17 ` [PATCH 05/10] powerpc/64e/interrupt: reconcile " Nicholas Piggin
2021-03-15  3:17 ` [PATCH 06/10] powerpc/64e/interrupt: Use new interrupt context tracking scheme Nicholas Piggin
2021-03-15  3:17 ` [PATCH 07/10] powerpc/64e/interrupt: handle bad_page_fault in C Nicholas Piggin
2021-03-15 14:07   ` Christophe Leroy
2021-03-16  7:06     ` Nicholas Piggin
2021-03-15  3:17 ` [PATCH 08/10] powerpc: clean up do_page_fault Nicholas Piggin
2021-03-15  3:17 ` [PATCH 09/10] powerpc: remove partial register save logic Nicholas Piggin
2021-03-15  3:17 ` [PATCH 10/10] powerpc: move norestart trap flag to bit 0 Nicholas Piggin
2021-03-15  8:14   ` Christophe Leroy
2021-03-16  7:11     ` Nicholas Piggin
2021-03-16  7:13       ` Christophe Leroy
2021-03-22 23:45 ` [PATCH 00/10] Move 64e to new interrupt return code Daniel Axtens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210315031716.3940350-2-npiggin@gmail.com \
    --to=npiggin@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=oss@buserror.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.