diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2008-04-23 16:29:36 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-04-24 06:58:02 -0400 |
commit | f608600e74404c5c8f017af45294074282911ae9 (patch) | |
tree | 9d62c005e06960a661ff77f540ca76625fabe827 /arch | |
parent | 885aa35c9669ce7919d203036a87a7e1a4ebd25f (diff) |
[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: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/misc_32.S | 6 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_low_32.S | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 9d2c56621f1e..92ccc6fcc5b0 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -152,7 +152,7 @@ _GLOBAL(low_choose_750fx_pll) | |||
152 | mtspr SPRN_HID1,r4 | 152 | mtspr SPRN_HID1,r4 |
153 | 153 | ||
154 | /* Store new HID1 image */ | 154 | /* Store new HID1 image */ |
155 | rlwinm r6,r1,0,0,18 | 155 | rlwinm r6,r1,0,0,(31-THREAD_SHIFT) |
156 | lwz r6,TI_CPU(r6) | 156 | lwz r6,TI_CPU(r6) |
157 | slwi r6,r6,2 | 157 | slwi r6,r6,2 |
158 | addis r6,r6,nap_save_hid1@ha | 158 | addis r6,r6,nap_save_hid1@ha |
@@ -281,7 +281,7 @@ _GLOBAL(_tlbia) | |||
281 | #endif /* CONFIG_SMP */ | 281 | #endif /* CONFIG_SMP */ |
282 | #else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */ | 282 | #else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */ |
283 | #if defined(CONFIG_SMP) | 283 | #if defined(CONFIG_SMP) |
284 | rlwinm r8,r1,0,0,18 | 284 | rlwinm r8,r1,0,0,(31-THREAD_SHIFT) |
285 | lwz r8,TI_CPU(r8) | 285 | lwz r8,TI_CPU(r8) |
286 | oris r8,r8,10 | 286 | oris r8,r8,10 |
287 | mfmsr r10 | 287 | mfmsr r10 |
@@ -377,7 +377,7 @@ _GLOBAL(_tlbie) | |||
377 | #endif /* CONFIG_SMP */ | 377 | #endif /* CONFIG_SMP */ |
378 | #else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */ | 378 | #else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */ |
379 | #if defined(CONFIG_SMP) | 379 | #if defined(CONFIG_SMP) |
380 | rlwinm r8,r1,0,0,18 | 380 | rlwinm r8,r1,0,0,(31-THREAD_SHIFT) |
381 | lwz r8,TI_CPU(r8) | 381 | lwz r8,TI_CPU(r8) |
382 | oris r8,r8,11 | 382 | oris r8,r8,11 |
383 | mfmsr r10 | 383 | mfmsr r10 |
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index e10d76a860d3..ddeaf9e38ad5 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S | |||
@@ -191,7 +191,7 @@ _GLOBAL(add_hash_page) | |||
191 | add r3,r3,r0 /* note create_hpte trims to 24 bits */ | 191 | add r3,r3,r0 /* note create_hpte trims to 24 bits */ |
192 | 192 | ||
193 | #ifdef CONFIG_SMP | 193 | #ifdef CONFIG_SMP |
194 | rlwinm r8,r1,0,0,18 /* use cpu number to make tag */ | 194 | rlwinm r8,r1,0,0,(31-THREAD_SHIFT) /* use cpu number to make tag */ |
195 | lwz r8,TI_CPU(r8) /* to go in mmu_hash_lock */ | 195 | lwz r8,TI_CPU(r8) /* to go in mmu_hash_lock */ |
196 | oris r8,r8,12 | 196 | oris r8,r8,12 |
197 | #endif /* CONFIG_SMP */ | 197 | #endif /* CONFIG_SMP */ |
@@ -526,7 +526,7 @@ _GLOBAL(flush_hash_pages) | |||
526 | #ifdef CONFIG_SMP | 526 | #ifdef CONFIG_SMP |
527 | addis r9,r7,mmu_hash_lock@ha | 527 | addis r9,r7,mmu_hash_lock@ha |
528 | addi r9,r9,mmu_hash_lock@l | 528 | addi r9,r9,mmu_hash_lock@l |
529 | rlwinm r8,r1,0,0,18 | 529 | rlwinm r8,r1,0,0,(31-THREAD_SHIFT) |
530 | add r8,r8,r7 | 530 | add r8,r8,r7 |
531 | lwz r8,TI_CPU(r8) | 531 | lwz r8,TI_CPU(r8) |
532 | oris r8,r8,9 | 532 | oris r8,r8,9 |