summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_percpu.c26
-rw-r--r--sys/kern/uipc_mbuf.c4
-rw-r--r--sys/net/route.c4
-rw-r--r--sys/netinet/igmp.c4
-rw-r--r--sys/netinet/ip_input.c4
-rw-r--r--sys/netinet/udp_usrreq.c4
-rw-r--r--sys/netinet6/ip6_input.c4
-rw-r--r--sys/sys/percpu.h8
8 files changed, 29 insertions, 29 deletions
diff --git a/sys/kern/subr_percpu.c b/sys/kern/subr_percpu.c
index d009f646e9c..bcd4dd9bcd7 100644
--- a/sys/kern/subr_percpu.c
+++ b/sys/kern/subr_percpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_percpu.c,v 1.6 2017/01/11 17:46:28 bluhm Exp $ */
+/* $OpenBSD: subr_percpu.c,v 1.7 2017/02/05 16:23:38 jca Exp $ */
/*
* Copyright (c) 2016 David Gwynne <dlg@openbsd.org>
@@ -125,7 +125,7 @@ cpumem_next(struct cpumem_iter *i, struct cpumem *cm)
}
struct cpumem *
-counters_alloc(unsigned int n, int type)
+counters_alloc(unsigned int n)
{
struct cpumem *cm;
struct cpumem_iter cmi;
@@ -135,7 +135,7 @@ counters_alloc(unsigned int n, int type)
KASSERT(n > 0);
n++; /* add space for a generation number */
- cm = cpumem_malloc(n * sizeof(uint64_t), type);
+ cm = cpumem_malloc(n * sizeof(uint64_t), M_COUNTERS);
CPUMEM_FOREACH(counters, &cmi, cm) {
for (i = 0; i < n; i++)
@@ -146,17 +146,17 @@ counters_alloc(unsigned int n, int type)
}
struct cpumem *
-counters_alloc_ncpus(struct cpumem *cm, unsigned int n, int type)
+counters_alloc_ncpus(struct cpumem *cm, unsigned int n)
{
n++; /* the generation number */
- return (cpumem_malloc_ncpus(cm, n * sizeof(uint64_t), type));
+ return (cpumem_malloc_ncpus(cm, n * sizeof(uint64_t), M_COUNTERS));
}
void
-counters_free(struct cpumem *cm, int type, unsigned int n)
+counters_free(struct cpumem *cm, unsigned int n)
{
n++; /* generation number */
- cpumem_free(cm, type, n * sizeof(uint64_t));
+ cpumem_free(cm, M_COUNTERS, n * sizeof(uint64_t));
}
void
@@ -284,24 +284,24 @@ cpumem_next(struct cpumem_iter *i, struct cpumem *cm)
}
struct cpumem *
-counters_alloc(unsigned int n, int type)
+counters_alloc(unsigned int n)
{
KASSERT(n > 0);
- return (cpumem_malloc(n * sizeof(uint64_t), type));
+ return (cpumem_malloc(n * sizeof(uint64_t), M_COUNTERS));
}
struct cpumem *
-counters_alloc_ncpus(struct cpumem *cm, unsigned int n, int type)
+counters_alloc_ncpus(struct cpumem *cm, unsigned int n)
{
/* this is unecessary, but symmetrical */
- return (cpumem_malloc_ncpus(cm, n * sizeof(uint64_t), type));
+ return (cpumem_malloc_ncpus(cm, n * sizeof(uint64_t), M_COUNTERS));
}
void
-counters_free(struct cpumem *cm, int type, unsigned int n)
+counters_free(struct cpumem *cm, unsigned int n)
{
- cpumem_free(cm, type, n * sizeof(uint64_t));
+ cpumem_free(cm, M_COUNTERS, n * sizeof(uint64_t));
}
void
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 1c1e747f01a..2ef5c139c95 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.240 2017/01/25 09:41:45 mpi Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.241 2017/02/05 16:23:38 jca Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -186,7 +186,7 @@ mbinit(void)
void
mbcpuinit()
{
- mbstat = counters_alloc_ncpus(mbstat, MBSTAT_COUNT, M_DEVBUF);
+ mbstat = counters_alloc_ncpus(mbstat, MBSTAT_COUNT);
}
void
diff --git a/sys/net/route.c b/sys/net/route.c
index 52e7d3813de..ad621de6b69 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.349 2017/01/24 10:08:30 krw Exp $ */
+/* $OpenBSD: route.c,v 1.350 2017/02/05 16:23:38 jca Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -191,7 +191,7 @@ TAILQ_HEAD(rt_labels, rt_label) rt_labels = TAILQ_HEAD_INITIALIZER(rt_labels);
void
route_init(void)
{
- rtcounters = counters_alloc(rts_ncounters, M_COUNTERS);
+ rtcounters = counters_alloc(rts_ncounters);
pool_init(&rtentry_pool, sizeof(struct rtentry), 0, IPL_SOFTNET, 0,
"rtentry", NULL);
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
index f47e416d375..d5c8415430c 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: igmp.c,v 1.63 2017/01/31 10:24:41 jca Exp $ */
+/* $OpenBSD: igmp.c,v 1.64 2017/02/05 16:23:38 jca Exp $ */
/* $NetBSD: igmp.c,v 1.15 1996/02/13 23:41:25 christos Exp $ */
/*
@@ -118,7 +118,7 @@ igmp_init(void)
igmp_timers_are_running = 0;
rti_head = 0;
- igmpcounters = counters_alloc(igps_ncounters, M_COUNTERS);
+ igmpcounters = counters_alloc(igps_ncounters);
router_alert = m_get(M_DONTWAIT, MT_DATA);
if (router_alert == NULL) {
printf("%s: no mbuf\n", __func__);
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 5065a68e6ca..3a5990bdd76 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.294 2017/01/31 10:24:41 jca Exp $ */
+/* $OpenBSD: ip_input.c,v 1.295 2017/02/05 16:23:38 jca Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -167,7 +167,7 @@ ip_init(void)
const u_int16_t defrootonlyports_tcp[] = DEFROOTONLYPORTS_TCP;
const u_int16_t defrootonlyports_udp[] = DEFROOTONLYPORTS_UDP;
- ipcounters = counters_alloc(ips_ncounters, M_COUNTERS);
+ ipcounters = counters_alloc(ips_ncounters);
pool_init(&ipqent_pool, sizeof(struct ipqent), 0,
IPL_SOFTNET, 0, "ipqe", NULL);
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index bee1a3a86f5..4de18ddc0eb 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.230 2017/01/31 10:24:41 jca Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.231 2017/02/05 16:23:38 jca Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -143,7 +143,7 @@ int udp_sysctl_udpstat(void *, size_t *, void *);
void
udp_init(void)
{
- udpcounters = counters_alloc(udps_ncounters, M_COUNTERS);
+ udpcounters = counters_alloc(udps_ncounters);
in_pcbinit(&udbtable, UDB_INITIAL_HASH_SIZE);
}
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index f1f902107e5..d306e043c31 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.176 2017/02/05 16:04:14 jca Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.177 2017/02/05 16:23:38 jca Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -159,7 +159,7 @@ ip6_init(void)
mq_init(&ip6send_mq, 64, IPL_SOFTNET);
- ip6counters = counters_alloc(ip6s_ncounters, M_COUNTERS);
+ ip6counters = counters_alloc(ip6s_ncounters);
}
/*
diff --git a/sys/sys/percpu.h b/sys/sys/percpu.h
index 3b45b7e308d..ee4e88455b8 100644
--- a/sys/sys/percpu.h
+++ b/sys/sys/percpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: percpu.h,v 1.5 2016/12/20 12:07:14 bluhm Exp $ */
+/* $OpenBSD: percpu.h,v 1.6 2017/02/05 16:23:38 jca Exp $ */
/*
* Copyright (c) 2016 David Gwynne <dlg@openbsd.org>
@@ -110,9 +110,9 @@ static struct { \
* per cpu counters
*/
-struct cpumem *counters_alloc(unsigned int, int);
-struct cpumem *counters_alloc_ncpus(struct cpumem *, unsigned int, int);
-void counters_free(struct cpumem *, int, unsigned int);
+struct cpumem *counters_alloc(unsigned int);
+struct cpumem *counters_alloc_ncpus(struct cpumem *, unsigned int);
+void counters_free(struct cpumem *, unsigned int);
void counters_read(struct cpumem *, uint64_t *, unsigned int);
void counters_zero(struct cpumem *, unsigned int);