aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2006-06-10 06:32:01 -0400
committerPaul Mackerras <paulus@samba.org>2006-06-15 05:31:26 -0400
commit227318bbde6c8309b1d20ab46532ec2b737e1fee (patch)
treede8bbbda0d69fc641629c10e5a0a1070a09bdde7 /arch/powerpc
parent8555a0029b1b0840237b750e55d4835a52cc719b (diff)
[POWERPC] Remove stale 64bit on 32bit kernel code
Remove some stale POWER3/POWER4/970 on 32bit kernel support. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/Makefile1
-rw-r--r--arch/powerpc/kernel/cputable.c8
-rw-r--r--arch/powerpc/mm/hash_low_32.S34
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c10
4 files changed, 0 insertions, 53 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index ed5b26aa8be3..01667d1d571d 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -108,7 +108,6 @@ ifeq ($(CONFIG_6xx),y)
108CFLAGS += -mcpu=powerpc 108CFLAGS += -mcpu=powerpc
109endif 109endif
110 110
111cpu-as-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge
112cpu-as-$(CONFIG_4xx) += -Wa,-m405 111cpu-as-$(CONFIG_4xx) += -Wa,-m405
113cpu-as-$(CONFIG_6xx) += -Wa,-maltivec 112cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
114cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec 113cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index dfe2fcfb20a0..abf7d42a8b07 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -189,17 +189,11 @@ struct cpu_spec cpu_specs[] = {
189 .oprofile_type = PPC_OPROFILE_POWER4, 189 .oprofile_type = PPC_OPROFILE_POWER4,
190 .platform = "ppc970", 190 .platform = "ppc970",
191 }, 191 },
192#endif /* CONFIG_PPC64 */
193#if defined(CONFIG_PPC64) || defined(CONFIG_POWER4)
194 { /* PPC970FX */ 192 { /* PPC970FX */
195 .pvr_mask = 0xffff0000, 193 .pvr_mask = 0xffff0000,
196 .pvr_value = 0x003c0000, 194 .pvr_value = 0x003c0000,
197 .cpu_name = "PPC970FX", 195 .cpu_name = "PPC970FX",
198#ifdef CONFIG_PPC32
199 .cpu_features = CPU_FTRS_970_32,
200#else
201 .cpu_features = CPU_FTRS_PPC970, 196 .cpu_features = CPU_FTRS_PPC970,
202#endif
203 .cpu_user_features = COMMON_USER_POWER4 | 197 .cpu_user_features = COMMON_USER_POWER4 |
204 PPC_FEATURE_HAS_ALTIVEC_COMP, 198 PPC_FEATURE_HAS_ALTIVEC_COMP,
205 .icache_bsize = 128, 199 .icache_bsize = 128,
@@ -210,8 +204,6 @@ struct cpu_spec cpu_specs[] = {
210 .oprofile_type = PPC_OPROFILE_POWER4, 204 .oprofile_type = PPC_OPROFILE_POWER4,
211 .platform = "ppc970", 205 .platform = "ppc970",
212 }, 206 },
213#endif /* defined(CONFIG_PPC64) || defined(CONFIG_POWER4) */
214#ifdef CONFIG_PPC64
215 { /* PPC970MP */ 207 { /* PPC970MP */
216 .pvr_mask = 0xffff0000, 208 .pvr_mask = 0xffff0000,
217 .pvr_value = 0x00440000, 209 .pvr_value = 0x00440000,
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S
index ea469eefa146..94255beeecd3 100644
--- a/arch/powerpc/mm/hash_low_32.S
+++ b/arch/powerpc/mm/hash_low_32.S
@@ -74,12 +74,6 @@ _GLOBAL(hash_page_sync)
74 */ 74 */
75 .text 75 .text
76_GLOBAL(hash_page) 76_GLOBAL(hash_page)
77#ifdef CONFIG_PPC64BRIDGE
78 mfmsr r0
79 clrldi r0,r0,1 /* make sure it's in 32-bit mode */
80 MTMSRD(r0)
81 isync
82#endif
83 tophys(r7,0) /* gets -KERNELBASE into r7 */ 77 tophys(r7,0) /* gets -KERNELBASE into r7 */
84#ifdef CONFIG_SMP 78#ifdef CONFIG_SMP
85 addis r8,r7,mmu_hash_lock@h 79 addis r8,r7,mmu_hash_lock@h
@@ -285,7 +279,6 @@ Hash_base = 0xc0180000
285Hash_bits = 12 /* e.g. 256kB hash table */ 279Hash_bits = 12 /* e.g. 256kB hash table */
286Hash_msk = (((1 << Hash_bits) - 1) * 64) 280Hash_msk = (((1 << Hash_bits) - 1) * 64)
287 281
288#ifndef CONFIG_PPC64BRIDGE
289/* defines for the PTE format for 32-bit PPCs */ 282/* defines for the PTE format for 32-bit PPCs */
290#define PTE_SIZE 8 283#define PTE_SIZE 8
291#define PTEG_SIZE 64 284#define PTEG_SIZE 64
@@ -299,21 +292,6 @@ Hash_msk = (((1 << Hash_bits) - 1) * 64)
299#define SET_V(r) oris r,r,PTE_V@h 292#define SET_V(r) oris r,r,PTE_V@h
300#define CLR_V(r,t) rlwinm r,r,0,1,31 293#define CLR_V(r,t) rlwinm r,r,0,1,31
301 294
302#else
303/* defines for the PTE format for 64-bit PPCs */
304#define PTE_SIZE 16
305#define PTEG_SIZE 128
306#define LG_PTEG_SIZE 7
307#define LDPTEu ldu
308#define STPTE std
309#define CMPPTE cmpd
310#define PTE_H 2
311#define PTE_V 1
312#define TST_V(r) andi. r,r,PTE_V
313#define SET_V(r) ori r,r,PTE_V
314#define CLR_V(r,t) li t,PTE_V; andc r,r,t
315#endif /* CONFIG_PPC64BRIDGE */
316
317#define HASH_LEFT 31-(LG_PTEG_SIZE+Hash_bits-1) 295#define HASH_LEFT 31-(LG_PTEG_SIZE+Hash_bits-1)
318#define HASH_RIGHT 31-LG_PTEG_SIZE 296#define HASH_RIGHT 31-LG_PTEG_SIZE
319 297
@@ -331,14 +309,8 @@ BEGIN_FTR_SECTION
331END_FTR_SECTION_IFSET(CPU_FTR_NEED_COHERENT) 309END_FTR_SECTION_IFSET(CPU_FTR_NEED_COHERENT)
332 310
333 /* Construct the high word of the PPC-style PTE (r5) */ 311 /* Construct the high word of the PPC-style PTE (r5) */
334#ifndef CONFIG_PPC64BRIDGE
335 rlwinm r5,r3,7,1,24 /* put VSID in 0x7fffff80 bits */ 312 rlwinm r5,r3,7,1,24 /* put VSID in 0x7fffff80 bits */
336 rlwimi r5,r4,10,26,31 /* put in API (abbrev page index) */ 313 rlwimi r5,r4,10,26,31 /* put in API (abbrev page index) */
337#else /* CONFIG_PPC64BRIDGE */
338 clrlwi r3,r3,8 /* reduce vsid to 24 bits */
339 sldi r5,r3,12 /* shift vsid into position */
340 rlwimi r5,r4,16,20,24 /* put in API (abbrev page index) */
341#endif /* CONFIG_PPC64BRIDGE */
342 SET_V(r5) /* set V (valid) bit */ 314 SET_V(r5) /* set V (valid) bit */
343 315
344 /* Get the address of the primary PTE group in the hash table (r3) */ 316 /* Get the address of the primary PTE group in the hash table (r3) */
@@ -516,14 +488,8 @@ _GLOBAL(flush_hash_pages)
516 add r3,r3,r0 /* note code below trims to 24 bits */ 488 add r3,r3,r0 /* note code below trims to 24 bits */
517 489
518 /* Construct the high word of the PPC-style PTE (r11) */ 490 /* Construct the high word of the PPC-style PTE (r11) */
519#ifndef CONFIG_PPC64BRIDGE
520 rlwinm r11,r3,7,1,24 /* put VSID in 0x7fffff80 bits */ 491 rlwinm r11,r3,7,1,24 /* put VSID in 0x7fffff80 bits */
521 rlwimi r11,r4,10,26,31 /* put in API (abbrev page index) */ 492 rlwimi r11,r4,10,26,31 /* put in API (abbrev page index) */
522#else /* CONFIG_PPC64BRIDGE */
523 clrlwi r3,r3,8 /* reduce vsid to 24 bits */
524 sldi r11,r3,12 /* shift vsid into position */
525 rlwimi r11,r4,16,20,24 /* put in API (abbrev page index) */
526#endif /* CONFIG_PPC64BRIDGE */
527 SET_V(r11) /* set V (valid) bit */ 493 SET_V(r11) /* set V (valid) bit */
528 494
529#ifdef CONFIG_SMP 495#ifdef CONFIG_SMP
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index 1df731e42b50..ab5cd724b122 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -42,11 +42,7 @@ unsigned long _SDR1;
42 42
43union ubat { /* BAT register values to be loaded */ 43union ubat { /* BAT register values to be loaded */
44 BAT bat; 44 BAT bat;
45#ifdef CONFIG_PPC64BRIDGE
46 u64 word[2];
47#else
48 u32 word[2]; 45 u32 word[2];
49#endif
50} BATS[4][2]; /* 4 pairs of IBAT, DBAT */ 46} BATS[4][2]; /* 4 pairs of IBAT, DBAT */
51 47
52struct batrange { /* stores address ranges mapped by BATs */ 48struct batrange { /* stores address ranges mapped by BATs */
@@ -220,15 +216,9 @@ void __init MMU_init_hw(void)
220 216
221 if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105); 217 if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105);
222 218
223#ifdef CONFIG_PPC64BRIDGE
224#define LG_HPTEG_SIZE 7 /* 128 bytes per HPTEG */
225#define SDR1_LOW_BITS (lg_n_hpteg - 11)
226#define MIN_N_HPTEG 2048 /* min 256kB hash table */
227#else
228#define LG_HPTEG_SIZE 6 /* 64 bytes per HPTEG */ 219#define LG_HPTEG_SIZE 6 /* 64 bytes per HPTEG */
229#define SDR1_LOW_BITS ((n_hpteg - 1) >> 10) 220#define SDR1_LOW_BITS ((n_hpteg - 1) >> 10)
230#define MIN_N_HPTEG 1024 /* min 64kB hash table */ 221#define MIN_N_HPTEG 1024 /* min 64kB hash table */
231#endif
232 222
233 /* 223 /*
234 * Allow 1 HPTE (1/8 HPTEG) for each page of memory. 224 * Allow 1 HPTE (1/8 HPTEG) for each page of memory.