#define activate_mm(active_mm, mm) \
switch_mm(active_mm, mm, current);
-#define VSID_RANDOMIZER 42470972311
-#define VSID_MASK 0xfffffffff
+#define VSID_RANDOMIZER 42470972311UL
+#define VSID_MASK 0xfffffffffUL
/* This is only valid for kernel (including vmalloc, imalloc and bolted) EA's
#include <linux/config.h>
-/* PAGE_SHIFT determines the page size */
-#define PAGE_SHIFT 12
-#ifndef __ASSEMBLY__
-# define PAGE_SIZE (1UL << PAGE_SHIFT)
+#ifdef __ASSEMBLY__
+ #define ASM_CONST(x) x
#else
-# define PAGE_SIZE (1 << PAGE_SHIFT)
+ #define ASM_CONST(x) x##UL
#endif
+
+/* PAGE_SHIFT determines the page size */
+#define PAGE_SHIFT 12
+#define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#define PAGE_OFFSET_MASK (PAGE_SIZE-1)
#define SID_SHIFT 28
-#define SID_MASK 0xfffffffff
+#define SID_MASK 0xfffffffffUL
#define GET_ESID(x) (((x) >> SID_SHIFT) & SID_MASK)
#ifdef CONFIG_HUGETLB_PAGE
/* KERNELBASE is defined for performance reasons. */
/* When KERNELBASE moves, those macros may have */
/* to change! */
-#define PAGE_OFFSET 0xC000000000000000
+#define PAGE_OFFSET ASM_CONST(0xC000000000000000)
#define KERNELBASE PAGE_OFFSET
-#define VMALLOCBASE 0xD000000000000000
-#define IOREGIONBASE 0xE000000000000000
-#define EEHREGIONBASE 0xA000000000000000
+#define VMALLOCBASE 0xD000000000000000UL
+#define IOREGIONBASE 0xE000000000000000UL
+#define EEHREGIONBASE 0xA000000000000000UL
#define IO_REGION_ID (IOREGIONBASE>>REGION_SHIFT)
#define EEH_REGION_ID (EEHREGIONBASE>>REGION_SHIFT)
#if BITS_PER_LONG == 32
# define IDR_BITS 5
-# define IDR_FULL 0xffffffff
+# define IDR_FULL 0xfffffffful
#elif BITS_PER_LONG == 64
# define IDR_BITS 6
-# define IDR_FULL 0xffffffffffffffff
+# define IDR_FULL 0xfffffffffffffffful
#else
# error "BITS_PER_LONG is not 32 or 64"
#endif