From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc64-dev@ozlabs.org
Cc: Stephen Rothwell <sfr@canb.auug.org.au>, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] 1/2 Start header file merger (Was: Re: Beginning Merger Patch)
Date: Fri, 5 Aug 2005 13:53:22 +0200 [thread overview]
Message-ID: <200508051353.23750.arnd@arndb.de> (raw)
In-Reply-To: <20050805174705.731ffa05.sfr@canb.auug.org.au>
On Freedag 05 August 2005 09:47, Stephen Rothwell wrote:
> cd linux/include
> mkdir asm-powerpc
> cd asm-ppc
> for i in *
> do
> =A0=A0=A0=A0=A0=A0=A0=A0[ -e ../asm-ppc64/$i ] || mv $i ../asm-powerpc/$i
> done
> cd ../asm-ppc64
> for i in *
> do
> =A0=A0=A0=A0=A0=A0=A0=A0[ -e ../asm-ppc/$i ] || mv $i ../asm-powerpc/$i
> done
While I really like your approach in general (I've done it the
same way when merging asm-s390{,x]), I think we should take
a little care to move only the files that we really want in
asm/powerpc.
E.g, most of the files that are in asm-ppc but not in asm-ppc64
seem so be board-specific or cpu-specific, so I'd not move them
around before (unless) moving the platform code for those as well.
Also, for everything below include/asm-ppc64/iSeries, it would
make sense to rename the files to lowercase in the same
step and change all their users.
> for i in *
> do
> =A0=A0=A0=A0=A0=A0=A0=A0[ -f ../asm-ppc64/$i ] && cmp -s $i ../asm-ppc64/=
$i &&
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0mv $i ../asm-powerpc/$i &=
& rm ../asm-ppc64/$i
> done
Another help for merging further is to do=20
for i in `ls include/asm-ppc` ; do=20
if [ -e include/asm-ppc64/$i ] ; then
diff --ifdef __powerpc64__ include/asm-{ppc,ppc64}/$i > \
include/asm-generic/$i ;
fi
done
Note that you need to hand-edit practically every file that you get from
this, but many of them become trivial to merge.
Another interesting point about it is which define to use. For s390, we
decided to '#ifdef __s390x__' rather than '#ifdef CONFIG_ARCH_S390X' or
'ifdef CONFIG_64BIT', because CONFIG_* does not work when including the
headers from user space.
Using CONFIG_64BIT instead of __powerpc64__ only within #ifdef __KERNEL__
would be correct but less consistant.
Arnd <><
next prev parent reply other threads:[~2005-08-05 11:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-02 22:59 Beginning Merger Patch Jon Loeliger
2005-08-02 23:05 ` Eugene Surovegin
2005-08-02 23:12 ` Dan Malek
2005-08-02 23:17 ` Eugene Surovegin
2005-08-03 3:08 ` Paul Mackerras
2005-08-03 2:38 ` Josh Boyer
2005-08-02 23:10 ` Dan Malek
2005-08-05 7:47 ` [PATCH] 1/2 Start header file merger (Was: Re: Beginning Merger Patch) Stephen Rothwell
2005-08-05 7:50 ` [PATCH] 2/2 merge the easy ones Stephen Rothwell
2005-08-05 8:37 ` [PATCH] 1/2 Start header file merger (Was: Re: Beginning Merger Patch) Stephen Rothwell
2005-08-05 9:08 ` Michael Ellerman
2005-08-05 11:53 ` Arnd Bergmann [this message]
2005-08-05 14:59 ` Stephen Rothwell
2005-08-05 16:24 ` Arnd Bergmann
2005-08-26 20:55 ` Jon Loeliger
2005-08-29 15:44 ` Segher Boessenkool
2005-08-29 18:41 ` Christopher Friesen
2005-08-17 5:39 ` Kumar Gala
2005-08-17 11:05 ` Arnd Bergmann
2005-08-03 2:17 ` Beginning Merger Patch Nathan Lynch
2005-08-03 2:58 ` Eugene Surovegin
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=200508051353.23750.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=linuxppc64-dev@ozlabs.org \
--cc=sfr@canb.auug.org.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.