Author: kib
Date: Fri Feb 17 22:49:52 2017
New Revision: 313902
URL: https://svnweb.freebsd.org/changeset/base/313902

Log:
  smp_rendezvous() works for UP case as well, reduce duplicated
  code.  Also fix cast and remove unneeded XXX in comment.
  
  Noted and reviewed by: jhb
  Sponsored by: The FreeBSD Foundation
  MFC after:    2 weeks
  Differential revision:        https://reviews.freebsd.org/D9657

Modified:
  head/sys/x86/x86/x86_mem.c

Modified: head/sys/x86/x86/x86_mem.c
==============================================================================
--- head/sys/x86/x86/x86_mem.c  Fri Feb 17 22:09:55 2017        (r313901)
+++ head/sys/x86/x86/x86_mem.c  Fri Feb 17 22:49:52 2017        (r313902)
@@ -303,19 +303,13 @@ x86_mrt2mtrr(int flags, int oldval)
  * Update running CPU(s) MTRRs to match the ranges in the descriptor
  * list.
  *
- * XXX Must be called with interrupts enabled.
+ * Must be called with interrupts enabled.
  */
 static void
 x86_mrstore(struct mem_range_softc *sc)
 {
 
-#ifdef SMP
        smp_rendezvous(NULL, x86_mrstoreone, NULL, sc);
-#else
-       disable_intr();                         /* disable interrupts */
-       x86_mrstoreone(sc);
-       enable_intr();
-#endif
 }
 
 /*
@@ -710,19 +704,13 @@ x86_mrAPinit(struct mem_range_softc *sc)
  * Re-initialise running CPU(s) MTRRs to match the ranges in the descriptor
  * list.
  *
- * XXX Must be called with interrupts enabled.
+ * Must be called with interrupts enabled.
  */
 static void
 x86_mrreinit(struct mem_range_softc *sc)
 {
 
-#ifdef SMP
-       smp_rendezvous(NULL, (void *)x86_mrAPinit, NULL, sc);
-#else
-       disable_intr();                         /* disable interrupts */
-       x86_mrAPinit(sc);
-       enable_intr();
-#endif
+       smp_rendezvous(NULL, (void (*)(void *))x86_mrAPinit, NULL, sc);
 }
 
 static void
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to