summaryrefslogtreecommitdiff
path: root/sys/arch/octeon
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2017-08-26 13:53:47 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2017-08-26 13:53:47 +0000
commitcc73752fcb0b6a75e545d75b31b83111691ffa4f (patch)
treeb49f409a1012c8af960e76743fc7a983d6d5428f /sys/arch/octeon
parent17ba9d3b1c5091b8beda8c168a3a100586d3e89e (diff)
Use macros for Config1 bits.
Diffstat (limited to 'sys/arch/octeon')
-rw-r--r--sys/arch/octeon/octeon/machdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c
index d081b7e710a..933152eb662 100644
--- a/sys/arch/octeon/octeon/machdep.c
+++ b/sys/arch/octeon/octeon/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.97 2017/07/31 14:53:56 visa Exp $ */
+/* $OpenBSD: machdep.c,v 1.98 2017/08/26 13:53:46 visa Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -350,7 +350,8 @@ mips_init(register_t a0, register_t a1, register_t a2, register_t a3)
bootcpu_hwinfo.type = (prid >> 8) & 0xff;
bootcpu_hwinfo.c1prid = 0; /* No FPU */
- bootcpu_hwinfo.tlbsize = 1 + ((cp0_get_config_1() >> 25) & 0x3f);
+ bootcpu_hwinfo.tlbsize = 1 + ((cp0_get_config_1() & CONFIG1_MMUSize1)
+ >> CONFIG1_MMUSize1_SHIFT);
if (cp0_get_config_3() & CONFIG3_M) {
config4 = cp0_get_config_4();
if (((config4 & CONFIG4_MMUExtDef) >>