diff options
author | Matt Evans <matt@ozlabs.org> | 2011-04-06 15:48:50 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-27 00:18:52 -0400 |
commit | 44ae3ab3358e962039c36ad4ae461ae9fb29596c (patch) | |
tree | 08c0628a5226c0535b7fe236be64b48e5eb0fbd6 /arch/powerpc/mm/hash_utils_64.c | |
parent | eca590f402332ab873d13f2d8d00fa0b91cfff36 (diff) |
powerpc: Free up some CPU feature bits by moving out MMU-related features
Some of the 64bit PPC CPU features are MMU-related, so this patch moves
them to MMU_FTR_ bits. All cpu_has_feature()-style tests are moved to
mmu_has_feature(), and seven feature bits are freed as a result.
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm/hash_utils_64.c')
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index d95d8f484d2f..26b2872b3d00 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -259,11 +259,11 @@ static int __init htab_dt_scan_seg_sizes(unsigned long node, | |||
259 | for (; size >= 4; size -= 4, ++prop) { | 259 | for (; size >= 4; size -= 4, ++prop) { |
260 | if (prop[0] == 40) { | 260 | if (prop[0] == 40) { |
261 | DBG("1T segment support detected\n"); | 261 | DBG("1T segment support detected\n"); |
262 | cur_cpu_spec->cpu_features |= CPU_FTR_1T_SEGMENT; | 262 | cur_cpu_spec->mmu_features |= MMU_FTR_1T_SEGMENT; |
263 | return 1; | 263 | return 1; |
264 | } | 264 | } |
265 | } | 265 | } |
266 | cur_cpu_spec->cpu_features &= ~CPU_FTR_NO_SLBIE_B; | 266 | cur_cpu_spec->mmu_features &= ~MMU_FTR_NO_SLBIE_B; |
267 | return 0; | 267 | return 0; |
268 | } | 268 | } |
269 | 269 | ||
@@ -289,7 +289,7 @@ static int __init htab_dt_scan_page_sizes(unsigned long node, | |||
289 | if (prop != NULL) { | 289 | if (prop != NULL) { |
290 | DBG("Page sizes from device-tree:\n"); | 290 | DBG("Page sizes from device-tree:\n"); |
291 | size /= 4; | 291 | size /= 4; |
292 | cur_cpu_spec->cpu_features &= ~(CPU_FTR_16M_PAGE); | 292 | cur_cpu_spec->mmu_features &= ~(MMU_FTR_16M_PAGE); |
293 | while(size > 0) { | 293 | while(size > 0) { |
294 | unsigned int shift = prop[0]; | 294 | unsigned int shift = prop[0]; |
295 | unsigned int slbenc = prop[1]; | 295 | unsigned int slbenc = prop[1]; |
@@ -317,7 +317,7 @@ static int __init htab_dt_scan_page_sizes(unsigned long node, | |||
317 | break; | 317 | break; |
318 | case 0x18: | 318 | case 0x18: |
319 | idx = MMU_PAGE_16M; | 319 | idx = MMU_PAGE_16M; |
320 | cur_cpu_spec->cpu_features |= CPU_FTR_16M_PAGE; | 320 | cur_cpu_spec->mmu_features |= MMU_FTR_16M_PAGE; |
321 | break; | 321 | break; |
322 | case 0x22: | 322 | case 0x22: |
323 | idx = MMU_PAGE_16G; | 323 | idx = MMU_PAGE_16G; |
@@ -412,7 +412,7 @@ static void __init htab_init_page_sizes(void) | |||
412 | * Not in the device-tree, let's fallback on known size | 412 | * Not in the device-tree, let's fallback on known size |
413 | * list for 16M capable GP & GR | 413 | * list for 16M capable GP & GR |
414 | */ | 414 | */ |
415 | if (cpu_has_feature(CPU_FTR_16M_PAGE)) | 415 | if (mmu_has_feature(MMU_FTR_16M_PAGE)) |
416 | memcpy(mmu_psize_defs, mmu_psize_defaults_gp, | 416 | memcpy(mmu_psize_defs, mmu_psize_defaults_gp, |
417 | sizeof(mmu_psize_defaults_gp)); | 417 | sizeof(mmu_psize_defaults_gp)); |
418 | found: | 418 | found: |
@@ -442,7 +442,7 @@ static void __init htab_init_page_sizes(void) | |||
442 | mmu_vmalloc_psize = MMU_PAGE_64K; | 442 | mmu_vmalloc_psize = MMU_PAGE_64K; |
443 | if (mmu_linear_psize == MMU_PAGE_4K) | 443 | if (mmu_linear_psize == MMU_PAGE_4K) |
444 | mmu_linear_psize = MMU_PAGE_64K; | 444 | mmu_linear_psize = MMU_PAGE_64K; |
445 | if (cpu_has_feature(CPU_FTR_CI_LARGE_PAGE)) { | 445 | if (mmu_has_feature(MMU_FTR_CI_LARGE_PAGE)) { |
446 | /* | 446 | /* |
447 | * Don't use 64k pages for ioremap on pSeries, since | 447 | * Don't use 64k pages for ioremap on pSeries, since |
448 | * that would stop us accessing the HEA ethernet. | 448 | * that would stop us accessing the HEA ethernet. |
@@ -608,7 +608,7 @@ static void __init htab_initialize(void) | |||
608 | /* Initialize page sizes */ | 608 | /* Initialize page sizes */ |
609 | htab_init_page_sizes(); | 609 | htab_init_page_sizes(); |
610 | 610 | ||
611 | if (cpu_has_feature(CPU_FTR_1T_SEGMENT)) { | 611 | if (mmu_has_feature(MMU_FTR_1T_SEGMENT)) { |
612 | mmu_kernel_ssize = MMU_SEGSIZE_1T; | 612 | mmu_kernel_ssize = MMU_SEGSIZE_1T; |
613 | mmu_highuser_ssize = MMU_SEGSIZE_1T; | 613 | mmu_highuser_ssize = MMU_SEGSIZE_1T; |
614 | printk(KERN_INFO "Using 1TB segments\n"); | 614 | printk(KERN_INFO "Using 1TB segments\n"); |
@@ -749,7 +749,7 @@ void __init early_init_mmu(void) | |||
749 | 749 | ||
750 | /* Initialize stab / SLB management except on iSeries | 750 | /* Initialize stab / SLB management except on iSeries |
751 | */ | 751 | */ |
752 | if (cpu_has_feature(CPU_FTR_SLB)) | 752 | if (mmu_has_feature(MMU_FTR_SLB)) |
753 | slb_initialize(); | 753 | slb_initialize(); |
754 | else if (!firmware_has_feature(FW_FEATURE_ISERIES)) | 754 | else if (!firmware_has_feature(FW_FEATURE_ISERIES)) |
755 | stab_initialize(get_paca()->stab_real); | 755 | stab_initialize(get_paca()->stab_real); |
@@ -766,7 +766,7 @@ void __cpuinit early_init_mmu_secondary(void) | |||
766 | * in real mode on pSeries and we want a virtual address on | 766 | * in real mode on pSeries and we want a virtual address on |
767 | * iSeries anyway | 767 | * iSeries anyway |
768 | */ | 768 | */ |
769 | if (cpu_has_feature(CPU_FTR_SLB)) | 769 | if (mmu_has_feature(MMU_FTR_SLB)) |
770 | slb_initialize(); | 770 | slb_initialize(); |
771 | else | 771 | else |
772 | stab_initialize(get_paca()->stab_addr); | 772 | stab_initialize(get_paca()->stab_addr); |