Skip to content

Commit 3eba620

Browse files
committed
Merge tag 'x86_cleanups_for_v6.1_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Borislav Petkov: - The usual round of smaller fixes and cleanups all over the tree * tag 'x86_cleanups_for_v6.1_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Include the header of init_ia32_feat_ctl()'s prototype x86/uaccess: Improve __try_cmpxchg64_user_asm() for x86_32 x86: Fix various duplicate-word comment typos x86/boot: Remove superfluous type casting from arch/x86/boot/bitops.h
2 parents 193e226 + 30ea703 commit 3eba620

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

arch/x86/boot/bitops.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919

2020
static inline bool constant_test_bit(int nr, const void *addr)
2121
{
22-
const u32 *p = (const u32 *)addr;
22+
const u32 *p = addr;
2323
return ((1UL << (nr & 31)) & (p[nr >> 5])) != 0;
2424
}
2525
static inline bool variable_test_bit(int nr, const void *addr)
2626
{
2727
bool v;
28-
const u32 *p = (const u32 *)addr;
28+
const u32 *p = addr;
2929

3030
asm("btl %2,%1" CC_SET(c) : CC_OUT(c) (v) : "m" (*p), "Ir" (nr));
3131
return v;

arch/x86/include/asm/uaccess.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ do { \
448448

449449
#ifdef CONFIG_X86_32
450450
/*
451-
* Unlike the normal CMPXCHG, hardcode ECX for both success/fail and error.
451+
* Unlike the normal CMPXCHG, use output GPR for both success/fail and error.
452452
* There are only six GPRs available and four (EAX, EBX, ECX, and EDX) are
453453
* hardcoded by CMPXCHG8B, leaving only ESI and EDI. If the compiler uses
454454
* both ESI and EDI for the memory operand, compilation will fail if the error
@@ -461,11 +461,12 @@ do { \
461461
__typeof__(*(_ptr)) __new = (_new); \
462462
asm volatile("\n" \
463463
"1: " LOCK_PREFIX "cmpxchg8b %[ptr]\n" \
464-
"mov $0, %%ecx\n\t" \
465-
"setz %%cl\n" \
464+
"mov $0, %[result]\n\t" \
465+
"setz %b[result]\n" \
466466
"2:\n" \
467-
_ASM_EXTABLE_TYPE_REG(1b, 2b, EX_TYPE_EFAULT_REG, %%ecx) \
468-
: [result]"=c" (__result), \
467+
_ASM_EXTABLE_TYPE_REG(1b, 2b, EX_TYPE_EFAULT_REG, \
468+
%[result]) \
469+
: [result] "=q" (__result), \
469470
"+A" (__old), \
470471
[ptr] "+m" (*_ptr) \
471472
: "b" ((u32)__new), \

arch/x86/kernel/amd_gart_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static u32 *iommu_gatt_base; /* Remapping table */
5353
* of only flushing when an mapping is reused. With it true the GART is
5454
* flushed for every mapping. Problem is that doing the lazy flush seems
5555
* to trigger bugs with some popular PCI cards, in particular 3ware (but
56-
* has been also also seen with Qlogic at least).
56+
* has been also seen with Qlogic at least).
5757
*/
5858
static int iommu_fullflush = 1;
5959

arch/x86/kernel/aperture_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/*
3737
* Using 512M as goal, in case kexec will load kernel_big
3838
* that will do the on-position decompress, and could overlap with
39-
* with the gart aperture that is used.
39+
* the gart aperture that is used.
4040
* Sequence:
4141
* kernel_small
4242
* ==> kexec (with kdump trigger path or gart still enabled)

arch/x86/kernel/cpu/feat_ctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <linux/tboot.h>
33

4+
#include <asm/cpu.h>
45
#include <asm/cpufeature.h>
56
#include <asm/msr-index.h>
67
#include <asm/processor.h>
78
#include <asm/vmx.h>
8-
#include "cpu.h"
99

1010
#undef pr_fmt
1111
#define pr_fmt(fmt) "x86/cpu: " fmt

arch/x86/kvm/vmx/nested.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2570,7 +2570,7 @@ static int prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
25702570
* bits which we consider mandatory enabled.
25712571
* The CR0_READ_SHADOW is what L2 should have expected to read given
25722572
* the specifications by L1; It's not enough to take
2573-
* vmcs12->cr0_read_shadow because on our cr0_guest_host_mask we we
2573+
* vmcs12->cr0_read_shadow because on our cr0_guest_host_mask we
25742574
* have more bits than L1 expected.
25752575
*/
25762576
vmx_set_cr0(vcpu, vmcs12->guest_cr0);

arch/x86/platform/efi/efi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static void __init do_add_efi_memmap(void)
169169
}
170170

171171
/*
172-
* Given add_efi_memmap defaults to 0 and there there is no alternative
172+
* Given add_efi_memmap defaults to 0 and there is no alternative
173173
* e820 mechanism for soft-reserved memory, import the full EFI memory
174174
* map if soft reservations are present and enabled. Otherwise, the
175175
* mechanism to disable the kernel's consideration of EFI_MEMORY_SP is

0 commit comments

Comments
 (0)