Commit 6da49d1a authored by Linus Torvalds's avatar Linus Torvalds

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

Pull x86 cleanups from Ingo Molnar:
 "Misc cleanups all around the map"

* 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/CPU/AMD: Remove amd_get_topology_early()
  x86/tsc: Remove redundant assignment
  x86/crash: Use resource_size()
  x86/cpu: Add a missing prototype for arch_smt_update()
  x86/nospec: Remove unused RSB_FILL_LOOPS
  x86/vdso: Provide missing include file
  x86/Kconfig: Correct spelling and punctuation
  Documentation/x86/boot: Fix typo
  x86/boot: Fix a comment's incorrect file reference
  x86/process: Remove set but not used variables prev and next
  x86/Kconfig: Fix Kconfig indentation
parents 4244057c 3c749b81
...@@ -251,7 +251,7 @@ setting fields in the header, you must make sure only to set fields ...@@ -251,7 +251,7 @@ setting fields in the header, you must make sure only to set fields
supported by the protocol version in use. supported by the protocol version in use.
Details of Harder Fileds Details of Header Fields
======================== ========================
For each field, some are information from the kernel to the bootloader For each field, some are information from the kernel to the bootloader
......
...@@ -440,8 +440,8 @@ config X86_MPPARSE ...@@ -440,8 +440,8 @@ config X86_MPPARSE
(esp with 64bit cpus) with acpi support, MADT and DSDT will override it (esp with 64bit cpus) with acpi support, MADT and DSDT will override it
config GOLDFISH config GOLDFISH
def_bool y def_bool y
depends on X86_GOLDFISH depends on X86_GOLDFISH
config RETPOLINE config RETPOLINE
bool "Avoid speculative indirect branches in kernel" bool "Avoid speculative indirect branches in kernel"
...@@ -479,7 +479,7 @@ config X86_BIGSMP ...@@ -479,7 +479,7 @@ config X86_BIGSMP
bool "Support for big SMP systems with more than 8 CPUs" bool "Support for big SMP systems with more than 8 CPUs"
depends on SMP depends on SMP
---help--- ---help---
This option is needed for the systems that have more than 8 CPUs This option is needed for the systems that have more than 8 CPUs.
config X86_EXTENDED_PLATFORM config X86_EXTENDED_PLATFORM
bool "Support for extended (non-PC) x86 platforms" bool "Support for extended (non-PC) x86 platforms"
...@@ -563,9 +563,9 @@ config X86_UV ...@@ -563,9 +563,9 @@ config X86_UV
# Please maintain the alphabetic order if and when there are additions # Please maintain the alphabetic order if and when there are additions
config X86_GOLDFISH config X86_GOLDFISH
bool "Goldfish (Virtual Platform)" bool "Goldfish (Virtual Platform)"
depends on X86_EXTENDED_PLATFORM depends on X86_EXTENDED_PLATFORM
---help--- ---help---
Enable support for the Goldfish virtual platform used primarily Enable support for the Goldfish virtual platform used primarily
for Android development. Unless you are building for the Android for Android development. Unless you are building for the Android
Goldfish emulator say N here. Goldfish emulator say N here.
...@@ -808,9 +808,9 @@ config KVM_GUEST ...@@ -808,9 +808,9 @@ config KVM_GUEST
timing infrastructure such as time of day, and system time timing infrastructure such as time of day, and system time
config ARCH_CPUIDLE_HALTPOLL config ARCH_CPUIDLE_HALTPOLL
def_bool n def_bool n
prompt "Disable host haltpoll when loading haltpoll driver" prompt "Disable host haltpoll when loading haltpoll driver"
help help
If virtualized under KVM, disable host haltpoll. If virtualized under KVM, disable host haltpoll.
config PVH config PVH
...@@ -889,16 +889,16 @@ config HPET_EMULATE_RTC ...@@ -889,16 +889,16 @@ config HPET_EMULATE_RTC
depends on HPET_TIMER && (RTC=y || RTC=m || RTC_DRV_CMOS=m || RTC_DRV_CMOS=y) depends on HPET_TIMER && (RTC=y || RTC=m || RTC_DRV_CMOS=m || RTC_DRV_CMOS=y)
config APB_TIMER config APB_TIMER
def_bool y if X86_INTEL_MID def_bool y if X86_INTEL_MID
prompt "Intel MID APB Timer Support" if X86_INTEL_MID prompt "Intel MID APB Timer Support" if X86_INTEL_MID
select DW_APB_TIMER select DW_APB_TIMER
depends on X86_INTEL_MID && SFI depends on X86_INTEL_MID && SFI
help help
APB timer is the replacement for 8254, HPET on X86 MID platforms. APB timer is the replacement for 8254, HPET on X86 MID platforms.
The APBT provides a stable time base on SMP The APBT provides a stable time base on SMP
systems, unlike the TSC, but it is more expensive to access, systems, unlike the TSC, but it is more expensive to access,
as it is off-chip. APB timers are always running regardless of CPU as it is off-chip. APB timers are always running regardless of CPU
C states, they are used as per CPU clockevent device when possible. C states, they are used as per CPU clockevent device when possible.
# Mark as expert because too many people got it wrong. # Mark as expert because too many people got it wrong.
# The code disables itself when not needed. # The code disables itself when not needed.
...@@ -1037,8 +1037,8 @@ config SCHED_MC_PRIO ...@@ -1037,8 +1037,8 @@ config SCHED_MC_PRIO
If unsure say Y here. If unsure say Y here.
config UP_LATE_INIT config UP_LATE_INIT
def_bool y def_bool y
depends on !SMP && X86_LOCAL_APIC depends on !SMP && X86_LOCAL_APIC
config X86_UP_APIC config X86_UP_APIC
bool "Local APIC support on uniprocessors" if !PCI_MSI bool "Local APIC support on uniprocessors" if !PCI_MSI
...@@ -1187,8 +1187,8 @@ config X86_LEGACY_VM86 ...@@ -1187,8 +1187,8 @@ config X86_LEGACY_VM86
If unsure, say N here. If unsure, say N here.
config VM86 config VM86
bool bool
default X86_LEGACY_VM86 default X86_LEGACY_VM86
config X86_16BIT config X86_16BIT
bool "Enable support for 16-bit segments" if EXPERT bool "Enable support for 16-bit segments" if EXPERT
...@@ -1209,10 +1209,10 @@ config X86_ESPFIX64 ...@@ -1209,10 +1209,10 @@ config X86_ESPFIX64
depends on X86_16BIT && X86_64 depends on X86_16BIT && X86_64
config X86_VSYSCALL_EMULATION config X86_VSYSCALL_EMULATION
bool "Enable vsyscall emulation" if EXPERT bool "Enable vsyscall emulation" if EXPERT
default y default y
depends on X86_64 depends on X86_64
---help--- ---help---
This enables emulation of the legacy vsyscall page. Disabling This enables emulation of the legacy vsyscall page. Disabling
it is roughly equivalent to booting with vsyscall=none, except it is roughly equivalent to booting with vsyscall=none, except
that it will also disable the helpful warning if a program that it will also disable the helpful warning if a program
...@@ -1545,12 +1545,12 @@ config AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT ...@@ -1545,12 +1545,12 @@ config AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT
# Common NUMA Features # Common NUMA Features
config NUMA config NUMA
bool "Numa Memory Allocation and Scheduler Support" bool "NUMA Memory Allocation and Scheduler Support"
depends on SMP depends on SMP
depends on X86_64 || (X86_32 && HIGHMEM64G && X86_BIGSMP) depends on X86_64 || (X86_32 && HIGHMEM64G && X86_BIGSMP)
default y if X86_BIGSMP default y if X86_BIGSMP
---help--- ---help---
Enable NUMA (Non Uniform Memory Access) support. Enable NUMA (Non-Uniform Memory Access) support.
The kernel will try to allocate memory used by a CPU on the The kernel will try to allocate memory used by a CPU on the
local memory controller of the CPU and add some more local memory controller of the CPU and add some more
...@@ -1650,9 +1650,9 @@ config ARCH_PROC_KCORE_TEXT ...@@ -1650,9 +1650,9 @@ config ARCH_PROC_KCORE_TEXT
depends on X86_64 && PROC_KCORE depends on X86_64 && PROC_KCORE
config ILLEGAL_POINTER_VALUE config ILLEGAL_POINTER_VALUE
hex hex
default 0 if X86_32 default 0 if X86_32
default 0xdead000000000000 if X86_64 default 0xdead000000000000 if X86_64
config X86_PMEM_LEGACY_DEVICE config X86_PMEM_LEGACY_DEVICE
bool bool
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/mm_types.h> #include <linux/mm_types.h>
#include <linux/elf.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/vdso.h> #include <asm/vdso.h>
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
*/ */
#define RSB_CLEAR_LOOPS 32 /* To forcibly overwrite all entries */ #define RSB_CLEAR_LOOPS 32 /* To forcibly overwrite all entries */
#define RSB_FILL_LOOPS 16 /* To avoid underflow */
/* /*
* Google experimented with loop-unrolling and this turned out to be * Google experimented with loop-unrolling and this turned out to be
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <asm/io.h> #include <asm/io.h>
/* This must match data at realmode.S */ /* This must match data at realmode/rm/header.S */
struct real_mode_header { struct real_mode_header {
u32 text_start; u32 text_start;
u32 ro_end; u32 ro_end;
...@@ -36,7 +36,7 @@ struct real_mode_header { ...@@ -36,7 +36,7 @@ struct real_mode_header {
#endif #endif
}; };
/* This must match data at trampoline_32/64.S */ /* This must match data at realmode/rm/trampoline_{32,64}.S */
struct trampoline_header { struct trampoline_header {
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
u32 start; u32 start;
......
...@@ -319,13 +319,6 @@ static void legacy_fixup_core_id(struct cpuinfo_x86 *c) ...@@ -319,13 +319,6 @@ static void legacy_fixup_core_id(struct cpuinfo_x86 *c)
c->cpu_core_id %= cus_per_node; c->cpu_core_id %= cus_per_node;
} }
static void amd_get_topology_early(struct cpuinfo_x86 *c)
{
if (cpu_has(c, X86_FEATURE_TOPOEXT))
smp_num_siblings = ((cpuid_ebx(0x8000001e) >> 8) & 0xff) + 1;
}
/* /*
* Fixup core topology information for * Fixup core topology information for
* (1) AMD multi-node processors * (1) AMD multi-node processors
...@@ -717,7 +710,8 @@ static void early_init_amd(struct cpuinfo_x86 *c) ...@@ -717,7 +710,8 @@ static void early_init_amd(struct cpuinfo_x86 *c)
} }
} }
amd_get_topology_early(c); if (cpu_has(c, X86_FEATURE_TOPOEXT))
smp_num_siblings = ((cpuid_ebx(0x8000001e) >> 8) & 0xff) + 1;
} }
static void init_amd_k8(struct cpuinfo_x86 *c) static void init_amd_k8(struct cpuinfo_x86 *c)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/sched/mm.h> #include <linux/sched/mm.h>
#include <linux/sched/clock.h> #include <linux/sched/clock.h>
#include <linux/sched/task.h> #include <linux/sched/task.h>
#include <linux/sched/smt.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kprobes.h> #include <linux/kprobes.h>
#include <linux/kgdb.h> #include <linux/kgdb.h>
......
...@@ -370,7 +370,7 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params) ...@@ -370,7 +370,7 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)
/* Add crashk_low_res region */ /* Add crashk_low_res region */
if (crashk_low_res.end) { if (crashk_low_res.end) {
ei.addr = crashk_low_res.start; ei.addr = crashk_low_res.start;
ei.size = crashk_low_res.end - crashk_low_res.start + 1; ei.size = resource_size(&crashk_low_res);
ei.type = E820_TYPE_RAM; ei.type = E820_TYPE_RAM;
add_e820_entry(params, &ei); add_e820_entry(params, &ei);
} }
......
...@@ -615,12 +615,8 @@ void speculation_ctrl_update_current(void) ...@@ -615,12 +615,8 @@ void speculation_ctrl_update_current(void)
void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p) void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p)
{ {
struct thread_struct *prev, *next;
unsigned long tifp, tifn; unsigned long tifp, tifn;
prev = &prev_p->thread;
next = &next_p->thread;
tifn = READ_ONCE(task_thread_info(next_p)->flags); tifn = READ_ONCE(task_thread_info(next_p)->flags);
tifp = READ_ONCE(task_thread_info(prev_p)->flags); tifp = READ_ONCE(task_thread_info(prev_p)->flags);
......
...@@ -233,7 +233,6 @@ static cycles_t check_tsc_warp(unsigned int timeout) ...@@ -233,7 +233,6 @@ static cycles_t check_tsc_warp(unsigned int timeout)
* The measurement runs for 'timeout' msecs: * The measurement runs for 'timeout' msecs:
*/ */
end = start + (cycles_t) tsc_khz * timeout; end = start + (cycles_t) tsc_khz * timeout;
now = start;
for (i = 0; ; i++) { for (i = 0; ; i++) {
/* /*
......
...@@ -62,10 +62,10 @@ config XEN_512GB ...@@ -62,10 +62,10 @@ config XEN_512GB
boot parameter "xen_512gb_limit". boot parameter "xen_512gb_limit".
config XEN_SAVE_RESTORE config XEN_SAVE_RESTORE
bool bool
depends on XEN depends on XEN
select HIBERNATE_CALLBACKS select HIBERNATE_CALLBACKS
default y default y
config XEN_DEBUG_FS config XEN_DEBUG_FS
bool "Enable Xen debug and tuning parameters in debugfs" bool "Enable Xen debug and tuning parameters in debugfs"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment