Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e525de3a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Misc fixes all across the map:

   - /proc/kcore vsyscall related fixes
   - LTO fix
   - build warning fix
   - CPU hotplug fix
   - Kconfig NR_CPUS cleanups
   - cpu_has() cleanups/robustification
   - .gitignore fix
   - memory-failure unmapping fix
   - UV platform fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mm, mm/hwpoison: Don't unconditionally unmap kernel 1:1 pages
  x86/error_inject: Make just_return_func() globally visible
  x86/platform/UV: Fix GAM Range Table entries less than 1GB
  x86/build: Add arch/x86/tools/insn_decoder_test to .gitignore
  x86/smpboot: Fix uncore_pci_remove() indexing bug when hot-removing a physical CPU
  x86/mm/kcore: Add vsyscall page to /proc/kcore conditionally
  vfs/proc/kcore, x86/mm/kcore: Fix SMAP fault when dumping vsyscall user page
  x86/Kconfig: Further simplify the NR_CPUS config
  x86/Kconfig: Simplify NR_CPUS config
  x86/MCE: Fix build warning introduced by "x86: do not use print_symbol()"
  x86/cpufeature: Update _static_cpu_has() to use all named variables
  x86/cpufeature: Reindent _static_cpu_has()
parents d4667ca1 fd0e786d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
boot/compressed/vmlinux
tools/test_get_len
tools/insn_sanity
tools/insn_decoder_test
purgatory/kexec-purgatory.c
purgatory/purgatory.ro
+58 −17
Original line number Diff line number Diff line
@@ -423,12 +423,6 @@ config X86_MPPARSE
	  For old smp systems that do not have proper acpi support. Newer systems
	  (esp with 64bit cpus) with acpi support, MADT and DSDT will override it

config X86_BIGSMP
	bool "Support for big SMP systems with more than 8 CPUs"
	depends on X86_32 && SMP
	---help---
	  This option is needed for the systems that have more than 8 CPUs

config GOLDFISH
       def_bool y
       depends on X86_GOLDFISH
@@ -460,6 +454,12 @@ config INTEL_RDT
	  Say N if unsure.

if X86_32
config X86_BIGSMP
	bool "Support for big SMP systems with more than 8 CPUs"
	depends on SMP
	---help---
	  This option is needed for the systems that have more than 8 CPUs

config X86_EXTENDED_PLATFORM
	bool "Support for extended (non-PC) x86 platforms"
	default y
@@ -949,25 +949,66 @@ config MAXSMP
	  Enable maximum number of CPUS and NUMA Nodes for this architecture.
	  If unsure, say N.

#
# The maximum number of CPUs supported:
#
# The main config value is NR_CPUS, which defaults to NR_CPUS_DEFAULT,
# and which can be configured interactively in the
# [NR_CPUS_RANGE_BEGIN ... NR_CPUS_RANGE_END] range.
#
# The ranges are different on 32-bit and 64-bit kernels, depending on
# hardware capabilities and scalability features of the kernel.
#
# ( If MAXSMP is enabled we just use the highest possible value and disable
#   interactive configuration. )
#

config NR_CPUS_RANGE_BEGIN
	int
	default NR_CPUS_RANGE_END if MAXSMP
	default    1 if !SMP
	default    2

config NR_CPUS_RANGE_END
	int
	depends on X86_32
	default   64 if  SMP &&  X86_BIGSMP
	default    8 if  SMP && !X86_BIGSMP
	default    1 if !SMP

config NR_CPUS_RANGE_END
	int
	depends on X86_64
	default 8192 if  SMP && ( MAXSMP ||  CPUMASK_OFFSTACK)
	default  512 if  SMP && (!MAXSMP && !CPUMASK_OFFSTACK)
	default    1 if !SMP

config NR_CPUS_DEFAULT
	int
	depends on X86_32
	default   32 if  X86_BIGSMP
	default    8 if  SMP
	default    1 if !SMP

config NR_CPUS_DEFAULT
	int
	depends on X86_64
	default 8192 if  MAXSMP
	default   64 if  SMP
	default    1 if !SMP

