public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Generic headers implementation
@ 2009-03-12 13:43 Remis Lima Baima
  2009-03-12 13:43 ` [PATCH 1/3] Create the infrastructure for generic headers Remis Lima Baima
  2009-03-12 15:31 ` [PATCH 0/3] Generic headers implementation Sam Ravnborg
  0 siblings, 2 replies; 9+ messages in thread
From: Remis Lima Baima @ 2009-03-12 13:43 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Remis Lima Baima

Generic headers allow ARCH maintainers to remove all dummy
arch/ARCH/include/asm/XXX.h files or, depending on the architecture, 
include/asm-ARCH/XXX.h (e.g. arch/x86/include/asm/errno.h) that only 
include the _name equivalent_ include/asm-generic/XXX.h file 
(e.g. include/asm-generic/errno.h) with _no_ changes. It was called 
generic headers for short. Arnd Bergmann gave the original idea and 
asked me to implement it.

To use it just two steps are necessary:

 - Remove all the dummy arch/ARCH/include/asm/XXX.h files 
   (e.g. rm arch/x86/include/asm/errno.h)

 - Add the variable generic-y with the names of the removed files 
   (e.g. generic-y += errno.h) in the arch/ARCH/include/asm/Kbuild 
   (e.g. arch/x86/include/asm/Kbuild)

The removed files will be automatically generated during the build 
process by the script scripts/Makefile.genericheaders.

The scripts/Makefile.headersinst was adapted to avoid errors (due to 
the removal of header files from their default locations) so it would 
pass the 'make headers_check'.

The generic headers were applyed and tested in both x86 (tested in my 
Notebook with i386_defconfig on kernel 2.6.29-rc7 of 09/Mar/2009 from 
Linus git tree) and powerpc (tested in my PS3 with ps3_defconfig on 
kernel 2.6.29-rc7 of 11/Mar/2009 from Geoff Levand git tree). Both 
compiled and booted without problems.

This approach does not reduce much LOC but, in a rough estimation, it 
would allow the removal of around 90 dummy header files among all 
architectures.

PS: This is my first e-mail/patch here. Sorry for any misbehaviour :)


Remis Lima Baima (3):
  Create the infrastructure for generic headers
  Apply generic headers for x86
  Apply generic headers for PPC

 Makefile                                     |    4 +++
 arch/powerpc/include/asm/Kbuild              |    8 ++++++
 arch/powerpc/include/asm/div64.h             |    1 -
 arch/powerpc/include/asm/emergency-restart.h |    1 -
 arch/powerpc/include/asm/irq_regs.h          |    2 -
 arch/powerpc/include/asm/poll.h              |    1 -
 arch/powerpc/include/asm/resource.h          |    1 -
 arch/powerpc/include/asm/statfs.h            |    6 ----
 arch/powerpc/include/asm/xor.h               |    1 -
 arch/x86/include/asm/Kbuild                  |    9 +++++++
 arch/x86/include/asm/cputime.h               |    1 -
 arch/x86/include/asm/errno.h                 |    1 -
 arch/x86/include/asm/fcntl.h                 |    1 -
 arch/x86/include/asm/ioctl.h                 |    1 -
 arch/x86/include/asm/poll.h                  |    1 -
 arch/x86/include/asm/resource.h              |    1 -
 arch/x86/include/asm/rtc.h                   |    1 -
 arch/x86/include/asm/sections.h              |    1 -
 scripts/Makefile.genericheaders              |   34 ++++++++++++++++++++++++++
 scripts/Makefile.headersinst                 |    4 +++
 20 files changed, 59 insertions(+), 21 deletions(-)
 delete mode 100644 arch/powerpc/include/asm/div64.h
 delete mode 100644 arch/powerpc/include/asm/emergency-restart.h
 delete mode 100644 arch/powerpc/include/asm/irq_regs.h
 delete mode 100644 arch/powerpc/include/asm/poll.h
 delete mode 100644 arch/powerpc/include/asm/resource.h
 delete mode 100644 arch/powerpc/include/asm/statfs.h
 delete mode 100644 arch/powerpc/include/asm/xor.h
 delete mode 100644 arch/x86/include/asm/cputime.h
 delete mode 100644 arch/x86/include/asm/errno.h
 delete mode 100644 arch/x86/include/asm/fcntl.h
 delete mode 100644 arch/x86/include/asm/ioctl.h
 delete mode 100644 arch/x86/include/asm/poll.h
 delete mode 100644 arch/x86/include/asm/resource.h
 delete mode 100644 arch/x86/include/asm/rtc.h
 delete mode 100644 arch/x86/include/asm/sections.h
 create mode 100644 scripts/Makefile.genericheaders


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] Create the infrastructure for generic headers
  2009-03-12 13:43 [PATCH 0/3] Generic headers implementation Remis Lima Baima
@ 2009-03-12 13:43 ` Remis Lima Baima
  2009-03-12 13:43   ` [PATCH 2/3] Apply generic headers for x86 Remis Lima Baima
  2009-03-12 15:31 ` [PATCH 0/3] Generic headers implementation Sam Ravnborg
  1 sibling, 1 reply; 9+ messages in thread
From: Remis Lima Baima @ 2009-03-12 13:43 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Remis Lima Baima

Create the infrastructure that allow ARCH maintainers to remove all
arch/ARCH/include/asm/XXX.h files or, depending on the architecture,
include/asm-ARCH/XXX.h (e.g. arch/x86/include/asm/errno.h) that only
include the _name equivalent_ include/asm-generic/XXX.h file
(e.g. include/asm-generic/errno.h) with _no_ changes. It was called
generic headers for short. Arnd Bergmann gave the original idea and
asked me to implement it.

To use it just two steps are necessary:

 - Remove all the dummy arch/ARCH/include/asm/XXX.h files
   (e.g. rm arch/x86/include/asm/errno.h)

 - Add the variable generic-y with the names of the removed files
   (e.g. generic-y += errno.h) in the arch/ARCH/include/asm/Kbuild
   (e.g. arch/x86/include/asm/Kbuild)

The removed files will be automatically generated during the build
process by the script scripts/Makefile.genericheaders.

NOTE: the arch/ARCH/include/asm/XXX.h (or include/asm-ARCH/XXX.h)
file can only be removed if it has the _exact same name_ as the
include/asm-generic/XXX.h file and _no_ additional logic.

Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
---
 Makefile                        |    4 ++++
 scripts/Makefile.genericheaders |   34 ++++++++++++++++++++++++++++++++++
 scripts/Makefile.headersinst    |    4 ++++
 3 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 scripts/Makefile.genericheaders

diff --git a/Makefile b/Makefile
index d04ee0a..4bab071 100644
--- a/Makefile
+++ b/Makefile
@@ -952,9 +952,11 @@ endif
 # prepare2 creates a makefile if using a separate output directory
 prepare2: prepare3 outputmakefile
 
+export genericheaders := -C $(srctree) -f $(srctree)/scripts/Makefile.genericheaders gh_arch
 prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
                    include/asm include/config/auto.conf
 	$(cmd_crmodverdir)
+	$(Q)$(MAKE) $(genericheaders)=$(SRCARCH) genericheaders_install
 
 archprepare: prepare1 scripts_basic
 
@@ -1218,6 +1220,8 @@ $(mrproper-dirs):
 mrproper: clean archmrproper $(mrproper-dirs)
 	$(call cmd,rmdirs)
 	$(call cmd,rmfiles)
+	$(Q)$(foreach a, $(subst $(objtree)/include/asm-,,$(wildcard $(objtree)/include/asm-*)),\
+		$(MAKE) $(genericheaders)=$(a) genericheaders_remove;)
 
 # distclean
 #
diff --git a/scripts/Makefile.genericheaders b/scripts/Makefile.genericheaders
new file mode 100644
index 0000000..8c86945
--- /dev/null
+++ b/scripts/Makefile.genericheaders
@@ -0,0 +1,34 @@
+# ==========================================================================
+# Generic headers handling
+# ==========================================================================
+
+PHONY += genericheaders_install genericheaders_remove
+
+ifneq ($(wildcard $(srctree)/arch/$(gh_arch)/include/asm/Kbuild),)
+include $(srctree)/arch/$(gh_arch)/include/asm/Kbuild
+else ifneq ($(wildcard $(srctree)/include/asm-$(gh_arch)/Kbuild),)
+include $(srctree)/include/asm-$(gh_arch)/Kbuild
+endif
+
+gh_dst ?= $(objtree)/include/asm-$(gh_arch)
+gh_files := $(addprefix $(gh_dst)/, $(generic-y))
+gh_existentfiles := $(wildcard $(gh_files))
+
+genericheaders_install:
+ifeq ($(generic-y),)
+	$(Q):
+else
+	$(Q)$(foreach g, $(generic-y), \
+		echo "#include <asm-generic/"$(g)">" > $(gh_dst)/$(g);)
+	$(Q)echo "  GEN     "$(subst $(objtree)/,,$(gh_files))
+endif
+
+genericheaders_remove:
+ifeq ($(gh_existentfiles),)
+	$(Q):
+else
+	$(Q)rm -f $(gh_existentfiles)
+	$(Q)echo "  CLEAN   "$(subst $(objtree)/,,$(gh_existentfiles))
+endif
+
+.PHONY: $(PHONY)
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 612dc13..3028a73 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -21,6 +21,7 @@ install       := $(INSTALL_HDR_PATH)/$(_dst)
 header-y      := $(sort $(header-y) $(unifdef-y))
 subdirs       := $(patsubst %/,%,$(filter %/, $(header-y)))
 header-y      := $(filter-out %/, $(header-y))
+header-y      := $(filter-out $(generic-y), $(header-y))
 
 # files used to track state of install/check
 install-file  := $(install)/.install
@@ -65,6 +66,9 @@ __headersinst: $(subdirs) $(install-file)
 
 targets += $(install-file)
 $(install-file): scripts/headers_install.pl $(input-files) FORCE
+ifneq ($(generic-y),)
+	$(Q)$(MAKE) $(genericheaders)=$(SRCARCH) gh_dst=$(install) genericheaders_install
+endif
 	$(if $(unwanted),$(call cmd,remove),)
 	$(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
 	$(call if_changed,install)
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] Apply generic headers for x86
  2009-03-12 13:43 ` [PATCH 1/3] Create the infrastructure for generic headers Remis Lima Baima
@ 2009-03-12 13:43   ` Remis Lima Baima
  2009-03-12 13:43     ` [PATCH 3/3] Apply generic headers for PPC Remis Lima Baima
  0 siblings, 1 reply; 9+ messages in thread
From: Remis Lima Baima @ 2009-03-12 13:43 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Remis Lima Baima

This patch depends on patch d8b392b37469f570bd180f37be783367259f1d4b
("Create the infrastructure for generic headers").

Remove the dummy arch/x86/include/asm/XXX.h files.

Add in the arch/x86/include/asm/Kbuild file the variable generic-y
with the names of the removed arch/x86/include/asm/XXX.h files.

The removed files will be automatically generated during the build
process by the script scripts/Makefile.genericheaders.

Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
---
 arch/x86/include/asm/Kbuild     |    9 +++++++++
 arch/x86/include/asm/cputime.h  |    1 -
 arch/x86/include/asm/errno.h    |    1 -
 arch/x86/include/asm/fcntl.h    |    1 -
 arch/x86/include/asm/ioctl.h    |    1 -
 arch/x86/include/asm/poll.h     |    1 -
 arch/x86/include/asm/resource.h |    1 -
 arch/x86/include/asm/rtc.h      |    1 -
 arch/x86/include/asm/sections.h |    1 -
 9 files changed, 9 insertions(+), 8 deletions(-)
 delete mode 100644 arch/x86/include/asm/cputime.h
 delete mode 100644 arch/x86/include/asm/errno.h
 delete mode 100644 arch/x86/include/asm/fcntl.h
 delete mode 100644 arch/x86/include/asm/ioctl.h
 delete mode 100644 arch/x86/include/asm/poll.h
 delete mode 100644 arch/x86/include/asm/resource.h
 delete mode 100644 arch/x86/include/asm/rtc.h
 delete mode 100644 arch/x86/include/asm/sections.h

diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild
index 4a8e80c..ae936b1 100644
--- a/arch/x86/include/asm/Kbuild
+++ b/arch/x86/include/asm/Kbuild
@@ -22,3 +22,12 @@ unifdef-y += unistd_32.h
 unifdef-y += unistd_64.h
 unifdef-y += vm86.h
 unifdef-y += vsyscall.h
+
+generic-y += cputime.h
+generic-y += errno.h
+generic-y += fcntl.h
+generic-y += ioctl.h
+generic-y += poll.h
+generic-y += resource.h
+generic-y += rtc.h
+generic-y += sections.h
diff --git a/arch/x86/include/asm/cputime.h b/arch/x86/include/asm/cputime.h
deleted file mode 100644
index 6d68ad7..0000000
--- a/arch/x86/include/asm/cputime.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/cputime.h>
diff --git a/arch/x86/include/asm/errno.h b/arch/x86/include/asm/errno.h
deleted file mode 100644
index 4c82b50..0000000
--- a/arch/x86/include/asm/errno.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/errno.h>
diff --git a/arch/x86/include/asm/fcntl.h b/arch/x86/include/asm/fcntl.h
deleted file mode 100644
index 46ab12d..0000000
--- a/arch/x86/include/asm/fcntl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/fcntl.h>
diff --git a/arch/x86/include/asm/ioctl.h b/arch/x86/include/asm/ioctl.h
deleted file mode 100644
index b279fe0..0000000
--- a/arch/x86/include/asm/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/ioctl.h>
diff --git a/arch/x86/include/asm/poll.h b/arch/x86/include/asm/poll.h
deleted file mode 100644
index c98509d..0000000
--- a/arch/x86/include/asm/poll.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/poll.h>
diff --git a/arch/x86/include/asm/resource.h b/arch/x86/include/asm/resource.h
deleted file mode 100644
index 04bc4db..0000000
--- a/arch/x86/include/asm/resource.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/resource.h>
diff --git a/arch/x86/include/asm/rtc.h b/arch/x86/include/asm/rtc.h
deleted file mode 100644
index f71c3b0..0000000
--- a/arch/x86/include/asm/rtc.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/rtc.h>
diff --git a/arch/x86/include/asm/sections.h b/arch/x86/include/asm/sections.h
deleted file mode 100644
index 2b8c516..0000000
--- a/arch/x86/include/asm/sections.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/sections.h>
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] Apply generic headers for PPC
  2009-03-12 13:43   ` [PATCH 2/3] Apply generic headers for x86 Remis Lima Baima
@ 2009-03-12 13:43     ` Remis Lima Baima
  0 siblings, 0 replies; 9+ messages in thread
From: Remis Lima Baima @ 2009-03-12 13:43 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Remis Lima Baima

This patch depends on patch d8b392b37469f570bd180f37be783367259f1d4b
("Create the infrastructure for generic headers").

Remove the dummy arch/powerpc/include/asm/XXX.h files.

Add in the arch/powerpc/include/asm/Kbuild file the variable generic-y
with the names of the removed arch/powerpc/include/asm/XXX.h files.

The removed files will be automatically generated during the build
process by the script scripts/Makefile.genericheaders.

Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
---
 arch/powerpc/include/asm/Kbuild              |    8 ++++++++
 arch/powerpc/include/asm/div64.h             |    1 -
 arch/powerpc/include/asm/emergency-restart.h |    1 -
 arch/powerpc/include/asm/irq_regs.h          |    2 --
 arch/powerpc/include/asm/poll.h              |    1 -
 arch/powerpc/include/asm/resource.h          |    1 -
 arch/powerpc/include/asm/statfs.h            |    6 ------
 arch/powerpc/include/asm/xor.h               |    1 -
 8 files changed, 8 insertions(+), 13 deletions(-)
 delete mode 100644 arch/powerpc/include/asm/div64.h
 delete mode 100644 arch/powerpc/include/asm/emergency-restart.h
 delete mode 100644 arch/powerpc/include/asm/irq_regs.h
 delete mode 100644 arch/powerpc/include/asm/poll.h
 delete mode 100644 arch/powerpc/include/asm/resource.h
 delete mode 100644 arch/powerpc/include/asm/statfs.h
 delete mode 100644 arch/powerpc/include/asm/xor.h

diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild
index 5ab7d7f..8eea68e 100644
--- a/arch/powerpc/include/asm/Kbuild
+++ b/arch/powerpc/include/asm/Kbuild
@@ -35,3 +35,11 @@ unifdef-y += spu_info.h
 unifdef-y += termios.h
 unifdef-y += types.h
 unifdef-y += unistd.h
+
+generic-y += div64.h
+generic-y += emergency-restart.h
+generic-y += irq_regs.h
+generic-y += poll.h
+generic-y += resource.h
+generic-y += statfs.h
+generic-y += xor.h
diff --git a/arch/powerpc/include/asm/div64.h b/arch/powerpc/include/asm/div64.h
deleted file mode 100644
index 6cd978c..0000000
--- a/arch/powerpc/include/asm/div64.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/div64.h>
diff --git a/arch/powerpc/include/asm/emergency-restart.h b/arch/powerpc/include/asm/emergency-restart.h
deleted file mode 100644
index 3711bd9..0000000
--- a/arch/powerpc/include/asm/emergency-restart.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/emergency-restart.h>
diff --git a/arch/powerpc/include/asm/irq_regs.h b/arch/powerpc/include/asm/irq_regs.h
deleted file mode 100644
index ba94b51..0000000
--- a/arch/powerpc/include/asm/irq_regs.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#include <asm-generic/irq_regs.h>
-
diff --git a/arch/powerpc/include/asm/poll.h b/arch/powerpc/include/asm/poll.h
deleted file mode 100644
index c98509d..0000000
--- a/arch/powerpc/include/asm/poll.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/poll.h>
diff --git a/arch/powerpc/include/asm/resource.h b/arch/powerpc/include/asm/resource.h
deleted file mode 100644
index 04bc4db..0000000
--- a/arch/powerpc/include/asm/resource.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/resource.h>
diff --git a/arch/powerpc/include/asm/statfs.h b/arch/powerpc/include/asm/statfs.h
deleted file mode 100644
index 5244834..0000000
--- a/arch/powerpc/include/asm/statfs.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_POWERPC_STATFS_H
-#define _ASM_POWERPC_STATFS_H
-
-#include <asm-generic/statfs.h>
-
-#endif
diff --git a/arch/powerpc/include/asm/xor.h b/arch/powerpc/include/asm/xor.h
deleted file mode 100644
index c82eb12..0000000
--- a/arch/powerpc/include/asm/xor.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/xor.h>
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Generic headers implementation
  2009-03-12 13:43 [PATCH 0/3] Generic headers implementation Remis Lima Baima
  2009-03-12 13:43 ` [PATCH 1/3] Create the infrastructure for generic headers Remis Lima Baima
@ 2009-03-12 15:31 ` Sam Ravnborg
  2009-03-13 21:50   ` Remis Lima Baima
  2009-03-18 17:08   ` [PATCH 0/2] New generic " Remis Lima Baima
  1 sibling, 2 replies; 9+ messages in thread
