From owner-svn-src-stable@freebsd.org Fri Sep 9 19:57:34 2016 Return-Path: Delivered-To: svn-src-stable@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 8862ABD4D54; Fri, 9 Sep 2016 19:57:34 +0000 (UTC) (envelope-from jhb@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 6129439C; Fri, 9 Sep 2016 19:57:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u89JvXw3044402; Fri, 9 Sep 2016 19:57:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u89JvX07044398; Fri, 9 Sep 2016 19:57:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201609091957.u89JvX07044398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 9 Sep 2016 19:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r305672 - in stable: 10/sys/amd64/include 10/sys/i386/include 10/sys/x86/x86 10/sys/x86/xen 11/sys/amd64/include 11/sys/i386/include 11/sys/x86/x86 11/sys/x86/xen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2016 19:57:34 -0000 Author: jhb Date: Fri Sep 9 19:57:32 2016 New Revision: 305672 URL: https://svnweb.freebsd.org/changeset/base/305672 Log: MFC 304637: Fix build for !SMP kernels after the Xen MSIX workaround. Move msix_disable_migration under #ifdef SMP since it doesn't make sense for !SMP kernels. PR: 212014 Modified: stable/11/sys/amd64/include/intr_machdep.h stable/11/sys/i386/include/intr_machdep.h stable/11/sys/x86/x86/msi.c stable/11/sys/x86/xen/hvm.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/amd64/include/intr_machdep.h stable/10/sys/i386/include/intr_machdep.h stable/10/sys/x86/x86/msi.c stable/10/sys/x86/xen/hvm.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/amd64/include/intr_machdep.h ============================================================================== --- stable/11/sys/amd64/include/intr_machdep.h Fri Sep 9 19:13:02 2016 (r305671) +++ stable/11/sys/amd64/include/intr_machdep.h Fri Sep 9 19:57:32 2016 (r305672) @@ -148,8 +148,9 @@ extern cpuset_t intr_cpus; #endif extern struct mtx icu_lock; extern int elcr_found; - +#ifdef SMP extern int msix_disable_migration; +#endif #ifndef DEV_ATPIC void atpic_reset(void); Modified: stable/11/sys/i386/include/intr_machdep.h ============================================================================== --- stable/11/sys/i386/include/intr_machdep.h Fri Sep 9 19:13:02 2016 (r305671) +++ stable/11/sys/i386/include/intr_machdep.h Fri Sep 9 19:57:32 2016 (r305672) @@ -139,8 +139,9 @@ extern cpuset_t intr_cpus; #endif extern struct mtx icu_lock; extern int elcr_found; - +#ifdef SMP extern int msix_disable_migration; +#endif #ifndef DEV_ATPIC void atpic_reset(void); Modified: stable/11/sys/x86/x86/msi.c ============================================================================== --- stable/11/sys/x86/x86/msi.c Fri Sep 9 19:13:02 2016 (r305671) +++ stable/11/sys/x86/x86/msi.c Fri Sep 9 19:57:32 2016 (r305672) @@ -149,6 +149,7 @@ struct pic msi_pic = { .pic_reprogram_pin = NULL, }; +#ifdef SMP /** * Xen hypervisors prior to 4.6.0 do not properly handle updates to * enabled MSI-X table entries. Allow migration of MSI-X interrupts @@ -162,6 +163,7 @@ int msix_disable_migration = -1; SYSCTL_INT(_machdep, OID_AUTO, disable_msix_migration, CTLFLAG_RDTUN, &msix_disable_migration, 0, "Disable migration of MSI-X interrupts between CPUs"); +#endif static int msi_enabled; static int msi_last_irq; @@ -241,8 +243,10 @@ msi_assign_cpu(struct intsrc *isrc, u_in if (msi->msi_first != msi) return (EINVAL); +#ifdef SMP if (msix_disable_migration && msi->msi_msix) return (EINVAL); +#endif /* Store information to free existing irq. */ old_vector = msi->msi_vector; @@ -316,10 +320,12 @@ msi_init(void) return; } +#ifdef SMP if (msix_disable_migration == -1) { /* The default is to allow migration of MSI-X interrupts. */ msix_disable_migration = 0; } +#endif msi_enabled = 1; intr_register_pic(&msi_pic); Modified: stable/11/sys/x86/xen/hvm.c ============================================================================== --- stable/11/sys/x86/xen/hvm.c Fri Sep 9 19:13:02 2016 (r305671) +++ stable/11/sys/x86/xen/hvm.c Fri Sep 9 19:57:32 2016 (r305672) @@ -143,6 +143,7 @@ xen_hvm_init_hypercall_stubs(enum xen_hv printf("XEN: Hypervisor version %d.%d detected.\n", major, minor); +#ifdef SMP if (((major < 4) || (major == 4 && minor <= 5)) && msix_disable_migration == -1) { /* @@ -157,6 +158,7 @@ xen_hvm_init_hypercall_stubs(enum xen_hv "Set machdep.msix_disable_migration=0 to forcefully enable it.\n"); msix_disable_migration = 1; } +#endif } /*