[Top] [All Lists]

Re: Should #ifdef __KERNEL__ be added before #include <spaces.h> in asm-

To: Ralf Baechle <>
Subject: Re: Should #ifdef __KERNEL__ be added before #include <spaces.h> in asm-mips/addrspace.h ?
From: Song Wang <>
Date: Wed, 25 Aug 2004 12:34:58 -0700 (PDT)
In-reply-to: <>
Original-recipient: rfc822;

The problem in asm-mips/addrspace.h when including
<spaces.h> is different. The problem is the path.

spaces.h lives in asm-mips/mach-generic,

Only when compiling kernel, asm-mips/mach-generic
is in the include path, because arch/mips/Makefile
defines it.

However, when compiling the user-space apps, they
don't know how to find spaces.h when they indirectly
include <asm/addrspace.h>


--- Ralf Baechle <> wrote:

> On Tue, Jul 20, 2004 at 05:03:56PM -0700, Song Wang
> wrote:
> > Should #ifdef _KERNEL__ be added before #include
> > <spaces.h> in asm-mips/addrspace.h?
> > 
> > I think the reason is the same as when you added
> > the #ifdef __KERNEL__ before #include <spaces.h>
> > for asm-mips/page.h.
> Some userspace software is expecting to get
> PAGE_MASK to be available in userspace via
> <asm/page.h>, so I
> protected the inclusion of <asm/spaces.h> with
> __KERNEL__ but left
> the definitions of these symbols unprotected.
>   Ralf

Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage! 

<Prev in Thread] Current Thread [Next in Thread>