diff options
Diffstat (limited to 'arch/powerpc/kernel')
| -rw-r--r-- | arch/powerpc/kernel/head_40x.S | 6 | ||||
| -rw-r--r-- | arch/powerpc/kernel/paca.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/prom.c | 15 | ||||
| -rw-r--r-- | arch/powerpc/kernel/rtas.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/setup_32.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/setup_64.c | 2 |
6 files changed, 15 insertions, 14 deletions
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index a90625f9b485..8278e8bad5a0 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S | |||
| @@ -923,11 +923,7 @@ initial_mmu: | |||
| 923 | mtspr SPRN_PID,r0 | 923 | mtspr SPRN_PID,r0 |
| 924 | sync | 924 | sync |
| 925 | 925 | ||
| 926 | /* Configure and load two entries into TLB slots 62 and 63. | 926 | /* Configure and load one entry into TLB slots 63 */ |
| 927 | * In case we are pinning TLBs, these are reserved in by the | ||
| 928 | * other TLB functions. If not reserving, then it doesn't | ||
| 929 | * matter where they are loaded. | ||
| 930 | */ | ||
| 931 | clrrwi r4,r4,10 /* Mask off the real page number */ | 927 | clrrwi r4,r4,10 /* Mask off the real page number */ |
| 932 | ori r4,r4,(TLB_WR | TLB_EX) /* Set the write and execute bits */ | 928 | ori r4,r4,(TLB_WR | TLB_EX) /* Set the write and execute bits */ |
| 933 | 929 | ||
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index d0a26f1770fe..a4e72159234f 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
| @@ -127,7 +127,7 @@ void __init allocate_pacas(void) | |||
| 127 | * the first segment. On iSeries they must be within the area mapped | 127 | * the first segment. On iSeries they must be within the area mapped |
| 128 | * by the HV, which is HvPagesToMap * HVPAGESIZE bytes. | 128 | * by the HV, which is HvPagesToMap * HVPAGESIZE bytes. |
| 129 | */ | 129 | */ |
| 130 | limit = min(0x10000000ULL, memblock.rmo_size); | 130 | limit = min(0x10000000ULL, ppc64_rma_size); |
| 131 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 131 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
| 132 | limit = min(limit, HvPagesToMap * HVPAGESIZE); | 132 | limit = min(limit, HvPagesToMap * HVPAGESIZE); |
| 133 | 133 | ||
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index fed9bf6187d1..c3c6a8857544 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
| @@ -66,6 +66,7 @@ | |||
| 66 | int __initdata iommu_is_off; | 66 | int __initdata iommu_is_off; |
| 67 | int __initdata iommu_force_on; | 67 | int __initdata iommu_force_on; |
| 68 | unsigned long tce_alloc_start, tce_alloc_end; | 68 | unsigned long tce_alloc_start, tce_alloc_end; |
| 69 | u64 ppc64_rma_size; | ||
| 69 | #endif | 70 | #endif |
| 70 | 71 | ||
| 71 | static int __init early_parse_mem(char *p) | 72 | static int __init early_parse_mem(char *p) |
| @@ -98,7 +99,7 @@ static void __init move_device_tree(void) | |||
| 98 | 99 | ||
| 99 | if ((memory_limit && (start + size) > memory_limit) || | 100 | if ((memory_limit && (start + size) > memory_limit) || |
| 100 | overlaps_crashkernel(start, size)) { | 101 | overlaps_crashkernel(start, size)) { |
| 101 | p = __va(memblock_alloc_base(size, PAGE_SIZE, memblock.rmo_size)); | 102 | p = __va(memblock_alloc(size, PAGE_SIZE)); |
| 102 | memcpy(p, initial_boot_params, size); | 103 | memcpy(p, initial_boot_params, size); |
| 103 | initial_boot_params = (struct boot_param_header *)p; | 104 | initial_boot_params = (struct boot_param_header *)p; |
| 104 | DBG("Moved device tree to 0x%p\n", p); | 105 | DBG("Moved device tree to 0x%p\n", p); |
| @@ -492,7 +493,7 @@ static int __init early_init_dt_scan_memory_ppc(unsigned long node, | |||
| 492 | 493 | ||
| 493 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) | 494 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) |
| 494 | { | 495 | { |
| 495 | #if defined(CONFIG_PPC64) | 496 | #ifdef CONFIG_PPC64 |
| 496 | if (iommu_is_off) { | 497 | if (iommu_is_off) { |
| 497 | if (base >= 0x80000000ul) | 498 | if (base >= 0x80000000ul) |
| 498 | return; | 499 | return; |
| @@ -501,9 +502,13 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) | |||
| 501 | } | 502 | } |
| 502 | #endif | 503 | #endif |
| 503 | 504 | ||
| 504 | memblock_add(base, size); | 505 | /* First MEMBLOCK added, do some special initializations */ |
| 505 | 506 | if (memstart_addr == ~(phys_addr_t)0) | |
| 507 | setup_initial_memory_limit(base, size); | ||
| 506 | memstart_addr = min((u64)memstart_addr, base); | 508 | memstart_addr = min((u64)memstart_addr, base); |
| 509 | |||
| 510 | /* Add the chunk to the MEMBLOCK list */ | ||
| 511 | memblock_add(base, size); | ||
| 507 | } | 512 | } |
| 508 | 513 | ||
| 509 | u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align) | 514 | u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align) |
| @@ -655,7 +660,6 @@ static void __init phyp_dump_reserve_mem(void) | |||
| 655 | static inline void __init phyp_dump_reserve_mem(void) {} | 660 | static inline void __init phyp_dump_reserve_mem(void) {} |
| 656 | #endif /* CONFIG_PHYP_DUMP && CONFIG_PPC_RTAS */ | 661 | #endif /* CONFIG_PHYP_DUMP && CONFIG_PPC_RTAS */ |
| 657 | 662 | ||
| 658 | |||
| 659 | void __init early_init_devtree(void *params) | 663 | void __init early_init_devtree(void *params) |
| 660 | { | 664 | { |
| 661 | phys_addr_t limit; | 665 | phys_addr_t limit; |
| @@ -683,6 +687,7 @@ void __init early_init_devtree(void *params) | |||
| 683 | 687 | ||
| 684 | /* Scan memory nodes and rebuild MEMBLOCKs */ | 688 | /* Scan memory nodes and rebuild MEMBLOCKs */ |
| 685 | memblock_init(); | 689 | memblock_init(); |
| 690 | |||
| 686 | of_scan_flat_dt(early_init_dt_scan_root, NULL); | 691 | of_scan_flat_dt(early_init_dt_scan_root, NULL); |
| 687 | of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL); | 692 | of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL); |
| 688 | 693 | ||
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 41048de3c6c3..7333fdbf857b 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
| @@ -969,7 +969,7 @@ void __init rtas_initialize(void) | |||
| 969 | */ | 969 | */ |
| 970 | #ifdef CONFIG_PPC64 | 970 | #ifdef CONFIG_PPC64 |
| 971 | if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR)) { | 971 | if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR)) { |
| 972 | rtas_region = min(memblock.rmo_size, RTAS_INSTANTIATE_MAX); | 972 | rtas_region = min(ppc64_rma_size, RTAS_INSTANTIATE_MAX); |
| 973 | ibm_suspend_me_token = rtas_token("ibm,suspend-me"); | 973 | ibm_suspend_me_token = rtas_token("ibm,suspend-me"); |
| 974 | } | 974 | } |
| 975 | #endif | 975 | #endif |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 93666f9cabf1..b86111fe9257 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
| @@ -246,7 +246,7 @@ static void __init irqstack_early_init(void) | |||
| 246 | unsigned int i; | 246 | unsigned int i; |
| 247 | 247 | ||
| 248 | /* interrupt stacks must be in lowmem, we get that for free on ppc32 | 248 | /* interrupt stacks must be in lowmem, we get that for free on ppc32 |
| 249 | * as the memblock is limited to lowmem by MEMBLOCK_REAL_LIMIT */ | 249 | * as the memblock is limited to lowmem by default */ |
| 250 | for_each_possible_cpu(i) { | 250 | for_each_possible_cpu(i) { |
| 251 | softirq_ctx[i] = (struct thread_info *) | 251 | softirq_ctx[i] = (struct thread_info *) |
| 252 | __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE)); | 252 | __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE)); |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index e72690ec9b87..2a178b0ebcdf 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
| @@ -486,7 +486,7 @@ static void __init emergency_stack_init(void) | |||
| 486 | * bringup, we need to get at them in real mode. This means they | 486 | * bringup, we need to get at them in real mode. This means they |
| 487 | * must also be within the RMO region. | 487 | * must also be within the RMO region. |
| 488 | */ | 488 | */ |
| 489 | limit = min(slb0_limit(), memblock.rmo_size); | 489 | limit = min(slb0_limit(), ppc64_rma_size); |
| 490 | 490 | ||
| 491 | for_each_possible_cpu(i) { | 491 | for_each_possible_cpu(i) { |
| 492 | unsigned long sp; | 492 | unsigned long sp; |
