diff options
-rw-r--r-- | arch/sparc64/mm/tsb.c | 2 | ||||
-rw-r--r-- | include/asm-sparc64/tsb.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c index 707af4b84a0e..e605478217c2 100644 --- a/arch/sparc64/mm/tsb.c +++ b/arch/sparc64/mm/tsb.c | |||
@@ -184,7 +184,7 @@ static void copy_tsb(struct tsb *old_tsb, unsigned long old_size, | |||
184 | : "=r" (tag), "=r" (pte) | 184 | : "=r" (tag), "=r" (pte) |
185 | : "r" (&old_tsb[i]), "i" (ASI_NUCLEUS_QUAD_LDD)); | 185 | : "r" (&old_tsb[i]), "i" (ASI_NUCLEUS_QUAD_LDD)); |
186 | 186 | ||
187 | if (!tag || (tag & TSB_TAG_LOCK)) | 187 | if (!tag || (tag & (1UL << TSB_TAG_LOCK_BIT))) |
188 | continue; | 188 | continue; |
189 | 189 | ||
190 | /* We only put base page size PTEs into the TSB, | 190 | /* We only put base page size PTEs into the TSB, |
diff --git a/include/asm-sparc64/tsb.h b/include/asm-sparc64/tsb.h index 1f93b7d8cdbc..09ab3aaa8d20 100644 --- a/include/asm-sparc64/tsb.h +++ b/include/asm-sparc64/tsb.h | |||
@@ -47,13 +47,14 @@ | |||
47 | * possible solution is to use RCU for the freeing of the TSB. | 47 | * possible solution is to use RCU for the freeing of the TSB. |
48 | */ | 48 | */ |
49 | 49 | ||
50 | #define TSB_TAG_LOCK (1 << (47 - 32)) | 50 | #define TSB_TAG_LOCK_BIT 47 |
51 | #define TSB_TAG_LOCK_HIGH (1 << (TSB_TAG_LOCK_BIT - 32)) | ||
51 | 52 | ||
52 | #define TSB_MEMBAR membar #StoreStore | 53 | #define TSB_MEMBAR membar #StoreStore |
53 | 54 | ||
54 | #define TSB_LOCK_TAG(TSB, REG1, REG2) \ | 55 | #define TSB_LOCK_TAG(TSB, REG1, REG2) \ |
55 | 99: lduwa [TSB] ASI_N, REG1; \ | 56 | 99: lduwa [TSB] ASI_N, REG1; \ |
56 | sethi %hi(TSB_TAG_LOCK), REG2;\ | 57 | sethi %hi(TSB_TAG_LOCK_HIGH), REG2;\ |
57 | andcc REG1, REG2, %g0; \ | 58 | andcc REG1, REG2, %g0; \ |
58 | bne,pn %icc, 99b; \ | 59 | bne,pn %icc, 99b; \ |
59 | nop; \ | 60 | nop; \ |