From: Sam Ravnborg @ 2009-03-12 15:31 UTC (permalink / raw)
  To: Remis Lima Baima; +Cc: linux-kbuild

On Thu, Mar 12, 2009 at 02:43:05PM +0100, Remis Lima Baima wrote:
> Generic headers allow ARCH maintainers to remove all dummy
> arch/ARCH/include/asm/XXX.h files or, depending on the architecture, 
> include/asm-ARCH/XXX.h (e.g. arch/x86/include/asm/errno.h) that only 
> include the _name equivalent_ include/asm-generic/XXX.h file 
> (e.g. include/asm-generic/errno.h) with _no_ changes. It was called 
> generic headers for short. Arnd Bergmann gave the original idea and 
> asked me to implement it.

Hi Remis.

I recall having exchanged mails with Arnd about the topic before but
I have lost track of it.

Why is it that we do not implment this using the following scheme:

Create a new directory:
1) include/generic/asm
2) Add the directory to the searchpath _after_ all ARCH supplied search paths.
3) Teach headers install about this new place
4) Move all generic headers from asm-generic to this new home
   and add a dummy "#include <generic/asm/foo.h>" in asm-generic

Then we can delete all the one-liners in $ARCH/include/asm
which simply include the asm-generic version.

	Sam

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Generic headers implementation
  2009-03-12 15:31 ` [PATCH 0/3] Generic headers implementation Sam Ravnborg
@ 2009-03-13 21:50   ` Remis Lima Baima
  2009-03-18 17:08   ` [PATCH 0/2] New generic " Remis Lima Baima
  1 sibling, 0 replies; 9+ messages in thread
From: Remis Lima Baima @ 2009-03-13 21:50 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kbuild

On Thu, Mar 12, 2009 at 4:31 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Thu, Mar 12, 2009 at 02:43:05PM +0100, Remis Lima Baima wrote:
>> Generic headers allow ARCH maintainers to remove all dummy
>> arch/ARCH/include/asm/XXX.h files or, depending on the architecture,
>> include/asm-ARCH/XXX.h (e.g. arch/x86/include/asm/errno.h) that only
>> include the _name equivalent_ include/asm-generic/XXX.h file
>> (e.g. include/asm-generic/errno.h) with _no_ changes. It was called
>> generic headers for short. Arnd Bergmann gave the original idea and
>> asked me to implement it.
>
> Hi Remis.
>
> I recall having exchanged mails with Arnd about the topic before but
> I have lost track of it.
>
> Why is it that we do not implment this using the following scheme:
>
> Create a new directory:
> 1) include/generic/asm
> 2) Add the directory to the searchpath _after_ all ARCH supplied search paths.
> 3) Teach headers install about this new place
> 4) Move all generic headers from asm-generic to this new home
>   and add a dummy "#include <generic/asm/foo.h>" in asm-generic
>
> Then we can delete all the one-liners in $ARCH/include/asm
> which simply include the asm-generic version.
>
>        Sam

Actually this is a much better solution. I just tried it out for few
files and it seems to work quite well. I will implement it and send
the patch.
But what do you think if, instead of creating the dummy "#include
<generic/asm/foo.h>" in asm-generic, we create symlinks?
I've heard about an "avoid-symlink policy" so it is more a sort of
question than suggestion ;-)

Remis

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 0/2] New generic headers implementation
  2009-03-12 15:31 ` [PATCH 0/3] Generic headers implementation Sam Ravnborg
  2009-03-13 21:50   ` Remis Lima Baima
@ 2009-03-18 17:08   ` Remis Lima Baima
       [not found]     ` <1237396115-28674-2-git-send-email-remis.developer@googlemail.com>
  1 sibling, 1 reply; 9+ messages in thread
From: Remis Lima Baima @ 2009-03-18 17:08 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, Remis Lima Baima

Generic headers allow ARCH maintainers to remove all dummy
arch/ARCH/include/asm/XXX.h files or, depending on the architecture, 
include/asm-ARCH/XXX.h (e.g. arch/x86/include/asm/errno.h) that only 
include the _name equivalent_ include/asm-generic/XXX.h file 
(e.g. include/asm-generic/errno.h) with _no_ changes. It was called 
generic headers for short. Arnd Bergmann gave the original idea and 
asked me to implement it. This is the second implementation with the 
changes proposed by Sam Ravnborg.

To use it just one step is necessary:

 - Remove all the dummy arch/ARCH/include/asm/XXX.h files 
   (e.g. rm arch/x86/include/asm/errno.h)

The scripts/Makefile.headersinst was adapted to avoid errors (due to 
the removal of header files from their default locations) so it would 
pass the 'make headers_check'.

The generic headers were applyed and tested in x86 (tested in my 
Notebook with i386_defconfig on kernel 2.6.29-rc8 of 17/Mar/2009 from 
Linus git tree). It compiled and booted without problems.

This approach does not reduce much LOC but, in a rough estimation, it 
would allow the removal of around 90 dummy header files among all 
architectures.

Remis Lima Baima (2):
  Create the infrastructure for generic headers
  Apply generic headers for x86

 Makefile                                     |    1 +
 arch/x86/include/asm/cputime.h               |    1 -
 arch/x86/include/asm/errno.h                 |    1 -
 arch/x86/include/asm/fcntl.h                 |    1 -
 arch/x86/include/asm/ioctl.h                 |    1 -
 arch/x86/include/asm/poll.h                  |    1 -
 arch/x86/include/asm/resource.h              |    1 -
 arch/x86/include/asm/rtc.h                   |    1 -
 arch/x86/include/asm/sections.h              |    1 -
 include/asm-generic/4level-fixup.h           |   38 +--
 include/asm-generic/atomic.h                 |  259 +---------
 include/asm-generic/audit_change_attr.h      |   23 +-
 include/asm-generic/audit_dir_write.h        |   19 +-
 include/asm-generic/audit_read.h             |    9 +-
 include/asm-generic/audit_signal.h           |    4 +-
 include/asm-generic/audit_write.h            |   14 +-
 include/asm-generic/bitops.h                 |   34 +--
 include/asm-generic/bitops/__ffs.h           |   44 +--
 include/asm-generic/bitops/__fls.h           |   44 +--
 include/asm-generic/bitops/atomic.h          |  189 +-------
 include/asm-generic/bitops/ext2-atomic.h     |   23 +-
 include/asm-generic/bitops/ext2-non-atomic.h |   21 +-
 include/asm-generic/bitops/ffs.h             |   42 +--
 include/asm-generic/bitops/ffz.h             |   13 +-
 include/asm-generic/bitops/find.h            |   16 +-
 include/asm-generic/bitops/fls.h             |   42 +--
 include/asm-generic/bitops/fls64.h           |   37 +--
 include/asm-generic/bitops/hweight.h         |   12 +-
 include/asm-generic/bitops/le.h              |   58 +--
 include/asm-generic/bitops/lock.h            |   46 +--
 include/asm-generic/bitops/minix-le.h        |   18 +-
 include/asm-generic/bitops/minix.h           |   16 +-
 include/asm-generic/bitops/non-atomic.h      |  109 +----
 include/asm-generic/bitops/sched.h           |   32 +--
 include/asm-generic/bug.h                    |  144 +-----
 include/asm-generic/cmpxchg-local.h          |   66 +---
 include/asm-generic/cmpxchg.h                |   23 +-
 include/asm-generic/cputime.h                |   70 +---
 include/asm-generic/device.h                 |   13 +-
 include/asm-generic/div64.h                  |   59 +--
 include/asm-generic/dma-coherent.h           |   33 +--
 include/asm-generic/dma-mapping-broken.h     |   83 +---
 include/asm-generic/dma-mapping.h            |  309 +-----------
 include/asm-generic/emergency-restart.h      |   10 +-
 include/asm-generic/errno-base.h             |   40 +--
 include/asm-generic/errno.h                  |  110 +----
 include/asm-generic/fcntl.h                  |  152 +------
 include/asm-generic/futex.h                  |   57 +--
 include/asm-generic/gpio.h                   |  189 +-------
 include/asm-generic/ide_iops.h               |   39 +--
 include/asm-generic/int-l64.h                |   72 +---
 include/asm-generic/int-ll64.h               |   77 +---
 include/asm-generic/ioctl.h                  |  106 +----
 include/asm-generic/iomap.h                  |   73 +---
 include/asm-generic/irq_regs.h               |   38 +--
 include/asm-generic/kdebug.h                 |   10 +-
 include/asm-generic/libata-portmap.h         |    8 +-
 include/asm-generic/local.h                  |   75 +---
 include/asm-generic/memory_model.h           |   78 +---
 include/asm-generic/mm_hooks.h               |   19 +-
 include/asm-generic/mman.h                   |   42 +--
 include/asm-generic/mutex-dec.h              |   91 +----
 include/asm-generic/mutex-null.h             |   20 +-
 include/asm-generic/mutex-xchg.h             |  112 +----
 include/asm-generic/page.h                   |   25 +-
 include/asm-generic/pci-dma-compat.h         |  108 +----
 include/asm-generic/pci.h                    |   56 +--
 include/asm-generic/percpu.h                 |   84 +---
 include/asm-generic/pgtable-nopmd.h          |   70 +---
 include/asm-generic/pgtable-nopud.h          |   62 +---
 include/asm-generic/pgtable.h                |  345 +------------
 include/asm-generic/poll.h                   |   38 +--
 include/asm-generic/resource.h               |   95 +----
 include/asm-generic/rtc.h                    |  219 +--------
 include/asm-generic/sections.h               |   24 +-
 include/asm-generic/siginfo.h                |  297 +-----------
 include/asm-generic/signal.h                 |   29 +-
 include/asm-generic/statfs.h                 |   83 +---
 include/asm-generic/syscall.h                |  142 +-----
 include/asm-generic/termios.h                |   78 +---
 include/asm-generic/tlb.h                    |  149 +------
 include/asm-generic/topology.h               |   83 +---
 include/asm-generic/uaccess.h                |   27 +-
 include/asm-generic/vmlinux.lds.h            |  442 +----------------
 include/asm-generic/xor.h                    |  719 +-------------------------
 include/generic/asm/4level-fixup.h           |   37 ++
 include/generic/asm/atomic.h                 |  258 +++++++++
 include/generic/asm/audit_change_attr.h      |   22 +
 include/generic/asm/audit_dir_write.h        |   18 +
 include/generic/asm/audit_read.h             |    8 +
 include/generic/asm/audit_signal.h           |    3 +
 include/generic/asm/audit_write.h            |   13 +
 include/generic/asm/bitops.h                 |   33 ++
 include/generic/asm/bitops/__ffs.h           |   43 ++
 include/generic/asm/bitops/__fls.h           |   43 ++
 include/generic/asm/bitops/atomic.h          |  188 +++++++
 include/generic/asm/bitops/ext2-atomic.h     |   22 +
 include/generic/asm/bitops/ext2-non-atomic.h |   20 +
 include/generic/asm/bitops/ffs.h             |   41 ++
 include/generic/asm/bitops/ffz.h             |   12 +
 include/generic/asm/bitops/find.h            |   15 +
 include/generic/asm/bitops/fls.h             |   41 ++
 include/generic/asm/bitops/fls64.h           |   36 ++
 include/generic/asm/bitops/hweight.h         |   11 +
 include/generic/asm/bitops/le.h              |   57 ++
 include/generic/asm/bitops/lock.h            |   45 ++
 include/generic/asm/bitops/minix-le.h        |   17 +
 include/generic/asm/bitops/minix.h           |   15 +
 include/generic/asm/bitops/non-atomic.h      |  108 ++++
 include/generic/asm/bitops/sched.h           |   31 ++
 include/generic/asm/bug.h                    |  143 +++++
 include/generic/asm/cmpxchg-local.h          |   65 +++
 include/generic/asm/cmpxchg.h                |   22 +
 include/generic/asm/cputime.h                |   69 +++
 include/generic/asm/device.h                 |   12 +
 include/generic/asm/div64.h                  |   58 ++
 include/generic/asm/dma-coherent.h           |   32 ++
 include/generic/asm/dma-mapping-broken.h     |   82 +++
 include/generic/asm/dma-mapping.h            |  308 +++++++++++
 include/generic/asm/emergency-restart.h      |    9 +
 include/generic/asm/errno-base.h             |   39 ++
 include/generic/asm/errno.h                  |  109 ++++
 include/generic/asm/fcntl.h                  |  151 ++++++
 include/generic/asm/futex.h                  |   56 ++
 include/generic/asm/gpio.h                   |  188 +++++++
 include/generic/asm/ide_iops.h               |   38 ++
 include/generic/asm/int-l64.h                |   71 +++
 include/generic/asm/int-ll64.h               |   76 +++
 include/generic/asm/ioctl.h                  |  105 ++++
 include/generic/asm/iomap.h                  |   72 +++
 include/generic/asm/irq_regs.h               |   37 ++
 include/generic/asm/kdebug.h                 |    9 +
 include/generic/asm/libata-portmap.h         |    7 +
 include/generic/asm/local.h                  |   74 +++
 include/generic/asm/memory_model.h           |   77 +++
 include/generic/asm/mm_hooks.h               |   18 +
 include/generic/asm/mman.h                   |   41 ++
 include/generic/asm/mutex-dec.h              |   90 ++++
 include/generic/asm/mutex-null.h             |   19 +
 include/generic/asm/mutex-xchg.h             |  111 ++++
 include/generic/asm/page.h                   |   24 +
 include/generic/asm/pci-dma-compat.h         |  107 ++++
 include/generic/asm/pci.h                    |   55 ++
 include/generic/asm/percpu.h                 |   83 +++
 include/generic/asm/pgtable-nopmd.h          |   69 +++
 include/generic/asm/pgtable-nopud.h          |   61 +++
 include/generic/asm/pgtable.h                |  344 ++++++++++++
 include/generic/asm/poll.h                   |   37 ++
 include/generic/asm/resource.h               |   94 ++++
 include/generic/asm/rtc.h                    |  218 ++++++++
 include/generic/asm/sections.h               |   23 +
 include/generic/asm/siginfo.h                |  296 +++++++++++
 include/generic/asm/signal.h                 |   28 +
 include/generic/asm/statfs.h                 |   82 +++
 include/generic/asm/syscall.h                |  141 +++++
 include/generic/asm/termios.h                |   77 +++
 include/generic/asm/tlb.h                    |  148 ++++++
 include/generic/asm/topology.h               |   82 +++
 include/generic/asm/uaccess.h                |   26 +
 include/generic/asm/vmlinux.lds.h            |  441 ++++++++++++++++
 include/generic/asm/xor.h                    |  718 +++++++++++++++++++++++++
 scripts/Makefile.headersinst                 |    9 +
 162 files changed, 6565 insertions(+), 6487 deletions(-)
 delete mode 100644 arch/x86/include/asm/cputime.h
 delete mode 100644 arch/x86/include/asm/errno.h
 delete mode 100644 arch/x86/include/asm/fcntl.h
 delete mode 100644 arch/x86/include/asm/ioctl.h
 delete mode 100644 arch/x86/include/asm/poll.h
 delete mode 100644 arch/x86/include/asm/resource.h
 delete mode 100644 arch/x86/include/asm/rtc.h
 delete mode 100644 arch/x86/include/asm/sections.h
 create mode 100644 include/generic/asm/4level-fixup.h
 create mode 100644 include/generic/asm/atomic.h
 create mode 100644 include/generic/asm/audit_change_attr.h
 create mode 100644 include/generic/asm/audit_dir_write.h
 create mode 100644 include/generic/asm/audit_read.h
 create mode 100644 include/generic/asm/audit_signal.h
 create mode 100644 include/generic/asm/audit_write.h
 create mode 100644 include/generic/asm/bitops.h
 create mode 100644 include/generic/asm/bitops/__ffs.h
 create mode 100644 include/generic/asm/bitops/__fls.h
 create mode 100644 include/generic/asm/bitops/atomic.h
 create mode 100644 include/generic/asm/bitops/ext2-atomic.h
 create mode 100644 include/generic/asm/bitops/ext2-non-atomic.h
 create mode 100644 include/generic/asm/bitops/ffs.h
 create mode 100644 include/generic/asm/bitops/ffz.h
 create mode 100644 include/generic/asm/bitops/find.h
 create mode 100644 include/generic/asm/bitops/fls.h
 create mode 100644 include/generic/asm/bitops/fls64.h
 create mode 100644 include/generic/asm/bitops/hweight.h
 create mode 100644 include/generic/asm/bitops/le.h
 create mode 100644 include/generic/asm/bitops/lock.h
 create mode 100644 include/generic/asm/bitops/minix-le.h
 create mode 100644 include/generic/asm/bitops/minix.h
 create mode 100644 include/generic/asm/bitops/non-atomic.h
 create mode 100644 include/generic/asm/bitops/sched.h
 create mode 100644 include/generic/asm/bug.h
 create mode 100644 include/generic/asm/cmpxchg-local.h
 create mode 100644 include/generic/asm/cmpxchg.h
 create mode 100644 include/generic/asm/cputime.h
 create mode 100644 include/generic/asm/device.h
 create mode 100644 include/generic/asm/div64.h
 create mode 100644 include/generic/asm/dma-coherent.h
 create mode 100644 include/generic/asm/dma-mapping-broken.h
 create mode 100644 include/generic/asm/dma-mapping.h
 create mode 100644 include/generic/asm/emergency-restart.h
 create mode 100644 include/generic/asm/errno-base.h
 create mode 100644 include/generic/asm/errno.h
 create mode 100644 include/generic/asm/fcntl.h
 create mode 100644 include/generic/asm/futex.h
 create mode 100644 include/generic/asm/gpio.h
 create mode 100644 include/generic/asm/ide_iops.h
 create mode 100644 include/generic/asm/int-l64.h
 create mode 100644 include/generic/asm/int-ll64.h
 create mode 100644 include/generic/asm/ioctl.h
 create mode 100644 include/generic/asm/iomap.h
 create mode 100644 include/generic/asm/irq_regs.h
 create mode 100644 include/generic/asm/kdebug.h
 create mode 100644 include/generic/asm/libata-portmap.h
 create mode 100644 include/generic/asm/local.h
 create mode 100644 include/generic/asm/memory_model.h
 create mode 100644 include/generic/asm/mm_hooks.h
 create mode 100644 include/generic/asm/mman.h
 create mode 100644 include/generic/asm/mutex-dec.h
 create mode 100644 include/generic/asm/mutex-null.h
 create mode 100644 include/generic/asm/mutex-xchg.h
 create mode 100644 include/generic/asm/page.h
 create mode 100644 include/generic/asm/pci-dma-compat.h
 create mode 100644 include/generic/asm/pci.h
 create mode 100644 include/generic/asm/percpu.h
 create mode 100644 include/generic/asm/pgtable-nopmd.h
 create mode 100644 include/generic/asm/pgtable-nopud.h
 create mode 100644 include/generic/asm/pgtable.h
 create mode 100644 include/generic/asm/poll.h
 create mode 100644 include/generic/asm/resource.h
 create mode 100644 include/generic/asm/rtc.h
 create mode 100644 include/generic/asm/sections.h
 create mode 100644 include/generic/asm/siginfo.h
 create mode 100644 include/generic/asm/signal.h
 create mode 100644 include/generic/asm/statfs.h
 create mode 100644 include/generic/asm/syscall.h
 create mode 100644 include/generic/asm/termios.h
 create mode 100644 include/generic/asm/tlb.h
 create mode 100644 include/generic/asm/topology.h
 create mode 100644 include/generic/asm/uaccess.h
 create mode 100644 include/generic/asm/vmlinux.lds.h
 create mode 100644 include/generic/asm/xor.h


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/2] Apply generic headers for x86
       [not found]     ` <1237396115-28674-2-git-send-email-remis.developer@googlemail.com>
@ 2009-03-18 17:08       ` Remis Lima Baima
  2009-03-20 16:31       ` [PATCH] Create the infrastructure for generic headers-UPDATE Remis Lima Baima
  1 sibling, 0 replies; 9+ messages in thread
From: Remis Lima Baima @ 2009-03-18 17:08 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, Remis Lima Baima

This patch depends on patch 7354857901f03bd27db16bf8c34958dd1673a95a
("Create the infrastructure for generic headers").

Remove the dummy arch/x86/include/asm/XXX.h files.

Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
---
 arch/x86/include/asm/cputime.h  |    1 -
 arch/x86/include/asm/errno.h    |    1 -
 arch/x86/include/asm/fcntl.h    |    1 -
 arch/x86/include/asm/ioctl.h    |    1 -
 arch/x86/include/asm/poll.h     |    1 -
 arch/x86/include/asm/resource.h |    1 -
 arch/x86/include/asm/rtc.h      |    1 -
 arch/x86/include/asm/sections.h |    1 -
 8 files changed, 0 insertions(+), 8 deletions(-)
 delete mode 100644 arch/x86/include/asm/cputime.h
 delete mode 100644 arch/x86/include/asm/errno.h
 delete mode 100644 arch/x86/include/asm/fcntl.h
 delete mode 100644 arch/x86/include/asm/ioctl.h
 delete mode 100644 arch/x86/include/asm/poll.h
 delete mode 100644 arch/x86/include/asm/resource.h
 delete mode 100644 arch/x86/include/asm/rtc.h
 delete mode 100644 arch/x86/include/asm/sections.h

