All of lore.kernel.org
 help / color / mirror / Atom feed
* Should #ifdef __KERNEL__ be added before #include <spaces.h> in asm-mips/addrspace.h ?
@ 2004-07-21  0:03 Song Wang
  2004-08-20 12:05 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Song Wang @ 2004-07-21  0:03 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

Hi, Ralf

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.

-Song


	
		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

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

* Re: Should #ifdef __KERNEL__ be added before #include <spaces.h> in asm-mips/addrspace.h ?
  2004-07-21  0:03 Should #ifdef __KERNEL__ be added before #include <spaces.h> in asm-mips/addrspace.h ? Song Wang
@ 2004-08-20 12:05 ` Ralf Baechle
  2004-08-25 19:34   ` Song Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2004-08-20 12:05 UTC (permalink / raw)
  To: Song Wang; +Cc: linux-mips

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_SHIFT, PAGE_SIZE and
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

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

* Re: Should #ifdef __KERNEL__ be added before #include <spaces.h> in asm-mips/addrspace.h ?
  2004-08-20 12:05 ` Ralf Baechle
@ 2004-08-25 19:34   ` Song Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Song Wang @ 2004-08-25 19:34 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

Ralf,

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>


-Song


--- Ralf Baechle <ralf@linux-mips.org> 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_SHIFT, PAGE_SIZE and
> 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!
http://promotions.yahoo.com/new_mail 

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

end of thread, other threads:[~2004-08-25 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-21  0:03 Should #ifdef __KERNEL__ be added before #include <spaces.h> in asm-mips/addrspace.h ? Song Wang
2004-08-20 12:05 ` Ralf Baechle
2004-08-25 19:34   ` Song Wang

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.