Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Feb 2013 03:12:03 +0000 (19:12 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Feb 2013 03:12:03 +0000 (19:12 -0800)
Pull two x86 kernel build changes from Ingo Molnar:
 "The first change modifies how 'make oldconfig' works on cross-bitness
  situations on x86.  It was felt the new behavior of preserving the
  bitness of the .config is more logical.  This is a leftover of the
  merge.

  The second change eliminates a Perl warning.  (There's another, more
  complete fix resulting of this warning fix, which second fix in flight
  to you via the kbuild tree, which will remove the timeconst.pl script
  altogether.)"

* 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timeconst.pl: Eliminate Perl warning
  x86: Default to ARCH=x86 to avoid overriding CONFIG_64BIT

1  2 
Makefile
arch/x86/Kconfig
arch/x86/Makefile

diff --combined Makefile
+++ b/Makefile
@@@ -1,8 -1,8 +1,8 @@@
  VERSION = 3
 -PATCHLEVEL = 7
 +PATCHLEVEL = 8
  SUBLEVEL = 0
  EXTRAVERSION =
 -NAME = Terrified Chipmunk
 +NAME = Unicycling Gorilla
  
  # *DOCUMENTATION*
  # To see a list of typical targets execute "make help"
@@@ -124,7 -124,7 +124,7 @@@ $(if $(KBUILD_OUTPUT),, 
  PHONY += $(MAKECMDGOALS) sub-make
  
  $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
 -      $(Q)@:
 +      @:
  
  sub-make: FORCE
        $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
@@@ -165,11 -165,12 +165,12 @@@ export srctree objtree VPAT
  # then ARCH is assigned, getting whatever value it gets normally, and 
  # SUBARCH is subsequently ignored.
  
- SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
+ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
+                                 -e s/sun4u/sparc64/ \
                                  -e s/arm.*/arm/ -e s/sa110/arm/ \
                                  -e s/s390x/s390/ -e s/parisc64/parisc/ \
                                  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
 -                                -e s/sh[234].*/sh/ )
 +                                -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ )
  
  # Cross compiling and selecting different set of gcc/bin-utils
  # ---------------------------------------------------------------------------
@@@ -981,12 -982,6 +982,12 @@@ _modinst_post: _modinst
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modinst
        $(call cmd,depmod)
  
 +ifeq ($(CONFIG_MODULE_SIG), y)
 +PHONY += modules_sign
 +modules_sign:
 +      $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modsign
 +endif
 +
  else # CONFIG_MODULES
  
  # Modules not configured
