Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247903
b: refs/heads/master
c: 5149bed
h: refs/heads/master
i:
  247901: 4a6faca
  247899: d519842
  247895: d44fb39
  247887: 35939c6
  247871: cdfc4fc
v: v3
  • Loading branch information
Daniel Hellstrom authored and David S. Miller committed May 16, 2011
1 parent 719a56c commit dc2b66c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 970def654e9df1ad28ddb466bb1d123a55e1e7e7
refs/heads/master: 5149bed8912f4030f52feb33326cfe794831b184
5 changes: 5 additions & 0 deletions trunk/arch/sparc/include/asm/smp_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ static inline int hard_smp_processor_id(void)
__asm__ __volatile__("lda [%g0] ASI_M_VIKING_TMP1, %0\n\t"
"nop; nop" :
"=&r" (cpuid));
- leon
__asm__ __volatile__( "rd %asr17, %0\n\t"
"srl %0, 0x1c, %0\n\t"
"nop\n\t" :
"=&r" (cpuid));
See btfixup.h and btfixupprep.c to understand how a blackbox works.
*/
__asm__ __volatile__("sethi %%hi(___b_hard_smp_processor_id), %0\n\t"
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/sparc/include/asm/winmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
st %scratch, [%cur_reg + TI_W_SAVED];

#ifdef CONFIG_SMP
/* Results of LOAD_CURRENT() after BTFIXUP for SUN4M, SUN4D & LEON (comments) */
#define LOAD_CURRENT4M(dest_reg, idreg) \
rd %tbr, %idreg; \
sethi %hi(current_set), %dest_reg; \
Expand All @@ -118,6 +119,14 @@
or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \
ld [%idreg + %dest_reg], %dest_reg;

#define LOAD_CURRENT_LEON(dest_reg, idreg) \
rd %asr17, %idreg; \
sethi %hi(current_set), %dest_reg; \
srl %idreg, 0x1c, %idreg; \
or %dest_reg, %lo(current_set), %dest_reg; \
sll %idreg, 0x2, %idreg; \
ld [%idreg + %dest_reg], %dest_reg;

/* Blackbox - take care with this... - check smp4m and smp4d before changing this. */
#define LOAD_CURRENT(dest_reg, idreg) \
sethi %hi(___b_load_current), %idreg; \
Expand Down

0 comments on commit dc2b66c

Please sign in to comment.