aboutsummaryrefslogtreecommitdiffstats
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
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>
-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
-rw-r--r--arch/um/sys-ppc/misc.S6
-rw-r--r--include/asm-powerpc/cputable.h19
-rw-r--r--include/asm-ppc/mmu.h17
7 files changed, 1 insertions, 94 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.
diff --git a/arch/um/sys-ppc/misc.S b/arch/um/sys-ppc/misc.S
index 11b7bd768cfd..f0c971db47e4 100644
--- a/arch/um/sys-ppc/misc.S
+++ b/arch/um/sys-ppc/misc.S
@@ -23,14 +23,10 @@
23#define CACHE_LINE_SIZE 16 23#define CACHE_LINE_SIZE 16
24#define LG_CACHE_LINE_SIZE 4 24#define LG_CACHE_LINE_SIZE 4
25#define MAX_COPY_PREFETCH 1 25#define MAX_COPY_PREFETCH 1
26#elif !defined(CONFIG_PPC64BRIDGE) 26#else
27#define CACHE_LINE_SIZE 32 27#define CACHE_LINE_SIZE 32
28#define LG_CACHE_LINE_SIZE 5 28#define LG_CACHE_LINE_SIZE 5
29#define MAX_COPY_PREFETCH 4 29#define MAX_COPY_PREFETCH 4
30#else
31#define CACHE_LINE_SIZE 128
32#define LG_CACHE_LINE_SIZE 7
33#define MAX_COPY_PREFETCH 1
34#endif /* CONFIG_4xx || CONFIG_8xx */ 30#endif /* CONFIG_4xx || CONFIG_8xx */
35 31
36 .text 32 .text
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index 69f2c242797f..da6f417d2ca7 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -300,13 +300,6 @@ extern void do_cpu_ftr_fixups(unsigned long offset);
300 CPU_FTR_COMMON) 300 CPU_FTR_COMMON)
301#define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ 301#define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
302 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE) 302 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE)
303#define CPU_FTRS_POWER3_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
304 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE)
305#define CPU_FTRS_POWER4_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
306 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_NODSISRALIGN)
307#define CPU_FTRS_970_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
308 CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_ALTIVEC_COMP | \
309 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN)
310#define CPU_FTRS_8XX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB) 303#define CPU_FTRS_8XX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB)
311#define CPU_FTRS_40X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ 304#define CPU_FTRS_40X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
312 CPU_FTR_NODSISRALIGN) 305 CPU_FTR_NODSISRALIGN)
@@ -367,12 +360,6 @@ enum {
367#else 360#else
368 CPU_FTRS_GENERIC_32 | 361 CPU_FTRS_GENERIC_32 |
369#endif 362#endif
370#ifdef CONFIG_PPC64BRIDGE
371 CPU_FTRS_POWER3_32 |
372#endif
373#ifdef CONFIG_POWER4
374 CPU_FTRS_POWER4_32 | CPU_FTRS_970_32 |
375#endif
376#ifdef CONFIG_8xx 363#ifdef CONFIG_8xx
377 CPU_FTRS_8XX | 364 CPU_FTRS_8XX |
378#endif 365#endif
@@ -412,12 +399,6 @@ enum {
412#else 399#else
413 CPU_FTRS_GENERIC_32 & 400 CPU_FTRS_GENERIC_32 &
414#endif 401#endif
415#ifdef CONFIG_PPC64BRIDGE
416 CPU_FTRS_POWER3_32 &
417#endif
418#ifdef CONFIG_POWER4
419 CPU_FTRS_POWER4_32 & CPU_FTRS_970_32 &
420#endif
421#ifdef CONFIG_8xx 402#ifdef CONFIG_8xx
422 CPU_FTRS_8XX & 403 CPU_FTRS_8XX &
423#endif 404#endif
diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h
index 80ae60481fb7..8915c4c3ecb3 100644
--- a/include/asm-ppc/mmu.h
+++ b/include/asm-ppc/mmu.h
@@ -31,20 +31,11 @@ typedef struct {
31 31
32/* Hardware Page Table Entry */ 32/* Hardware Page Table Entry */
33typedef struct _PTE { 33typedef struct _PTE {
34#ifdef CONFIG_PPC64BRIDGE
35 unsigned long long vsid:52;
36 unsigned long api:5;
37 unsigned long :5;
38 unsigned long h:1;
39 unsigned long v:1;
40 unsigned long long rpn:52;
41#else /* CONFIG_PPC64BRIDGE */
42 unsigned long v:1; /* Entry is valid */ 34 unsigned long v:1; /* Entry is valid */
43 unsigned long vsid:24; /* Virtual segment identifier */ 35 unsigned long vsid:24; /* Virtual segment identifier */
44 unsigned long h:1; /* Hash algorithm indicator */ 36 unsigned long h:1; /* Hash algorithm indicator */
45 unsigned long api:6; /* Abbreviated page index */ 37 unsigned long api:6; /* Abbreviated page index */
46 unsigned long rpn:20; /* Real (physical) page number */ 38 unsigned long rpn:20; /* Real (physical) page number */
47#endif /* CONFIG_PPC64BRIDGE */
48 unsigned long :3; /* Unused */ 39 unsigned long :3; /* Unused */
49 unsigned long r:1; /* Referenced */ 40 unsigned long r:1; /* Referenced */
50 unsigned long c:1; /* Changed */ 41 unsigned long c:1; /* Changed */
@@ -85,11 +76,7 @@ typedef struct _P601_BATU { /* Upper part of BAT for 601 processor */
85} P601_BATU; 76} P601_BATU;
86 77
87typedef struct _BATU { /* Upper part of BAT (all except 601) */ 78typedef struct _BATU { /* Upper part of BAT (all except 601) */
88#ifdef CONFIG_PPC64BRIDGE
89 unsigned long long bepi:47;
90#else /* CONFIG_PPC64BRIDGE */
91 unsigned long bepi:15; /* Effective page index (virtual address) */ 79 unsigned long bepi:15; /* Effective page index (virtual address) */
92#endif /* CONFIG_PPC64BRIDGE */
93 unsigned long :4; /* Unused */ 80 unsigned long :4; /* Unused */
94 unsigned long bl:11; /* Block size mask */ 81 unsigned long bl:11; /* Block size mask */
95 unsigned long vs:1; /* Supervisor valid */ 82 unsigned long vs:1; /* Supervisor valid */
@@ -104,11 +91,7 @@ typedef struct _P601_BATL { /* Lower part of BAT for 601 processor */
104} P601_BATL; 91} P601_BATL;
105 92
106typedef struct _BATL { /* Lower part of BAT (all except 601) */ 93typedef struct _BATL { /* Lower part of BAT (all except 601) */
107#ifdef CONFIG_PPC64BRIDGE
108 unsigned long long brpn:47;
109#else /* CONFIG_PPC64BRIDGE */
110 unsigned long brpn:15; /* Real page index (physical address) */ 94 unsigned long brpn:15; /* Real page index (physical address) */
111#endif /* CONFIG_PPC64BRIDGE */
112 unsigned long :10; /* Unused */ 95 unsigned long :10; /* Unused */
113 unsigned long w:1; /* Write-thru cache */ 96 unsigned long w:1; /* Write-thru cache */
114 unsigned long i:1; /* Cache inhibit */ 97 unsigned long i:1; /* Cache inhibit */