Thread (9 messages) 9 messages, 5 authors, 2008-08-28

Re: 2.6.25: include/asm-ppc vs. include/asm-powerpc

From: Josh Boyer <hidden>
Date: 2008-08-28 14:39:24

On Thu, Aug 28, 2008 at 10:30:48AM -0400, Paul Smith wrote:
On Thu, 2008-08-28 at 15:53 +0200, Arnd Bergmann wrote:
quoted
The easiest solution should be to just include all your modules in
the kernel source as patches, rather than building them externally.

That will give you access to all the headers you need.
It doesn't matter whether I build my code in the kernel as patches, or
not.  The problem is not that I don't have the headers handy, it's that
they simply don't exist in asm-ppc anymore, not even in the linux source
tree.
Then you need to adapt your code to where ever that information moved
to?  Maybe if you post your driver code and makefile we can help you
out.
There is no asm-ppc/ppc_asm.h in the kernel anymore.  In my code that
includes it, where ARCH=ppc and include/asm is linked to asm-ppc, how do
I get ahold of that file?  I can't use #include <asm/ppc_asm.h> like I
used to.  Do I have to use #include <asm-powerpc/ppc_asm.h> explicitly?
At least this will work... but read on:

Even more troublesome are headers like <linux/posix_types.h>, which
includes <asm/posix_types.h>, but there IS NO asm-ppc/posix_types.h file
in the kernel tree!  There is only an asm-powerpc/posix_types.h... but
if asm is a link to asm-ppc, this fails and I have no way to fix it!

On the other hand, if I cheat and set the asm symlink pointing to
asm-powerpc instead, then when I include files like <linux/interrupt.h>.
which includes <linux/hardirq.h>, which includes <asm/hardirq.h>, which
(because I have CONFIG_40X defined) includes <asm/ibm44x.h>, I get the
opposite problem: there is no asm-powerpc/ibm4xx.h; that header exists
only in the asm-ppc directory.  So now THAT include fails.
This is all confusing to me.  Things obviously work in-kernel, or it
wouldn't build at all.  There used to be a hack in the ppc makefiles to
add a -Iasm-powerpc (or a symlink or something) so that files _would_ find
the right headers.  Look harder at the makefiles and try to duplicate that
for your external modules.

Or move to the latest git kernel, where this problem doesn't exist at all
since arch/ppc is removed entirely :).

josh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help