diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2019-04-26 16:36:39 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-05-03 01:20:26 +1000 |
commit | e4dccf9092ab48a6f902003b9558c0e45d0e849a (patch) | |
tree | 19c90a014b0bc05fe19b996e95b9f1fb23c30fc0 /arch/powerpc/mm/book3s32/mmu.c | |
parent | 8f156c23f4c04ca51961cd1f6a0edbc80caa2683 (diff) |
powerpc/mm: print hash info in a helper
Reduce #ifdef mess by defining a helper to print
hash info at startup.
In the meantime, remove the display of hash table address
to reduce leak of non necessary information.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/book3s32/mmu.c')
-rw-r--r-- | arch/powerpc/mm/book3s32/mmu.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/powerpc/mm/book3s32/mmu.c b/arch/powerpc/mm/book3s32/mmu.c index 131cd3acb6b8..615f78d35536 100644 --- a/arch/powerpc/mm/book3s32/mmu.c +++ b/arch/powerpc/mm/book3s32/mmu.c @@ -37,7 +37,7 @@ #include <mm/mmu_decl.h> struct hash_pte *Hash; -unsigned long Hash_size, Hash_mask; +static unsigned long Hash_size, Hash_mask; unsigned long _SDR1; static unsigned int hash_mb, hash_mb2; @@ -401,6 +401,13 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base, memblock_set_current_limit(min_t(u64, first_memblock_size, 0x10000000)); } +void __init print_system_hash_info(void) +{ + pr_info("Hash_size = 0x%lx\n", Hash_size); + if (Hash_mask) + pr_info("Hash_mask = 0x%lx\n", Hash_mask); +} + #ifdef CONFIG_PPC_KUEP void __init setup_kuep(bool disabled) { |