]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.kernel.org/arch-include-asm-fixes
Changed checkfs to auto reboot after correctable fsck fixes.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.kernel.org / arch-include-asm-fixes
1 From: Jeff Mahoney <jeffm@suse.com>
2 Subject: [PATCH] kbuild: Properly handle arch/$arch/include/asm
3 References: bnc#427473
4
5 Some architectures have moved include/asm-$arch to arch/$arch/include/asm,
6 but were still placing new files in include/asm-$arch. This causes build
7 problems with out-of-tree modules.
8
9 This patch properly handles the new locations.
10
11 Signed-off-by: Jeff Mahoney <jeffm@suse.com>
12 ---
13 Makefile | 23 +++++++++++++++--------
14 arch/ia64/Makefile | 2 +-
15 arch/ia64/include/asm/irq.h | 2 +-
16 arch/ia64/kernel/Makefile | 6 +++---
17 4 files changed, 20 insertions(+), 13 deletions(-)
18
19 --- a/arch/ia64/include/asm/irq.h
20 +++ b/arch/ia64/include/asm/irq.h
21 @@ -13,7 +13,7 @@
22
23 #include <linux/types.h>
24 #include <linux/cpumask.h>
25 -#include <asm-ia64/nr-irqs.h>
26 +#include <asm/nr-irqs.h>
27
28 static __inline__ int
29 irq_canonicalize (int irq)
30 --- a/arch/ia64/kernel/Makefile
31 +++ b/arch/ia64/kernel/Makefile
32 @@ -96,15 +96,15 @@ endef
33
34 # We use internal kbuild rules to avoid the "is up to date" message from make
35 arch/$(SRCARCH)/kernel/nr-irqs.s: $(srctree)/arch/$(SRCARCH)/kernel/nr-irqs.c \
36 - $(wildcard $(srctree)/include/asm-ia64/*/irq.h)
37 + $(wildcard $(srctree)/arch/ia64/include/asm/*/irq.h)
38 $(Q)mkdir -p $(dir $@)
39 $(call if_changed_dep,cc_s_c)
40
41 -include/asm-ia64/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s
42 +arch/ia64/include/asm/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s
43 $(Q)mkdir -p $(dir $@)
44 $(call cmd,nr_irqs)
45
46 -clean-files += $(objtree)/include/asm-ia64/nr-irqs.h
47 +clean-files += $(objtree)/arch/ia64/include/asm/nr-irqs.h
48
49 #
50 # native ivt.S and entry.S
51 --- a/arch/ia64/Makefile
52 +++ b/arch/ia64/Makefile
53 @@ -105,4 +105,4 @@ archprepare: make_nr_irqs_h FORCE
54 PHONY += make_nr_irqs_h FORCE
55
56 make_nr_irqs_h: FORCE
57 - $(Q)$(MAKE) $(build)=arch/ia64/kernel include/asm-ia64/nr-irqs.h
58 + $(Q)$(MAKE) $(build)=arch/ia64/kernel arch/ia64/include/asm/nr-irqs.h
59 --- a/Makefile
60 +++ b/Makefile
61 @@ -968,8 +968,10 @@ define check-symlink
62 set -e; \
63 if [ -L include/asm ]; then \
64 asmlink=`readlink include/asm | cut -d '-' -f 2`; \
65 - if [ "$$asmlink" != "$(SRCARCH)" ]; then \
66 - echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(SRCARCH) was expected"; \
67 + archlink=`readlink include/asm | cut -d '/' -f 3`; \
68 + if [ "$$asmlink" != "$(SRCARCH)" -a \
69 + "$$archlink" != "$(SRCARCH)" ]; then \
70 + echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(SRCARCH) or ../arch/$(SRCARCH)/include/asm was expected"; \
71 echo " set ARCH or save .config and run 'make mrproper' to fix it"; \
72 exit 1; \
73 fi; \
74 @@ -980,12 +982,18 @@ endef
75 # not exist so the test in chack-symlink works and we have a
76 # directory for generated filesas used by some architectures.
77 define create-symlink
78 - if [ ! -L include/asm ]; then \
79 - echo ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \
80 - if [ ! -d include/asm-$(SRCARCH) ]; then \
81 - mkdir -p include/asm-$(SRCARCH); \
82 - fi; \
83 - ln -fsn asm-$(SRCARCH) $@; \
84 + if [ ! -L include/asm ]; then \
85 + if [ -d $(srctree)/arch/$(SRCARCH)/include/asm ]; then \
86 + echo ' SYMLINK $@ -> arch/$(SRCARCH)/include/asm'; \
87 + mkdir -p arch/$(SRCARCH)/include/asm; \
88 + ln -fsn ../arch/$(SRCARCH)/include/asm $@; \
89 + else \
90 + echo ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \
91 + if [ ! -d include/asm-$(SRCARCH) ]; then \
92 + mkdir -p include/asm-$(SRCARCH); \
93 + fi; \
94 + ln -fsn asm-$(SRCARCH) $@; \
95 + fi; \
96 fi
97 endef
98