]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
[SPARC64]: Fix incorrect TSB lock bit handling.
authorDavid S. Miller <davem@davemloft.net>
Wed, 1 Feb 2006 02:32:44 +0000 (18:32 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 20 Mar 2006 09:11:21 +0000 (01:11 -0800)
The TSB_LOCK_BIT define is actually a special
value shifted down by 32-bits for the assembler
code macros.

In C code, this isn't what we want.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/mm/tsb.c
include/asm-sparc64/tsb.h

index 707af4b84a0ec14b9680201f17348cfa449a0ef9..e605478217c273717df7e3750ccdad140704732b 100644 (file)
@@ -184,7 +184,7 @@ static void copy_tsb(struct tsb *old_tsb, unsigned long old_size,
                        : "=r" (tag), "=r" (pte)
                        : "r" (&old_tsb[i]), "i" (ASI_NUCLEUS_QUAD_LDD));
 
-               if (!tag || (tag & TSB_TAG_LOCK))
+               if (!tag || (tag & (1UL << TSB_TAG_LOCK_BIT)))
                        continue;
 
                /* We only put base page size PTEs into the TSB,
index 1f93b7d8cdbc023b000aa21e71fe44deb6d995c9..09ab3aaa8d20049b6b8580db18b8496a9479cc74 100644 (file)
  * possible solution is to use RCU for the freeing of the TSB.
  */
 
-#define TSB_TAG_LOCK   (1 << (47 - 32))
+#define TSB_TAG_LOCK_BIT       47
+#define TSB_TAG_LOCK_HIGH      (1 << (TSB_TAG_LOCK_BIT - 32))
 
 #define TSB_MEMBAR     membar  #StoreStore
 
 #define TSB_LOCK_TAG(TSB, REG1, REG2)  \
 99:    lduwa   [TSB] ASI_N, REG1;      \
-       sethi   %hi(TSB_TAG_LOCK), REG2;\
+       sethi   %hi(TSB_TAG_LOCK_HIGH), REG2;\
        andcc   REG1, REG2, %g0;        \
        bne,pn  %icc, 99b;              \
         nop;                           \