From owner-svn-src-head@freebsd.org Fri Feb 17 22:49:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7572ECE29A6; Fri, 17 Feb 2017 22:49:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 353191CAF; Fri, 17 Feb 2017 22:49:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HMnqD6053821; Fri, 17 Feb 2017 22:49:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HMnquY053820; Fri, 17 Feb 2017 22:49:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702172249.v1HMnquY053820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 17 Feb 2017 22:49:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313902 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 22:49:53 -0000 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