[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20191121092516.9041-1-linux@rasmusvillemoes.dk>
Date: Thu, 21 Nov 2019 10:25:16 +0100
From: Rasmus Villemoes <linux@...musvillemoes.dk>
To: Russell King <linux@...linux.org.uk>
Cc: Li Yang <leoyang.li@....com>, Marc Zyngier <maz@...nel.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
kbuild test robot <lkp@...el.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] arm: avoid cpumask_t typedef in arch_trigger_cpumask_backtrace
I was trying to enable a previously PPC-only driver for ARM. That
driver happens to include asm/irq.h without some previous header
recursively pulling in linux/cpumask.h, resulting in kbuild kindly
informing me [1]
In file included from drivers/soc/fsl/qe/ucc.c:18:0:
>> arch/arm/include/asm/irq.h:34:50: error: unknown type name 'cpumask_t'
extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
Instead of including linux/cpumask.h from asm/irq.h just for the
cpumask_t typedef, use the spelling "struct cpumask" and add a
forward declaration of that. For consistency, update the definition of
the function accordingly.
No functional change.
[1] https://lore.kernel.org/lkml/201911210258.dfd8HF9z%25lkp@intel.com/
Reported-by: kbuild test robot <lkp@...el.com>
Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
---
We're past -rc8, so I probably can't hope for this to make it into
5.4. However, it currently blocks a rather large series of mine from
being picked up and getting time in -next. Would it be ok with the ARM
maintainers if I ask Li Yang to carry this as part of that large
series?
arch/arm/include/asm/irq.h | 3 ++-
arch/arm/kernel/smp.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index 46d41140df27..d8deb81bc8ce 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -31,7 +31,8 @@ void handle_IRQ(unsigned int, struct pt_regs *);
void init_IRQ(void);
#ifdef CONFIG_SMP
-extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
+struct cpumask;
+extern void arch_trigger_cpumask_backtrace(const struct cpumask *mask,
bool exclude_self);
#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
#endif
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 4b0bab2607e4..b096200c7436 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -806,7 +806,8 @@ static void raise_nmi(cpumask_t *mask)
__smp_cross_call(mask, IPI_CPU_BACKTRACE);
}
-void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
+void arch_trigger_cpumask_backtrace(const struct cpumask *mask,
+ bool exclude_self)
{
nmi_trigger_cpumask_backtrace(mask, exclude_self, raise_nmi);
}
--
2.23.0
Powered by blists - more mailing lists