Merge tag 'x86-cleanups-2022-12-10' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 12 Dec 2022 20:44:03 +0000 (12:44 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 12 Dec 2022 20:44:03 +0000 (12:44 -0800)
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

1  2 
arch/x86/kernel/alternative.c
arch/x86/kernel/traps.c

@@@ -624,7 -624,7 +624,7 @@@ void __init_or_module noinline apply_ib
  
  #else
  
 -void __init_or_module noinline apply_ibt_endbr(s32 *start, s32 *end) { }
 +void __init_or_module apply_ibt_endbr(s32 *start, s32 *end) { }
  
  #endif /* CONFIG_X86_KERNEL_IBT */
  
@@@ -1608,7 -1608,7 +1608,7 @@@ static void text_poke_loc_init(struct t
  
        default:
                BUG_ON(len != insn.length);
-       };
+       }
  
  
        switch (tp->opcode) {
diff --combined arch/x86/kernel/traps.c
@@@ -15,7 -15,6 +15,7 @@@
  #include <linux/context_tracking.h>
  #include <linux/interrupt.h>
  #include <linux/kallsyms.h>
 +#include <linux/kmsan.h>
  #include <linux/spinlock.h>
  #include <linux/kprobes.h>
  #include <linux/uaccess.h>
  
  #ifdef CONFIG_X86_64
  #include <asm/x86_init.h>
- #include <asm/proto.h>
  #else
  #include <asm/processor-flags.h>
  #include <asm/setup.h>
- #include <asm/proto.h>
  #endif
  
+ #include <asm/proto.h>
  DECLARE_BITMAP(system_vectors, NR_VECTORS);
  
  static inline void cond_local_irq_enable(struct pt_regs *regs)
@@@ -302,12 -301,6 +302,12 @@@ static noinstr bool handle_bug(struct p
  {
        bool handled = false;
  
 +      /*
 +       * Normally @regs are unpoisoned by irqentry_enter(), but handle_bug()
 +       * is a rare case that uses @regs without passing them to
 +       * irqentry_enter().
 +       */
 +      kmsan_unpoison_entry_regs(regs);
        if (!is_valid_bugaddr(regs->ip))
                return handled;