* [PATCH 01/10] kbuild: move bounds.h to include/generated
2009-07-21 21:10 [PATCH/RFC] Move generated files to include/generated Sam Ravnborg
@ 2009-07-21 21:19 ` Sam Ravnborg
2009-07-21 21:19 ` [PATCH 02/10] kbuild: move asm-offsets.h " Sam Ravnborg
` (9 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-21 21:19 UTC (permalink / raw)
To: linux-kernel, linux-kbuild, linux-arch; +Cc: Sam Ravnborg, Al Viro
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
---
.gitignore | 1 -
Kbuild | 2 +-
Makefile | 2 +-
include/linux/mmzone.h | 2 +-
include/linux/page-flags.h | 2 +-
kernel/bounds.c | 2 +-
6 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
index b93fb7e..32855c6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,7 +51,6 @@ include/linux/autoconf.h
include/linux/compile.h
include/linux/version.h
include/linux/utsrelease.h
-include/linux/bounds.h
include/generated
# stgit generated dirs
diff --git a/Kbuild b/Kbuild
index f056b4f..1165d7a 100644
--- a/Kbuild
+++ b/Kbuild
@@ -8,7 +8,7 @@
#####
# 1) Generate bounds.h
-bounds-file := include/linux/bounds.h
+bounds-file := include/generated/bounds.h
always := $(bounds-file)
targets := $(bounds-file) kernel/bounds.s
diff --git a/Makefile b/Makefile
index 79957b3..9bd427e 100644
--- a/Makefile
+++ b/Makefile
@@ -1197,7 +1197,7 @@ MRPROPER_DIRS += include/config include2 usr/include include/generated
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
include/linux/autoconf.h include/linux/version.h \
include/linux/utsrelease.h \
- include/linux/bounds.h include/asm*/asm-offsets.h \
+ include/asm*/asm-offsets.h \
Module.symvers Module.markers tags TAGS cscope*
# clean - Delete most, but leave enough to build external modules
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 8895985..74800d0 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -15,7 +15,7 @@
#include <linux/seqlock.h>
#include <linux/nodemask.h>
#include <linux/pageblock-flags.h>
-#include <linux/bounds.h>
+#include <generated/bounds.h>
#include <asm/atomic.h>
#include <asm/page.h>
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index e2e5ce5..e99eaac 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -8,7 +8,7 @@
#include <linux/types.h>
#ifndef __GENERATING_BOUNDS_H
#include <linux/mm_types.h>
-#include <linux/bounds.h>
+#include <generated/bounds.h>
#endif /* !__GENERATING_BOUNDS_H */
/*
diff --git a/kernel/bounds.c b/kernel/bounds.c
index 3c53013..98a51f2 100644
--- a/kernel/bounds.c
+++ b/kernel/bounds.c
@@ -12,7 +12,7 @@
void foo(void)
{
- /* The enum constants to put into include/linux/bounds.h */
+ /* The enum constants to put into include/generated/bounds.h */
DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);
DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES);
/* End of constants */
--
1.6.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 02/10] kbuild: move asm-offsets.h to include/generated
2009-07-21 21:10 [PATCH/RFC] Move generated files to include/generated Sam Ravnborg
2009-07-21 21:19 ` [PATCH 01/10] kbuild: move bounds.h " Sam Ravnborg
@ 2009-07-21 21:19 ` Sam Ravnborg
2009-07-21 21:19 ` [PATCH 03/10] ia64: move nr-irqs.h " Sam Ravnborg
` (8 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-21 21:19 UTC (permalink / raw)
To: linux-kernel, linux-kbuild, linux-arch; +Cc: Sam Ravnborg, Al Viro
The simplest method was to add an extra asm-offsets.h
file in arch/$ARCH/include/asm that references the generated file.
We can now migrate the architectures one-by-one to reference
the generated file direct - and when done we can delete the
temporary arch/$ARCH/include/asm/asm-offsets.h file.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
---
.gitignore | 1 -
Kbuild | 2 +-
Makefile | 1 -
arch/alpha/include/asm/asm-offsets.h | 1 +
arch/arm/include/asm/asm-offsets.h | 1 +
arch/avr32/include/asm/asm-offsets.h | 1 +
arch/blackfin/include/asm/asm-offsets.h | 1 +
arch/cris/include/asm/asm-offsets.h | 1 +
arch/frv/include/asm/asm-offsets.h | 1 +
arch/h8300/include/asm/asm-offsets.h | 1 +
arch/ia64/include/asm/asm-offsets.h | 1 +
arch/m68k/include/asm/asm-offsets.h | 1 +
arch/microblaze/include/asm/asm-offsets.h | 1 +
arch/mips/include/asm/asm-offsets.h | 1 +
arch/mn10300/include/asm/asm-offsets.h | 1 +
arch/parisc/include/asm/asm-offsets.h | 1 +
arch/powerpc/include/asm/asm-offsets.h | 1 +
arch/s390/include/asm/asm-offsets.h | 1 +
arch/sh/include/asm/asm-offsets.h | 1 +
arch/sparc/include/asm/asm-offsets.h | 1 +
arch/um/Makefile | 2 +-
arch/um/include/asm/asm-offsets.h | 1 +
arch/x86/include/asm/asm-offsets.h | 1 +
arch/xtensa/include/asm/asm-offsets.h | 1 +
24 files changed, 22 insertions(+), 4 deletions(-)
create mode 100644 arch/alpha/include/asm/asm-offsets.h
create mode 100644 arch/arm/include/asm/asm-offsets.h
create mode 100644 arch/avr32/include/asm/asm-offsets.h
create mode 100644 arch/blackfin/include/asm/asm-offsets.h
create mode 100644 arch/cris/include/asm/asm-offsets.h
create mode 100644 arch/frv/include/asm/asm-offsets.h
create mode 100644 arch/h8300/include/asm/asm-offsets.h
create mode 100644 arch/ia64/include/asm/asm-offsets.h
create mode 100644 arch/m68k/include/asm/asm-offsets.h
create mode 100644 arch/microblaze/include/asm/asm-offsets.h
create mode 100644 arch/mips/include/asm/asm-offsets.h
create mode 100644 arch/mn10300/include/asm/asm-offsets.h
create mode 100644 arch/parisc/include/asm/asm-offsets.h
create mode 100644 arch/powerpc/include/asm/asm-offsets.h
create mode 100644 arch/s390/include/asm/asm-offsets.h
create mode 100644 arch/sh/include/asm/asm-offsets.h
create mode 100644 arch/sparc/include/asm/asm-offsets.h
create mode 100644 arch/um/include/asm/asm-offsets.h
create mode 100644 arch/x86/include/asm/asm-offsets.h
create mode 100644 arch/xtensa/include/asm/asm-offsets.h
diff --git a/.gitignore b/.gitignore
index 32855c6..5a5024a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,7 +45,6 @@ Module.symvers
# Generated include files
#
include/asm
-include/asm-*/asm-offsets.h
include/config
include/linux/autoconf.h
include/linux/compile.h
diff --git a/Kbuild b/Kbuild
index 1165d7a..e3737ad 100644
--- a/Kbuild
+++ b/Kbuild
@@ -43,7 +43,7 @@ $(obj)/$(bounds-file): kernel/bounds.s Kbuild
# 2) Generate asm-offsets.h
#
-offsets-file := include/asm/asm-offsets.h
+offsets-file := include/generated/asm-offsets.h
always += $(offsets-file)
targets += $(offsets-file)
diff --git a/Makefile b/Makefile
index 9bd427e..1f6a34c 100644
--- a/Makefile
+++ b/Makefile
@@ -1197,7 +1197,6 @@ MRPROPER_DIRS += include/config include2 usr/include include/generated
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
include/linux/autoconf.h include/linux/version.h \
include/linux/utsrelease.h \
- include/asm*/asm-offsets.h \
Module.symvers Module.markers tags TAGS cscope*
# clean - Delete most, but leave enough to build external modules
diff --git a/arch/alpha/include/asm/asm-offsets.h b/arch/alpha/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/alpha/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/arm/include/asm/asm-offsets.h b/arch/arm/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/arm/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/avr32/include/asm/asm-offsets.h b/arch/avr32/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/avr32/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/blackfin/include/asm/asm-offsets.h b/arch/blackfin/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/blackfin/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/cris/include/asm/asm-offsets.h b/arch/cris/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/cris/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/frv/include/asm/asm-offsets.h b/arch/frv/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/frv/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/h8300/include/asm/asm-offsets.h b/arch/h8300/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/h8300/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/ia64/include/asm/asm-offsets.h b/arch/ia64/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/ia64/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/m68k/include/asm/asm-offsets.h b/arch/m68k/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/m68k/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/microblaze/include/asm/asm-offsets.h b/arch/microblaze/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/microblaze/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/mips/include/asm/asm-offsets.h b/arch/mips/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/mips/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/mn10300/include/asm/asm-offsets.h b/arch/mn10300/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/mn10300/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/parisc/include/asm/asm-offsets.h b/arch/parisc/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/parisc/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/powerpc/include/asm/asm-offsets.h b/arch/powerpc/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/powerpc/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/s390/include/asm/asm-offsets.h b/arch/s390/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/s390/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/sh/include/asm/asm-offsets.h b/arch/sh/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/sh/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/sparc/include/asm/asm-offsets.h b/arch/sparc/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/sparc/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 0728def..8936057 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -150,6 +150,6 @@ $(SHARED_HEADERS)/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s
$(SHARED_HEADERS)/kern_constants.h:
$(Q)mkdir -p $(dir $@)
- $(Q)echo '#include "../../../../include/asm/asm-offsets.h"' >$@
+ $(Q)echo '#include "../../../../include/generated/asm-offsets.h"' >$@
export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH
diff --git a/arch/um/include/asm/asm-offsets.h b/arch/um/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/um/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/x86/include/asm/asm-offsets.h b/arch/x86/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/x86/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
diff --git a/arch/xtensa/include/asm/asm-offsets.h b/arch/xtensa/include/asm/asm-offsets.h
new file mode 100644
index 0000000..d370ee3
--- /dev/null
+++ b/arch/xtensa/include/asm/asm-offsets.h
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
--
1.6.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 03/10] ia64: move nr-irqs.h to include/generated
2009-07-21 21:10 [PATCH/RFC] Move generated files to include/generated Sam Ravnborg
2009-07-21 21:19 ` [PATCH 01/10] kbuild: move bounds.h " Sam Ravnborg
2009-07-21 21:19 ` [PATCH 02/10] kbuild: move asm-offsets.h " Sam Ravnborg
@ 2009-07-21 21:19 ` Sam Ravnborg
2009-07-21 21:48 ` Yu, Fenghua
[not found] ` <A6AD88C3F2289247BE726C37303E1EB8B09F47F2@orsmsx505.amr.corp.intel.com>
2009-07-21 21:19 ` [PATCH 04/10] sh: move machtypes.h " Sam Ravnborg
` (7 subsequent siblings)
10 siblings, 2 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-21 21:19 UTC (permalink / raw)
To: linux-kernel, linux-kbuild, linux-arch
Cc: Sam Ravnborg, Al Viro, Tony Luck, Fenghua Yu
Avoid generating files in the now deprecated asm-ia64 dir
Simplified the logic in the Makefile when editing stuff in the area
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
---
arch/ia64/Makefile | 2 +-
arch/ia64/include/asm/irq.h | 2 +-
arch/ia64/kernel/Makefile | 7 ++-----
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index 58a7e46..e9fcac6 100644
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -108,4 +108,4 @@ archprepare: make_nr_irqs_h FORCE
PHONY += make_nr_irqs_h FORCE
make_nr_irqs_h: FORCE
- $(Q)$(MAKE) $(build)=arch/ia64/kernel include/asm-ia64/nr-irqs.h
+ $(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.h
diff --git a/arch/ia64/include/asm/irq.h b/arch/ia64/include/asm/irq.h
index 5282546..91b920f 100644
--- a/arch/ia64/include/asm/irq.h
+++ b/arch/ia64/include/asm/irq.h
@@ -13,7 +13,7 @@
#include <linux/types.h>
#include <linux/cpumask.h>
-#include <asm-ia64/nr-irqs.h>
+#include <generated/nr-irqs.h>
static __inline__ int
irq_canonicalize (int irq)
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 6b7edca..cedd773 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -81,17 +81,14 @@ define cmd_nr_irqs
endef
# We use internal kbuild rules to avoid the "is up to date" message from make
-arch/$(SRCARCH)/kernel/nr-irqs.s: $(srctree)/arch/$(SRCARCH)/kernel/nr-irqs.c \
- $(wildcard $(srctree)/include/asm-ia64/*/irq.h)
+arch/ia64/kernel/nr-irqs.s: arch/ia64/kernel/nr-irqs.c
$(Q)mkdir -p $(dir $@)
$(call if_changed_dep,cc_s_c)
-include/asm-ia64/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s
+include/generated/nr-irqs.h: arch/ia64/kernel/nr-irqs.s
$(Q)mkdir -p $(dir $@)
$(call cmd,nr_irqs)
-clean-files += $(objtree)/include/asm-ia64/nr-irqs.h
-
#
# native ivt.S, entry.S and fsys.S
#
--
1.6.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* RE: [PATCH 03/10] ia64: move nr-irqs.h to include/generated
2009-07-21 21:19 ` [PATCH 03/10] ia64: move nr-irqs.h " Sam Ravnborg
@ 2009-07-21 21:48 ` Yu, Fenghua
[not found] ` <A6AD88C3F2289247BE726C37303E1EB8B09F47F2@orsmsx505.amr.corp.intel.com>
1 sibling, 0 replies; 16+ messages in thread
From: Yu, Fenghua @ 2009-07-21 21:48 UTC (permalink / raw)
To: 'Sam Ravnborg', 'linux-kernel@vger.kernel.org',
'linux-kbuild@vger.kernel.org', 'linux-arch
Cc: 'Al Viro', Luck, Tony
>---
> arch/ia64/Makefile | 2 +-
> arch/ia64/include/asm/irq.h | 2 +-
> arch/ia64/kernel/Makefile | 7 ++-----
> 3 files changed, 4 insertions(+), 7 deletions(-)
>
>diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
>index 58a7e46..e9fcac6 100644
>--- a/arch/ia64/Makefile
>+++ b/arch/ia64/Makefile
>@@ -108,4 +108,4 @@ archprepare: make_nr_irqs_h FORCE
> PHONY += make_nr_irqs_h FORCE
>
> make_nr_irqs_h: FORCE
>- $(Q)$(MAKE) $(build)=arch/ia64/kernel include/asm-ia64/nr-irqs.h
>+ $(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.h
>diff --git a/arch/ia64/include/asm/irq.h b/arch/ia64/include/asm/irq.h
>index 5282546..91b920f 100644
>--- a/arch/ia64/include/asm/irq.h
>+++ b/arch/ia64/include/asm/irq.h
>@@ -13,7 +13,7 @@
>
> #include <linux/types.h>
> #include <linux/cpumask.h>
>-#include <asm-ia64/nr-irqs.h>
>+#include <generated/nr-irqs.h>
>
> static __inline__ int
> irq_canonicalize (int irq)
>diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
>index 6b7edca..cedd773 100644
>--- a/arch/ia64/kernel/Makefile
>+++ b/arch/ia64/kernel/Makefile
>@@ -81,17 +81,14 @@ define cmd_nr_irqs
> endef
>
> # We use internal kbuild rules to avoid the "is up to date" message from
>make
>-arch/$(SRCARCH)/kernel/nr-irqs.s: $(srctree)/arch/$(SRCARCH)/kernel/nr-
>irqs.c \
>- $(wildcard $(srctree)/include/asm-ia64/*/irq.h)
>+arch/ia64/kernel/nr-irqs.s: arch/ia64/kernel/nr-irqs.c
> $(Q)mkdir -p $(dir $@)
> $(call if_changed_dep,cc_s_c)
>
Could you keep the SRCARCH and srctree variables? There is no need to hard code them.
>-include/asm-ia64/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s
>+include/generated/nr-irqs.h: arch/ia64/kernel/nr-irqs.s
> $(Q)mkdir -p $(dir $@)
> $(call cmd,nr_irqs)
>
>-clean-files += $(objtree)/include/asm-ia64/nr-irqs.h
>-
> #
> # native ivt.S, entry.S and fsys.S
> #
Ditto.
^ permalink raw reply [flat|nested] 16+ messages in thread[parent not found: <A6AD88C3F2289247BE726C37303E1EB8B09F47F2@orsmsx505.amr.corp.intel.com>]
* Re: [PATCH 03/10] ia64: move nr-irqs.h to include/generated
[not found] ` <A6AD88C3F2289247BE726C37303E1EB8B09F47F2@orsmsx505.amr.corp.intel.com>
@ 2009-07-21 21:58 ` Sam Ravnborg
0 siblings, 0 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-21 21:58 UTC (permalink / raw)
To: Yu, Fenghua
Cc: 'linux-kernel@vger.kernel.org',
'linux-kbuild@vger.kernel.org',
'linux-arch@vger.kernel.org', 'Al Viro',
Luck, Tony
On Tue, Jul 21, 2009 at 02:48:22PM -0700, Yu, Fenghua wrote:
> >---
> > arch/ia64/Makefile | 2 +-
> > arch/ia64/include/asm/irq.h | 2 +-
> > arch/ia64/kernel/Makefile | 7 ++-----
> > 3 files changed, 4 insertions(+), 7 deletions(-)
> >
> >diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
> >index 58a7e46..e9fcac6 100644
> >--- a/arch/ia64/Makefile
> >+++ b/arch/ia64/Makefile
> >@@ -108,4 +108,4 @@ archprepare: make_nr_irqs_h FORCE
> > PHONY += make_nr_irqs_h FORCE
> >
> > make_nr_irqs_h: FORCE
> >- $(Q)$(MAKE) $(build)=arch/ia64/kernel include/asm-ia64/nr-irqs.h
> >+ $(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.h
> >diff --git a/arch/ia64/include/asm/irq.h b/arch/ia64/include/asm/irq.h
> >index 5282546..91b920f 100644
> >--- a/arch/ia64/include/asm/irq.h
> >+++ b/arch/ia64/include/asm/irq.h
> >@@ -13,7 +13,7 @@
> >
> > #include <linux/types.h>
> > #include <linux/cpumask.h>
> >-#include <asm-ia64/nr-irqs.h>
> >+#include <generated/nr-irqs.h>
> >
> > static __inline__ int
> > irq_canonicalize (int irq)
> >diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
> >index 6b7edca..cedd773 100644
> >--- a/arch/ia64/kernel/Makefile
> >+++ b/arch/ia64/kernel/Makefile
> >@@ -81,17 +81,14 @@ define cmd_nr_irqs
> > endef
> >
> > # We use internal kbuild rules to avoid the "is up to date" message from
> >make
> >-arch/$(SRCARCH)/kernel/nr-irqs.s: $(srctree)/arch/$(SRCARCH)/kernel/nr-
> >irqs.c \
> >- $(wildcard $(srctree)/include/asm-ia64/*/irq.h)
> >+arch/ia64/kernel/nr-irqs.s: arch/ia64/kernel/nr-irqs.c
> > $(Q)mkdir -p $(dir $@)
> > $(call if_changed_dep,cc_s_c)
> >
>
> Could you keep the SRCARCH and srctree variables? There is no need to hard code them.
I will update my patch to continue using SRCARCH.
I usually hardcode the name of the arch because it makes the
code IMO more explicit and thus more readable.
The use of srctree is not needed but I can add that back too.
Both changes are unrelated to the actual patch and I
just rutinely made it look like I would have doen it.
>
> >-include/asm-ia64/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s
> >+include/generated/nr-irqs.h: arch/ia64/kernel/nr-irqs.s
> > $(Q)mkdir -p $(dir $@)
> > $(call cmd,nr_irqs)
> >
> >-clean-files += $(objtree)/include/asm-ia64/nr-irqs.h
> >-
> > #
> > # native ivt.S, entry.S and fsys.S
> > #
>
> Ditto.
OK.
Sam
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 04/10] sh: move machtypes.h to include/generated
2009-07-21 21:10 [PATCH/RFC] Move generated files to include/generated Sam Ravnborg
` (2 preceding siblings ...)
2009-07-21 21:19 ` [PATCH 03/10] ia64: move nr-irqs.h " Sam Ravnborg
@ 2009-07-21 21:19 ` Sam Ravnborg
2009-07-21 21:19 ` [PATCH 05/10] arm: move mach-types " Sam Ravnborg
` (6 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-21 21:19 UTC (permalink / raw)
To: linux-kernel, linux-kbuild, linux-arch; +Cc: Sam Ravnborg, Al Viro, Paul Mundt
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Paul Mundt <lethal@linux-sh.org>
---
arch/sh/Makefile | 9 ++-------
arch/sh/include/asm/.gitignore | 1 -
arch/sh/include/asm/machvec.h | 2 +-
arch/sh/tools/Makefile | 4 ++--
arch/sh/tools/gen-mach-types | 2 +-
5 files changed, 6 insertions(+), 12 deletions(-)
delete mode 100644 arch/sh/include/asm/.gitignore
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 75d049b..1b63cfd 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -189,10 +189,6 @@ KBUILD_AFLAGS += $(cflags-y)
libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y)
libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)
-PHONY += maketools FORCE
-
-maketools: include/linux/version.h FORCE
- $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
all: $(KBUILD_IMAGE)
@@ -201,7 +197,8 @@ zImage uImage uImage.srec vmlinux.srec: vmlinux
compressed: zImage
-archprepare: maketools
+archprepare:
+ $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
archclean:
$(Q)$(MAKE) $(clean)=$(boot)
@@ -213,5 +210,3 @@ define archhelp
@echo ' uImage - Create a bootable image for U-Boot'
@echo ' uImage.srec - Create an S-record for U-Boot'
endef
-
-CLEAN_FILES += include/asm-sh/machtypes.h
diff --git a/arch/sh/include/asm/.gitignore b/arch/sh/include/asm/.gitignore
deleted file mode 100644
index 378db77..0000000
--- a/arch/sh/include/asm/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-machtypes.h
diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h
index 84dd377..9c30955 100644
--- a/arch/sh/include/asm/machvec.h
+++ b/arch/sh/include/asm/machvec.h
@@ -12,7 +12,7 @@
#include <linux/types.h>
#include <linux/time.h>
-#include <asm/machtypes.h>
+#include <generated/machtypes.h>
struct sh_machine_vector {
void (*mv_setup)(char **cmdline_p);
diff --git a/arch/sh/tools/Makefile b/arch/sh/tools/Makefile
index 567516b..558a56b 100644
--- a/arch/sh/tools/Makefile
+++ b/arch/sh/tools/Makefile
@@ -10,7 +10,7 @@
# Shamelessly cloned from ARM.
#
-include/asm-sh/machtypes.h: $(src)/gen-mach-types $(src)/mach-types
+include/generated/machtypes.h: $(src)/gen-mach-types $(src)/mach-types
@echo ' Generating $@'
- $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
+ $(Q)mkdir -p $(dir $@)
$(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
diff --git a/arch/sh/tools/gen-mach-types b/arch/sh/tools/gen-mach-types
index 65161e3..f5ff7c5 100644
--- a/arch/sh/tools/gen-mach-types
+++ b/arch/sh/tools/gen-mach-types
@@ -1,6 +1,6 @@
#!/bin/awk
#
-# Awk script to generate include/asm-sh/machtypes.h
+# Awk script to generate include/generated/machtypes.h
# Heavily based on arch/arm/tools/gen-mach-types
#
BEGIN { nr = 0 }
--
1.6.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 05/10] arm: move mach-types to include/generated
2009-07-21 21:10 [PATCH/RFC] Move generated files to include/generated Sam Ravnborg
` (3 preceding siblings ...)
2009-07-21 21:19 ` [PATCH 04/10] sh: move machtypes.h " Sam Ravnborg
@ 2009-07-21 21:19 ` Sam Ravnborg
2009-07-21 21:19 ` [PATCH 06/10] kbuild: drop asm symlink Sam Ravnborg
` (5 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-21 21:19 UTC (permalink / raw)
To: linux-kernel, linux-kbuild, linux-arch
Cc: Sam Ravnborg, Al Viro, Russell King
Simplified arch/arm/Makefile by dropping the maketools target
It was undocumented and not needed
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/Makefile | 14 ++------------
arch/arm/include/asm/mach-types.h | 1 +
arch/arm/tools/Makefile | 2 +-
arch/arm/tools/gen-mach-types | 2 +-
4 files changed, 5 insertions(+), 14 deletions(-)
create mode 100644 arch/arm/include/asm/mach-types.h
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index c877d6d..8b335bf 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -226,15 +226,8 @@ all: $(KBUILD_IMAGE)
boot := arch/arm/boot
-# Update machine arch and proc symlinks if something which affects
-# them changed. We use .arch to indicate when they were updated
-# last, otherwise make uses the target directory mtime.
-
-archprepare: maketools
-
-PHONY += maketools FORCE
-maketools: include/linux/version.h FORCE
- $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
+archprepare:
+ $(Q)$(MAKE) $(build)=arch/arm/tools include/generated/mach-types.h
# Convert bzImage to zImage
bzImage: zImage
@@ -245,9 +238,6 @@ zImage Image xipImage bootpImage uImage: vmlinux
zinstall install: vmlinux
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
-CLEAN_FILES += include/asm-arm/mach-types.h \
- include/asm-arm/arch include/asm-arm/.arch
-
# We use MRPROPER_FILES and CLEAN_FILES now
archclean:
$(Q)$(MAKE) $(clean)=$(boot)
diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h
new file mode 100644
index 0000000..948178c
--- /dev/null
+++ b/arch/arm/include/asm/mach-types.h
@@ -0,0 +1 @@
+#include <generated/mach-types.h>
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile
index 1dbaa29..635cb18 100644
--- a/arch/arm/tools/Makefile
+++ b/arch/arm/tools/Makefile
@@ -4,7 +4,7 @@
# Copyright (C) 2001 Russell King
#
-include/asm-arm/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
+include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
@echo ' Generating $@'
@mkdir -p $(dir $@)
$(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
diff --git a/arch/arm/tools/gen-mach-types b/arch/arm/tools/gen-mach-types
index ce319ef..04fef71 100644
--- a/arch/arm/tools/gen-mach-types
+++ b/arch/arm/tools/gen-mach-types
@@ -1,6 +1,6 @@
#!/bin/awk
#
-# Awk script to generate include/asm-arm/mach-types.h
+# Awk script to generate include/generated/mach-types.h
#
BEGIN { nr = 0 }
/^#/ { next }
--
1.6.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 06/10] kbuild: drop asm symlink
2009-07-21 21:10 [PATCH/RFC] Move generated files to include/generated Sam Ravnborg
` (4 preceding siblings ...)
2009-07-21 21:19 ` [PATCH 05/10] arm: move mach-types " Sam Ravnborg
@ 2009-07-21 21:19 ` Sam Ravnborg
2009-07-21 21:19 ` [PATCH 07/10] kbuild: move compile.h to include/generated Sam Ravnborg
` (4 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-21 21:19 UTC (permalink / raw)
To: linux-kernel, linux-kbuild, linux-arch; +Cc: Sam Ravnborg, Al Viro
Generated files are no longer saved in include/asm
so there is no use left of this.
This also allowed us to get rid of the ugly "include2"
directory used for O=... builds.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
---
.gitignore | 1 -
Makefile | 51 +++++----------------------------------------------
2 files changed, 5 insertions(+), 47 deletions(-)
diff --git a/.gitignore b/.gitignore
index 5a5024a..624e3ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,7 +44,6 @@ Module.symvers
#
# Generated include files
#
-include/asm
include/config
include/linux/autoconf.h
include/linux/compile.h
diff --git a/Makefile b/Makefile
index 1f6a34c..100dfd1 100644
--- a/Makefile
+++ b/Makefile
@@ -334,7 +334,7 @@ CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
LINUXINCLUDE := -Iinclude \
- $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
+ $(if $(KBUILD_SRC), -I$(srctree)/include) \
-I$(srctree)/arch/$(hdr-arch)/include \
-include include/linux/autoconf.h
@@ -940,7 +940,7 @@ include/config/kernel.release: include/config/auto.conf FORCE
# Things we need to do before we recursively start building the kernel
# or the modules are listed in "prepare".
# A multi level approach is used. prepareN is processed before prepareN-1.
-# archprepare is used in arch Makefiles and when processed asm symlink,
+# archprepare is used in arch Makefiles when
# version.h and scripts_basic is processed / created.
# Listed in dependency order
@@ -949,7 +949,6 @@ PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
# prepare3 is used to check if we are building in a separate output directory,
# and if so do:
# 1) Check that make has not been executed in the kernel src $(srctree)
-# 2) Create the include2 directory, used for the second asm symlink
prepare3: include/config/kernel.release
ifneq ($(KBUILD_SRC),)
@$(kecho) ' Using $(srctree) as source for kernel'
@@ -958,17 +957,13 @@ ifneq ($(KBUILD_SRC),)
echo " in the '$(srctree)' directory.";\
/bin/false; \
fi;
- $(Q)if [ ! -d include2 ]; then \
- mkdir -p include2; \
- ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \
- fi
endif
# prepare2 creates a makefile if using a separate output directory
prepare2: prepare3 outputmakefile
prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
- include/asm include/config/auto.conf
+ include/config/auto.conf
$(cmd_crmodverdir)
archprepare: prepare1 scripts_basic
@@ -985,42 +980,6 @@ prepare: prepare0
export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
-# The asm symlink changes when $(ARCH) changes.
-# Detect this and ask user to run make mrproper
-# If asm is a stale symlink (point to dir that does not exist) remove it
-define check-symlink
- set -e; \
- if [ -L include/asm ]; then \
- asmlink=`readlink include/asm | cut -d '-' -f 2`; \
- if [ "$$asmlink" != "$(SRCARCH)" ]; then \
- echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(SRCARCH) was expected"; \
- echo " set ARCH or save .config and run 'make mrproper' to fix it"; \
- exit 1; \
- fi; \
- test -e $$asmlink || rm include/asm; \
- elif [ -d include/asm ]; then \
- echo "ERROR: $@ is a directory but a symlink was expected";\
- exit 1; \
- fi
-endef
-
-# We create the target directory of the symlink if it does
-# not exist so the test in check-symlink works and we have a
-# directory for generated filesas used by some architectures.
-define create-symlink
- if [ ! -L include/asm ]; then \
- $(kecho) ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \
- if [ ! -d include/asm-$(SRCARCH) ]; then \
- mkdir -p include/asm-$(SRCARCH); \
- fi; \
- ln -fsn asm-$(SRCARCH) $@; \
- fi
-endef
-
-include/asm: FORCE
- $(Q)$(check-symlink)
- $(Q)$(create-symlink)
-
# Generate some files
# ---------------------------------------------------------------------------
@@ -1193,8 +1152,8 @@ CLEAN_FILES += vmlinux System.map \
.tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
# Directories & files removed with 'make mrproper'
-MRPROPER_DIRS += include/config include2 usr/include include/generated
-MRPROPER_FILES += .config .config.old include/asm .version .old_version \
+MRPROPER_DIRS += include/config usr/include include/generated
+MRPROPER_FILES += .config .config.old .version .old_version \
include/linux/autoconf.h include/linux/version.h \
include/linux/utsrelease.h \
Module.symvers Module.markers tags TAGS cscope*
--
1.6.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 07/10] kbuild: move compile.h to include/generated
2009-07-21 21:10 [PATCH/RFC] Move generated files to include/generated Sam Ravnborg
` (5 preceding siblings ...)
2009-07-21 21:19 ` [PATCH 06/10] kbuild: drop asm symlink Sam Ravnborg
@ 2009-07-21 21:19 ` Sam Ravnborg
2009-07-21 21:19 ` [PATCH 08/10] drop unneeded include of autoconf.h Sam Ravnborg
` (3 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-21 21:19 UTC (permalink / raw)
To: linux-kernel, linux-kbuild, linux-arch; +Cc: Sam Ravnborg, Al Viro
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
---
.gitignore | 1 -
arch/x86/boot/version.c | 2 +-
init/Makefile | 6 +++---
init/version.c | 2 +-
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
index 624e3ab..0f594d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,7 +46,6 @@ Module.symvers
#
include/config
include/linux/autoconf.h
-include/linux/compile.h
include/linux/version.h
include/linux/utsrelease.h
include/generated
diff --git a/arch/x86/boot/version.c b/arch/x86/boot/version.c
index 2723d9b..4d88763 100644
--- a/arch/x86/boot/version.c
+++ b/arch/x86/boot/version.c
@@ -14,7 +14,7 @@
#include "boot.h"
#include <linux/utsrelease.h>
-#include <linux/compile.h>
+#include <generated/compile.h>
const char kernel_version[] =
UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") "
diff --git a/init/Makefile b/init/Makefile
index 4a243df..2bcd810 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -16,11 +16,11 @@ mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o
mounts-$(CONFIG_BLK_DEV_MD) += do_mounts_md.o
# files to be removed upon make clean
-clean-files := ../include/linux/compile.h
+clean-files := ../include/generated/compile.h
# dependencies on generated files need to be listed explicitly
-$(obj)/version.o: include/linux/compile.h
+$(obj)/version.o: include/generated/compile.h
# compile.h changes depending on hostname, generation number, etc,
# so we regenerate it always.
@@ -30,7 +30,7 @@ $(obj)/version.o: include/linux/compile.h
chk_compile.h = :
quiet_chk_compile.h = echo ' CHK $@'
silent_chk_compile.h = :
-include/linux/compile.h: FORCE
+include/generated/compile.h: FORCE
@$($(quiet)chk_compile.h)
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
"$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(KBUILD_CFLAGS)"
diff --git a/init/version.c b/init/version.c
index 52a8b98..82328aa 100644
--- a/init/version.c
+++ b/init/version.c
@@ -6,7 +6,7 @@
* May be freely distributed as part of Linux.
*/
-#include <linux/compile.h>
+#include <generated/compile.h>
#include <linux/module.h>
#include <linux/uts.h>
#include <linux/utsname.h>
--
1.6.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 08/10] drop unneeded include of autoconf.h
2009-07-21 21:10 [PATCH/RFC] Move generated files to include/generated Sam Ravnborg
` (6 preceding siblings ...)
2009-07-21 21:19 ` [PATCH 07/10] kbuild: move compile.h to include/generated Sam Ravnborg
@ 2009-07-21 21:19 ` Sam Ravnborg
2009-07-21 21:19 ` [PATCH 09/10] kbuild: move autoconf.h to include/generated Sam Ravnborg
` (2 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-21 21:19 UTC (permalink / raw)
To: linux-kernel, linux-kbuild, linux-arch; +Cc: Sam Ravnborg
kbuild.h forces include of autoconf.h on the
commandline using -include - so we do not need to
include the file explicit.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
arch/cris/arch-v32/kernel/head.S | 1 -
arch/cris/kernel/asm-offsets.c | 1 -
arch/cris/kernel/vmlinux.lds.S | 1 -
arch/ia64/kvm/asm-offsets.c | 1 -
drivers/accessibility/braille/braille_console.c | 1 -
drivers/hid/hid-lg.h | 2 --
drivers/platform/x86/compal-laptop.c | 1 -
include/linux/mmdebug.h | 2 --
8 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/arch/cris/arch-v32/kernel/head.S b/arch/cris/arch-v32/kernel/head.S
index 3db478e..76266f8 100644
--- a/arch/cris/arch-v32/kernel/head.S
+++ b/arch/cris/arch-v32/kernel/head.S
@@ -10,7 +10,6 @@
* The macros found in mmu_defs_asm.h uses the ## concatenation operator, so
* -traditional must not be used when assembling this file.
*/
-#include <linux/autoconf.h>
#include <arch/memmap.h>
#include <hwregs/reg_rdwr.h>
#include <hwregs/intr_vect.h>
diff --git a/arch/cris/kernel/asm-offsets.c b/arch/cris/kernel/asm-offsets.c
index ddd6fbb..dd7b8e9 100644
--- a/arch/cris/kernel/asm-offsets.c
+++ b/arch/cris/kernel/asm-offsets.c
@@ -1,6 +1,5 @@
#include <linux/sched.h>
#include <asm/thread_info.h>
-#include <linux/autoconf.h>
/*
* Generate definitions needed by assembly language modules.
diff --git a/arch/cris/kernel/vmlinux.lds.S b/arch/cris/kernel/vmlinux.lds.S
index 0d2adfc..8a80d78 100644
--- a/arch/cris/kernel/vmlinux.lds.S
+++ b/arch/cris/kernel/vmlinux.lds.S
@@ -8,7 +8,6 @@
* the kernel has booted.
*/
-#include <linux/autoconf.h>
#include <asm-generic/vmlinux.lds.h>
#include <asm/page.h>
diff --git a/arch/ia64/kvm/asm-offsets.c b/arch/ia64/kvm/asm-offsets.c
index 0c3564a..9324c87 100644
--- a/arch/ia64/kvm/asm-offsets.c
+++ b/arch/ia64/kvm/asm-offsets.c
@@ -22,7 +22,6 @@
*
*/
-#include <linux/autoconf.h>
#include <linux/kvm_host.h>
#include <linux/kbuild.h>
diff --git a/drivers/accessibility/braille/braille_console.c b/drivers/accessibility/braille/braille_console.c
index d672cfe..cb423f5 100644
--- a/drivers/accessibility/braille/braille_console.c
+++ b/drivers/accessibility/braille/braille_console.c
@@ -21,7 +21,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <linux/autoconf.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
diff --git a/drivers/hid/hid-lg.h b/drivers/hid/hid-lg.h
index 27ae750..bf31592 100644
--- a/drivers/hid/hid-lg.h
+++ b/drivers/hid/hid-lg.h
@@ -1,8 +1,6 @@
#ifndef __HID_LG_H
#define __HID_LG_H
-#include <linux/autoconf.h>
-
#ifdef CONFIG_LOGITECH_FF
int lgff_init(struct hid_device *hdev);
#else
diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
index 11003bb..1a387e7 100644
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -51,7 +51,6 @@
#include <linux/dmi.h>
#include <linux/backlight.h>
#include <linux/platform_device.h>
-#include <linux/autoconf.h>
#define COMPAL_DRIVER_VERSION "0.2.6"
diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
index 8a55098..ee24ef8 100644
--- a/include/linux/mmdebug.h
+++ b/include/linux/mmdebug.h
@@ -1,8 +1,6 @@
#ifndef LINUX_MM_DEBUG_H
#define LINUX_MM_DEBUG_H 1
-#include <linux/autoconf.h>
-
#ifdef CONFIG_DEBUG_VM
#define VM_BUG_ON(cond) BUG_ON(cond)
#else
--
1.6.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 09/10] kbuild: move autoconf.h to include/generated
2009-07-21 21:10 [PATCH/RFC] Move generated files to include/generated Sam Ravnborg
` (7 preceding siblings ...)
2009-07-21 21:19 ` [PATCH 08/10] drop unneeded include of autoconf.h Sam Ravnborg
@ 2009-07-21 21:19 ` Sam Ravnborg
2009-07-21 21:19 ` [PATCH 10/10] kbuild: move utsrelease.h " Sam Ravnborg
2009-07-22 9:58 ` [PATCH/RFC] Move generated files " Amerigo Wang
10 siblings, 0 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-21 21:19 UTC (permalink / raw)
To: linux-kernel, linux-kbuild, linux-arch; +Cc: Sam Ravnborg, Al Viro
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
---
.gitignore | 1 -
Documentation/kbuild/kconfig.txt | 3 ++-
Makefile | 11 ++++++-----
arch/m68k/kernel/head.S | 2 +-
scripts/basic/fixdep.c | 10 +++++-----
scripts/kconfig/confdata.c | 2 +-
scripts/mkcompile_h | 2 +-
7 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/.gitignore b/.gitignore
index 0f594d9..91f8e0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,7 +45,6 @@ Module.symvers
# Generated include files
#
include/config
-include/linux/autoconf.h
include/linux/version.h
include/linux/utsrelease.h
include/generated
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index 849b5e5..ab8dc35 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -106,7 +106,8 @@ This environment variable can be set to specify the path & name of the
KCONFIG_AUTOHEADER
--------------------------------------------------
This environment variable can be set to specify the path & name of the
-"autoconf.h" (header) file. Its default value is "include/linux/autoconf.h".
+"autoconf.h" (header) file.
+Its default value is "include/generated/autoconf.h".
======================================================================
diff --git a/Makefile b/Makefile
index 100dfd1..044a3f4 100644
--- a/Makefile
+++ b/Makefile
@@ -336,7 +336,7 @@ CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
LINUXINCLUDE := -Iinclude \
$(if $(KBUILD_SRC), -I$(srctree)/include) \
-I$(srctree)/arch/$(hdr-arch)/include \
- -include include/linux/autoconf.h
+ -include include/generated/autoconf.h
KBUILD_CPPFLAGS := -D__KERNEL__
@@ -490,17 +490,18 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
# if auto.conf.cmd is missing then we are probably in a cleaned tree so
# we execute the config step to be sure to catch updated Kconfig files
include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
+ $(Q)mkdir -p include/generated
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
else
-# external modules needs include/linux/autoconf.h and include/config/auto.conf
+# external modules needs include/generated/autoconf.h and include/config/auto.conf
# but do not care if they are up-to-date. Use auto.conf to trigger the test
PHONY += include/config/auto.conf
include/config/auto.conf:
- $(Q)test -e include/linux/autoconf.h -a -e $@ || ( \
+ $(Q)test -e include/generated/autoconf.h -a -e $@ || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
- echo " include/linux/autoconf.h or $@ are missing."; \
+ echo " include/generated/autoconf.h or $@ are missing.";\
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)
@@ -1154,7 +1155,7 @@ CLEAN_FILES += vmlinux System.map \
# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config usr/include include/generated
MRPROPER_FILES += .config .config.old .version .old_version \
- include/linux/autoconf.h include/linux/version.h \
+ include/linux/version.h \
include/linux/utsrelease.h \
Module.symvers Module.markers tags TAGS cscope*
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S
index 86edb5f..ef54128 100644
--- a/arch/m68k/kernel/head.S
+++ b/arch/m68k/kernel/head.S
@@ -196,7 +196,7 @@
* for them and trying to understand what they mean.
*
* CONFIG_xxx: These are the obvious machine configuration defines created
- * during configuration. These are defined in include/linux/autoconf.h.
+ * during configuration. These are defined in autoconf.h.
*
* CONSOLE: There is support for head.S console in this file. This
* console can talk to a Mac frame buffer, but could easily be extrapolated
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 72c1520..0aaa208 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -17,15 +17,15 @@
*
* To use this list as-is however has the drawback that virtually
* every file in the kernel includes <linux/config.h> which then again
- * includes <linux/autoconf.h>
+ * includes autoconf.h
*
- * If the user re-runs make *config, linux/autoconf.h will be
+ * If the user re-runs make *config, autoconf.h will be
* regenerated. make notices that and will rebuild every file which
* includes autoconf.h, i.e. basically all files. This is extremely
* annoying if the user just changed CONFIG_HIS_DRIVER from n to m.
*
* So we play the same trick that "mkdep" played before. We replace
- * the dependency on linux/autoconf.h by a dependency on every config
+ * the dependency on autoconf.h by a dependency on every config
* option which is mentioned in any of the listed prequisites.
*
* kconfig populates a tree in include/config/ with an empty file
@@ -74,7 +74,7 @@
* cmd_<target> = <cmdline>
*
* and then basically copies the .<target>.d file to stdout, in the
- * process filtering out the dependency on linux/autoconf.h and adding
+ * process filtering out the dependency on autoconf.h and adding
* dependencies on include/config/my/option.h for every
* CONFIG_MY_OPTION encountered in any of the prequisites.
*
@@ -326,7 +326,7 @@ void parse_dep_file(void *map, size_t len)
p++;
}
memcpy(s, m, p-m); s[p-m] = 0;
- if (strrcmp(s, "include/linux/autoconf.h") &&
+ if (strrcmp(s, "include/generated/autoconf.h") &&
strrcmp(s, "arch/um/include/uml-config.h") &&
strrcmp(s, ".ver")) {
printf(" %s \\\n", s);
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index a04da34..600fc72 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -776,7 +776,7 @@ int conf_write_autoconf(void)
name = getenv("KCONFIG_AUTOHEADER");
if (!name)
- name = "include/linux/autoconf.h";
+ name = "include/generated/autoconf.h";
if (rename(".tmpconfig.h", name))
return 1;
name = conf_get_autoconfig_name();
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 6a12dd9..b48d04d 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -12,7 +12,7 @@ vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; }
# So "sudo make install" won't change the "compiled by <user>"
# do "compiled by root"
-if [ -r $TARGET -a ! -O include/linux/autoconf.h ]; then
+if [ -r $TARGET -a ! -O include/generated/autoconf.h ]; then
vecho " SKIPPED $TARGET"
exit 0
fi
--
1.6.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 10/10] kbuild: move utsrelease.h to include/generated
2009-07-21 21:10 [PATCH/RFC] Move generated files to include/generated Sam Ravnborg
` (8 preceding siblings ...)
2009-07-21 21:19 ` [PATCH 09/10] kbuild: move autoconf.h to include/generated Sam Ravnborg
@ 2009-07-21 21:19 ` Sam Ravnborg
2009-07-22 9:58 ` [PATCH/RFC] Move generated files " Amerigo Wang
10 siblings, 0 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-21 21:19 UTC (permalink / raw)
To: linux-kernel, linux-kbuild, linux-arch; +Cc: Sam Ravnborg, Al Viro
Fix up all users of utsrelease.h
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
---
.gitignore | 1 -
Makefile | 5 ++---
arch/alpha/boot/bootp.c | 2 +-
arch/alpha/boot/bootpz.c | 2 +-
arch/alpha/boot/main.c | 2 +-
arch/frv/kernel/setup.c | 2 +-
arch/powerpc/platforms/52xx/efika.c | 2 +-
arch/powerpc/platforms/amigaone/setup.c | 2 +-
arch/powerpc/platforms/chrp/setup.c | 2 +-
arch/powerpc/platforms/powermac/bootx_init.c | 2 +-
| 2 +-
arch/x86/boot/version.c | 2 +-
drivers/staging/panel/panel.c | 2 +-
include/linux/vermagic.h | 2 +-
init/version.c | 2 +-
kernel/kexec.c | 2 +-
kernel/trace/trace.c | 2 +-
17 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/.gitignore b/.gitignore
index 91f8e0c..4980606 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,7 +46,6 @@ Module.symvers
#
include/config
include/linux/version.h
-include/linux/utsrelease.h
include/generated
# stgit generated dirs
diff --git a/Makefile b/Makefile
index 044a3f4..985e165 100644
--- a/Makefile
+++ b/Makefile
@@ -963,7 +963,7 @@ endif
# prepare2 creates a makefile if using a separate output directory
prepare2: prepare3 outputmakefile
-prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
+prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \
include/config/auto.conf
$(cmd_crmodverdir)
@@ -1005,7 +1005,7 @@ endef
include/linux/version.h: $(srctree)/Makefile FORCE
$(call filechk,version.h)
-include/linux/utsrelease.h: include/config/kernel.release FORCE
+include/generated/utsrelease.h: include/config/kernel.release FORCE
$(call filechk,utsrelease.h)
PHONY += headerdep
@@ -1156,7 +1156,6 @@ CLEAN_FILES += vmlinux System.map \
MRPROPER_DIRS += include/config usr/include include/generated
MRPROPER_FILES += .config .config.old .version .old_version \
include/linux/version.h \
- include/linux/utsrelease.h \
Module.symvers Module.markers tags TAGS cscope*
# clean - Delete most, but leave enough to build external modules
diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c
index 3af21c7..3c8d1b2 100644
--- a/arch/alpha/boot/bootp.c
+++ b/arch/alpha/boot/bootp.c
@@ -9,7 +9,7 @@
*/
#include <linux/kernel.h>
#include <linux/string.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <linux/mm.h>
#include <asm/system.h>
diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 1036b51..ade3f12 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -11,7 +11,7 @@
*/
#include <linux/kernel.h>
#include <linux/string.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <linux/mm.h>
#include <asm/system.h>
diff --git a/arch/alpha/boot/main.c b/arch/alpha/boot/main.c
index 89f3be0..644b7db 100644
--- a/arch/alpha/boot/main.c
+++ b/arch/alpha/boot/main.c
@@ -7,7 +7,7 @@
*/
#include <linux/kernel.h>
#include <linux/string.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <linux/mm.h>
#include <asm/system.h>
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index 55e4fab..75cf7f4 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -10,7 +10,7 @@
* 2 of the License, or (at your option) any later version.
*/
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/delay.h>
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index bcc69e1..45c0cb9 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -10,7 +10,7 @@
*/
#include <linux/init.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <linux/pci.h>
#include <linux/of.h>
#include <asm/prom.h>
diff --git a/arch/powerpc/platforms/amigaone/setup.c b/arch/powerpc/platforms/amigaone/setup.c
index 4430353..91c55f7 100644
--- a/arch/powerpc/platforms/amigaone/setup.c
+++ b/arch/powerpc/platforms/amigaone/setup.c
@@ -14,7 +14,7 @@
#include <linux/kernel.h>
#include <linux/seq_file.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <asm/machdep.h>
#include <asm/cputable.h>
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index cd4ad9a..0a6f5ab 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -23,7 +23,7 @@
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/pci.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <linux/adb.h>
#include <linux/module.h>
#include <linux/delay.h>
diff --git a/arch/powerpc/platforms/powermac/bootx_init.c b/arch/powerpc/platforms/powermac/bootx_init.c
index cf66091..9dd789a 100644
--- a/arch/powerpc/platforms/powermac/bootx_init.c
+++ b/arch/powerpc/platforms/powermac/bootx_init.c
@@ -12,7 +12,7 @@
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/init.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <asm/sections.h>
#include <asm/prom.h>
#include <asm/page.h>
--git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index b31cc54..93e689f 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -16,7 +16,7 @@
*/
#include <asm/segment.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <asm/boot.h>
#include <asm/e820.h>
#include <asm/page_types.h>
diff --git a/arch/x86/boot/version.c b/arch/x86/boot/version.c
index 4d88763..2b15aa4 100644
--- a/arch/x86/boot/version.c
+++ b/arch/x86/boot/version.c
@@ -13,7 +13,7 @@
*/
#include "boot.h"
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <generated/compile.h>
const char kernel_version[] =
diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index c2747bc..4b5d243 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -55,7 +55,7 @@
#include <linux/list.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <linux/io.h>
#include <asm/uaccess.h>
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
index 79b9837..cf97b5b 100644
--- a/include/linux/vermagic.h
+++ b/include/linux/vermagic.h
@@ -1,4 +1,4 @@
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <linux/module.h>
/* Simply sanity version stamp for modules. */
diff --git a/init/version.c b/init/version.c
index 82328aa..adff586 100644
--- a/init/version.c
+++ b/init/version.c
@@ -10,7 +10,7 @@
#include <linux/module.h>
#include <linux/uts.h>
#include <linux/utsname.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <linux/version.h>
#ifndef CONFIG_KALLSYMS
diff --git a/kernel/kexec.c b/kernel/kexec.c
index ae1c352..6e11ded 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -21,7 +21,7 @@
#include <linux/hardirq.h>
#include <linux/elf.h>
#include <linux/elfcore.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <linux/utsname.h>
#include <linux/numa.h>
#include <linux/suspend.h>
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8bc8d8a..35b6bba 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -12,7 +12,7 @@
* Copyright (C) 2004 William Lee Irwin III
*/
#include <linux/ring_buffer.h>
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#include <linux/stacktrace.h>
#include <linux/writeback.h>
#include <linux/kallsyms.h>
--
1.6.2.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH/RFC] Move generated files to include/generated
2009-07-21 21:10 [PATCH/RFC] Move generated files to include/generated Sam Ravnborg
` (9 preceding siblings ...)
2009-07-21 21:19 ` [PATCH 10/10] kbuild: move utsrelease.h " Sam Ravnborg
@ 2009-07-22 9:58 ` Amerigo Wang
2009-07-22 13:50 ` Arnd Bergmann
10 siblings, 1 reply; 16+ messages in thread
From: Amerigo Wang @ 2009-07-22 9:58 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kbuild, lkml, linux arch, Al Viro
On Tue, Jul 21, 2009 at 11:10:40PM +0200, Sam Ravnborg wrote:
>In 2.6.30 we introduced support for adding generated
>files to a dedicated directory named "include/generated".
>
Personally, I don't like this, I hate to see
#include <generated/foo.h>
.
>This had a number of benefits:
>
> - avoid mixing generated and normal files
I don't think this is an advantage...
> - allow us to finally kill the asm symlink
This makes sense, but it looks like only when 'make O=xxx',
no?
> - simpler .gitignore rules
> - simpler list of mrproper files
Neither these two.
The benifits we get is little, I think.
Thanks.
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH/RFC] Move generated files to include/generated
2009-07-22 9:58 ` [PATCH/RFC] Move generated files " Amerigo Wang
@ 2009-07-22 13:50 ` Arnd Bergmann
2009-07-22 20:33 ` Sam Ravnborg
0 siblings, 1 reply; 16+ messages in thread
From: Arnd Bergmann @ 2009-07-22 13:50 UTC (permalink / raw)
To: Amerigo Wang; +Cc: Sam Ravnborg, linux-kbuild, lkml, linux arch, Al Viro
On Wednesday 22 July 2009, Amerigo Wang wrote:
> On Tue, Jul 21, 2009 at 11:10:40PM +0200, Sam Ravnborg wrote:
> >In 2.6.30 we introduced support for adding generated
> >files to a dedicated directory named "include/generated".
>
> Personally, I don't like this, I hate to see
> #include <generated/foo.h>
I think that moving the generated files to a common location
makes a lot of sense, but it seems easier to move them
to include/generated/linux/ or even to (generated/linux/) and
then add -Iinclude/generated/ to the gcc command line so
you don't need to actually change all the users.
For the files in asm/, you could either add a generated/asm
directory or move them to generated/linux/ and change the
users.
Arnd <><
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH/RFC] Move generated files to include/generated
2009-07-22 13:50 ` Arnd Bergmann
@ 2009-07-22 20:33 ` Sam Ravnborg
0 siblings, 0 replies; 16+ messages in thread
From: Sam Ravnborg @ 2009-07-22 20:33 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Amerigo Wang, linux-kbuild, lkml, linux arch, Al Viro
On Wed, Jul 22, 2009 at 03:50:15PM +0200, Arnd Bergmann wrote:
> On Wednesday 22 July 2009, Amerigo Wang wrote:
> > On Tue, Jul 21, 2009 at 11:10:40PM +0200, Sam Ravnborg wrote:
> > >In 2.6.30 we introduced support for adding generated
> > >files to a dedicated directory named "include/generated".
> >
> > Personally, I don't like this, I hate to see
> > #include <generated/foo.h>
>
> I think that moving the generated files to a common location
> makes a lot of sense, but it seems easier to move them
> to include/generated/linux/ or even to (generated/linux/) and
> then add -Iinclude/generated/ to the gcc command line so
> you don't need to actually change all the users.
To put some numbers on this..
utsrelease.h - incuded in 19 files
autoconf.h - included in 0 files
bounds.h - included in 2 files
compile.h - included in 1 file
asm-offsets.h - included in 240 files
version.h - included in 184 files
So the only relevant files to discuss here is asm-offsets.h
and version.h.
We cannot break "#include <linux/version.h>" because
that would break each and every external module.
The solution to this is a simple file:
cat include/linux/version.h
#include <generated.version.h>
For asm-offsets.h the patch-set create an architecture
specific asm-offsets.h that include the generated version.
But I would prefer to see this redone so they include
the generated version directly.
This would also document that asm-offsets.h is a generated file.
The amount of includes pr arch is listed below - not a huge deal to fix up.
alpha 5
arm 30
avr32 3
blackfin 9
cris 3
frv 5
h8300 2
ia64 15
m32r 0
m68k 6
m68knommu 5
microblaze 5
mips 25
mn10300 6
parisc 14
powerpc 43
s390 13
sh 8
sparc 6
um 2
x86 24
xtensa 8
Sam
^ permalink raw reply [flat|nested] 16+ messages in thread