diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2016-07-25 20:33:03 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-07-26 00:16:18 -0400 |
commit | 6364e84e855ae9a0558ac873e3ff50ecb75bb40a (patch) | |
tree | ba0706a67093e553153e233ac605b700f461260f | |
parent | 7353644fa9df875aee778a802e3d28f1e3578512 (diff) |
powerpc/mm: Rename hpte_init_lpar() and move the fallback to a header
hpte_init_lpar() is part of the pseries platform, so name it as such.
Move the fallback implementation for when PSERIES=n into the header,
dropping the weak implementation. The panic() is now handled by the
calling code.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/mmu-hash.h | 7 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/lpar.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h index b0f4dffe12ae..450b017fdc19 100644 --- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h +++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h | |||
@@ -391,8 +391,13 @@ int htab_remove_mapping(unsigned long vstart, unsigned long vend, | |||
391 | extern void add_gpage(u64 addr, u64 page_size, unsigned long number_of_pages); | 391 | extern void add_gpage(u64 addr, u64 page_size, unsigned long number_of_pages); |
392 | extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr); | 392 | extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr); |
393 | 393 | ||
394 | #ifdef CONFIG_PPC_PSERIES | ||
395 | void hpte_init_pseries(void); | ||
396 | #else | ||
397 | static inline void hpte_init_pseries(void) { } | ||
398 | #endif | ||
399 | |||
394 | extern void hpte_init_native(void); | 400 | extern void hpte_init_native(void); |
395 | extern void hpte_init_lpar(void); | ||
396 | extern void hpte_init_beat(void); | 401 | extern void hpte_init_beat(void); |
397 | extern void hpte_init_beat_v3(void); | 402 | extern void hpte_init_beat_v3(void); |
398 | 403 | ||
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 381b5894cc99..1ff11c1bb182 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -885,11 +885,6 @@ static void __init htab_initialize(void) | |||
885 | #undef KB | 885 | #undef KB |
886 | #undef MB | 886 | #undef MB |
887 | 887 | ||
888 | void __init __weak hpte_init_lpar(void) | ||
889 | { | ||
890 | panic("FW_FEATURE_LPAR set but no LPAR support compiled\n"); | ||
891 | } | ||
892 | |||
893 | void __init hash__early_init_mmu(void) | 888 | void __init hash__early_init_mmu(void) |
894 | { | 889 | { |
895 | /* | 890 | /* |
@@ -930,7 +925,7 @@ void __init hash__early_init_mmu(void) | |||
930 | if (firmware_has_feature(FW_FEATURE_PS3_LV1)) | 925 | if (firmware_has_feature(FW_FEATURE_PS3_LV1)) |
931 | ps3_early_mm_init(); | 926 | ps3_early_mm_init(); |
932 | else if (firmware_has_feature(FW_FEATURE_LPAR)) | 927 | else if (firmware_has_feature(FW_FEATURE_LPAR)) |
933 | hpte_init_lpar(); | 928 | hpte_init_pseries(); |
934 | else if IS_ENABLED(CONFIG_PPC_NATIVE) | 929 | else if IS_ENABLED(CONFIG_PPC_NATIVE) |
935 | hpte_init_native(); | 930 | hpte_init_native(); |
936 | 931 | ||
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 0e91388d0af9..86707e67843f 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -589,7 +589,7 @@ static int __init disable_bulk_remove(char *str) | |||
589 | 589 | ||
590 | __setup("bulk_remove=", disable_bulk_remove); | 590 | __setup("bulk_remove=", disable_bulk_remove); |
591 | 591 | ||
592 | void __init hpte_init_lpar(void) | 592 | void __init hpte_init_pseries(void) |
593 | { | 593 | { |
594 | mmu_hash_ops.hpte_invalidate = pSeries_lpar_hpte_invalidate; | 594 | mmu_hash_ops.hpte_invalidate = pSeries_lpar_hpte_invalidate; |
595 | mmu_hash_ops.hpte_updatepp = pSeries_lpar_hpte_updatepp; | 595 | mmu_hash_ops.hpte_updatepp = pSeries_lpar_hpte_updatepp; |