config NR_CPUS
	int "Maximum number of CPUs" if SMP && !MAXSMP
	range 2 8 if SMP && X86_32 && !X86_BIGSMP
	range 2 64 if SMP && X86_32 && X86_BIGSMP
	range 2 512 if SMP && !MAXSMP && !CPUMASK_OFFSTACK && X86_64
	range 2 8192 if SMP && !MAXSMP && CPUMASK_OFFSTACK && X86_64
	default "1" if !SMP
	default "8192" if MAXSMP
	default "32" if SMP && X86_BIGSMP
	default "8" if SMP && X86_32
	default "64" if SMP
	range NR_CPUS_RANGE_BEGIN NR_CPUS_RANGE_END
	default NR_CPUS_DEFAULT
	---help---
	  This allows you to specify the maximum number of CPUs which this
	  kernel will support.  If CPUMASK_OFFSTACK is enabled, the maximum
	  supported value is 8192, otherwise the maximum value is 512.  The
	  minimum value which makes sense is 2.

	  This is purely to save memory - each supported CPU adds
	  approximately eight kilobytes to the kernel image.
	  This is purely to save memory: each supported CPU adds about 8KB
	  to the kernel image.

config SCHED_SMT
	bool "SMT (Hyperthreading) scheduler support"
+40 −39
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ static __always_inline __pure bool _static_cpu_has(u16 bit)
		 ".section .altinstructions,\"a\"\n"
		 " .long 1b - .\n"		/* src offset */
		 " .long 4f - .\n"		/* repl offset */
			 " .word %P1\n"			/* always replace */
		 " .word %P[always]\n"		/* always replace */
		 " .byte 3b - 1b\n"		/* src len */
		 " .byte 5f - 4f\n"		/* repl len */
		 " .byte 3b - 2b\n"		/* pad len */
@@ -168,7 +168,7 @@ static __always_inline __pure bool _static_cpu_has(u16 bit)
		 ".section .altinstructions,\"a\"\n"
		 " .long 1b - .\n"		/* src offset */
		 " .long 0\n"			/* no replacement */
			 " .word %P0\n"			/* feature bit */
		 " .word %P[feature]\n"		/* feature bit */
		 " .byte 3b - 1b\n"		/* src len */
		 " .byte 0\n"			/* repl len */
		 " .byte 0\n"			/* pad len */
@@ -179,7 +179,8 @@ static __always_inline __pure bool _static_cpu_has(u16 bit)
		 " jnz %l[t_yes]\n"
		 " jmp %l[t_no]\n"
		 ".previous\n"
			 : : "i" (bit), "i" (X86_FEATURE_ALWAYS),
		 : : [feature]  "i" (bit),
		     [always]   "i" (X86_FEATURE_ALWAYS),
		     [bitnum]   "i" (1 << (bit & 7)),
		     [cap_byte] "m" (((const char *)boot_cpu_data.x86_capability)[bit >> 3])
		 : : t_yes, t_no);
+0 −4
Original line number Diff line number Diff line
@@ -52,10 +52,6 @@ static inline void clear_page(void *page)

void copy_page(void *to, void *from);

#ifdef CONFIG_X86_MCE
#define arch_unmap_kpfn arch_unmap_kpfn
#endif

#endif	/* !__ASSEMBLY__ */

#ifdef CONFIG_X86_VSYSCALL_EMULATION
+12 −3
Original line number Diff line number Diff line
@@ -1176,16 +1176,25 @@ static void __init decode_gam_rng_tbl(unsigned long ptr)

	uv_gre_table = gre;
	for (; gre->type != UV_GAM_RANGE_TYPE_UNUSED; gre++) {
		unsigned long size = ((unsigned long)(gre->limit - lgre)
					<< UV_GAM_RANGE_SHFT);
		int order = 0;
		char suffix[] = " KMGTPE";

		while (size > 9999 && order < sizeof(suffix)) {
			size /= 1024;
			order++;
		}

		if (!index) {
			pr_info("UV: GAM Range Table...\n");
			pr_info("UV:  # %20s %14s %5s %4s %5s %3s %2s\n", "Range", "", "Size", "Type", "NASID", "SID", "PN");
		}
		pr_info("UV: %2d: 0x%014lx-0x%014lx %5luG %3d   %04x  %02x %02x\n",
		pr_info("UV: %2d: 0x%014lx-0x%014lx %5lu%c %3d   %04x  %02x %02x\n",
			index++,
			(unsigned long)lgre << UV_GAM_RANGE_SHFT,
			(unsigned long)gre->limit << UV_GAM_RANGE_SHFT,
			((unsigned long)(gre->limit - lgre)) >>
				(30 - UV_GAM_RANGE_SHFT), /* 64M -> 1G */
			size, suffix[order],
			gre->type, gre->nasid, gre->sockid, gre->pnode);

		lgre = gre->limit;
Loading