diff -urN linux-2.6.16/include/asm-powerpc/asm-compat.h linux-2.6.16.plasmaroo/include/asm-powerpc/asm-compat.h --- linux-2.6.16/include/asm-powerpc/asm-compat.h 2006-04-18 12:05:58.000000000 +1000 +++ linux-2.6.16.plasmaroo/include/asm-powerpc/asm-compat.h 2006-04-18 11:20:25.000000000 +1000 @@ -1,6 +1,7 @@ #ifndef _ASM_POWERPC_ASM_COMPAT_H #define _ASM_POWERPC_ASM_COMPAT_H +#include #include #ifdef __ASSEMBLY__ @@ -40,7 +41,6 @@ #endif -#ifdef __KERNEL__ #ifdef CONFIG_IBM405_ERR77 /* Erratum #77 on the 405 means we need a sync or dcbt before every * stwcx. The old ATOMIC_SYNC_FIX covered some but not all of this. @@ -51,6 +51,5 @@ #define PPC405_ERR77(ra,rb) #define PPC405_ERR77_SYNC #endif -#endif #endif /* _ASM_POWERPC_ASM_COMPAT_H */ diff -urN linux-2.6.16/include/asm-powerpc/page.h linux-2.6.16.plasmaroo/include/asm-powerpc/page.h --- linux-2.6.16/include/asm-powerpc/page.h 2006-04-18 12:05:58.000000000 +1000 +++ linux-2.6.16.plasmaroo/include/asm-powerpc/page.h 2006-04-18 11:35:51.000000000 +1000 @@ -120,10 +120,12 @@ #ifdef STRICT_MM_TYPECHECKS /* These are used to make use of C type-checking. */ +#ifdef __KERNEL__ /* PTE level */ typedef struct { pte_basic_t pte; } pte_t; #define pte_val(x) ((x).pte) #define __pte(x) ((pte_t) { (x) }) +#endif /* 64k pages additionally define a bigger "real PTE" type that gathers * the "second half" part of the PTE for pseudo 64k pages @@ -162,9 +164,11 @@ * .. while these make it easier on the compiler */ +#ifdef __KERNEL__ typedef pte_basic_t pte_t; #define pte_val(x) (x) #define __pte(x) (x) +#endif #ifdef CONFIG_PPC_64K_PAGES typedef struct { pte_t pte; unsigned long hidx; } real_pte_t; diff -urN linux-2.6.16/include/asm-powerpc/synch.h linux-2.6.16.plasmaroo/include/asm-powerpc/synch.h --- linux-2.6.16/include/asm-powerpc/synch.h 2006-04-18 12:05:58.000000000 +1000 +++ linux-2.6.16.plasmaroo/include/asm-powerpc/synch.h 2006-04-18 11:21:10.000000000 +1000 @@ -1,6 +1,5 @@ #ifndef _ASM_POWERPC_SYNCH_H #define _ASM_POWERPC_SYNCH_H -#ifdef __KERNEL__ #include @@ -22,6 +21,8 @@ #define LWSYNC_ON_SMP #endif +#ifdef __KERNEL__ + static inline void eieio(void) { __asm__ __volatile__ ("eieio" : : : "memory");