Commit 79ad8912 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'x86-cleanups-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 cleanups from Thomas Gleixner:
 "A set of x86 cleanups:

   - Rework the handling of x86_regset for 32 and 64 bit.

     The original implementation tried to minimize the allocation size
     with quite some hard to understand and fragile tricks. Make it
     robust and straight forward by separating the register enumerations
     for 32 and 64 bit completely.

   - Add a few missing static annotations

   - Remove the stale unused setup_once() assembly function

   - Address a few minor static analysis and kernel-doc warnings"

* tag 'x86-cleanups-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/asm/32: Remove setup_once()
  x86/kaslr: Fix process_mem_region()'s return value
  x86: Fix misc small issues
  x86/boot: Repair kernel-doc for boot_kstrtoul()
  x86: Improve formatting of user_regset arrays
  x86: Separate out x86_regset for 32 and 64 bit
  x86/i8259: Make default_legacy_pic static
  x86/tsc: Make art_related_clocksource static
parents 36901316 ff4c85c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -668,7 +668,7 @@ static bool process_mem_region(struct mem_vector *region,
		}
	}
#endif
	return 0;
	return false;
}

#ifdef CONFIG_EFI
+1 −1
Original line number Diff line number Diff line
@@ -350,7 +350,7 @@ static int _kstrtoul(const char *s, unsigned int base, unsigned long *res)
}

/**
 * kstrtoul - convert a string to an unsigned long
 * boot_kstrtoul - convert a string to an unsigned long
 * @s: The start of the string. The string must be null-terminated, and may also
 *  include a single newline before its terminating null. The first character
 *  may also be a plus sign, but not a minus sign.
+1 −1
Original line number Diff line number Diff line
@@ -1608,7 +1608,7 @@ static void text_poke_loc_init(struct text_poke_loc *tp, void *addr,

	default:
		BUG_ON(len != insn.length);
	};
	}


	switch (tp->opcode) {
+0 −22
Original line number Diff line number Diff line
@@ -260,16 +260,6 @@ SYM_FUNC_START(startup_32_smp)
	/* Shift the stack pointer to a virtual address */
	addl $__PAGE_OFFSET, %esp

/*
 * start system 32-bit setup. We need to re-do some of the things done
 * in 16-bit mode for the "real" operations.
 */
	movl setup_once_ref,%eax
	andl %eax,%eax
	jz 1f				# Did we do this already?
	call *%eax
1:

/*
 * Check if it is 486
 */
@@ -331,18 +321,7 @@ SYM_FUNC_END(startup_32_smp)

#include "verify_cpu.S"

/*
 *  setup_once
 *
 *  The setup work we only want to run on the BSP.
 *
 *  Warning: %esi is live across this function.
 */
__INIT
setup_once:
	andl $0,setup_once_ref	/* Once is enough, thanks */
	RET

SYM_FUNC_START(early_idt_handler_array)
	# 36(%esp) %eflags
	# 32(%esp) %cs
@@ -458,7 +437,6 @@ SYM_DATA(early_recursion_flag, .long 0)
__REFDATA
	.align 4
SYM_DATA(initial_code,		.long i386_start_kernel)
SYM_DATA(setup_once_ref,	.long setup_once)

#ifdef CONFIG_PAGE_TABLE_ISOLATION
#define	PGD_ALIGN	(2 * PAGE_SIZE)
+1 −1
Original line number Diff line number Diff line
@@ -407,7 +407,7 @@ struct legacy_pic null_legacy_pic = {
	.make_irq = legacy_pic_uint_noop,
};

struct legacy_pic default_legacy_pic = {
static struct legacy_pic default_legacy_pic = {
	.nr_legacy_irqs = NR_IRQS_LEGACY,
	.chip  = &i8259A_chip,
	.mask = mask_8259A_irq,
Loading