diff options
-rw-r--r-- | arch/powerpc/include/asm/machdep.h | 3 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_native_64.c | 10 | ||||
-rw-r--r-- | arch/powerpc/mm/pgtable-radix.c | 9 |
3 files changed, 16 insertions, 6 deletions
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index a9af1bd6a51e..e62e7d33bda0 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
@@ -256,7 +256,8 @@ struct machdep_calls { | |||
256 | #ifdef CONFIG_ARCH_RANDOM | 256 | #ifdef CONFIG_ARCH_RANDOM |
257 | int (*get_random_seed)(unsigned long *v); | 257 | int (*get_random_seed)(unsigned long *v); |
258 | #endif | 258 | #endif |
259 | int (*update_partition_table)(u64); | 259 | int (*register_process_table)(unsigned long base, unsigned long page_size, |
260 | unsigned long tbl_size); | ||
260 | }; | 261 | }; |
261 | 262 | ||
262 | extern void e500_idle(void); | 263 | extern void e500_idle(void); |
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index 70521ef171fc..cb3b4c98b637 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c | |||
@@ -725,8 +725,14 @@ static void native_flush_hash_range(unsigned long number, int local) | |||
725 | local_irq_restore(flags); | 725 | local_irq_restore(flags); |
726 | } | 726 | } |
727 | 727 | ||
728 | static int native_update_partition_table(u64 patb1) | 728 | static int native_register_proc_table(unsigned long base, unsigned long page_size, |
729 | unsigned long table_size) | ||
729 | { | 730 | { |
731 | unsigned long patb1 = base << 25; /* VSID */ | ||
732 | |||
733 | patb1 |= (page_size << 5); /* sllp */ | ||
734 | patb1 |= table_size; | ||
735 | |||
730 | partition_tb->patb1 = cpu_to_be64(patb1); | 736 | partition_tb->patb1 = cpu_to_be64(patb1); |
731 | return 0; | 737 | return 0; |
732 | } | 738 | } |
@@ -743,5 +749,5 @@ void __init hpte_init_native(void) | |||
743 | ppc_md.hugepage_invalidate = native_hugepage_invalidate; | 749 | ppc_md.hugepage_invalidate = native_hugepage_invalidate; |
744 | 750 | ||
745 | if (cpu_has_feature(CPU_FTR_ARCH_300)) | 751 | if (cpu_has_feature(CPU_FTR_ARCH_300)) |
746 | ppc_md.update_partition_table = native_update_partition_table; | 752 | ppc_md.register_process_table = native_register_proc_table; |
747 | } | 753 | } |
diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index 8636bf120985..4ea1094c9fc4 100644 --- a/arch/powerpc/mm/pgtable-radix.c +++ b/arch/powerpc/mm/pgtable-radix.c | |||
@@ -21,8 +21,11 @@ | |||
21 | 21 | ||
22 | #include <trace/events/thp.h> | 22 | #include <trace/events/thp.h> |
23 | 23 | ||
24 | static int native_update_partition_table(u64 patb1) | 24 | static int native_register_process_table(unsigned long base, unsigned long pg_sz, |
25 | unsigned long table_size) | ||
25 | { | 26 | { |
27 | unsigned long patb1 = base | table_size | PATB_GR; | ||
28 | |||
26 | partition_tb->patb1 = cpu_to_be64(patb1); | 29 | partition_tb->patb1 = cpu_to_be64(patb1); |
27 | return 0; | 30 | return 0; |
28 | } | 31 | } |
@@ -168,7 +171,7 @@ redo: | |||
168 | * of process table here. But our linear mapping also enable us to use | 171 | * of process table here. But our linear mapping also enable us to use |
169 | * physical address here. | 172 | * physical address here. |
170 | */ | 173 | */ |
171 | ppc_md.update_partition_table(__pa(process_tb) | (PRTB_SIZE_SHIFT - 12) | PATB_GR); | 174 | ppc_md.register_process_table(__pa(process_tb), 0, PRTB_SIZE_SHIFT - 12); |
172 | pr_info("Process table %p and radix root for kernel: %p\n", process_tb, init_mm.pgd); | 175 | pr_info("Process table %p and radix root for kernel: %p\n", process_tb, init_mm.pgd); |
173 | } | 176 | } |
174 | 177 | ||
@@ -195,7 +198,7 @@ static void __init radix_init_partition_table(void) | |||
195 | 198 | ||
196 | void __init radix_init_native(void) | 199 | void __init radix_init_native(void) |
197 | { | 200 | { |
198 | ppc_md.update_partition_table = native_update_partition_table; | 201 | ppc_md.register_process_table = native_register_process_table; |
199 | } | 202 | } |
200 | 203 | ||
201 | static int __init get_idx_from_shift(unsigned int shift) | 204 | static int __init get_idx_from_shift(unsigned int shift) |