From 298309a2f694c05ed7eae99df69f305d450753d5 Mon Sep 17 00:00:00 2001 From: Visa Hankala Date: Mon, 31 Jul 2017 14:53:57 +0000 Subject: Replace OCTEON_MAXCPUS with MAXCPUS to avoid redundancy. --- sys/arch/octeon/dev/mainbus.c | 4 ++-- sys/arch/octeon/include/octeonvar.h | 4 +--- sys/arch/octeon/octeon/machdep.c | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'sys') diff --git a/sys/arch/octeon/dev/mainbus.c b/sys/arch/octeon/dev/mainbus.c index 274cf054cc6..76616ce9991 100644 --- a/sys/arch/octeon/dev/mainbus.c +++ b/sys/arch/octeon/dev/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.9 2017/07/03 08:17:20 visa Exp $ */ +/* $OpenBSD: mainbus.c,v 1.10 2017/07/31 14:53:56 visa Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -73,7 +73,7 @@ mainbus_attach(struct device *parent, struct device *self, void *aux) config_found(self, &caa, mainbus_print); #ifdef MULTIPROCESSOR - for (cpuid = 1; cpuid < OCTEON_MAXCPUS && + for (cpuid = 1; cpuid < MAXCPUS && octeon_boot_info->core_mask & (1 << cpuid); cpuid++) { bcopy(&bootcpu_hwinfo, &hw, sizeof(struct cpu_hwinfo)); caa.caa_hw = &hw; diff --git a/sys/arch/octeon/include/octeonvar.h b/sys/arch/octeon/include/octeonvar.h index 3811ad68bb7..b7898fe87a6 100644 --- a/sys/arch/octeon/include/octeonvar.h +++ b/sys/arch/octeon/include/octeonvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: octeonvar.h,v 1.36 2017/07/30 16:08:09 visa Exp $ */ +/* $OpenBSD: octeonvar.h,v 1.37 2017/07/31 14:53:56 visa Exp $ */ /* $NetBSD: maltavar.h,v 1.3 2002/03/18 10:10:16 simonb Exp $ */ /*- @@ -189,8 +189,6 @@ struct octeon_fau_map { #if defined(_KERNEL) || defined(_STANDALONE) #define OCTEON_ARGV_MAX 64 -#define OCTEON_MAXCPUS 16 - struct boot_desc { uint32_t desc_ver; uint32_t desc_size; diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c index f25fae4fdb1..d081b7e710a 100644 --- a/sys/arch/octeon/octeon/machdep.c +++ b/sys/arch/octeon/octeon/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.96 2017/07/03 08:17:20 visa Exp $ */ +/* $OpenBSD: machdep.c,v 1.97 2017/07/31 14:53:56 visa Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -665,7 +665,7 @@ get_ncpusfound(void) uint64_t core_mask = octeon_boot_desc->core_mask; uint64_t i, m, ncpus = 0; - for (i = 0, m = 1 ; i < OCTEON_MAXCPUS; i++, m <<= 1) + for (i = 0, m = 1 ; i < MAXCPUS; i++, m <<= 1) if (core_mask & m) ncpus++; -- cgit v1.2.3