aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2002-02-27 00:27:05 +0000
committerJake Burkholder <jake@FreeBSD.org>2002-02-27 00:27:05 +0000
commit9d16662aa3359693751e1b694c9cc88e0e459ac0 (patch)
treea868ec508c8df8734be42236927a6003ee7d7ec1 /sys
parent5d60dc233a8551a64fd7ba853fea452dd8ac4850 (diff)
Use pcpu.pc_cpumask instead of computing 1 << cpuid.
Notes
Notes: svn path=/head/; revision=91337
Diffstat (limited to 'sys')
-rw-r--r--sys/sparc64/sparc64/genassym.c1
-rw-r--r--sys/sparc64/sparc64/swtch.S8
-rw-r--r--sys/sparc64/sparc64/swtch.s8
3 files changed, 5 insertions, 12 deletions
diff --git a/sys/sparc64/sparc64/genassym.c b/sys/sparc64/sparc64/genassym.c
index 09dc4bd2a75a..22fa7f769819 100644
--- a/sys/sparc64/sparc64/genassym.c
+++ b/sys/sparc64/sparc64/genassym.c
@@ -146,6 +146,7 @@ ASSYM(V_INTR, offsetof(struct vmmeter, v_intr));
ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
+ASSYM(PC_CPUMASK, offsetof(struct pcpu, pc_cpumask));
ASSYM(PC_IQ, offsetof(struct pcpu, pc_iq));
ASSYM(PC_MID, offsetof(struct pcpu, pc_mid));
ASSYM(PC_SIZEOF, sizeof(struct pcpu));
diff --git a/sys/sparc64/sparc64/swtch.S b/sys/sparc64/sparc64/swtch.S
index c69d153706f5..731d586ce0f3 100644
--- a/sys/sparc64/sparc64/swtch.S
+++ b/sys/sparc64/sparc64/swtch.S
@@ -154,9 +154,7 @@ ENTRY(cpu_switch)
* Mark the pmap no longer active on this cpu.
*/
lduw [%l2 + VM_PMAP + PM_ACTIVE], %l3
- mov 1, %l4
- lduw [PCPU(CPUID)], %l5
- sllx %l4, %l5, %l4
+ lduw [PCPU(CPUMASK)], %l4
andn %l3, %l4, %l3
stw %l3, [%l2 + VM_PMAP + PM_ACTIVE]
@@ -181,9 +179,7 @@ ENTRY(cpu_switch)
* Mark the pmap as active on this cpu.
*/
lduw [%o2 + VM_PMAP + PM_ACTIVE], %o3
- mov 1, %o4
- lduw [PCPU(CPUID)], %o5
- sllx %o4, %o5, %o4
+ lduw [PCPU(CPUMASK)], %o4
or %o3, %o4, %o3
stw %o3, [%o2 + VM_PMAP + PM_ACTIVE]
diff --git a/sys/sparc64/sparc64/swtch.s b/sys/sparc64/sparc64/swtch.s
index c69d153706f5..731d586ce0f3 100644
--- a/sys/sparc64/sparc64/swtch.s
+++ b/sys/sparc64/sparc64/swtch.s
@@ -154,9 +154,7 @@ ENTRY(cpu_switch)
* Mark the pmap no longer active on this cpu.
*/
lduw [%l2 + VM_PMAP + PM_ACTIVE], %l3
- mov 1, %l4
- lduw [PCPU(CPUID)], %l5
- sllx %l4, %l5, %l4
+ lduw [PCPU(CPUMASK)], %l4
andn %l3, %l4, %l3
stw %l3, [%l2 + VM_PMAP + PM_ACTIVE]
@@ -181,9 +179,7 @@ ENTRY(cpu_switch)
* Mark the pmap as active on this cpu.
*/
lduw [%o2 + VM_PMAP + PM_ACTIVE], %o3
- mov 1, %o4
- lduw [PCPU(CPUID)], %o5
- sllx %o4, %o5, %o4
+ lduw [PCPU(CPUMASK)], %o4
or %o3, %o4, %o3
stw %o3, [%o2 + VM_PMAP + PM_ACTIVE]