From: Remis Lima Baima <remis.developer@googlemail.com>
To: linux-kbuild@vger.kernel.org
Cc: Remis Lima Baima <remis.developer@googlemail.com>
Subject: [PATCH 0/3] Generic headers implementation
Date: Thu, 12 Mar 2009 14:43:05 +0100 [thread overview]
Message-ID: <1236865388-31590-1-git-send-email-remis.developer@googlemail.com> (raw)
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
next reply other threads:[~2009-03-12 13:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 13:43 Remis Lima Baima [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1236865388-31590-1-git-send-email-remis.developer@googlemail.com \
--to=remis.developer@googlemail.com \
--cc=linux-kbuild@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox