Re: [tip:x86/asm] x86, 64-bit: ifdef out struct thread_struct::ip
From: Robert P. J. Day
Date: Mon May 11 2009 - 13:27:28 EST
On Mon, 11 May 2009, Alexey Dobriyan wrote:
> On Mon, May 11, 2009 at 8:03 PM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> > On Mon, May 11, 2009 at 03:09:40PM +0000, tip-bot for Alexey Dobriyan wrote:
> >> +#ifdef CONFIG_X86_32
> >> unsigned long ip;
> >> +#endif
> >> #ifdef CONFIG_X86_64
> >> unsigned long fs;
> >> #endif
> >
> > What happened to the good old concept of #if #else #endif?
>
> #else suggests alternative which is not the case.
> ->ip and ->fs can be in different parts of thread_struct.
the arch/x86/Kconfig file certainly suggests that those are
mutually-exclusive alternatives:
...
# Select 32 or 64 bit
config 64BIT
bool "64-bit kernel" if ARCH = "x86"
default ARCH = "x86_64"
---help---
Say yes to build a 64-bit kernel - formerly known as x86_64
Say no to build a 32-bit kernel - formerly known as i386
config X86_32
def_bool !64BIT
config X86_64
def_bool 64BIT
...
unless there's something weird going on underneath.
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Annoying Kernel Pedantry.
Web page: http://crashcourse.ca
Linked In: http://www.linkedin.com/in/rpjday
Twitter: http://twitter.com/rpjday
========================================================================