diff options
author | 2017-12-11 00:15:50 +0000 | |
---|---|---|
committer | 2017-12-11 00:15:50 +0000 | |
commit | db71f12fccea4764e685f2b42196406cefbc7826 (patch) | |
tree | c1e3c6416fab2a3002785f8720464529c3576a7d | |
parent | more 0xcc, in data. There are i386 machines without NX, so this change (diff) | |
download | wireguard-openbsd-db71f12fccea4764e685f2b42196406cefbc7826.tar.xz wireguard-openbsd-db71f12fccea4764e685f2b42196406cefbc7826.zip |
Use correct mask to derive portid from "reg" property in cpu_match.
Use cpu_myid() since it makes the coe more obvious.
-rw-r--r-- | sys/arch/sparc64/sparc64/cpu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc64/sparc64/cpu.c b/sys/arch/sparc64/sparc64/cpu.c index 3d10bd1d241..88b75412ded 100644 --- a/sys/arch/sparc64/sparc64/cpu.c +++ b/sys/arch/sparc64/sparc64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.68 2017/12/08 19:05:33 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.69 2017/12/11 00:15:50 kettenis Exp $ */ /* $NetBSD: cpu.c,v 1.13 2001/05/26 21:27:15 chs Exp $ */ /* @@ -212,11 +212,11 @@ cpu_match(struct device *parent, void *match, void *aux) if (portid == -1) portid = getpropint(ma->ma_node, "cpuid", -1); if (portid == -1 && ma->ma_nreg > 0) - portid = (ma->ma_reg[0].ur_paddr >> 32) & 0xff; + portid = (ma->ma_reg[0].ur_paddr >> 32) & 0x0fffffff; if (portid == -1) return (0); - if (ncpus < MAXCPUS || portid == cpus->ci_upaid) + if (ncpus < MAXCPUS || portid == cpu_myid()) return (1); return (0); |