Skip to content

Commit

Permalink
powerpc/32s: Make Hash var static
Browse files Browse the repository at this point in the history
Hash var is used only locally in mmu.c now.

No need to set it in head_32.S anymore.

Make it static and initialises it to the early hash table.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/786c82a89cdfdaabb32b72a44f7c312fa81d192b.1603348103.git.christophe.leroy@csgroup.eu
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Dec 9, 2020
1 parent 4cc445b commit 4b74a35
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
5 changes: 0 additions & 5 deletions arch/powerpc/kernel/head_book3s_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,8 @@ __after_mmu_off:

bl initial_bats
bl load_segment_registers
BEGIN_MMU_FTR_SECTION
bl reloc_offset
bl early_hash_table
END_MMU_FTR_SECTION_IFSET(MMU_FTR_HPTE_TABLE)
#if defined(CONFIG_BOOTX_TEXT)
bl setup_disp_bat
#endif
Expand Down Expand Up @@ -922,9 +920,6 @@ early_hash_table:
lis r6, early_hash - PAGE_OFFSET@h
ori r6, r6, 3 /* 256kB table */
mtspr SPRN_SDR1, r6
lis r6, early_hash@h
addis r3, r3, Hash@ha
stw r6, Hash@l(r3)
blr

load_up_mmu:
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/mm/book3s32/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

u8 __initdata early_hash[SZ_256K] __aligned(SZ_256K) = {0};

struct hash_pte *Hash;
static struct hash_pte *Hash = (struct hash_pte *)early_hash;
static unsigned long Hash_size, Hash_mask;
unsigned long _SDR1;
static unsigned int hash_mb, hash_mb2;
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/mm/mmu_decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ extern int __map_without_bats;
extern unsigned int rtas_data, rtas_size;

struct hash_pte;
extern struct hash_pte *Hash;
extern u8 early_hash[];

#endif /* CONFIG_PPC32 */
Expand Down

0 comments on commit 4b74a35

Please sign in to comment.