@@@ -1027,14 -1022,11 +1028,14 @@@ clean: rm-dirs  := $(CLEAN_DIRS
  clean: rm-files := $(CLEAN_FILES)
  clean-dirs      := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples)
  
 -PHONY += $(clean-dirs) clean archclean
 +PHONY += $(clean-dirs) clean archclean vmlinuxclean
  $(clean-dirs):
        $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
  
 -clean: archclean
 +vmlinuxclean:
 +      $(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
 +
 +clean: archclean vmlinuxclean
  
  # mrproper - Delete all generated files, including .config
  #
@@@ -1261,6 -1253,7 +1262,6 @@@ scripts: 
  endif # KBUILD_EXTMOD
  
  clean: $(clean-dirs)
 -      $(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
        $(call cmd,rmdirs)
        $(call cmd,rmfiles)
        @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
diff --combined arch/x86/Kconfig
@@@ -1,7 -1,7 +1,7 @@@
  # Select 32 or 64 bit
  config 64BIT
        bool "64-bit kernel" if ARCH = "x86"
-       default ARCH = "x86_64"
+       default ARCH != "i386"
        ---help---
          Say yes to build a 64-bit kernel - formerly known as x86_64
          Say no to build a 32-bit kernel - formerly known as i386
@@@ -22,12 -22,11 +22,12 @@@ config X8
        def_bool y
        select HAVE_AOUT if X86_32
        select HAVE_UNSTABLE_SCHED_CLOCK
 +      select ARCH_SUPPORTS_NUMA_BALANCING
 +      select ARCH_WANTS_PROT_NUMA_PROT_NONE
        select HAVE_IDE
        select HAVE_OPROFILE
        select HAVE_PCSPKR_PLATFORM
        select HAVE_PERF_EVENTS
 -      select HAVE_IRQ_WORK
        select HAVE_IOREMAP_PROT
        select HAVE_KPROBES
        select HAVE_MEMBLOCK
        select HAVE_DMA_CONTIGUOUS if !SWIOTLB
        select HAVE_KRETPROBES
        select HAVE_OPTPROBES
 +      select HAVE_KPROBES_ON_FTRACE
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_FENTRY if X86_64
        select HAVE_C_RECORDMCOUNT
        select HAVE_DYNAMIC_FTRACE
 +      select HAVE_DYNAMIC_FTRACE_WITH_REGS
        select HAVE_FUNCTION_TRACER
        select HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_FUNCTION_GRAPH_FP_TEST
@@@ -72,8 -69,8 +72,8 @@@
        select HAVE_PERF_USER_STACK_DUMP
        select HAVE_DEBUG_KMEMLEAK
        select ANON_INODES
 -      select HAVE_ALIGNED_STRUCT_PAGE if SLUB && !M386
 -      select HAVE_CMPXCHG_LOCAL if !M386
 +      select HAVE_ALIGNED_STRUCT_PAGE if SLUB
 +      select HAVE_CMPXCHG_LOCAL
        select HAVE_CMPXCHG_DOUBLE
        select HAVE_ARCH_KMEMCHECK
        select HAVE_USER_RETURN_NOTIFIER
        select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC)
        select GENERIC_TIME_VSYSCALL if X86_64
        select KTIME_SCALAR if X86_32
 +      select ALWAYS_USE_PERSISTENT_CLOCK
        select GENERIC_STRNCPY_FROM_USER
        select GENERIC_STRNLEN_USER
 -      select HAVE_RCU_USER_QS if X86_64
 +      select HAVE_CONTEXT_TRACKING if X86_64
        select HAVE_IRQ_TIME_ACCOUNTING
 -      select GENERIC_KERNEL_THREAD
 -      select GENERIC_KERNEL_EXECVE
        select MODULES_USE_ELF_REL if X86_32
        select MODULES_USE_ELF_RELA if X86_64
 +      select CLONE_BACKWARDS if X86_32
 +      select GENERIC_SIGALTSTACK
 +      select ARCH_USE_BUILTIN_BSWAP
  
  config INSTRUCTION_DECODER
        def_bool y
@@@ -176,8 -171,13 +176,8 @@@ config ARCH_MAY_HAVE_PC_FD
        def_bool y
        depends on ISA_DMA_API
  
 -config RWSEM_GENERIC_SPINLOCK
 -      def_bool y
 -      depends on !X86_XADD
 -
  config RWSEM_XCHGADD_ALGORITHM
        def_bool y
 -      depends on X86_XADD
  
  config GENERIC_CALIBRATE_DELAY
        def_bool y
@@@ -310,7 -310,7 +310,7 @@@ config X86_X2API
          If you don't know what to do here, say N.
  
  config X86_MPPARSE
 -      bool "Enable MPS table" if ACPI
 +      bool "Enable MPS table" if ACPI || SFI
        default y
        depends on X86_LOCAL_APIC
        ---help---
@@@ -374,7 -374,6 +374,7 @@@ config X86_NUMACHI
        depends on NUMA
        depends on SMP
        depends on X86_X2APIC
 +      depends on PCI_MMCONFIG
        ---help---
          Adds support for Numascale NumaChip large-SMP systems. Needed to
          enable more than ~168 cores.
@@@ -1101,7 -1100,7 +1101,7 @@@ config HIGHMEM4
  
  config HIGHMEM64G
        bool "64GB"
 -      depends on !M386 && !M486
 +      depends on !M486
        select X86_PAE
        ---help---
          Select this if you have a 32-bit processor and more than 4
@@@ -1699,50 -1698,6 +1699,50 @@@ config HOTPLUG_CP
            automatically on SMP systems. )
          Say N if you want to disable CPU hotplug.
  
 +config BOOTPARAM_HOTPLUG_CPU0
 +      bool "Set default setting of cpu0_hotpluggable"
 +      default n
 +      depends on HOTPLUG_CPU && EXPERIMENTAL
 +      ---help---
 +        Set whether default state of cpu0_hotpluggable is on or off.
 +
 +        Say Y here to enable CPU0 hotplug by default. If this switch
 +        is turned on, there is no need to give cpu0_hotplug kernel
 +        parameter and the CPU0 hotplug feature is enabled by default.
 +
 +        Please note: there are two known CPU0 dependencies if you want
 +        to enable the CPU0 hotplug feature either by this switch or by
 +        cpu0_hotplug kernel parameter.
 +
 +        First, resume from hibernate or suspend always starts from CPU0.
 +        So hibernate and suspend are prevented if CPU0 is offline.
 +
 +        Second dependency is PIC interrupts always go to CPU0. CPU0 can not
 +        offline if any interrupt can not migrate out of CPU0. There may
 +        be other CPU0 dependencies.
 +
 +        Please make sure the dependencies are under your control before
 +        you enable this feature.
 +
 +        Say N if you don't want to enable CPU0 hotplug feature by default.
 +        You still can enable the CPU0 hotplug feature at boot by kernel
 +        parameter cpu0_hotplug.
 +
 +config DEBUG_HOTPLUG_CPU0
 +      def_bool n
 +      prompt "Debug CPU0 hotplug"
 +      depends on HOTPLUG_CPU && EXPERIMENTAL
 +      ---help---
 +        Enabling this option offlines CPU0 (if CPU0 can be offlined) as
 +        soon as possible and boots up userspace with CPU0 offlined. User
 +        can online CPU0 back after boot time.
 +
 +        To debug CPU0 hotplug, you need to enable CPU0 offline/online
 +        feature by either turning on CONFIG_BOOTPARAM_HOTPLUG_CPU0 during
 +        compilation or giving cpu0_hotplug kernel parameter at boot.
 +
 +        If unsure, say N.
 +
  config COMPAT_VDSO
        def_bool y
        prompt "Compat VDSO support"
