mirror of
https://github.com/t2linux/kernel.git
synced 2026-04-30 13:48:59 -07:00
Merge tag 'x86_cleanups_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull misc x86 cleanups from Borislav Petkov: "Trivial cleanups and fixes all over the place" * tag 'x86_cleanups_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: MAINTAINERS: Remove me from IDE/ATAPI section x86/pat: Do not compile stubbed functions when X86_PAT is off x86/asm: Ensure asm/proto.h can be included stand-alone x86/platform/intel/quark: Fix incorrect kernel-doc comment syntax in files x86/msr: Make locally used functions static x86/cacheinfo: Remove unneeded dead-store initialization x86/process/64: Move cpu_current_top_of_stack out of TSS tools/turbostat: Unmark non-kernel-doc comment x86/syscalls: Fix -Wmissing-prototypes warnings from COND_SYSCALL() x86/fpu/math-emu: Fix function cast warning x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes x86: Fix various typos in comments, take #2 x86: Remove unusual Unicode characters from comments x86/kaslr: Return boolean values from a function returning bool x86: Fix various typos in comments x86/setup: Remove unused RESERVE_BRK_ARRAY() stacktrace: Move documentation for arch_stack_walk_reliable() to header x86: Remove duplicate TSC DEADLINE MSR definitions
This commit is contained in:
+1
-2
@@ -8612,9 +8612,8 @@ F: drivers/ide/
|
||||
F: include/linux/ide.h
|
||||
|
||||
IDE/ATAPI DRIVERS
|
||||
M: Borislav Petkov <bp@alien8.de>
|
||||
L: linux-ide@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Orphan
|
||||
F: Documentation/cdrom/ide-cd.rst
|
||||
F: drivers/ide/ide-cd*
|
||||
|
||||
|
||||
@@ -24,12 +24,6 @@ void arch_stack_walk(stack_trace_consume_fn consume_entry, void *cookie,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This function returns an error if it detects any unreliable features of the
|
||||
* stack. Otherwise it guarantees that the stack trace is reliable.
|
||||
*
|
||||
* If the task is not 'current', the caller *must* ensure the task is inactive.
|
||||
*/
|
||||
int arch_stack_walk_reliable(stack_trace_consume_fn consume_entry,
|
||||
void *cookie, struct task_struct *task)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Early support for invoking 32-bit EFI services from a 64-bit kernel.
|
||||
*
|
||||
* Because this thunking occurs before ExitBootServices() we have to
|
||||
* restore the firmware's 32-bit GDT before we make EFI serivce calls,
|
||||
* restore the firmware's 32-bit GDT before we make EFI service calls,
|
||||
* since the firmware's 32-bit IDT is still currently installed and it
|
||||
* needs to be able to service interrupts.
|
||||
*
|
||||
|
||||
@@ -252,7 +252,7 @@ SYM_FUNC_START(startup_32)
|
||||
/*
|
||||
* Setup for the jump to 64bit mode
|
||||
*
|
||||
* When the jump is performend we will be in long mode but
|
||||
* When the jump is performed we will be in long mode but
|
||||
* in 32bit compatibility mode with EFER.LME = 1, CS.L = 0, CS.D = 1
|
||||
* (and in turn EFER.LMA = 1). To jump into 64bit mode we use
|
||||
* the new gdt/idt that has __KERNEL_CS with CS.L = 1.
|
||||
|
||||
@@ -639,9 +639,9 @@ static bool process_mem_region(struct mem_vector *region,
|
||||
|
||||
if (slot_area_index == MAX_SLOT_AREA) {
|
||||
debug_putstr("Aborted e820/efi memmap scan (slot_areas full)!\n");
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_MEMORY_HOTREMOVE) && defined(CONFIG_ACPI)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/*
|
||||
* Copyright 2012 Xyratex Technology Limited
|
||||
*
|
||||
* Wrappers for kernel crypto shash api to pclmulqdq crc32 imlementation.
|
||||
* Wrappers for kernel crypto shash api to pclmulqdq crc32 implementation.
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
@@ -114,11 +114,11 @@ static inline void fadd(u64 *out, const u64 *f1, const u64 *f2)
|
||||
);
|
||||
}
|
||||
|
||||
/* Computes the field substraction of two field elements */
|
||||
/* Computes the field subtraction of two field elements */
|
||||
static inline void fsub(u64 *out, const u64 *f1, const u64 *f2)
|
||||
{
|
||||
asm volatile(
|
||||
/* Compute the raw substraction of f1-f2 */
|
||||
/* Compute the raw subtraction of f1-f2 */
|
||||
" movq 0(%1), %%r8;"
|
||||
" subq 0(%2), %%r8;"
|
||||
" movq 8(%1), %%r9;"
|
||||
@@ -135,7 +135,7 @@ static inline void fsub(u64 *out, const u64 *f1, const u64 *f2)
|
||||
" mov $38, %%rcx;"
|
||||
" cmovc %%rcx, %%rax;"
|
||||
|
||||
/* Step 2: Substract carry*38 from the original difference */
|
||||
/* Step 2: Subtract carry*38 from the original difference */
|
||||
" sub %%rax, %%r8;"
|
||||
" sbb $0, %%r9;"
|
||||
" sbb $0, %%r10;"
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
/*
|
||||
* Combined G1 & G2 function. Reordered with help of rotates to have moves
|
||||
* at begining.
|
||||
* at beginning.
|
||||
*/
|
||||
#define g1g2_3(ab, cd, Tx0, Tx1, Tx2, Tx3, Ty0, Ty1, Ty2, Ty3, x, y) \
|
||||
/* G1,1 && G2,1 */ \
|
||||
|
||||
@@ -117,7 +117,7 @@ static bool is_blacklisted_cpu(void)
|
||||
* storing blocks in 64bit registers to allow three blocks to
|
||||
* be processed parallel. Parallel operation then allows gaining
|
||||
* more performance than was trade off, on out-of-order CPUs.
|
||||
* However Atom does not benefit from this parallellism and
|
||||
* However Atom does not benefit from this parallelism and
|
||||
* should be blacklisted.
|
||||
*/
|
||||
return true;
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
*
|
||||
* Lets build a 5 entry IRET frame after that, such that struct pt_regs
|
||||
* is complete and in particular regs->sp is correct. This gives us
|
||||
* the original 6 enties as gap:
|
||||
* the original 6 entries as gap:
|
||||
*
|
||||
* 14*4(%esp) - <previous context>
|
||||
* 13*4(%esp) - gap / flags
|
||||
|
||||
@@ -511,7 +511,7 @@ SYM_CODE_START(\asmsym)
|
||||
/*
|
||||
* No need to switch back to the IST stack. The current stack is either
|
||||
* identical to the stack in the IRET frame or the VC fall-back stack,
|
||||
* so it is definitly mapped even with PTI enabled.
|
||||
* so it is definitely mapped even with PTI enabled.
|
||||
*/
|
||||
jmp paranoid_exit
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ int main(int argc, char **argv)
|
||||
|
||||
/*
|
||||
* Figure out the struct name. If we're writing to a .so file,
|
||||
* generate raw output insted.
|
||||
* generate raw output instead.
|
||||
*/
|
||||
name = strdup(argv[3]);
|
||||
namelen = strlen(name);
|
||||
|
||||
@@ -29,7 +29,7 @@ __kernel_vsyscall:
|
||||
* anyone with an AMD CPU, for example). Nonetheless, we try to keep
|
||||
* it working approximately as well as it ever worked.
|
||||
*
|
||||
* This link may eludicate some of the history:
|
||||
* This link may elucidate some of the history:
|
||||
* https://android-review.googlesource.com/#/q/Iac3295376d61ef83e713ac9b528f3b50aa780cd7
|
||||
* personally, I find it hard to understand what's going on there.
|
||||
*
|
||||
|
||||
@@ -358,7 +358,7 @@ int map_vdso_once(const struct vdso_image *image, unsigned long addr)
|
||||
mmap_write_lock(mm);
|
||||
/*
|
||||
* Check if we have already mapped vdso blob - fail to prevent
|
||||
* abusing from userspace install_speciall_mapping, which may
|
||||
* abusing from userspace install_special_mapping, which may
|
||||
* not do accounting and rlimit right.
|
||||
* We could search vma near context.vdso, but it's a slowpath,
|
||||
* so let's explicitly check all VMAs to be completely sure.
|
||||
|
||||
@@ -137,7 +137,7 @@ SYM_FUNC_START(__vdso_sgx_enter_enclave)
|
||||
|
||||
/*
|
||||
* If the return from callback is zero or negative, return immediately,
|
||||
* else re-execute ENCLU with the postive return value interpreted as
|
||||
* else re-execute ENCLU with the positive return value interpreted as
|
||||
* the requested ENCLU function.
|
||||
*/
|
||||
cmp $0, %eax
|
||||
|
||||
@@ -623,7 +623,7 @@ static void amd_pmu_disable_all(void)
|
||||
/*
|
||||
* Check each counter for overflow and wait for it to be reset by the
|
||||
* NMI if it has overflowed. This relies on the fact that all active
|
||||
* counters are always enabled when this function is caled and
|
||||
* counters are always enabled when this function is called and
|
||||
* ARCH_PERFMON_EVENTSEL_INT is always set.
|
||||
*/
|
||||
for (idx = 0; idx < x86_pmu.num_counters; idx++) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#define IOMMU_PC_DEVID_MATCH_REG 0x20
|
||||
#define IOMMU_PC_COUNTER_REPORT_REG 0x28
|
||||
|
||||
/* maximun specified bank/counters */
|
||||
/* maximum specified bank/counters */
|
||||
#define PC_MAX_SPEC_BNKS 64
|
||||
#define PC_MAX_SPEC_CNTRS 16
|
||||
|
||||
|
||||
@@ -765,7 +765,7 @@ struct perf_sched {
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize interator that runs through all events and counters.
|
||||
* Initialize iterator that runs through all events and counters.
|
||||
*/
|
||||
static void perf_sched_init(struct perf_sched *sched, struct event_constraint **constraints,
|
||||
int num, int wmin, int wmax, int gpmax)
|
||||
|
||||
@@ -594,7 +594,7 @@ static __init int bts_init(void)
|
||||
* we cannot use the user mapping since it will not be available
|
||||
* if we're not running the owning process.
|
||||
*
|
||||
* With PTI we can't use the kernal map either, because its not
|
||||
* With PTI we can't use the kernel map either, because its not
|
||||
* there when we run userspace.
|
||||
*
|
||||
* For now, disable this driver when using PTI.
|
||||
|
||||
@@ -137,7 +137,7 @@ static struct event_constraint intel_ivb_event_constraints[] __read_mostly =
|
||||
FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
|
||||
FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */
|
||||
INTEL_UEVENT_CONSTRAINT(0x0148, 0x4), /* L1D_PEND_MISS.PENDING */
|
||||
INTEL_UEVENT_CONSTRAINT(0x0279, 0xf), /* IDQ.EMTPY */
|
||||
INTEL_UEVENT_CONSTRAINT(0x0279, 0xf), /* IDQ.EMPTY */
|
||||
INTEL_UEVENT_CONSTRAINT(0x019c, 0xf), /* IDQ_UOPS_NOT_DELIVERED.CORE */
|
||||
INTEL_UEVENT_CONSTRAINT(0x02a3, 0xf), /* CYCLE_ACTIVITY.CYCLES_LDM_PENDING */
|
||||
INTEL_UEVENT_CONSTRAINT(0x04a3, 0xf), /* CYCLE_ACTIVITY.CYCLES_NO_EXECUTE */
|
||||
@@ -2186,7 +2186,7 @@ static void intel_pmu_enable_all(int added)
|
||||
* magic three (non-counting) events 0x4300B5, 0x4300D2, and 0x4300B1 either
|
||||
* in sequence on the same PMC or on different PMCs.
|
||||
*
|
||||
* In practise it appears some of these events do in fact count, and
|
||||
* In practice it appears some of these events do in fact count, and
|
||||
* we need to program all 4 events.
|
||||
*/
|
||||
static void intel_pmu_nhm_workaround(void)
|
||||
@@ -2435,7 +2435,7 @@ static inline u64 icl_get_metrics_event_value(u64 metric, u64 slots, int idx)
|
||||
|
||||
/*
|
||||
* The metric is reported as an 8bit integer fraction
|
||||
* suming up to 0xff.
|
||||
* summing up to 0xff.
|
||||
* slots-in-metric = (Metric / 0xff) * slots
|
||||
*/
|
||||
val = (metric >> ((idx - INTEL_PMC_IDX_METRIC_BASE) * 8)) & 0xff;
|
||||
@@ -2776,7 +2776,7 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status)
|
||||
* processing loop coming after that the function, otherwise
|
||||
* phony regular samples may be generated in the sampling buffer
|
||||
* not marked with the EXACT tag. Another possibility is to have
|
||||
* one PEBS event and at least one non-PEBS event whic hoverflows
|
||||
* one PEBS event and at least one non-PEBS event which overflows
|
||||
* while PEBS has armed. In this case, bit 62 of GLOBAL_STATUS will
|
||||
* not be set, yet the overflow status bit for the PEBS counter will
|
||||
* be on Skylake.
|
||||
@@ -2824,7 +2824,7 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status)
|
||||
}
|
||||
|
||||
/*
|
||||
* Intel Perf mertrics
|
||||
* Intel Perf metrics
|
||||
*/
|
||||
if (__test_and_clear_bit(GLOBAL_STATUS_PERF_METRICS_OVF_BIT, (unsigned long *)&status)) {
|
||||
handled++;
|
||||
@@ -4594,7 +4594,7 @@ static bool check_msr(unsigned long msr, u64 mask)
|
||||
|
||||
/*
|
||||
* Disable the check for real HW, so we don't
|
||||
* mess with potentionaly enabled registers:
|
||||
* mess with potentially enabled registers:
|
||||
*/
|
||||
if (!boot_cpu_has(X86_FEATURE_HYPERVISOR))
|
||||
return true;
|
||||
@@ -4659,7 +4659,7 @@ static __init void intel_arch_events_quirk(void)
|
||||
{
|
||||
int bit;
|
||||
|
||||
/* disable event that reported as not presend by cpuid */
|
||||
/* disable event that reported as not present by cpuid */
|
||||
for_each_set_bit(bit, x86_pmu.events_mask, ARRAY_SIZE(intel_arch_events_map)) {
|
||||
intel_perfmon_event_map[intel_arch_events_map[bit].id] = 0;
|
||||
pr_warn("CPUID marked event: \'%s\' unavailable\n",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user