From 533f3e1026c2e2ab4ddc136aafeecae024dd8e49 Mon Sep 17 00:00:00 2001
From: Bryan Drewery <bdrewery@FreeBSD.org>
Date: Tue, 30 Aug 2016 19:26:07 +0000
Subject: [PATCH] Reduce duplicated logic for !SMP

Sponsored by:	EMC / Isilon Storage Division
---
 sys/kern/subr_smp.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index 4f3b51de2765..d98b1b7212ea 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -779,15 +779,8 @@ smp_rendezvous(void (*setup_func)(void *),
 	       void *arg)
 {
 
-	/* Look comments in the smp_rendezvous_cpus() case. */
-	spinlock_enter();
-	if (setup_func != NULL)
-		setup_func(arg);
-	if (action_func != NULL)
-		action_func(arg);
-	if (teardown_func != NULL)
-		teardown_func(arg);
-	spinlock_exit();
+	smp_rendezvous_cpus(all_cpus, setup_func, action_func, teardown_func,
+	    arg);
 }
 
 /*