From b7cfb05eb3bac4345e56dfcc0d7a87bad14f7619 Mon Sep 17 00:00:00 2001 From: miod Date: Mon, 2 Jan 2023 19:09:17 +0000 Subject: [PATCH] Fix the check for the BWX extension introduced in 1.92. This repairs operation on 21164 processors (not 21164A!) which lack BWX. Reported by Mark Butt on alpha@ --- sys/arch/alpha/alpha/machdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index 9bdb9337518..cbb9abb34e7 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.199 2022/10/30 17:43:39 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.200 2023/01/02 19:09:17 miod Exp $ */ /* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */ /*- @@ -402,7 +402,7 @@ nobootinfo: * read-only eventually (although this is not the case at the moment). */ if (alpha_implver() >= ALPHA_IMPLVER_EV5) { - if (~alpha_amask(ALPHA_AMASK_BWX) != 0) { + if ((~alpha_amask(ALPHA_AMASK_BWX) & ALPHA_AMASK_BWX) != 0) { extern vaddr_t __bwx_switch0, __bwx_switch1, __bwx_switch2, __bwx_switch3; u_int32_t *dst, *src, *end; -- 2.20.1