@@@ -2141,7 -2096,6 +2141,7 @@@ config OLPC_XO1_RT
  config OLPC_XO1_SCI
        bool "OLPC XO-1 SCI extras"
        depends on OLPC && OLPC_XO1_PM
 +      depends on INPUT=y
        select POWER_SUPPLY
        select GPIO_CS5535
        select MFD_CORE
diff --combined arch/x86/Makefile
@@@ -2,7 -2,11 +2,11 @@@
  
  # select defconfig based on actual architecture
  ifeq ($(ARCH),x86)
+   ifeq ($(shell uname -m),x86_64)
+         KBUILD_DEFCONFIG := x86_64_defconfig
+   else
          KBUILD_DEFCONFIG := i386_defconfig
+   endif
  else
          KBUILD_DEFCONFIG := $(ARCH)_defconfig
  endif
@@@ -123,10 -127,9 +127,10 @@@ cfi-sections := $(call as-instr,.cfi_se
  # does binutils support specific instructions?
  asinstr := $(call as-instr,fxsaveq (%rax),-DCONFIG_AS_FXSAVEQ=1)
  avx_instr := $(call as-instr,vxorps %ymm0$(comma)%ymm1$(comma)%ymm2,-DCONFIG_AS_AVX=1)
 +avx2_instr :=$(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFIG_AS_AVX2=1)
  
 -KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr)
 -KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr)
 +KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr)
 +KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr)
  
  LDFLAGS := -m elf_$(UTS_MACHINE)