All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: <linuxppc-dev@lists.ozlabs.org>
Cc: <peterz@infradead.org>, <npiggin@gmail.com>, linux-pm@vger.kernel.org
Subject: [PATCH 1/4] powerpc/64: Mark prep_irq_for_idle() __cpuidle
Date: Fri,  7 Apr 2023 00:45:32 +1000	[thread overview]
Message-ID: <20230406144535.3786008-1-mpe@ellerman.id.au> (raw)

Code in the idle path is not allowed to be instrumented because RCU is
disabled, see commit 0e985e9d2286 ("cpuidle: Add comments about
noinstr/__cpuidle usage").

Mark prep_irq_for_idle() __cpuidle, which is equivalent to noinstr, to
enforce that.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/irq_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/irq_64.c b/arch/powerpc/kernel/irq_64.c
index c788c55512ed..2ab0e8d84c1d 100644
--- a/arch/powerpc/kernel/irq_64.c
+++ b/arch/powerpc/kernel/irq_64.c
@@ -354,7 +354,7 @@ EXPORT_SYMBOL(arch_local_irq_restore);
  * disabled and marked as such, so the local_irq_enable() call
  * in arch_cpu_idle() will properly re-enable everything.
  */
-bool prep_irq_for_idle(void)
+__cpuidle bool prep_irq_for_idle(void)
 {
 	/*
 	 * First we need to hard disable to ensure no interrupt
-- 
2.39.2


WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <mpe@ellerman.id.au>
To: <linuxppc-dev@lists.ozlabs.org>
Cc: peterz@infradead.org, npiggin@gmail.com, linux-pm@vger.kernel.org
Subject: [PATCH 1/4] powerpc/64: Mark prep_irq_for_idle() __cpuidle
Date: Fri,  7 Apr 2023 00:45:32 +1000	[thread overview]
Message-ID: <20230406144535.3786008-1-mpe@ellerman.id.au> (raw)

Code in the idle path is not allowed to be instrumented because RCU is
disabled, see commit 0e985e9d2286 ("cpuidle: Add comments about
noinstr/__cpuidle usage").

Mark prep_irq_for_idle() __cpuidle, which is equivalent to noinstr, to
enforce that.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/irq_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/irq_64.c b/arch/powerpc/kernel/irq_64.c
index c788c55512ed..2ab0e8d84c1d 100644
--- a/arch/powerpc/kernel/irq_64.c
+++ b/arch/powerpc/kernel/irq_64.c
@@ -354,7 +354,7 @@ EXPORT_SYMBOL(arch_local_irq_restore);
  * disabled and marked as such, so the local_irq_enable() call
  * in arch_cpu_idle() will properly re-enable everything.
  */
-bool prep_irq_for_idle(void)
+__cpuidle bool prep_irq_for_idle(void)
 {
 	/*
 	 * First we need to hard disable to ensure no interrupt
-- 
2.39.2


             reply	other threads:[~2023-04-06 14:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 14:45 Michael Ellerman [this message]
2023-04-06 14:45 ` [PATCH 1/4] powerpc/64: Mark prep_irq_for_idle() __cpuidle Michael Ellerman
2023-04-06 14:45 ` [PATCH 2/4] powerpc/64: Don't call trace_hardirqs_on() in prep_irq_for_idle() Michael Ellerman
2023-04-06 14:45   ` Michael Ellerman
2023-04-06 14:45 ` [PATCH 3/4] cpuidle: pseries: Mark ->enter() functions as __cpuidle Michael Ellerman
2023-04-06 14:45   ` Michael Ellerman
2023-04-11  9:02   ` Sachin Sant
2023-04-11  9:02     ` Sachin Sant
2023-04-06 14:45 ` [PATCH 4/4] powerpc/pseries: Always inline functions called from cpuidle Michael Ellerman
2023-04-06 14:45   ` Michael Ellerman
2023-04-26 12:01 ` [PATCH 1/4] powerpc/64: Mark prep_irq_for_idle() __cpuidle Michael Ellerman

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=20230406144535.3786008-1-mpe@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=peterz@infradead.org \
    /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.