summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-07-27 11:59:57 +0000
committerrwatson <rwatson@FreeBSD.org>2007-07-27 11:59:57 +0000
commitc29e74320ba2271247571fc5ac01363963dcf016 (patch)
tree1d0bccf3909d0a0064cfcd777f148f0f6b272555 /sys/net/if.c
parent16ad7cce99fdefc348a2c705afbcdccf1057386f (diff)
downloadFreeBSD-src-c29e74320ba2271247571fc5ac01363963dcf016.zip
FreeBSD-src-c29e74320ba2271247571fc5ac01363963dcf016.tar.gz
First in a series of changes to remove the now-unused Giant compatibility
framework for non-MPSAFE network protocols: - Remove debug_mpsafenet variable, sysctl, and tunable. - Remove NET_NEEDS_GIANT() and associate SYSINITSs used by it to force debug.mpsafenet=0 if non-MPSAFE protocols are compiled into the kernel. - Remove logic to automatically flag interrupt handlers as non-MPSAFE if debug.mpsafenet is set for an INTR_TYPE_NET handler. - Remove logic to automatically flag netisr handlers as non-MPSAFE if debug.mpsafenet is set. - Remove references in a few subsystems, including NFS and Cronyx drivers, which keyed off debug_mpsafenet to determine various aspects of their own locking behavior. - Convert NET_LOCK_GIANT(), NET_UNLOCK_GIANT(), and NET_ASSERT_GIANT into no-op's, as their entire behavior was determined by the value in debug_mpsafenet. - Alias NET_CALLOUT_MPSAFE to CALLOUT_MPSAFE. Many remaining references to NET_.*_GIANT() and NET_CALLOUT_MPSAFE are still present in subsystems, and will be removed in followup commits. Reviewed by: bz, jhb Approved by: re (kensmith)
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 8716d0f..0b602bc 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -2694,9 +2694,7 @@ void
if_start(struct ifnet *ifp)
{
- NET_ASSERT_GIANT();
-
- if ((ifp->if_flags & IFF_NEEDSGIANT) != 0 && debug_mpsafenet != 0) {
+ if (ifp->if_flags & IFF_NEEDSGIANT) {
if (mtx_owned(&Giant))
(*(ifp)->if_start)(ifp);
else
@@ -2711,11 +2709,6 @@ if_start_deferred(void *context, int pending)
{
struct ifnet *ifp;
- /*
- * This code must be entered with Giant, and should never run if
- * we're not running with debug.mpsafenet.
- */
- KASSERT(debug_mpsafenet != 0, ("if_start_deferred: debug.mpsafenet"));
GIANT_REQUIRED;
ifp = context;
OpenPOWER on IntegriCloud