Commit 6364e84e authored by Michael Ellerman's avatar Michael Ellerman

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: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 7353644f
...@@ -391,8 +391,13 @@ int htab_remove_mapping(unsigned long vstart, unsigned long vend, ...@@ -391,8 +391,13 @@ int htab_remove_mapping(unsigned long vstart, unsigned long vend,
extern void add_gpage(u64 addr, u64 page_size, unsigned long number_of_pages); extern void add_gpage(u64 addr, u64 page_size, unsigned long number_of_pages);
extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr); extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr);
#ifdef CONFIG_PPC_PSERIES
void hpte_init_pseries(void);
#else
static inline void hpte_init_pseries(void) { }
#endif
extern void hpte_init_native(void); extern void hpte_init_native(void);
extern void hpte_init_lpar(void);
extern void hpte_init_beat(void); extern void hpte_init_beat(void);
extern void hpte_init_beat_v3(void); extern void hpte_init_beat_v3(void);
......
...@@ -885,11 +885,6 @@ static void __init htab_initialize(void) ...@@ -885,11 +885,6 @@ static void __init htab_initialize(void)
#undef KB #undef KB
#undef MB #undef MB
void __init __weak hpte_init_lpar(void)
{
panic("FW_FEATURE_LPAR set but no LPAR support compiled\n");
}
void __init hash__early_init_mmu(void) void __init hash__early_init_mmu(void)
{ {
/* /*
...@@ -930,7 +925,7 @@ void __init hash__early_init_mmu(void) ...@@ -930,7 +925,7 @@ void __init hash__early_init_mmu(void)
if (firmware_has_feature(FW_FEATURE_PS3_LV1)) if (firmware_has_feature(FW_FEATURE_PS3_LV1))
ps3_early_mm_init(); ps3_early_mm_init();
else if (firmware_has_feature(FW_FEATURE_LPAR)) else if (firmware_has_feature(FW_FEATURE_LPAR))
hpte_init_lpar(); hpte_init_pseries();
else if IS_ENABLED(CONFIG_PPC_NATIVE) else if IS_ENABLED(CONFIG_PPC_NATIVE)
hpte_init_native(); hpte_init_native();
......
...@@ -589,7 +589,7 @@ static int __init disable_bulk_remove(char *str) ...@@ -589,7 +589,7 @@ static int __init disable_bulk_remove(char *str)
__setup("bulk_remove=", disable_bulk_remove); __setup("bulk_remove=", disable_bulk_remove);
void __init hpte_init_lpar(void) void __init hpte_init_pseries(void)
{ {
mmu_hash_ops.hpte_invalidate = pSeries_lpar_hpte_invalidate; mmu_hash_ops.hpte_invalidate = pSeries_lpar_hpte_invalidate;
mmu_hash_ops.hpte_updatepp = pSeries_lpar_hpte_updatepp; mmu_hash_ops.hpte_updatepp = pSeries_lpar_hpte_updatepp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment