Skip to content

Commit 4b74a35

Browse files
chleroympe
authored andcommitted
powerpc/32s: Make Hash var static
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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/786c82a89cdfdaabb32b72a44f7c312fa81d192b.1603348103.git.christophe.leroy@csgroup.eu
1 parent 4cc445b commit 4b74a35

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

arch/powerpc/kernel/head_book3s_32.S

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,8 @@ __after_mmu_off:
155155

156156
bl initial_bats
157157
bl load_segment_registers
158-
BEGIN_MMU_FTR_SECTION
159158
bl reloc_offset
160159
bl early_hash_table
161-
END_MMU_FTR_SECTION_IFSET(MMU_FTR_HPTE_TABLE)
162160
#if defined(CONFIG_BOOTX_TEXT)
163161
bl setup_disp_bat
164162
#endif
@@ -922,9 +920,6 @@ early_hash_table:
922920
lis r6, early_hash - PAGE_OFFSET@h
923921
ori r6, r6, 3 /* 256kB table */
924922
mtspr SPRN_SDR1, r6
925-
lis r6, early_hash@h
926-
addis r3, r3, Hash@ha
927-
stw r6, Hash@l(r3)
928923
blr
929924

930925
load_up_mmu:

arch/powerpc/mm/book3s32/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

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

36-
struct hash_pte *Hash;
36+
static struct hash_pte *Hash = (struct hash_pte *)early_hash;
3737
static unsigned long Hash_size, Hash_mask;
3838
unsigned long _SDR1;
3939
static unsigned int hash_mb, hash_mb2;

arch/powerpc/mm/mmu_decl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ extern int __map_without_bats;
9999
extern unsigned int rtas_data, rtas_size;
100100

101101
struct hash_pte;
102-
extern struct hash_pte *Hash;
103102
extern u8 early_hash[];
104103

105104
#endif /* CONFIG_PPC32 */

0 commit comments

Comments
 (0)