diff --git a/arch/x86/include/asm/cputime.h b/arch/x86/include/asm/cputime.h
deleted file mode 100644
index 6d68ad7..0000000
--- a/arch/x86/include/asm/cputime.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/cputime.h>
diff --git a/arch/x86/include/asm/errno.h b/arch/x86/include/asm/errno.h
deleted file mode 100644
index 4c82b50..0000000
--- a/arch/x86/include/asm/errno.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/errno.h>
diff --git a/arch/x86/include/asm/fcntl.h b/arch/x86/include/asm/fcntl.h
deleted file mode 100644
index 46ab12d..0000000
--- a/arch/x86/include/asm/fcntl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/fcntl.h>
diff --git a/arch/x86/include/asm/ioctl.h b/arch/x86/include/asm/ioctl.h
deleted file mode 100644
index b279fe0..0000000
--- a/arch/x86/include/asm/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/ioctl.h>
diff --git a/arch/x86/include/asm/poll.h b/arch/x86/include/asm/poll.h
deleted file mode 100644
index c98509d..0000000
--- a/arch/x86/include/asm/poll.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/poll.h>
diff --git a/arch/x86/include/asm/resource.h b/arch/x86/include/asm/resource.h
deleted file mode 100644
index 04bc4db..0000000
--- a/arch/x86/include/asm/resource.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/resource.h>
diff --git a/arch/x86/include/asm/rtc.h b/arch/x86/include/asm/rtc.h
deleted file mode 100644
index f71c3b0..0000000
--- a/arch/x86/include/asm/rtc.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/rtc.h>
diff --git a/arch/x86/include/asm/sections.h b/arch/x86/include/asm/sections.h
deleted file mode 100644
index 2b8c516..0000000
--- a/arch/x86/include/asm/sections.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/sections.h>
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] Create the infrastructure for generic headers-UPDATE
       [not found]     ` <1237396115-28674-2-git-send-email-remis.developer@googlemail.com>
  2009-03-18 17:08       ` [PATCH 2/2] Apply generic headers for x86 Remis Lima Baima
