aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-02 17:17:45 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-09 02:47:38 -0400
commit944916858a430a0627e483657d4cfa2cd2dfb4f7 (patch)
tree37fa713f9c336daab10b132bd3e00c57f6111b71 /arch/powerpc/include/asm
parent91c60b5b8209627590b31c07262e40c27d27d272 (diff)
powerpc: Shield code specific to 64-bit server processors
This is a random collection of added ifdef's around portions of code that only mak sense on server processors. Using either CONFIG_PPC_STD_MMU_64 or CONFIG_PPC_BOOK3S as seems appropriate. This is meant to make the future merging of Book3E 64-bit support easier. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/lppaca.h6
-rw-r--r--arch/powerpc/include/asm/mmu.h4
-rw-r--r--arch/powerpc/include/asm/pgtable-ppc64.h5
3 files changed, 13 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h
index d2a65e8ca6ae..f78f65c38f05 100644
--- a/arch/powerpc/include/asm/lppaca.h
+++ b/arch/powerpc/include/asm/lppaca.h
@@ -20,6 +20,11 @@
20#define _ASM_POWERPC_LPPACA_H 20#define _ASM_POWERPC_LPPACA_H
21#ifdef __KERNEL__ 21#ifdef __KERNEL__
22 22
23/* These definitions relate to hypervisors that only exist when using
24 * a server type processor
25 */
26#ifdef CONFIG_PPC_BOOK3S
27
23//============================================================================= 28//=============================================================================
24// 29//
25// This control block contains the data that is shared between the 30// This control block contains the data that is shared between the
@@ -158,5 +163,6 @@ struct slb_shadow {
158 163
159extern struct slb_shadow slb_shadow[]; 164extern struct slb_shadow slb_shadow[];
160 165
166#endif /* CONFIG_PPC_BOOK3S */
161#endif /* __KERNEL__ */ 167#endif /* __KERNEL__ */
162#endif /* _ASM_POWERPC_LPPACA_H */ 168#endif /* _ASM_POWERPC_LPPACA_H */
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index 325b7208a146..fb57ded592f9 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -74,10 +74,10 @@ extern void early_init_mmu_secondary(void);
74#endif /* !__ASSEMBLY__ */ 74#endif /* !__ASSEMBLY__ */
75 75
76 76
77#ifdef CONFIG_PPC64 77#if defined(CONFIG_PPC_STD_MMU_64)
78/* 64-bit classic hash table MMU */ 78/* 64-bit classic hash table MMU */
79# include <asm/mmu-hash64.h> 79# include <asm/mmu-hash64.h>
80#elif defined(CONFIG_PPC_STD_MMU) 80#elif defined(CONFIG_PPC_STD_MMU_32)
81/* 32-bit classic hash table MMU */ 81/* 32-bit classic hash table MMU */
82# include <asm/mmu-hash32.h> 82# include <asm/mmu-hash32.h>
83#elif defined(CONFIG_40x) 83#elif defined(CONFIG_40x)
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
index c40db05f21e0..8cd083c61503 100644
--- a/arch/powerpc/include/asm/pgtable-ppc64.h
+++ b/arch/powerpc/include/asm/pgtable-ppc64.h
@@ -31,9 +31,11 @@
31#error TASK_SIZE_USER64 exceeds pagetable range 31#error TASK_SIZE_USER64 exceeds pagetable range
32#endif 32#endif
33 33
34#ifdef CONFIG_PPC_STD_MMU_64
34#if TASK_SIZE_USER64 > (1UL << (USER_ESID_BITS + SID_SHIFT)) 35#if TASK_SIZE_USER64 > (1UL << (USER_ESID_BITS + SID_SHIFT))
35#error TASK_SIZE_USER64 exceeds user VSID range 36#error TASK_SIZE_USER64 exceeds user VSID range
36#endif 37#endif
38#endif
37 39
38/* 40/*
39 * Define the address range of the vmalloc VM area. 41 * Define the address range of the vmalloc VM area.
@@ -199,8 +201,11 @@ static inline unsigned long pte_update(struct mm_struct *mm,
199 if (!huge) 201 if (!huge)
200 assert_pte_locked(mm, addr); 202 assert_pte_locked(mm, addr);
201 203
204#ifdef CONFIG_PPC_STD_MMU_64
202 if (old & _PAGE_HASHPTE) 205 if (old & _PAGE_HASHPTE)
203 hpte_need_flush(mm, addr, ptep, old, huge); 206 hpte_need_flush(mm, addr, ptep, old, huge);
207#endif
208
204 return old; 209 return old;
205} 210}
206 211