mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
A set of cleanups across x86:
- Use memremap() for the EISA probe instrad of ioremap(). EISA is strictly memory and not MMIO - Cleanups and enhancement all over the place -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmbpMzcTHHRnbHhAbGlu dXRyb25peC5kZQAKCRCmGPVMDXSYoa1WD/4txviyFr+1IY/P/JLxE8cBCW3R3aDY 7+15lGBHiWyJ+uamzlAv8OQab/brgh5ofnRQjkrvK7pLVb7XgBacncFT8tF/j83w Yw+36NMAkeVAt2rJbWz1ZdgpK+StFMFmXcclv+BL5m0aTuGP1IsJX3KbbpMAYlyY ju++UAm0c/CSjRyuks1HgqADZ2Q8pjQv3dN723BRBxgRv0b3IcFAl7bBdZGf/w5w PBC7mFg7x0dAVW3Dpb73VeeNuAJ1LolTasS+OZglo/fhNx1hVHTYInewZ24t37px xDSDoYSJq0qQsG6T660gEduVqay80A8Jwu9Mwu+0G7krbuSafqDOqcPlFWPMUbiy VP6EPUh1FaJsH+IxloU5nyfmU6DaukYh1cPkGJBfUyCLG4KDyodIxL5c1c3cG90Y umK+Ggy3vNbgcLBGJWUgqS9ET55qcxMc+X3DMlnQl+pGhFdkC9cHCTUqSJRwLeuj 4Dvk76zX1VNGmPmr77kP+rIZl9hqmfw4I2hekUaETSuWOAsf/xHzH/TlcOnPVSr0 jidxNvHQ0kuRziCeBH7RUU8jpZyepCY4SIvJt+C2f6pZv/82lOao/ZIqVhyNR5Jh +zLr+UU6PtxNYyYjg1zcL0FCa6jz40Z2el0cPChoK0xqwOVAPGu/HiqCQW0AmXJR +Dl/gGrb68vFsg== =aN01 -----END PGP SIGNATURE----- Merge tag 'x86-cleanups-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Thomas Gleixner: "A set of cleanups across x86: - Use memremap() for the EISA probe instead of ioremap(). EISA is strictly memory and not MMIO - Cleanups and enhancement all over the place" * tag 'x86-cleanups-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/EISA: Dereference memory directly instead of using readl() x86/extable: Remove unused declaration fixup_bug() x86/boot/64: Strip percpu address space when setting up GDT descriptors x86/cpu: Clarify the error message when BIOS does not support SGX x86/kexec: Add comments around swap_pages() assembly to improve readability x86/kexec: Fix a comment of swap_pages() assembly x86/sgx: Fix a W=1 build warning in function comment x86/EISA: Use memremap() to probe for the EISA BIOS signature x86/mtrr: Remove obsolete declaration for mtrr_bp_restore() x86/cpu_entry_area: Annotate percpu_setup_exception_stacks() as __init
This commit is contained in:
commit
0279aa780d
@ -37,7 +37,6 @@ struct pt_regs;
|
||||
|
||||
extern int fixup_exception(struct pt_regs *regs, int trapnr,
|
||||
unsigned long error_code, unsigned long fault_addr);
|
||||
extern int fixup_bug(struct pt_regs *regs, int trapnr);
|
||||
extern int ex_get_fixup_type(unsigned long ip);
|
||||
extern void early_fixup_exception(struct pt_regs *regs, int trapnr);
|
||||
|
||||
|
@ -69,7 +69,6 @@ extern int mtrr_add_page(unsigned long base, unsigned long size,
|
||||
unsigned int type, bool increment);
|
||||
extern int mtrr_del(int reg, unsigned long base, unsigned long size);
|
||||
extern int mtrr_del_page(int reg, unsigned long base, unsigned long size);
|
||||
extern void mtrr_bp_restore(void);
|
||||
extern int mtrr_trim_uncached_memory(unsigned long end_pfn);
|
||||
extern int amd_special_default_mtrr(void);
|
||||
void mtrr_disable(void);
|
||||
@ -117,7 +116,6 @@ static inline int mtrr_trim_uncached_memory(unsigned long end_pfn)
|
||||
return 0;
|
||||
}
|
||||
#define mtrr_bp_init() do {} while (0)
|
||||
#define mtrr_bp_restore() do {} while (0)
|
||||
#define mtrr_disable() do {} while (0)
|
||||
#define mtrr_enable() do {} while (0)
|
||||
#define mtrr_generic_set_state() do {} while (0)
|
||||
|
@ -188,7 +188,7 @@ void init_ia32_feat_ctl(struct cpuinfo_x86 *c)
|
||||
update_sgx:
|
||||
if (!(msr & FEAT_CTL_SGX_ENABLED)) {
|
||||
if (enable_sgx_kvm || enable_sgx_driver)
|
||||
pr_err_once("SGX disabled by BIOS.\n");
|
||||
pr_err_once("SGX disabled or unsupported by BIOS.\n");
|
||||
clear_cpu_cap(c, X86_FEATURE_SGX);
|
||||
return;
|
||||
}
|
||||
|
@ -733,7 +733,7 @@ int arch_memory_failure(unsigned long pfn, int flags)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A section metric is concatenated in a way that @low bits 12-31 define the
|
||||
* bits 12-31 of the metric and @high bits 0-19 define the bits 32-51 of the
|
||||
* metric.
|
||||
|
@ -11,15 +11,15 @@
|
||||
|
||||
static __init int eisa_bus_probe(void)
|
||||
{
|
||||
void __iomem *p;
|
||||
u32 *p;
|
||||
|
||||
if ((xen_pv_domain() && !xen_initial_domain()) || cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
|
||||
return 0;
|
||||
|
||||
p = ioremap(0x0FFFD9, 4);
|
||||
if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
|
||||
p = memremap(0x0FFFD9, 4, MEMREMAP_WB);
|
||||
if (p && *p == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
|
||||
EISA_bus = 1;
|
||||
iounmap(p);
|
||||
memunmap(p);
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(eisa_bus_probe);
|
||||
|
@ -559,10 +559,11 @@ void early_setup_idt(void)
|
||||
*/
|
||||
void __head startup_64_setup_gdt_idt(void)
|
||||
{
|
||||
struct desc_struct *gdt = (void *)(__force unsigned long)init_per_cpu_var(gdt_page.gdt);
|
||||
void *handler = NULL;
|
||||
|
||||
struct desc_ptr startup_gdt_descr = {
|
||||
.address = (unsigned long)&RIP_REL_REF(init_per_cpu_var(gdt_page.gdt)),
|
||||
.address = (unsigned long)&RIP_REL_REF(*gdt),
|
||||
.size = GDT_SIZE - 1,
|
||||
};
|
||||
|
||||
|
@ -170,6 +170,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
|
||||
wbinvd
|
||||
.Lsme_off:
|
||||
|
||||
/* Save the preserve_context to %r11 as swap_pages clobbers %rcx. */
|
||||
movq %rcx, %r11
|
||||
call swap_pages
|
||||
|
||||
@ -258,7 +259,7 @@ SYM_CODE_END(virtual_mapped)
|
||||
/* Do the copies */
|
||||
SYM_CODE_START_LOCAL_NOALIGN(swap_pages)
|
||||
UNWIND_HINT_END_OF_STACK
|
||||
movq %rdi, %rcx /* Put the page_list in %rcx */
|
||||
movq %rdi, %rcx /* Put the indirection_page in %rcx */
|
||||
xorl %edi, %edi
|
||||
xorl %esi, %esi
|
||||
jmp 1f
|
||||
@ -289,18 +290,21 @@ SYM_CODE_START_LOCAL_NOALIGN(swap_pages)
|
||||
movq %rcx, %rsi /* For ever source page do a copy */
|
||||
andq $0xfffffffffffff000, %rsi
|
||||
|
||||
movq %rdi, %rdx
|
||||
movq %rsi, %rax
|
||||
movq %rdi, %rdx /* Save destination page to %rdx */
|
||||
movq %rsi, %rax /* Save source page to %rax */
|
||||
|
||||
/* copy source page to swap page */
|
||||
movq %r10, %rdi
|
||||
movl $512, %ecx
|
||||
rep ; movsq
|
||||
|
||||
/* copy destination page to source page */
|
||||
movq %rax, %rdi
|
||||
movq %rdx, %rsi
|
||||
movl $512, %ecx
|
||||
rep ; movsq
|
||||
|
||||
/* copy swap page to destination page */
|
||||
movq %rdx, %rdi
|
||||
movq %r10, %rsi
|
||||
movl $512, %ecx
|
||||
|
@ -164,7 +164,7 @@ static void __init percpu_setup_exception_stacks(unsigned int cpu)
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline void percpu_setup_exception_stacks(unsigned int cpu)
|
||||
static void __init percpu_setup_exception_stacks(unsigned int cpu)
|
||||
{
|
||||
struct cpu_entry_area *cea = get_cpu_entry_area(cpu);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user