Bug 212014 - Unable to build non-SMP kernel since r303776
Summary: Unable to build non-SMP kernel since r303776
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.3-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: John Baldwin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-20 17:46 UTC by Glyn Grinstead
Modified: 2016-09-09 19:58 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glyn Grinstead 2016-08-20 17:46:55 UTC
Since r303776 I'm unable to build a custom kernel with "nooptions SMP" specified. The kernel conf I'm using consists of:

    include GENERIC
    nooptions SMP

make.conf is empty.

The last excerpt from the compilation is:

cc  -c -O2 -pipe -fno-strict-aliasing  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict
-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -f
format-extensions  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare
 -Wno-error-empty-body  -Wno-error-parentheses-equality -Wno-error-unused-function   -nostdinc  -I.
-I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPT
ION_HEADERS -include opt_global.h  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mn
o-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables
-ffreestanding -fstack-protector -gdwarf-2 -Werror  /usr/src/sys/x86/xen/hvm.c
/usr/src/sys/x86/xen/hvm.c:398:7: error: use of undeclared identifier 'msix_disable_migration'
                    msix_disable_migration == -1) {
                    ^
/usr/src/sys/x86/xen/hvm.c:409:4: error: use of undeclared identifier 'msix_disable_migration'
                        msix_disable_migration = 1;
                        ^
2 errors generated.
*** Error code 1
 
Stop.
 
The build above is from a system running 10.3-STABLE #0 r303775 amd64, but it appears to affect i386 with a similar configuration as well. 

The same or very similar error appears to be produced when building against both r303776 and r304519 (the last I've tested against).

I believe all relevant local changes have been rolled back, but unfortunately I'm not in a position to test a build on a completely fresh install at present. While I think I have eliminated all likely sources of user meddling, my apologies in advance if this isn't the case.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2016-08-20 20:27:50 UTC
Assign to committer of r303776.
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-08-22 21:23:28 UTC
A commit references this bug:

Author: jhb
Date: Mon Aug 22 21:23:18 UTC 2016
New revision: 304637
URL: https://svnweb.freebsd.org/changeset/base/304637

Log:
  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
  Reported by:	Glyn Grinstead <glyn@grinstead.org>
  MFC after:	3 days

Changes:
  head/sys/amd64/include/intr_machdep.h
  head/sys/i386/include/intr_machdep.h
  head/sys/x86/x86/msi.c
  head/sys/x86/xen/hvm.c
Comment 3 John Baldwin freebsd_committer freebsd_triage 2016-08-22 21:24:36 UTC
Sorry for the breakage.  Will MFC in a few days.
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-09-09 19:57:36 UTC
A commit references this bug:

Author: jhb
Date: Fri Sep  9 19:57:33 UTC 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

Changes:
_U  stable/10/
  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
_U  stable/11/
  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