Skip to contentSkip to conversation

IRQ flags patch

DISCUSSION David Howells 2 participants 4 messages Sep 9, 2010 – Sep 15, 2010 SuperH

lore
Share & tools
lore
#1 lore raw
Quoted 9 lines · David Howells

Hi Paul,

Could you review my SH irqflags changes? You can see it through here:

http://git.kernel.org/?p=linux/kernel/git/dhowells/linux-2.6-irqflags.git;a=summary

I'd like to put it into linux-next soon, hopefully to go to Linus in the next merge window, and I'd like for SH to still work...

Hi David,

This patch series fails to link on SH with the following error,

init/built-in.o: In function `do_one_initcall':
/home/matt/src/kernels/mfleming-2.6.git/init/main.c:770: undefined reference to `arch_local_save_flags'
init/built-in.o: In function `check_bugs':
/home/matt/src/kernels/mfleming-2.6.git/arch/sh/include/asm/bugs.h:28: undefined reference to arch_local_save_flags' arch/sh/kernel/built-in.o: In function cpu_idle':
/home/matt/src/kernels/mfleming-2.6.git/arch/sh/kernel/idle.c:114: undefined reference to arch_local_save_flags' arch/sh/mm/built-in.o: In function flush_icache_all':
/home/matt/src/kernels/mfleming-2.6.git/arch/sh/mm/cache-sh4.c:146: undefined reference to arch_local_save_flags' arch/sh/mm/built-in.o: In function sh4_flush_icache_range':
/home/matt/src/kernels/mfleming-2.6.git/arch/sh/mm/cache-sh4.c:86: undefined reference to arch_local_save_flags' arch/sh/mm/built-in.o:/home/matt/src/kernels/mfleming-2.6.git/arch/sh/include/asm/bitops-llsc.h:13: more undefined references to arch_local_save_flags' follow
make: *** [.tmp_vmlinux1] Error 1

I'm guessing the underscores should be dropped from __arch_local_irq_save() in arch/sh/kernel/irq_32.c seeing as there are no callers of that function anywhere?

However, this patch series fails to run on my 7785lcr board. You also need to move RAW_IRQ_DISABLED and RAW_IRQ_ENABLED in arch/sh/include/asm/irqflags.h to ARCH_IRQ_DISABLED and ARCH_IRQ_ENABLED. The attached diff gets my board booting.

arch/sh/include/asm/irqflags.h +2 -2
index a741153..43b7608 100644
@@ -1,8 +1,8 @@
 #ifndef __ASM_SH_IRQFLAGS_H
 #define __ASM_SH_IRQFLAGS_H
 
-#define RAW_IRQ_DISABLED	0xf0
-#define RAW_IRQ_ENABLED		0x00
+#define ARCH_IRQ_DISABLED	0xf0
+#define ARCH_IRQ_ENABLED	0x00
 
 #include <asm-generic/irqflags.h>
 
arch/sh/kernel/irq_32.c +4 -4
index 14d2477..e5a755b 100644
@@ -14,7 +14,7 @@ void notrace arch_local_irq_restore(unsigned long flags)
 {
 	unsigned long __dummy0, __dummy1;
 
-	if (flags = RAW_IRQ_DISABLED) {
+	if (flags = ARCH_IRQ_DISABLED) {
 		__asm__ __volatile__ (
 			"stc	sr, %0\n\t"
 			"or	#0xf0, %0\n\t"
@@ -33,14 +33,14 @@ void notrace arch_local_irq_restore(unsigned long flags)
 #endif
 			"ldc	%0, sr\n\t"
 			: "=&r" (__dummy0), "=r" (__dummy1)
-			: "1" (~RAW_IRQ_DISABLED)
+			: "1" (~ARCH_IRQ_DISABLED)
 			: "memory"
 		);
 	}
 }
 EXPORT_SYMBOL(arch_local_irq_restore);
 
-unsigned long notrace __arch_local_save_flags(void)
+unsigned long notrace arch_local_save_flags(void)
 {
 	unsigned long flags;
 
@@ -54,4 +54,4 @@ unsigned long notrace __arch_local_save_flags(void)
 
 	return flags;
 }
-EXPORT_SYMBOL(__arch_local_save_flags);
+EXPORT_SYMBOL(arch_local_save_flags);
#2 lore raw
In reply to David Howells
Quoted 8 lines · Matt Fleming

I'm guessing the underscores should be dropped from __arch_local_irq_save() in arch/sh/kernel/irq_32.c seeing as there are no callers of that function anywhere?

However, this patch series fails to run on my 7785lcr board. You also need to move RAW_IRQ_DISABLED and RAW_IRQ_ENABLED in arch/sh/include/asm/irqflags.h to ARCH_IRQ_DISABLED and ARCH_IRQ_ENABLED. The attached diff gets my board booting.

Seems likely, thanks. I've merged your patch into my GIT tree and rebased.

http://git.kernel.org/?p=linux/kernel/git/dhowells/linux-2.6-irqflags.git;a=summary

If you could check that, that'd be great!

Thanks,
David

Acked-by
#3 lore raw
In reply to David Howells
Quoted 11 lines · David Howells
Quoted 8 lines · Matt Fleming

I'm guessing the underscores should be dropped from __arch_local_irq_save() in arch/sh/kernel/irq_32.c seeing as there are no callers of that function anywhere?

However, this patch series fails to run on my 7785lcr board. You also need to move RAW_IRQ_DISABLED and RAW_IRQ_ENABLED in arch/sh/include/asm/irqflags.h to ARCH_IRQ_DISABLED and ARCH_IRQ_ENABLED. The attached diff gets my board booting.

Quoted 5 lines

Seems likely, thanks. I've merged your patch into my GIT tree and rebased.

http://git.kernel.org/?p=linux/kernel/git/dhowells/linux-2.6-irqflags.git;a=summary

If you could check that, that'd be great!

This looks good to me and it boots fine. Thanks!