Commit f608600e authored by Kumar Gala's avatar Kumar Gala Committed by Paul Mackerras

[POWERPC] Clean up access to thread_info in assembly

Use (31-THREAD_SHIFT) to get to thread_info from stack pointer.  This makes
the code a bit easier to read and more robust if we ever change THREAD_SHIFT.
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 885aa35c
...@@ -152,7 +152,7 @@ _GLOBAL(low_choose_750fx_pll) ...@@ -152,7 +152,7 @@ _GLOBAL(low_choose_750fx_pll)
mtspr SPRN_HID1,r4 mtspr SPRN_HID1,r4
/* Store new HID1 image */ /* Store new HID1 image */
rlwinm r6,r1,0,0,18 rlwinm r6,r1,0,0,(31-THREAD_SHIFT)
lwz r6,TI_CPU(r6) lwz r6,TI_CPU(r6)
slwi r6,r6,2 slwi r6,r6,2
addis r6,r6,nap_save_hid1@ha addis r6,r6,nap_save_hid1@ha
...@@ -281,7 +281,7 @@ _GLOBAL(_tlbia) ...@@ -281,7 +281,7 @@ _GLOBAL(_tlbia)
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
#else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */ #else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */
#if defined(CONFIG_SMP) #if defined(CONFIG_SMP)
rlwinm r8,r1,0,0,18 rlwinm r8,r1,0,0,(31-THREAD_SHIFT)
lwz r8,TI_CPU(r8) lwz r8,TI_CPU(r8)
oris r8,r8,10 oris r8,r8,10
mfmsr r10 mfmsr r10
...@@ -377,7 +377,7 @@ _GLOBAL(_tlbie) ...@@ -377,7 +377,7 @@ _GLOBAL(_tlbie)
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
#else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */ #else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */
#if defined(CONFIG_SMP) #if defined(CONFIG_SMP)
rlwinm r8,r1,0,0,18 rlwinm r8,r1,0,0,(31-THREAD_SHIFT)
lwz r8,TI_CPU(r8) lwz r8,TI_CPU(r8)
oris r8,r8,11 oris r8,r8,11
mfmsr r10 mfmsr r10
......
...@@ -191,7 +191,7 @@ _GLOBAL(add_hash_page) ...@@ -191,7 +191,7 @@ _GLOBAL(add_hash_page)
add r3,r3,r0 /* note create_hpte trims to 24 bits */ add r3,r3,r0 /* note create_hpte trims to 24 bits */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
rlwinm r8,r1,0,0,18 /* use cpu number to make tag */ rlwinm r8,r1,0,0,(31-THREAD_SHIFT) /* use cpu number to make tag */
lwz r8,TI_CPU(r8) /* to go in mmu_hash_lock */ lwz r8,TI_CPU(r8) /* to go in mmu_hash_lock */
oris r8,r8,12 oris r8,r8,12
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
...@@ -526,7 +526,7 @@ _GLOBAL(flush_hash_pages) ...@@ -526,7 +526,7 @@ _GLOBAL(flush_hash_pages)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
addis r9,r7,mmu_hash_lock@ha addis r9,r7,mmu_hash_lock@ha
addi r9,r9,mmu_hash_lock@l addi r9,r9,mmu_hash_lock@l
rlwinm r8,r1,0,0,18 rlwinm r8,r1,0,0,(31-THREAD_SHIFT)
add r8,r8,r7 add r8,r8,r7
lwz r8,TI_CPU(r8) lwz r8,TI_CPU(r8)
oris r8,r8,9 oris r8,r8,9
......
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