summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-02-27 00:27:05 +0000
committerjake <jake@FreeBSD.org>2002-02-27 00:27:05 +0000
commite3f3464752dad615ef648787ad025890351a5589 (patch)
treea868ec508c8df8734be42236927a6003ee7d7ec1
parentaec950ed91b8b8213beef80d37b79183490697d3 (diff)
downloadFreeBSD-src-e3f3464752dad615ef648787ad025890351a5589.zip
FreeBSD-src-e3f3464752dad615ef648787ad025890351a5589.tar.gz
Use pcpu.pc_cpumask instead of computing 1 << cpuid.
-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 09dc4bd..22fa7f7 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 c69d153..731d586 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 c69d153..731d586 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]
OpenPOWER on IntegriCloud