linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Move arch_trigger_cpumask_backtrace from nmi.h to irq.h
@ 2023-06-21 23:48 Douglas Anderson
  2023-06-22  8:40 ` Petr Mladek
  0 siblings, 1 reply; 3+ messages in thread
From: Douglas Anderson @ 2023-06-21 23:48 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Petr Mladek, Arnd Bergmann, Stephen Rothwell, Douglas Anderson,
	linux-kernel, Nicholas Piggin, Tom Rix, Laurent Dufour,
	linuxppc-dev

The powerpc architecture was the only one that defined
arch_trigger_cpumask_backtrace() in asm/nmi.h instead of
asm/irq.h. Move it to be consistent.

This fixes compile time errors introduced by commit 7ca8fe94aa92
("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH"). That commit
caused <asm/nmi.h> to stop being included if the hardlockup detector
wasn't enabled. The specific errors were:
  error: implicit declaration of function ‘nmi_cpu_backtrace’
  error: implicit declaration of function ‘nmi_trigger_cpumask_backtrace’

Fixes: 7ca8fe94aa92 ("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH")
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Closes: https://lore.kernel.org/r/871qi5otdh.fsf@mail.lhotse
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
I'd expect that this would land in Andrew Morton's tree along with the
other lockup detector stuff.

 arch/powerpc/include/asm/irq.h | 6 ++++++
 arch/powerpc/include/asm/nmi.h | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h
index 94dffa1dd223..f7a90b6f3ceb 100644
--- a/arch/powerpc/include/asm/irq.h
+++ b/arch/powerpc/include/asm/irq.h
@@ -53,5 +53,11 @@ void __do_IRQ(struct pt_regs *regs);
 
 int irq_choose_cpu(const struct cpumask *mask);
 
+#ifdef CONFIG_NMI_IPI
+extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
+					   bool exclude_self);
+#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
+#endif
+
 #endif /* _ASM_IRQ_H */
 #endif /* __KERNEL__ */
diff --git a/arch/powerpc/include/asm/nmi.h b/arch/powerpc/include/asm/nmi.h
index ce25318c3902..49a75340c3e0 100644
--- a/arch/powerpc/include/asm/nmi.h
+++ b/arch/powerpc/include/asm/nmi.h
@@ -9,12 +9,6 @@ void watchdog_hardlockup_set_timeout_pct(u64 pct);
 static inline void watchdog_hardlockup_set_timeout_pct(u64 pct) {}
 #endif
 
-#ifdef CONFIG_NMI_IPI
-extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
-					   bool exclude_self);
-#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
-#endif
-
 extern void hv_nmi_check_nonrecoverable(struct pt_regs *regs);
 
 #endif /* _ASM_NMI_H */
-- 
2.41.0.162.gfafddb0af9-goog


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

* Re: [PATCH] powerpc: Move arch_trigger_cpumask_backtrace from nmi.h to irq.h
  2023-06-21 23:48 [PATCH] powerpc: Move arch_trigger_cpumask_backtrace from nmi.h to irq.h Douglas Anderson
@ 2023-06-22  8:40 ` Petr Mladek
  2023-06-22 17:14   ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Mladek @ 2023-06-22  8:40 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Stephen Rothwell, Arnd Bergmann, linux-kernel, Nicholas Piggin,
	Tom Rix, Andrew Morton, Laurent Dufour, linuxppc-dev

On Wed 2023-06-21 16:48:19, Douglas Anderson wrote:
> The powerpc architecture was the only one that defined
> arch_trigger_cpumask_backtrace() in asm/nmi.h instead of
> asm/irq.h. Move it to be consistent.
> 
> This fixes compile time errors introduced by commit 7ca8fe94aa92
> ("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH"). That commit

Will this commit end up in the mainline wihtout rebasing?
We could use only final commit hashes in the commit messages.

> caused <asm/nmi.h> to stop being included if the hardlockup detector
> wasn't enabled. The specific errors were:
>   error: implicit declaration of function ‘nmi_cpu_backtrace’
>   error: implicit declaration of function ‘nmi_trigger_cpumask_backtrace’
> 
> Fixes: 7ca8fe94aa92 ("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH")
> Reported-by: Michael Ellerman <mpe@ellerman.id.au>
> Closes: https://lore.kernel.org/r/871qi5otdh.fsf@mail.lhotse
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Looks like a reasonable solution:

Reviewed-by: Petr Mladek <pmladek@suse.com>

Thanks a lot for fixing the regression.

Best Regards,
Petr

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

* Re: [PATCH] powerpc: Move arch_trigger_cpumask_backtrace from nmi.h to irq.h
  2023-06-22  8:40 ` Petr Mladek
@ 2023-06-22 17:14   ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2023-06-22 17:14 UTC (permalink / raw)
  To: Petr Mladek
  Cc: Stephen Rothwell, Arnd Bergmann, Douglas Anderson, linux-kernel,
	Nicholas Piggin, Tom Rix, Laurent Dufour, linuxppc-dev

On Thu, 22 Jun 2023 10:40:11 +0200 Petr Mladek <pmladek@suse.com> wrote:

> On Wed 2023-06-21 16:48:19, Douglas Anderson wrote:
> > The powerpc architecture was the only one that defined
> > arch_trigger_cpumask_backtrace() in asm/nmi.h instead of
> > asm/irq.h. Move it to be consistent.
> > 
> > This fixes compile time errors introduced by commit 7ca8fe94aa92
> > ("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH"). That commit
> 
> Will this commit end up in the mainline wihtout rebasing?
> We could use only final commit hashes in the commit messages.

7ca8fe94aa92 is now in the mm-stable branch, which is is non-rebasing,
so this hash should be good.

Patches get moved from the rebasing mm-unstable to the non-rebasing
mm-stable when they're considered to be stabilized.

Ditto mm-hotfixes-unstable/mm-hotfixes-stable and
mm-nonmm-unstable/mm-nonmm-stable.

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

end of thread, other threads:[~2023-06-22 17:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-21 23:48 [PATCH] powerpc: Move arch_trigger_cpumask_backtrace from nmi.h to irq.h Douglas Anderson
2023-06-22  8:40 ` Petr Mladek
2023-06-22 17:14   ` Andrew Morton

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).