From: David Daney <[email protected]>
My patch f21afc25f (smp.h: Use local_irq_{save,restore}() in !SMP
version of on_each_cpu().) seems to have broken ia64 and mn10300.
We can fix the breakage by resolving the unmet include dependencies.
David Daney (2):
ia64: Fix include dependency in asm/irqflags.h
mn10300: Fix include dependency in irqflags.h
arch/ia64/include/asm/irqflags.h | 1 +
arch/mn10300/include/asm/irqflags.h | 3 ++-
arch/mn10300/include/asm/smp.h | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
--
1.7.11.7
From: David Daney <[email protected]>
asm/kregs.h isn't always included first, so we need an explicit include.
Signed-off-by: David Daney <[email protected]>
---
arch/ia64/include/asm/irqflags.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/ia64/include/asm/irqflags.h b/arch/ia64/include/asm/irqflags.h
index 1bf2cf2..cec6c06 100644
--- a/arch/ia64/include/asm/irqflags.h
+++ b/arch/ia64/include/asm/irqflags.h
@@ -11,6 +11,7 @@
#define _ASM_IA64_IRQFLAGS_H
#include <asm/pal.h>
+#include <asm/kregs.h>
#ifdef CONFIG_IA64_DEBUG_IRQ
extern unsigned long last_cli_ip;
--
1.7.11.7
From: David Daney <[email protected]>
We need to pick up the definition of raw_smp_processor_id() from
asm/smp.h. For the !SMP case, we need to supply a definition of
raw_smp_processor_id().
Signed-off-by: David Daney <[email protected]>
---
arch/mn10300/include/asm/irqflags.h | 3 ++-
arch/mn10300/include/asm/smp.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/mn10300/include/asm/irqflags.h b/arch/mn10300/include/asm/irqflags.h
index 678f68d..06e0a17 100644
--- a/arch/mn10300/include/asm/irqflags.h
+++ b/arch/mn10300/include/asm/irqflags.h
@@ -14,7 +14,8 @@
#include <asm/cpu-regs.h>
#ifndef __ASSEMBLY__
-#include <linux/smp.h>
+/* linux/smp.h <- linux/irqflags.h needs asm/smp.h first */
+#include <asm/smp.h>
#endif
/*
diff --git a/arch/mn10300/include/asm/smp.h b/arch/mn10300/include/asm/smp.h
index 6745dbe..498e5ab 100644
--- a/arch/mn10300/include/asm/smp.h
+++ b/arch/mn10300/include/asm/smp.h
@@ -100,6 +100,7 @@ extern void __cpu_die(unsigned int cpu);
#ifndef __ASSEMBLY__
static inline void smp_init_cpus(void) {}
+#define raw_smp_processor_id() 0
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_SMP */
--
1.7.11.7
On Sun, Jun 16, 2013 at 10:06 PM, <[email protected]> wrote:
> From: David Daney <[email protected]>
>
> We need to pick up the definition of raw_smp_processor_id() from
> asm/smp.h. For the !SMP case, we need to supply a definition of
> raw_smp_processor_id().
Thanks, this fixes the build!
> Signed-off-by: David Daney <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On Sun, Jun 16, 2013 at 10:06 PM, <[email protected]> wrote:
> asm/kregs.h isn't always included first, so we need an explicit include.
Thanks, this fixes the build!
> Signed-off-by: David Daney <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
[email protected] wrote:
> #ifndef __ASSEMBLY__
> -#include <linux/smp.h>
> +/* linux/smp.h <- linux/irqflags.h needs asm/smp.h first */
> +#include <asm/smp.h>
> #endif
If you make this change, is the #ifndef __ASSEMBLY__ still necessary, I
wonder...
David
On Mon, Jun 17, 2013 at 11:07 AM, David Howells <[email protected]> wrote:
> [email protected] wrote:
>
>> #ifndef __ASSEMBLY__
>> -#include <linux/smp.h>
>> +/* linux/smp.h <- linux/irqflags.h needs asm/smp.h first */
>> +#include <asm/smp.h>
>> #endif
>
> If you make this change, is the #ifndef __ASSEMBLY__ still necessary, I
> wonder...
Seems to be fine, for asb2303_defconfig.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On Mon, Jun 17, 2013 at 9:07 AM, Geert Uytterhoeven
<[email protected]> wrote:
> On Sun, Jun 16, 2013 at 10:06 PM, <[email protected]> wrote:
>> From: David Daney <[email protected]>
>>
>> We need to pick up the definition of raw_smp_processor_id() from
>> asm/smp.h. For the !SMP case, we need to supply a definition of
>> raw_smp_processor_id().
>
> Thanks, this fixes the build!
>
>> Signed-off-by: David Daney <[email protected]>
>
> Acked-by: Geert Uytterhoeven <[email protected]>
Sorry, I acked to soon. While SMP=n is fine (asb2303_defconfig),
there's a new regression with asb2364_defconfig, which has SMP=y:
CC arch/mn10300/kernel/asm-offsets.s
In file included from
/scratch/geert/linux/linux/arch/mn10300/include/asm/irqflags.h:18:0,
from /scratch/geert/linux/linux/include/linux/irqflags.h:15,
from /scratch/geert/linux/linux/include/linux/spinlock.h:53,
from /scratch/geert/linux/linux/include/linux/seqlock.h:29,
from /scratch/geert/linux/linux/include/linux/time.h:5,
from /scratch/geert/linux/linux/include/uapi/linux/timex.h:56,
from /scratch/geert/linux/linux/include/linux/timex.h:56,
from /scratch/geert/linux/linux/include/linux/sched.h:17,
from
/scratch/geert/linux/linux/arch/mn10300/kernel/asm-offsets.c:7:
/scratch/geert/linux/linux/arch/mn10300/include/asm/smp.h:88:34:
error: unknown type name 'smp_call_func_t'
make[4]: *** [arch/mn10300/kernel/asm-offsets.s] Error 1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On 06/17/2013 03:12 AM, Geert Uytterhoeven wrote:
> On Mon, Jun 17, 2013 at 9:07 AM, Geert Uytterhoeven
> <[email protected]> wrote:
>> On Sun, Jun 16, 2013 at 10:06 PM, <[email protected]> wrote:
>>> From: David Daney <[email protected]>
>>>
>>> We need to pick up the definition of raw_smp_processor_id() from
>>> asm/smp.h. For the !SMP case, we need to supply a definition of
>>> raw_smp_processor_id().
>> Thanks, this fixes the build!
>>
>>> Signed-off-by: David Daney <[email protected]>
>> Acked-by: Geert Uytterhoeven <[email protected]>
> Sorry, I acked to soon. While SMP=n is fine (asb2303_defconfig),
> there's a new regression with asb2364_defconfig, which has SMP=y:
>
> CC arch/mn10300/kernel/asm-offsets.s
> In file included from
> /scratch/geert/linux/linux/arch/mn10300/include/asm/irqflags.h:18:0,
> from /scratch/geert/linux/linux/include/linux/irqflags.h:15,
> from /scratch/geert/linux/linux/include/linux/spinlock.h:53,
> from /scratch/geert/linux/linux/include/linux/seqlock.h:29,
> from /scratch/geert/linux/linux/include/linux/time.h:5,
> from /scratch/geert/linux/linux/include/uapi/linux/timex.h:56,
> from /scratch/geert/linux/linux/include/linux/timex.h:56,
> from /scratch/geert/linux/linux/include/linux/sched.h:17,
> from
> /scratch/geert/linux/linux/arch/mn10300/kernel/asm-offsets.c:7:
> /scratch/geert/linux/linux/arch/mn10300/include/asm/smp.h:88:34:
> error: unknown type name 'smp_call_func_t'
> make[4]: *** [arch/mn10300/kernel/asm-offsets.s] Error 1
I am truly in Include Hell. I will attempt a better fix...
David Daney
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
From: David Daney <[email protected]>
We need to pick up the definition of raw_smp_processor_id() from
asm/smp.h. For the !SMP case, we need to supply a definition of
raw_smp_processor_id().
Because of the include dependencies we cannot use smp_call_func_t in
asm/smp.h, but we do need linux/thread_info.h
Signed-off-by: David Daney <[email protected]>
---
Changes from v1: Remove redundant #ifndef __ASSEMBLY__, fix SMP case.
arch/mn10300/include/asm/irqflags.h | 5 ++---
arch/mn10300/include/asm/smp.h | 4 +++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/mn10300/include/asm/irqflags.h b/arch/mn10300/include/asm/irqflags.h
index 678f68d..8730c0a 100644
--- a/arch/mn10300/include/asm/irqflags.h
+++ b/arch/mn10300/include/asm/irqflags.h
@@ -13,9 +13,8 @@
#define _ASM_IRQFLAGS_H
#include <asm/cpu-regs.h>
-#ifndef __ASSEMBLY__
-#include <linux/smp.h>
-#endif
+/* linux/smp.h <- linux/irqflags.h needs asm/smp.h first */
+#include <asm/smp.h>
/*
* interrupt control
diff --git a/arch/mn10300/include/asm/smp.h b/arch/mn10300/include/asm/smp.h
index 6745dbe..56c4241 100644
--- a/arch/mn10300/include/asm/smp.h
+++ b/arch/mn10300/include/asm/smp.h
@@ -24,6 +24,7 @@
#ifndef __ASSEMBLY__
#include <linux/threads.h>
#include <linux/cpumask.h>
+#include <linux/thread_info.h>
#endif
#ifdef CONFIG_SMP
@@ -85,7 +86,7 @@ extern cpumask_t cpu_boot_map;
extern void smp_init_cpus(void);
extern void smp_cache_interrupt(void);
extern void send_IPI_allbutself(int irq);
-extern int smp_nmi_call_function(smp_call_func_t func, void *info, int wait);
+extern int smp_nmi_call_function(void (*func)(void *), void *info, int wait);
extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
@@ -100,6 +101,7 @@ extern void __cpu_die(unsigned int cpu);
#ifndef __ASSEMBLY__
static inline void smp_init_cpus(void) {}
+#define raw_smp_processor_id() 0
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_SMP */
--
1.7.11.7
On Mon, Jun 17, 2013 at 5:46 PM, <[email protected]> wrote:
> We need to pick up the definition of raw_smp_processor_id() from
> asm/smp.h. For the !SMP case, we need to supply a definition of
> raw_smp_processor_id().
>
> Because of the include dependencies we cannot use smp_call_func_t in
> asm/smp.h, but we do need linux/thread_info.h
>
> Signed-off-by: David Daney <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
> Changes from v1: Remove redundant #ifndef __ASSEMBLY__, fix SMP case.
Many thanks, now both mn10300 defconfigs build fine.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
[email protected] wrote:
> From: David Daney <[email protected]>
>
> We need to pick up the definition of raw_smp_processor_id() from
> asm/smp.h. For the !SMP case, we need to supply a definition of
> raw_smp_processor_id().
>
> Because of the include dependencies we cannot use smp_call_func_t in
> asm/smp.h, but we do need linux/thread_info.h
>
> Signed-off-by: David Daney <[email protected]>
Acked-by: David Howells <[email protected]>