@ 2009-03-20 16:31       ` Remis Lima Baima
  1 sibling, 0 replies; 9+ messages in thread
From: Remis Lima Baima @ 2009-03-20 16:31 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, Remis Lima Baima

This patch is an update to the patch 'Create the infrastructure for
generic headers'.

The 'make headers_install' is copying the dummy header files from
include/asm-generic to the OBJTREE/usr/include/asm-generic. But these
dummy header files are pointing to their equivalents in
include/generic/asm which were not being exported. This could cause
problems in the compilatin of some user space applications.
This patch fixes this problem by also exporting the header files from
include/generic/asm to the OBJTREE/usr/include/generic/asm.

Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
---
 include/Kbuild                 |    1 +
 include/asm-generic/Kbuild     |   14 +-------------
 include/asm-generic/Kbuild.asm |   39 +--------------------------------------
 include/generic/asm/Kbuild     |   13 +++++++++++++
 include/generic/asm/Kbuild.asm |   38 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 54 insertions(+), 51 deletions(-)
 create mode 100644 include/generic/asm/Kbuild
 create mode 100644 include/generic/asm/Kbuild.asm

diff --git a/include/Kbuild b/include/Kbuild
index d8c3e3c..ea577d5 100644
--- a/include/Kbuild
+++ b/include/Kbuild
@@ -2,6 +2,7 @@
 # List only non-arch directories below
 
 header-y += asm-generic/
+header-y += generic/asm/
 header-y += linux/
 header-y += sound/
 header-y += mtd/
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
index 4c9932a..19e654f 100644
--- a/include/asm-generic/Kbuild
+++ b/include/asm-generic/Kbuild
@@ -1,13 +1 @@
-header-y += errno-base.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += mman.h
-header-y += poll.h
-header-y += signal.h
-header-y += statfs.h
-
-unifdef-y += int-l64.h
-unifdef-y += int-ll64.h
-unifdef-y += resource.h
-unifdef-y += siginfo.h
+include include/generic/asm/Kbuild
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm
index 70d1855..447ce16 100644
--- a/include/asm-generic/Kbuild.asm
+++ b/include/asm-generic/Kbuild.asm
@@ -1,38 +1 @@
-ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
-      		  $(srctree)/include/asm-$(SRCARCH)/kvm.h),)
-header-y  += kvm.h
-endif
-
-ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
-      		  $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
-unifdef-y += a.out.h
-endif
-unifdef-y += auxvec.h
-unifdef-y += byteorder.h
-unifdef-y += errno.h
-unifdef-y += fcntl.h
-unifdef-y += ioctl.h
-unifdef-y += ioctls.h
-unifdef-y += ipcbuf.h
-unifdef-y += mman.h
-unifdef-y += msgbuf.h
-unifdef-y += param.h
-unifdef-y += poll.h
-unifdef-y += posix_types.h
-unifdef-y += ptrace.h
-unifdef-y += resource.h
-unifdef-y += sembuf.h
-unifdef-y += setup.h
-unifdef-y += shmbuf.h
-unifdef-y += sigcontext.h
-unifdef-y += siginfo.h
-unifdef-y += signal.h
-unifdef-y += socket.h
-unifdef-y += sockios.h
-unifdef-y += stat.h
-unifdef-y += statfs.h
-unifdef-y += swab.h
-unifdef-y += termbits.h
-unifdef-y += termios.h
-unifdef-y += types.h
-unifdef-y += unistd.h
+include include/generic/asm/Kbuild.asm
diff --git a/include/generic/asm/Kbuild b/include/generic/asm/Kbuild
new file mode 100644
index 0000000..4c9932a
--- /dev/null
+++ b/include/generic/asm/Kbuild
@@ -0,0 +1,13 @@
+header-y += errno-base.h
+header-y += errno.h
+header-y += fcntl.h
+header-y += ioctl.h
+header-y += mman.h
+header-y += poll.h
+header-y += signal.h
+header-y += statfs.h
+
+unifdef-y += int-l64.h
+unifdef-y += int-ll64.h
+unifdef-y += resource.h
+unifdef-y += siginfo.h
diff --git a/include/generic/asm/Kbuild.asm b/include/generic/asm/Kbuild.asm
new file mode 100644
index 0000000..70d1855
--- /dev/null
+++ b/include/generic/asm/Kbuild.asm
@@ -0,0 +1,38 @@
+ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
+      		  $(srctree)/include/asm-$(SRCARCH)/kvm.h),)
+header-y  += kvm.h
+endif
+
+ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
+      		  $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
+unifdef-y += a.out.h
+endif
+unifdef-y += auxvec.h
+unifdef-y += byteorder.h
+unifdef-y += errno.h
+unifdef-y += fcntl.h
+unifdef-y += ioctl.h
+unifdef-y += ioctls.h
+unifdef-y += ipcbuf.h
+unifdef-y += mman.h
+unifdef-y += msgbuf.h
+unifdef-y += param.h
+unifdef-y += poll.h
+unifdef-y += posix_types.h
+unifdef-y += ptrace.h
+unifdef-y += resource.h
+unifdef-y += sembuf.h
+unifdef-y += setup.h
+unifdef-y += shmbuf.h
+unifdef-y += sigcontext.h
+unifdef-y += siginfo.h
+unifdef-y += signal.h
+unifdef-y += socket.h
+unifdef-y += sockios.h
+unifdef-y += stat.h
+unifdef-y += statfs.h
+unifdef-y += swab.h
+unifdef-y += termbits.h
+unifdef-y += termios.h
+unifdef-y += types.h
+unifdef-y += unistd.h
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-03-20 16:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-12 13:43 [PATCH 0/3] Generic headers implementation Remis Lima Baima
2009-03-12 13:43 ` [PATCH 1/3] Create the infrastructure for generic headers Remis Lima Baima
2009-03-12 13:43   ` [PATCH 2/3] Apply generic headers for x86 Remis Lima Baima
2009-03-12 13:43     ` [PATCH 3/3] Apply generic headers for PPC Remis Lima Baima
2009-03-12 15:31 ` [PATCH 0/3] Generic headers implementation Sam Ravnborg
2009-03-13 21:50   ` Remis Lima Baima
2009-03-18 17:08   ` [PATCH 0/2] New generic " Remis Lima Baima
     [not found]     ` <1237396115-28674-2-git-send-email-remis.developer@googlemail.com>
2009-03-18 17:08       ` [PATCH 2/2] Apply generic headers for x86 Remis Lima Baima
2009-03-20 16:31       ` [PATCH] Create the infrastructure for generic headers-UPDATE Remis Lima Baima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox