sparc32: convert to asm-generic/hardirq.h
PATCH 1/1 sparc32: convert to asm-generic/hardirq.h
From: Christoph Hellwig <[email protected]>
---
arch/sparc/include/asm/hardirq_32.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
arch/sparc/include/asm/hardirq_32.h renamed from arch/sparc/include/asm/hardirq_32.h~sparc32-convert-to-asm-generic-hardirqh +1 -11
@@ -7,17 +7,7 @@#ifndef __SPARC_HARDIRQ_H#define __SPARC_HARDIRQ_H -#include <linux/threads.h> -#include <linux/spinlock.h> -#include <linux/cache.h> - -/* entry.S is sensitive to the offsets of these fields */ /* XXX P3 Is it? */ -typedef struct { -unsigned int __softirq_pending; -}____cacheline_aligned irq_cpustat_t ; - -#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ -#define HARDIRQ_BITS 8 +#include <asm-generic/hardirq.h> #endif /* __SPARC_HARDIRQ_H */
_
David Miller
maintainerFrom: [email protected]
Date: Fri, 18 Sep 2009 12:59:03 -0700
Quoted 5 lines
From: Christoph Hellwig <[email protected]>
Signed-off-by Christoph Hellwig <[email protected]>Cc "David S. Miller" <[email protected]>Signed-off-by Andrew Morton <[email protected]>
I had this in my tree but it breaks the build, so please toss this from your queue. Thanks.
In file included from include/asm-generic/hardirq.h:6,
from /home/davem/src/GIT/sparc-2.6/arch/sparc/include/asm/hardirq_32.h:11,
from /home/davem/src/GIT/sparc-2.6/arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:12,
from /home/davem/src/GIT/sparc-2.6/arch/sparc/include/asm/irq_32.h:9,
from /home/davem/src/GIT/sparc-2.6/arch/sparc/include/asm/irq.h:6,
from include/linux/irqnr.h:10,
from include/linux/random.h:12,
from include/linux/stackprotector.h:6,
from init/main.c:17:include/linux/irq.h:216: error: ‘NR_IRQS’ undeclared here (not in a function) ÿôèº{.nÇ+‰·Ÿ®‰†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¬¥ªÜ–)îÇø§¶›¡Ü¨}©ž²Æ zÚ&j:+v‰¨þø¯ù®w¥þŠà2ŠÞ™¨èÚ&¢)ß¡«a¶Úÿÿûàz¿äz¹Þ—ú+ƒùšŽŠÝ¢jÿŠwèþf
Quoted 23 lines · On Fri, 25 Sep 2009 14:07:21 -0700 (PDT) David Miller <[email protected]>…
From: [email protected]
Date: Fri, 18 Sep 2009 12:59:03 -0700Quoted 5 lines
From: Christoph Hellwig <[email protected]>
Signed-off-by Christoph Hellwig <[email protected]>Cc "David S. Miller" <[email protected]>Signed-off-by Andrew Morton <[email protected]>I had this in my tree but it breaks the build, so please toss this from your queue. Thanks.
In file included from
include/asm-generic/hardirq.h:6,from /home/davem/src/GIT/sparc-2.6/arch/sparc/include/asm/hardirq_32.h:11, from /home/davem/src/GIT/sparc-2.6/arch/sparc/include/asm/hardirq.h:6, from include/linux/hardirq.h:10, from include/linux/interrupt.h:12, from /home/davem/src/GIT/sparc-2.6/arch/sparc/include/asm/irq_32.h:9, from /home/davem/src/GIT/sparc-2.6/arch/sparc/include/asm/irq.h:6, from include/linux/irqnr.h:10, from include/linux/random.h:12, from include/linux/stackprotector.h:6, from init/main.c:17:
Quoted 1 line
include/linux/irq.h:216: error:___NR_IRQS___undeclared here (not in a function)
hm, I tried to fix this but my sparc32 cross-compiler broke.
ARCH=sparc:
scripts/mod/empty.c:1: error: -m64 is not supported by this configuration scripts/mod/empty.c:1: error: -mlong-double-64 not allowed with -m64 scripts/mod/empty.c:1: error: -mcmodel= is not supported on 32 bit systems
/opt/crosstool/gcc-4.1.0-glibc-2.3.6/sparc-unknown-linux-gnu/bin/sparc-unknown-linux-gnu-gcc -Wp,-MD,scripts/mod/.empty.o.d -nostdinc -isystem /opt/crosstool/gcc-4.1.0-glibc-2.3.6/sparc-unknown-linux-gnu/lib/gcc/sparc-unknown-linux-gnu/4.1.0/include -Iinclude -I/usr/src/devel/arch/sparc/include -include include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -pg -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(empty)" -D"KBUILD_MODNAME=KBUILD_STR(empty)" -D"DEBUG_HASHC" -D"DEBUG_HASH2P" -c -o scripts/mod/.tmp_empty.o scripts/mod/empty.c
How'd that -m64 get in there?
I haven't tested sparc32 in some time so perhaps I've forgotten the magic sauce.
David Miller
maintainerFrom: Andrew Morton <[email protected]>
Date: Fri, 25 Sep 2009 14:15:38 -0700
Quoted 7 lines
hm, I tried to fix this but my sparc32 cross-compiler broke.
ARCH=sparc:
scripts/mod/empty.c:1: error: -m64 is not supported by this configurationscripts/mod/empty.c:1: error: -mlong-double-64 not allowed with -m64scripts/mod/empty.c:1: error: -mcmodel= is not supported on 32 bit systems
...
Quoted 1 line
How'd that -m64 get in there?
That's really odd.
Sam, any idea?
Quoted 10 lines · David Miller
From: Andrew Morton <[email protected]>
Date: Fri, 25 Sep 2009 14:15:38 -0700Quoted 7 lines
hm, I tried to fix this but my sparc32 cross-compiler broke.
ARCH=sparc:
scripts/mod/empty.c:1: error: -m64 is not supported by this configurationscripts/mod/empty.c:1: error: -mlong-double-64 not allowed with -m64scripts/mod/empty.c:1: error: -mcmodel= is not supported on 32 bit systems
Quoted 6 lines
...
Quoted 1 line
How'd that -m64 get in there?
That's really odd.
Sam, any idea?
It happens if you try to build sparc with a sparc64 config.
Sam
Quoted 11 lines · On Fri, 25 Sep 2009 23:26:50 +0200 Sam Ravnborg <[email protected]> wrote:
Quoted 10 lines · David Miller
From: Andrew Morton <[email protected]>
Date: Fri, 25 Sep 2009 14:15:38 -0700Quoted 7 lines
hm, I tried to fix this but my sparc32 cross-compiler broke.
ARCH=sparc:
scripts/mod/empty.c:1: error: -m64 is not supported by this configurationscripts/mod/empty.c:1: error: -mlong-double-64 not allowed with -m64scripts/mod/empty.c:1: error: -mcmodel= is not supported on 32 bit systems
Quoted 9 lines
Quoted 6 lines
...
Quoted 1 line
How'd that -m64 get in there?
That's really odd.
Sam, any idea?
It happens if you try to build sparc with a sparc64 config.
setenv ARCH sparc
make mrproper
make allmodconfig
make init/main.o
scripts/mod/empty.c:1: error: -m64 is not supported by this configuration scripts/mod/empty.c:1: error: -mlong-double-64 not allowed with -m64 scripts/mod/empty.c:1: error: -mcmodel= is not supported on 32 bit systems
akpm:/usr/src/25> grep SPARC .configCONFIG_SPARC=y
# CONFIG_SPARC32 is not setCONFIG_SPARC64=yCONFIG_SPARC64_SMP=yCONFIG_SPARC64_PAGE_SIZE_8KB=y
# CONFIG_SPARC64_PAGE_SIZE_64KB is not setCONFIG_SPARC64_PCI=yCONFIG_INPUT_SPARCSPKR=mCONFIG_SND_SPARC=y
# Misc Linux/SPARC drivers
wtf? How'd sparc64 get set?
Maybe I'm supposed to use ARCH=sparc32 now? ARCH=sparc used to work.
akpm:/usr/src/25> setenv ARCH sparc32
akpm:/usr/src/25> make mrproper
Makefile:213: *** ARCH changed from "sparc" to "sparc32". Use "make mrproper" to fix it up. Stop.
lol.
akpm:/usr/src/25> setenv ARCH i386
akpm:/usr/src/25> make mrproper
Makefile:213: *** ARCH changed from "sparc" to "i386". Use "make mrproper" to fix it up. Stop.
help.
Quoted 12 lines · On Fri, 25 Sep 2009 14:36:23 -0700 Andrew Morton <[email protected]>…
akpm:/usr/src/25> grep SPARC .config
CONFIG_SPARC=y
#CONFIG_SPARC32is not setCONFIG_SPARC64=yCONFIG_SPARC64_SMP=yCONFIG_SPARC64_PAGE_SIZE_8KB=y
#CONFIG_SPARC64_PAGE_SIZE_64KBis not setCONFIG_SPARC64_PCI=yCONFIG_INPUT_SPARCSPKR=mCONFIG_SND_SPARC=y
# Misc Linux/SPARC drivers
Quoted 1 line
wtf? How'd sparc64 get set?
hm, OK, allmodconfig sets SPARC64. That seems wrong.
allnoconfig does not set SPARC64:
akpm:/usr/src/25> make allnoconfigscripts/kconfig/conf -n arch/sparc/Kconfig
#
# configuration written to .config # akpm:/usr/src/25> grep SPARC .config CONFIG_SPARC=y CONFIG_SPARC32=y # CONFIG_SPARC64 is not set # CONFIG_SPARC_LED is not set # CONFIG_SPARC_LEON is not set # Misc Linux/SPARC drivers
But with that config, init/main.o compiles OK.
Quoted 3 lines · On Fri, 25 Sep 2009 14:36:23 -0700 Andrew Morton <[email protected]>…
akpm:/usr/src/25> setenv ARCH sparc32
akpm:/usr/src/25> make mrproper
Makefile:213: *** ARCH changed from "sparc" to "sparc32". Use "make mrproper" to fix it up. Stop.
OK, I think this is just breakage in today's linux-next.
After doing an x86_64 build I did:
akpm2:/usr/src/25> setenv ARCH i386
akpm2:/usr/src/25> make mrproper
Makefile:200: *** CROSS_COMPILE changed from "/opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-" to to "/opt/crosstool/gcc-4.1.0-glibc-2.3.6/i686-unknown-linux-gnu/bin/i686-unknown-linux-gnu-". Use "make mrproper" to fix it up. Stop. **FAILED**
Manually removing include/generated/* fixes this up.
Quoted 45 lines · Andrew Morton
Quoted 11 lines · On Fri, 25 Sep 2009 23:26:50 +0200 Sam Ravnborg <[email protected]> wrote:
Quoted 10 lines · David Miller
From: Andrew Morton <[email protected]>
Date: Fri, 25 Sep 2009 14:15:38 -0700Quoted 7 lines
hm, I tried to fix this but my sparc32 cross-compiler broke.
ARCH=sparc:
scripts/mod/empty.c:1: error: -m64 is not supported by this configurationscripts/mod/empty.c:1: error: -mlong-double-64 not allowed with -m64scripts/mod/empty.c:1: error: -mcmodel= is not supported on 32 bit systemsQuoted 9 lines
Quoted 6 lines
...
Quoted 1 line
How'd that -m64 get in there?
That's really odd.
Sam, any idea?
It happens if you try to build sparc with a sparc64 config.
setenv ARCH sparc
make mrproper
make allmodconfig
makeinit/main.o
scripts/mod/empty.c:1: error: -m64 is not supported by this configurationscripts/mod/empty.c:1: error: -mlong-double-64 not allowed with -m64scripts/mod/empty.c:1: error: -mcmodel= is not supported on 32 bit systemsakpm:/usr/src/25> grep SPARC .config
CONFIG_SPARC=y
#CONFIG_SPARC32is not setCONFIG_SPARC64=yCONFIG_SPARC64_SMP=yCONFIG_SPARC64_PAGE_SIZE_8KB=y
#CONFIG_SPARC64_PAGE_SIZE_64KBis not setCONFIG_SPARC64_PCI=yCONFIG_INPUT_SPARCSPKR=mCONFIG_SND_SPARC=y
# Misc Linux/SPARC drivers
Quoted 1 line
wtf? How'd sparc64 get set?
One of the open issues after merging sparc and sparc64. I have never got around to find a proper solution so we adjust the config based on the ARCH= setting. So allmodconfig + allyesconfig will always be sparc64. And allnoconfig will always be sparc.
Davem has rightfully complained about this before.
Sam
Quoted 9 lines · Andrew Morton
Quoted 3 lines · On Fri, 25 Sep 2009 14:36:23 -0700 Andrew Morton <[email protected]>…
akpm:/usr/src/25> setenv ARCH sparc32
akpm:/usr/src/25> make mrproper
Makefile:213: *** ARCH changed from "sparc" to "sparc32". Use "make mrproper" to fix it up. Stop.OK, I think this is just breakage in today's linux-next.
Quoted 8 lines
After doing an
x86_64build I did:akpm2:/usr/src/25> setenv ARCH i386
akpm2:/usr/src/25> make mrproper
Makefile:200: ***CROSS_COMPILEchanged from "/opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-" to to "/opt/crosstool/gcc-4.1.0-glibc-2.3.6/i686-unknown-linux-gnu/bin/i686-unknown-linux-gnu-". Use "make mrproper" to fix it up. Stop. **FAILED**Manually removing
include/generated/*fixes this up.
Never used this combination in my testing - but it looks like something that many people will hit :-(
kbuild checks for inconsistent ARCH/CROSS_COMPILE settings _before_ we do the mrproper thing.
I need to look at this a bit to come up with a proper solution.
Thanks for reporting.
Sam
Quoted 24 lines · On Fri, 25 Sep 2009 23:50:11 +0200 Sam Ravnborg <[email protected]> wrote:
Quoted 9 lines · Andrew Morton
Quoted 3 lines · On Fri, 25 Sep 2009 14:36:23 -0700 Andrew Morton <[email protected]>…
akpm:/usr/src/25> setenv ARCH sparc32
akpm:/usr/src/25> make mrproper
Makefile:213: *** ARCH changed from "sparc" to "sparc32". Use "make mrproper" to fix it up. Stop.OK, I think this is just breakage in today's linux-next.
Quoted 8 lines
After doing an
x86_64build I did:akpm2:/usr/src/25> setenv ARCH i386
akpm2:/usr/src/25> make mrproper
Makefile:200: ***CROSS_COMPILEchanged from "/opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-" to to "/opt/crosstool/gcc-4.1.0-glibc-2.3.6/i686-unknown-linux-gnu/bin/i686-unknown-linux-gnu-". Use "make mrproper" to fix it up. Stop. **FAILED**Manually removing
include/generated/*fixes this up.Never used this combination in my testing - but it looks like something that many people will hit :-(
kbuild checks for inconsistent ARCH/CROSS_COMPILE settings _before_ we do the mrproper thing.
Quoted 5 lines
I need to look at this a bit to come up with a proper solution.
Thanks for reporting.
OK, thanks.
Dave, could you please send along the config which broke Christoph's patch? It works OK with allnoconfig and defconfig for me.
David Miller
maintainerFrom: Andrew Morton <[email protected]>
Date: Fri, 25 Sep 2009 14:56:18 -0700
Quoted 2 lines
Dave, could you please send along the config which broke Christoph's patch? It works OK with allnoconfig and defconfig for me.
arch/sparc/configs/sparc32_defconfig
Quoted 7 lines · On Fri, 25 Sep 2009 14:59:47 -0700 (PDT) David Miller <[email protected]>…
From: Andrew Morton <[email protected]>
Date: Fri, 25 Sep 2009 14:56:18 -0700Quoted 2 lines
Dave, could you please send along the config which broke Christoph's patch? It works OK with allnoconfig and defconfig for me.
arch/sparc/configs/sparc32_defconfig
OK.
In file included from include/asm-generic/hardirq.h:6,
from /usr/src/devel/arch/sparc/include/asm/hardirq_32.h:11,
from /usr/src/devel/arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:12,
from /usr/src/devel/arch/sparc/include/asm/irq_32.h:9,
from /usr/src/devel/arch/sparc/include/asm/irq.h:6,
from include/linux/nmi.h:8,
from kernel/sched.c:31:How's this fix look?
arch/sparc/include/asm/irq_32.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/sparc/include/asm/irq_32.h renamed from arch/sparc/include/asm/irq_32.h~a +2 -2
@@ -6,10 +6,10 @@#ifndef _SPARC_IRQ_H#define _SPARC_IRQ_H -#include <linux/interrupt.h> -#define NR_IRQS 16 +#include <linux/interrupt.h> +#define irq_canonicalize (irq) (irq)extern void __init init_IRQ (void );
_
David Miller
maintainerFrom: Andrew Morton <[email protected]>
Date: Fri, 25 Sep 2009 15:19:32 -0700
Quoted 1 line
How's this fix look?
Can you send me the respinned original patch with this fix in it? I can test and integrate that much more easily.
Thanks Andrew!
PATCH 1/1 sparc32: convert to asm-generic/hardirq.h
In reply to [email protected]From: Christoph Hellwig <[email protected]>
---
arch/sparc/include/asm/hardirq_32.h | 12 +----------- arch/sparc/include/asm/irq_32.h | 4 ++-- 2 files changed, 3 insertions(+), 13 deletions(-)
arch/sparc/include/asm/hardirq_32.h renamed from arch/sparc/include/asm/hardirq_32.h~sparc32-convert-to-asm-generic-hardirqh +1 -11
@@ -7,17 +7,7 @@#ifndef __SPARC_HARDIRQ_H#define __SPARC_HARDIRQ_H -#include <linux/threads.h> -#include <linux/spinlock.h> -#include <linux/cache.h> - -/* entry.S is sensitive to the offsets of these fields */ /* XXX P3 Is it? */ -typedef struct { -unsigned int __softirq_pending; -}____cacheline_aligned irq_cpustat_t ; - -#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ -#define HARDIRQ_BITS 8 +#include <asm-generic/hardirq.h> #endif /* __SPARC_HARDIRQ_H */
arch/sparc/include/asm/irq_32.h renamed from arch/sparc/include/asm/irq_32.h~sparc32-convert-to-asm-generic-hardirqh +2 -2
@@ -6,10 +6,10 @@#ifndef _SPARC_IRQ_H#define _SPARC_IRQ_H -#include <linux/interrupt.h> -#define NR_IRQS 16 +#include <linux/interrupt.h> +#define irq_canonicalize (irq) (irq)extern void __init init_IRQ (void );
_
From: [email protected]
Date: Mon, 28 Sep 2009 15:55:22 -0700
Quoted 7 lines
From: Christoph Hellwig <[email protected]>
[[email protected]: /arch/sparc/include/asm/irq_32.h: move NR_IRQS definition]Signed-off-by Christoph Hellwig <[email protected]>Cc "David S. Miller" <[email protected]>Cc Sam Ravnborg <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Applied, thanks Andrew.