Commit 3e9679a3 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull x86 fixes from Ingo Molnar:
 "Three fixes, a hw-enablement and a cross-arch fix/enablement change:

   - SGI/UV fix for older platforms

   - x32 signal handling fix

   - older x86 platform bootup APIC fix

   - AVX512-4VNNIW (Neural Network Instructions) and AVX512-4FMAPS
     (Multiply Accumulation Single precision instructions) enablement.

   - move thread_info back into x86 specific code, to make life easier
     for other architectures trying to make use of
     CONFIG_THREAD_INFO_IN_TASK_STRUCT=y"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot/smp: Don't try to poke disabled/non-existent APIC
  sched/core, x86: Make struct thread_info arch specific again
  x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi()
  x86/platform/UV: Fix support for EFI_OLD_MEMMAP after BIOS callback updates
  x86/cpufeature: Add AVX512_4VNNIW and AVX512_4FMAPS features
  x86/vmware: Skip timer_irq_works() check on VMware
parents 86c5bf71 ff856051
...@@ -194,6 +194,8 @@ ...@@ -194,6 +194,8 @@
#define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */ #define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */
#define X86_FEATURE_INTEL_PT ( 7*32+15) /* Intel Processor Trace */ #define X86_FEATURE_INTEL_PT ( 7*32+15) /* Intel Processor Trace */
#define X86_FEATURE_AVX512_4VNNIW (7*32+16) /* AVX-512 Neural Network Instructions */
#define X86_FEATURE_AVX512_4FMAPS (7*32+17) /* AVX-512 Multiply Accumulation Single precision */
/* Virtualization flags: Linux defined, word 8 */ /* Virtualization flags: Linux defined, word 8 */
#define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */ #define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */
......
...@@ -52,6 +52,15 @@ struct task_struct; ...@@ -52,6 +52,15 @@ struct task_struct;
#include <asm/cpufeature.h> #include <asm/cpufeature.h>
#include <linux/atomic.h> #include <linux/atomic.h>
struct thread_info {
unsigned long flags; /* low level flags */
};
#define INIT_THREAD_INFO(tsk) \
{ \
.flags = 0, \
}
#define init_stack (init_thread_union.stack) #define init_stack (init_thread_union.stack)
#else /* !__ASSEMBLY__ */ #else /* !__ASSEMBLY__ */
......
...@@ -32,6 +32,8 @@ void init_scattered_cpuid_features(struct cpuinfo_x86 *c) ...@@ -32,6 +32,8 @@ void init_scattered_cpuid_features(struct cpuinfo_x86 *c)
static const struct cpuid_bit cpuid_bits[] = { static const struct cpuid_bit cpuid_bits[] = {
{ X86_FEATURE_INTEL_PT, CR_EBX,25, 0x00000007, 0 }, { X86_FEATURE_INTEL_PT, CR_EBX,25, 0x00000007, 0 },
{ X86_FEATURE_AVX512_4VNNIW, CR_EDX, 2, 0x00000007, 0 },
{ X86_FEATURE_AVX512_4FMAPS, CR_EDX, 3, 0x00000007, 0 },
{ X86_FEATURE_APERFMPERF, CR_ECX, 0, 0x00000006, 0 }, { X86_FEATURE_APERFMPERF, CR_ECX, 0, 0x00000006, 0 },
{ X86_FEATURE_EPB, CR_ECX, 3, 0x00000006, 0 }, { X86_FEATURE_EPB, CR_ECX, 3, 0x00000006, 0 },
{ X86_FEATURE_HW_PSTATE, CR_EDX, 7, 0x80000007, 0 }, { X86_FEATURE_HW_PSTATE, CR_EDX, 7, 0x80000007, 0 },
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <asm/div64.h> #include <asm/div64.h>
#include <asm/x86_init.h> #include <asm/x86_init.h>
#include <asm/hypervisor.h> #include <asm/hypervisor.h>
#include <asm/timer.h>
#include <asm/apic.h> #include <asm/apic.h>
#define CPUID_VMWARE_INFO_LEAF 0x40000000 #define CPUID_VMWARE_INFO_LEAF 0x40000000
...@@ -94,6 +95,10 @@ static void __init vmware_platform_setup(void) ...@@ -94,6 +95,10 @@ static void __init vmware_platform_setup(void)
} else { } else {
pr_warn("Failed to get TSC freq from the hypervisor\n"); pr_warn("Failed to get TSC freq from the hypervisor\n");
} }
#ifdef CONFIG_X86_IO_APIC
no_timer_check = 1;
#endif
} }
/* /*
......
...@@ -74,6 +74,8 @@ void fpu__xstate_clear_all_cpu_caps(void) ...@@ -74,6 +74,8 @@ void fpu__xstate_clear_all_cpu_caps(void)
setup_clear_cpu_cap(X86_FEATURE_MPX); setup_clear_cpu_cap(X86_FEATURE_MPX);
setup_clear_cpu_cap(X86_FEATURE_XGETBV1); setup_clear_cpu_cap(X86_FEATURE_XGETBV1);
setup_clear_cpu_cap(X86_FEATURE_PKU); setup_clear_cpu_cap(X86_FEATURE_PKU);
setup_clear_cpu_cap(X86_FEATURE_AVX512_4VNNIW);
setup_clear_cpu_cap(X86_FEATURE_AVX512_4FMAPS);
} }
/* /*
......
...@@ -105,9 +105,6 @@ void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact) ...@@ -105,9 +105,6 @@ void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact)
/* Don't let flags to be set from userspace */ /* Don't let flags to be set from userspace */
act->sa.sa_flags &= ~(SA_IA32_ABI | SA_X32_ABI); act->sa.sa_flags &= ~(SA_IA32_ABI | SA_X32_ABI);
if (user_64bit_mode(current_pt_regs()))
return;
if (in_ia32_syscall()) if (in_ia32_syscall())
act->sa.sa_flags |= SA_IA32_ABI; act->sa.sa_flags |= SA_IA32_ABI;
if (in_x32_syscall()) if (in_x32_syscall())
......
...@@ -1409,15 +1409,17 @@ __init void prefill_possible_map(void) ...@@ -1409,15 +1409,17 @@ __init void prefill_possible_map(void)
/* No boot processor was found in mptable or ACPI MADT */ /* No boot processor was found in mptable or ACPI MADT */
if (!num_processors) { if (!num_processors) {
int apicid = boot_cpu_physical_apicid; if (boot_cpu_has(X86_FEATURE_APIC)) {
int cpu = hard_smp_processor_id(); int apicid = boot_cpu_physical_apicid;
int cpu = hard_smp_processor_id();
pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu); pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
/* Make sure boot cpu is enumerated */ /* Make sure boot cpu is enumerated */
if (apic->cpu_present_to_apicid(0) == BAD_APICID && if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
apic->apic_id_valid(apicid)) apic->apic_id_valid(apicid))
generic_processor_info(apicid, boot_cpu_apic_version); generic_processor_info(apicid, boot_cpu_apic_version);
}
if (!num_processors) if (!num_processors)
num_processors = 1; num_processors = 1;
......
...@@ -40,7 +40,15 @@ s64 uv_bios_call(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3, u64 a4, u64 a5) ...@@ -40,7 +40,15 @@ s64 uv_bios_call(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3, u64 a4, u64 a5)
*/ */
return BIOS_STATUS_UNIMPLEMENTED; return BIOS_STATUS_UNIMPLEMENTED;
ret = efi_call_virt_pointer(tab, function, (u64)which, a1, a2, a3, a4, a5); /*
* If EFI_OLD_MEMMAP is set, we need to fall back to using our old EFI
* callback method, which uses efi_call() directly, with the kernel page tables:
*/
if (unlikely(test_bit(EFI_OLD_MEMMAP, &efi.flags)))
ret = efi_call((void *)__va(tab->function), (u64)which, a1, a2, a3, a4, a5);
else
ret = efi_call_virt_pointer(tab, function, (u64)which, a1, a2, a3, a4, a5);
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(uv_bios_call); EXPORT_SYMBOL_GPL(uv_bios_call);
......
...@@ -13,17 +13,6 @@ ...@@ -13,17 +13,6 @@
struct timespec; struct timespec;
struct compat_timespec; struct compat_timespec;
#ifdef CONFIG_THREAD_INFO_IN_TASK
struct thread_info {
unsigned long flags; /* low level flags */
};
#define INIT_THREAD_INFO(tsk) \
{ \
.flags = 0, \
}
#endif
#ifdef CONFIG_THREAD_INFO_IN_TASK #ifdef CONFIG_THREAD_INFO_IN_TASK
#define current_thread_info() ((struct thread_info *)current) #define current_thread_info() ((struct thread_info *)current)
#endif #endif
......
...@@ -194,6 +194,8 @@ ...@@ -194,6 +194,8 @@
#define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */ #define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */
#define X86_FEATURE_INTEL_PT ( 7*32+15) /* Intel Processor Trace */ #define X86_FEATURE_INTEL_PT ( 7*32+15) /* Intel Processor Trace */
#define X86_FEATURE_AVX512_4VNNIW (7*32+16) /* AVX-512 Neural Network Instructions */
#define X86_FEATURE_AVX512_4FMAPS (7*32+17) /* AVX-512 Multiply Accumulation Single precision */
/* Virtualization flags: Linux defined, word 8 */ /* Virtualization flags: Linux defined, word 8 */
#define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */ #define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */
......
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