[PATCH 1/4] Made VMALLOC_END of type unsigned long.

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Oct 1 14:39:50 EDT 2009


On Thu, Oct 01, 2009 at 08:32:48PM +0200, Uwe Kleine-König wrote:
> Hello,
> 
> On Thu, Oct 01, 2009 at 02:03:38PM +0100, Russell King - ARM Linux wrote:
> > On Thu, Oct 01, 2009 at 12:47:15PM +0200, Andreas Fenkart wrote:
> > > Davinci defines VMALLOC_END this way:
> > > 
> > > #define VMALLOC_END   (IO_VIRT - (2<<20))   
> > > 
> > > The simple solution would be to prefix the VMALLOC_END with UL,
> > > the alternative to make IO_VIRT unsinged long.
> > 
> > Is:
> > 
> > 	(IO_VIRT - (2<<20))UL
> > 
> > valid C?  I don't think it is, and neither does my compiler.
> No, but
> 
> 	 UL(IO_VIRT - (2<<20))
> 
> might work?!  Havn't tried though.

'UL()' is our own macro which appends UL if building in C mode, otherwise
omits it if assembly:

arch/arm/include/asm/memory.h:#define UL(x) _AC(x, UL)

include/linux/const.h:
#ifdef __ASSEMBLY__
#define _AC(X,Y)        X
#define _AT(T,X)        X
#else
#define __AC(X,Y)       (X##Y)
#define _AC(X,Y)        __AC(X,Y)
#define _AT(T,X)        ((T)(X))
#endif




More information about the linux-arm-kernel mailing list