aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2019-11-22 23:23:40 +0000
committerConrad Meyer <cem@FreeBSD.org>2019-11-22 23:23:40 +0000
commit7993a104a10c81e4049e5923061d9bb7a5e35d80 (patch)
tree916e6db16a17e1940a3a6987453a18a8a7255964 /sys/net/if.c
parentbae3729be460e4857213505c067b0a5bba483a23 (diff)
downloadsrc-7993a104a10c81e4049e5923061d9bb7a5e35d80.tar.gz
src-7993a104a10c81e4049e5923061d9bb7a5e35d80.zip
Add explicit SI_SUB_EPOCH
Add explicit SI_SUB_EPOCH, after SI_SUB_TASKQ and before SI_SUB_SMP (EARLY_AP_STARTUP). Rename existing "SI_SUB_TASKQ + 1" to SI_SUB_EPOCH. epoch(9) consumers cannot epoch_alloc() before SI_SUB_EPOCH:SI_ORDER_SECOND, but likely should allocate before SI_SUB_SMP. Prior to this change, consumers (well, epoch itself, and net/if.c) just open-coded the SI_SUB_TASKQ + 1 order to match epoch.c, but this was fragile. Reviewed by: mmacy Differential Revision: https://reviews.freebsd.org/D22503
Notes
Notes: svn path=/head/; revision=355024
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 9128a048b91b..aaff4c6e2bf1 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -933,8 +933,7 @@ if_epochalloc(void *dummy __unused)
net_epoch_preempt = epoch_alloc("Net preemptible", EPOCH_PREEMPT);
net_epoch = epoch_alloc("Net", 0);
}
-SYSINIT(ifepochalloc, SI_SUB_TASKQ + 1, SI_ORDER_ANY,
- if_epochalloc, NULL);
+SYSINIT(ifepochalloc, SI_SUB_EPOCH, SI_ORDER_ANY, if_epochalloc, NULL);
static void
if_attachdomain(void *dummy)