From: kettenis Date: Sat, 11 Aug 2018 10:42:42 +0000 (+0000) Subject: Use MAXCPUS as the number of elements for the array of per-cpu data. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=aca8cde2a4430d14e1cbfb1c2f1854f68fd220d5;p=openbsd Use MAXCPUS as the number of elements for the array of per-cpu data. ok jsg@, patrick@ --- diff --git a/sys/arch/arm/cortex/agtimer.c b/sys/arch/arm/cortex/agtimer.c index 8d622c058a4..132036f55a3 100644 --- a/sys/arch/arm/cortex/agtimer.c +++ b/sys/arch/arm/cortex/agtimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agtimer.c,v 1.8 2016/09/24 13:03:47 kettenis Exp $ */ +/* $OpenBSD: agtimer.c,v 1.9 2018/08/11 10:42:42 kettenis Exp $ */ /* * Copyright (c) 2011 Dale Rahn * Copyright (c) 2013 Patrick Wildt @@ -49,8 +49,6 @@ static struct timecounter agtimer_timecounter = { agtimer_get_timecount, NULL, 0x7fffffff, 0, "agtimer", 0, NULL }; -#define MAX_ARM_CPUS 8 - struct agtimer_pcpu_softc { uint64_t pc_nexttickevent; uint64_t pc_nextstatevent; @@ -61,7 +59,7 @@ struct agtimer_softc { struct device sc_dev; int sc_node; - struct agtimer_pcpu_softc sc_pstat[MAX_ARM_CPUS]; + struct agtimer_pcpu_softc sc_pstat[MAXCPUS]; u_int32_t sc_ticks_err_cnt; u_int32_t sc_ticks_per_second;