Skip to contentSkip to conversation

Fix v3.10-rc6 failures in ia64 and mn10300

PATCH In review [email protected] 4 participants 12 messages Jun 16, 2013 – Jun 19, 2013

lore
Share & tools
lore
#0 lore raw

cover Fix v3.10-rc6 failures in ia64 and mn10300

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(-)
Signature · 1 line
1.7.11.7
#1 lore raw

PATCH 1/2 ia64: Fix include dependency in asm/irqflags.h

From: David Daney <[email protected]>

asm/kregs.h isn't always included first, so we need an explicit include.

---
 arch/ia64/include/asm/irqflags.h | 1 +
 1 file changed, 1 insertion(+)
arch/ia64/include/asm/irqflags.h +1 -0
index 1bf2cf2..cec6c06 100644
@@ -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;
Signature · 1 line
1.7.11.7
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] ia64: Fix include dependency in asm/irqflags.h

Quoted 1 line · 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!

Quoted 1 line

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

#3 lore raw

PATCH 2/2 mn10300: Fix include dependency in irqflags.h

In reply to [email protected]

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

---
 arch/mn10300/include/asm/irqflags.h | 3 ++-
 arch/mn10300/include/asm/smp.h      | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
arch/mn10300/include/asm/irqflags.h +2 -1
index 678f68d..06e0a17 100644
@@ -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
 
 /*
arch/mn10300/include/asm/smp.h +1 -0
index 6745dbe..498e5ab 100644
@@ -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 */
Signature · 1 line
1.7.11.7
Acked-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] mn10300: Fix include dependency in irqflags.h

Quoted 5 lines · 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!

Quoted 1 line

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

#5 lore raw

Re: [PATCH 2/2] mn10300: Fix include dependency in irqflags.h

Quoted 7 lines · Geert Uytterhoeven
Quoted 5 lines · 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().

Quoted 5 lines

Thanks, this fixes the build!

Quoted 1 line

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

#6 lore raw

Re: [PATCH 2/2] mn10300: Fix include dependency in irqflags.h

Quoted 15 lines · Geert Uytterhoeven
Quoted 10 lines · Geert Uytterhoeven
Quoted 5 lines · 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!

Quoted 1 line

Sorry, I acked to soon. While SMP=n is fine (asb2303_defconfig), there's a new regression with asb2364_defconfig, which has SMP=y:

Quoted 15 lines

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

Quoted 10 lines

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

#7 lore raw

Re: [PATCH 2/2] mn10300: Fix include dependency in irqflags.h

In reply to [email protected]

arch/mn10300/include/asm/irqflags.h line 19

Quoted 5 lines · [email protected] wrote:

#ifndef __ASSEMBLY__

arch/mn10300/include/asm/irqflags.h +2 -1
-#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

#8 lore raw

Re: [PATCH 2/2] mn10300: Fix include dependency in irqflags.h

Quoted 10 lines · David Howells

arch/mn10300/include/asm/irqflags.h line 19

Quoted 5 lines · [email protected] wrote:

#ifndef __ASSEMBLY__

arch/mn10300/include/asm/irqflags.h +2 -1
-#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

#9 lore raw

PATCH v2 1/1 mn10300: Fix include dependency in irqflags.h et al.

In reply to [email protected]

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

---

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(-)
arch/mn10300/include/asm/irqflags.h +2 -3
index 678f68d..8730c0a 100644
@@ -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
arch/mn10300/include/asm/smp.h +3 -1
index 6745dbe..56c4241 100644
@@ -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 */
Signature · 1 line
1.7.11.7
Acked-by on v2 1/1
#10 lore raw

Re: [PATCH v2] mn10300: Fix include dependency in irqflags.h et al.

Quoted 8 lines · 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

Quoted 1 line

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

Acked-by on v2 1/1
#11 lore raw

Re: [PATCH v2] mn10300: Fix include dependency in irqflags.h et al.

In reply to [email protected]
Quoted 10 lines · [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