Date: Fri, 17 Feb 2017 22:49:52 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313902 - head/sys/x86/x86 Message-ID: <201702172249.v1HMnquY053820@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702172249.v1HMnquY053820>