diff options
| author | Paul Mackerras <paulus@samba.org> | 2006-03-27 18:22:10 -0500 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2006-03-27 18:22:10 -0500 |
| commit | 0a26b1364f14852bc9a51db0ca63c5250c775627 (patch) | |
| tree | 83422473cb4bf4c450012cded06288a0dc6abedf /arch/ppc/mm | |
| parent | ff2e6d7e27cf1f757ab0d97e1a9e46de47152a0e (diff) | |
ppc: Remove CHRP, POWER3 and POWER4 support from arch/ppc
32-bit CHRP machines are now supported only in arch/powerpc, as are
all 64-bit PowerPC processors. This means that we don't use
Open Firmware on any platform in arch/ppc any more.
This makes PReP support a single-platform option like every other
platform support option in arch/ppc now, thus CONFIG_PPC_MULTIPLATFORM
is gone from arch/ppc. CONFIG_PPC_PREP is the option that selects
PReP support and is generally what has replaced
CONFIG_PPC_MULTIPLATFORM within arch/ppc.
_machine is all but dead now, being #defined to 0.
Updated Makefiles, comments and Kconfig options generally to reflect
these changes.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/mm')
| -rw-r--r-- | arch/ppc/mm/hashtable.S | 34 | ||||
| -rw-r--r-- | arch/ppc/mm/init.c | 13 | ||||
| -rw-r--r-- | arch/ppc/mm/mmu_context.c | 2 | ||||
| -rw-r--r-- | arch/ppc/mm/pgtable.c | 2 | ||||
| -rw-r--r-- | arch/ppc/mm/ppc_mmu.c | 28 |
5 files changed, 3 insertions, 76 deletions
diff --git a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/hashtable.S index f09fa88db35a..31d0a924317c 100644 --- a/arch/ppc/mm/hashtable.S +++ b/arch/ppc/mm/hashtable.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 |
| @@ -303,7 +297,6 @@ Hash_base = 0xc0180000 | |||
| 303 | Hash_bits = 12 /* e.g. 256kB hash table */ | 297 | Hash_bits = 12 /* e.g. 256kB hash table */ |
| 304 | Hash_msk = (((1 << Hash_bits) - 1) * 64) | 298 | Hash_msk = (((1 << Hash_bits) - 1) * 64) |
| 305 | 299 | ||
| 306 | #ifndef CONFIG_PPC64BRIDGE | ||
| 307 | /* defines for the PTE format for 32-bit PPCs */ | 300 | /* defines for the PTE format for 32-bit PPCs */ |
| 308 | #define PTE_SIZE 8 | 301 | #define PTE_SIZE 8 |
| 309 | #define PTEG_SIZE 64 | 302 | #define PTEG_SIZE 64 |
| @@ -317,21 +310,6 @@ Hash_msk = (((1 << Hash_bits) - 1) * 64) | |||
| 317 | #define SET_V(r) oris r,r,PTE_V@h | 310 | #define SET_V(r) oris r,r,PTE_V@h |
| 318 | #define CLR_V(r,t) rlwinm r,r,0,1,31 | 311 | #define CLR_V(r,t) rlwinm r,r,0,1,31 |
| 319 | 312 | ||
| 320 | #else | ||
| 321 | /* defines for the PTE format for 64-bit PPCs */ | ||
| 322 | #define PTE_SIZE 16 | ||
| 323 | #define PTEG_SIZE 128 | ||
| 324 | #define LG_PTEG_SIZE 7 | ||
| 325 | #define LDPTEu ldu | ||
| 326 | #define STPTE std | ||
| 327 | #define CMPPTE cmpd | ||
| 328 | #define PTE_H 2 | ||
| 329 | #define PTE_V 1 | ||
| 330 | #define TST_V(r) andi. r,r,PTE_V | ||
| 331 | #define SET_V(r) ori r,r,PTE_V | ||
| 332 | #define CLR_V(r,t) li t,PTE_V; andc r,r,t | ||
| 333 | #endif /* CONFIG_PPC64BRIDGE */ | ||
| 334 | |||
| 335 | #define HASH_LEFT 31-(LG_PTEG_SIZE+Hash_bits-1) | 313 | #define HASH_LEFT 31-(LG_PTEG_SIZE+Hash_bits-1) |
| 336 | #define HASH_RIGHT 31-LG_PTEG_SIZE | 314 | #define HASH_RIGHT 31-LG_PTEG_SIZE |
| 337 | 315 | ||
| @@ -349,14 +327,8 @@ BEGIN_FTR_SECTION | |||
| 349 | END_FTR_SECTION_IFSET(CPU_FTR_NEED_COHERENT) | 327 | END_FTR_SECTION_IFSET(CPU_FTR_NEED_COHERENT) |
| 350 | 328 | ||
| 351 | /* Construct the high word of the PPC-style PTE (r5) */ | 329 | /* Construct the high word of the PPC-style PTE (r5) */ |
| 352 | #ifndef CONFIG_PPC64BRIDGE | ||
| 353 | rlwinm r5,r3,7,1,24 /* put VSID in 0x7fffff80 bits */ | 330 | rlwinm r5,r3,7,1,24 /* put VSID in 0x7fffff80 bits */ |
| 354 | rlwimi r5,r4,10,26,31 /* put in API (abbrev page index) */ | 331 | rlwimi r5,r4,10,26,31 /* put in API (abbrev page index) */ |
| 355 | #else /* CONFIG_PPC64BRIDGE */ | ||
| 356 | clrlwi r3,r3,8 /* reduce vsid to 24 bits */ | ||
| 357 | sldi r5,r3,12 /* shift vsid into position */ | ||
| 358 | rlwimi r5,r4,16,20,24 /* put in API (abbrev page index) */ | ||
| 359 | #endif /* CONFIG_PPC64BRIDGE */ | ||
| 360 | SET_V(r5) /* set V (valid) bit */ | 332 | SET_V(r5) /* set V (valid) bit */ |
| 361 | 333 | ||
| 362 | /* Get the address of the primary PTE group in the hash table (r3) */ | 334 | /* Get the address of the primary PTE group in the hash table (r3) */ |
| @@ -540,14 +512,8 @@ _GLOBAL(flush_hash_pages) | |||
| 540 | add r3,r3,r0 /* note code below trims to 24 bits */ | 512 | add r3,r3,r0 /* note code below trims to 24 bits */ |
| 541 | 513 | ||
| 542 | /* Construct the high word of the PPC-style PTE (r11) */ | 514 | /* Construct the high word of the PPC-style PTE (r11) */ |
| 543 | #ifndef CONFIG_PPC64BRIDGE | ||
| 544 | rlwinm r11,r3,7,1,24 /* put VSID in 0x7fffff80 bits */ | 515 | rlwinm r11,r3,7,1,24 /* put VSID in 0x7fffff80 bits */ |
| 545 | rlwimi r11,r4,10,26,31 /* put in API (abbrev page index) */ | 516 | rlwimi r11,r4,10,26,31 /* put in API (abbrev page index) */ |
| 546 | #else /* CONFIG_PPC64BRIDGE */ | ||
| 547 | clrlwi r3,r3,8 /* reduce vsid to 24 bits */ | ||
| 548 | sldi r11,r3,12 /* shift vsid into position */ | ||
| 549 | rlwimi r11,r4,16,20,24 /* put in API (abbrev page index) */ | ||
| 550 | #endif /* CONFIG_PPC64BRIDGE */ | ||
| 551 | SET_V(r11) /* set V (valid) bit */ | 517 | SET_V(r11) /* set V (valid) bit */ |
| 552 | 518 | ||
| 553 | #ifdef CONFIG_SMP | 519 | #ifdef CONFIG_SMP |
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index cb1c294fb932..386e000bcb73 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c | |||
| @@ -412,14 +412,6 @@ void __init mem_init(void) | |||
| 412 | } | 412 | } |
| 413 | #endif /* CONFIG_BLK_DEV_INITRD */ | 413 | #endif /* CONFIG_BLK_DEV_INITRD */ |
| 414 | 414 | ||
| 415 | #ifdef CONFIG_PPC_OF | ||
| 416 | /* mark the RTAS pages as reserved */ | ||
| 417 | if ( rtas_data ) | ||
| 418 | for (addr = (ulong)__va(rtas_data); | ||
| 419 | addr < PAGE_ALIGN((ulong)__va(rtas_data)+rtas_size) ; | ||
| 420 | addr += PAGE_SIZE) | ||
| 421 | SetPageReserved(virt_to_page(addr)); | ||
| 422 | #endif | ||
| 423 | for (addr = PAGE_OFFSET; addr < (unsigned long)high_memory; | 415 | for (addr = PAGE_OFFSET; addr < (unsigned long)high_memory; |
| 424 | addr += PAGE_SIZE) { | 416 | addr += PAGE_SIZE) { |
| 425 | if (!PageReserved(virt_to_page(addr))) | 417 | if (!PageReserved(virt_to_page(addr))) |
| @@ -494,11 +486,6 @@ set_phys_avail(unsigned long total_memory) | |||
| 494 | initrd_end - initrd_start, 1); | 486 | initrd_end - initrd_start, 1); |
| 495 | } | 487 | } |
| 496 | #endif /* CONFIG_BLK_DEV_INITRD */ | 488 | #endif /* CONFIG_BLK_DEV_INITRD */ |
| 497 | #ifdef CONFIG_PPC_OF | ||
| 498 | /* remove the RTAS pages from the available memory */ | ||
| 499 | if (rtas_data) | ||
| 500 | mem_pieces_remove(&phys_avail, rtas_data, rtas_size, 1); | ||
| 501 | #endif | ||
| 502 | } | 489 | } |
| 503 | 490 | ||
| 504 | /* Mark some memory as reserved by removing it from phys_avail. */ | 491 | /* Mark some memory as reserved by removing it from phys_avail. */ |
diff --git a/arch/ppc/mm/mmu_context.c b/arch/ppc/mm/mmu_context.c index a8816e0f6a86..b4a4b3f02a1c 100644 --- a/arch/ppc/mm/mmu_context.c +++ b/arch/ppc/mm/mmu_context.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * This file contains the routines for handling the MMU on those | 2 | * This file contains the routines for handling the MMU on those |
| 3 | * PowerPC implementations where the MMU substantially follows the | 3 | * PowerPC implementations where the MMU substantially follows the |
| 4 | * architecture specification. This includes the 6xx, 7xx, 7xxx, | 4 | * architecture specification. This includes the 6xx, 7xx, 7xxx, |
| 5 | * 8260, and POWER3 implementations but excludes the 8xx and 4xx. | 5 | * 8260, and 83xx implementations but excludes the 8xx and 4xx. |
| 6 | * -- paulus | 6 | * -- paulus |
| 7 | * | 7 | * |
| 8 | * Derived from arch/ppc/mm/init.c: | 8 | * Derived from arch/ppc/mm/init.c: |
diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c index 6ea9185fd120..a1924876cad6 100644 --- a/arch/ppc/mm/pgtable.c +++ b/arch/ppc/mm/pgtable.c | |||
| @@ -39,7 +39,7 @@ unsigned long ioremap_base; | |||
| 39 | unsigned long ioremap_bot; | 39 | unsigned long ioremap_bot; |
| 40 | int io_bat_index; | 40 | int io_bat_index; |
| 41 | 41 | ||
| 42 | #if defined(CONFIG_6xx) || defined(CONFIG_POWER3) | 42 | #if defined(CONFIG_6xx) |
| 43 | #define HAVE_BATS 1 | 43 | #define HAVE_BATS 1 |
| 44 | #endif | 44 | #endif |
| 45 | 45 | ||
diff --git a/arch/ppc/mm/ppc_mmu.c b/arch/ppc/mm/ppc_mmu.c index 9a381ed5eb21..25bb6f3347c1 100644 --- a/arch/ppc/mm/ppc_mmu.c +++ b/arch/ppc/mm/ppc_mmu.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * This file contains the routines for handling the MMU on those | 2 | * This file contains the routines for handling the MMU on those |
| 3 | * PowerPC implementations where the MMU substantially follows the | 3 | * PowerPC implementations where the MMU substantially follows the |
| 4 | * architecture specification. This includes the 6xx, 7xx, 7xxx, | 4 | * architecture specification. This includes the 6xx, 7xx, 7xxx, |
| 5 | * 8260, and POWER3 implementations but excludes the 8xx and 4xx. | 5 | * 8260, and 83xx implementations but excludes the 8xx and 4xx. |
| 6 | * -- paulus | 6 | * -- paulus |
| 7 | * | 7 | * |
| 8 | * Derived from arch/ppc/mm/init.c: | 8 | * Derived from arch/ppc/mm/init.c: |
| @@ -42,11 +42,7 @@ unsigned long _SDR1; | |||
| 42 | 42 | ||
| 43 | union ubat { /* BAT register values to be loaded */ | 43 | union 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 | ||
| 52 | struct batrange { /* stores address ranges mapped by BATs */ | 48 | struct batrange { /* stores address ranges mapped by BATs */ |
| @@ -83,9 +79,6 @@ unsigned long p_mapped_by_bats(unsigned long pa) | |||
| 83 | 79 | ||
| 84 | unsigned long __init mmu_mapin_ram(void) | 80 | unsigned long __init mmu_mapin_ram(void) |
| 85 | { | 81 | { |
| 86 | #ifdef CONFIG_POWER4 | ||
| 87 | return 0; | ||
| 88 | #else | ||
| 89 | unsigned long tot, bl, done; | 82 | unsigned long tot, bl, done; |
| 90 | unsigned long max_size = (256<<20); | 83 | unsigned long max_size = (256<<20); |
| 91 | unsigned long align; | 84 | unsigned long align; |
| @@ -122,7 +115,6 @@ unsigned long __init mmu_mapin_ram(void) | |||
| 122 | } | 115 | } |
| 123 | 116 | ||
| 124 | return done; | 117 | return done; |
| 125 | #endif | ||
| 126 | } | 118 | } |
| 127 | 119 | ||
| 128 | /* | 120 | /* |
| @@ -205,27 +197,10 @@ void __init MMU_init_hw(void) | |||
| 205 | 197 | ||
| 206 | if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105); | 198 | if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105); |
| 207 | 199 | ||
| 208 | #ifdef CONFIG_PPC64BRIDGE | ||
| 209 | #define LG_HPTEG_SIZE 7 /* 128 bytes per HPTEG */ | ||
| 210 | #define SDR1_LOW_BITS (lg_n_hpteg - 11) | ||
| 211 | #define MIN_N_HPTEG 2048 /* min 256kB hash table */ | ||
| 212 | #else | ||
| 213 | #define LG_HPTEG_SIZE 6 /* 64 bytes per HPTEG */ | 200 | #define LG_HPTEG_SIZE 6 /* 64 bytes per HPTEG */ |
| 214 | #define SDR1_LOW_BITS ((n_hpteg - 1) >> 10) | 201 | #define SDR1_LOW_BITS ((n_hpteg - 1) >> 10) |
| 215 | #define MIN_N_HPTEG 1024 /* min 64kB hash table */ | 202 | #define MIN_N_HPTEG 1024 /* min 64kB hash table */ |
| 216 | #endif | ||
| 217 | |||
| 218 | #ifdef CONFIG_POWER4 | ||
| 219 | /* The hash table has already been allocated and initialized | ||
| 220 | in prom.c */ | ||
| 221 | n_hpteg = Hash_size >> LG_HPTEG_SIZE; | ||
| 222 | lg_n_hpteg = __ilog2(n_hpteg); | ||
| 223 | |||
| 224 | /* Remove the hash table from the available memory */ | ||
| 225 | if (Hash) | ||
| 226 | reserve_phys_mem(__pa(Hash), Hash_size); | ||
| 227 | 203 | ||
| 228 | #else /* CONFIG_POWER4 */ | ||
| 229 | /* | 204 | /* |
| 230 | * Allow 1 HPTE (1/8 HPTEG) for each page of memory. | 205 | * Allow 1 HPTE (1/8 HPTEG) for each page of memory. |
| 231 | * This is less than the recommended amount, but then | 206 | * This is less than the recommended amount, but then |
| @@ -248,7 +223,6 @@ void __init MMU_init_hw(void) | |||
| 248 | Hash = mem_pieces_find(Hash_size, Hash_size); | 223 | Hash = mem_pieces_find(Hash_size, Hash_size); |
| 249 | cacheable_memzero(Hash, Hash_size); | 224 | cacheable_memzero(Hash, Hash_size); |
| 250 | _SDR1 = __pa(Hash) | SDR1_LOW_BITS; | 225 | _SDR1 = __pa(Hash) | SDR1_LOW_BITS; |
| 251 | #endif /* CONFIG_POWER4 */ | ||
| 252 | 226 | ||
| 253 | Hash_end = (PTE *) ((unsigned long)Hash + Hash_size); | 227 | Hash_end = (PTE *) ((unsigned long)Hash + Hash_size); |
| 254 | 228 | ||
