lkml.org 
[lkml]   [2020]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch V6 18/37] x86/irq: Use generic irq_regs implementation

    The only difference is the name of the per-CPU variable: irq_regs
    vs. __irq_regs, but the accessor functions are identical.

    Remove the pointless copy and use the generic variant.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

    diff --git a/arch/x86/include/asm/irq_regs.h b/arch/x86/include/asm/irq_regs.h
    deleted file mode 100644
    index 187ce59aea28..000000000000
    --- a/arch/x86/include/asm/irq_regs.h
    +++ /dev/null
    @@ -1,32 +0,0 @@
    -/* SPDX-License-Identifier: GPL-2.0 */
    -/*
    - * Per-cpu current frame pointer - the location of the last exception frame on
    - * the stack, stored in the per-cpu area.
    - *
    - * Jeremy Fitzhardinge <jeremy@goop.org>
    - */
    -#ifndef _ASM_X86_IRQ_REGS_H
    -#define _ASM_X86_IRQ_REGS_H
    -
    -#include <asm/percpu.h>
    -
    -#define ARCH_HAS_OWN_IRQ_REGS
    -
    -DECLARE_PER_CPU(struct pt_regs *, irq_regs);
    -
    -static inline struct pt_regs *get_irq_regs(void)
    -{
    - return __this_cpu_read(irq_regs);
    -}
    -
    -static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
    -{
    - struct pt_regs *old_regs;
    -
    - old_regs = get_irq_regs();
    - __this_cpu_write(irq_regs, new_regs);
    -
    - return old_regs;
    -}
    -
    -#endif /* _ASM_X86_IRQ_REGS_32_H */
    diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
    index c7965ff429c5..252065d32ab5 100644
    --- a/arch/x86/kernel/irq.c
    +++ b/arch/x86/kernel/irq.c
    @@ -26,9 +26,6 @@
    DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
    EXPORT_PER_CPU_SYMBOL(irq_stat);

    -DEFINE_PER_CPU(struct pt_regs *, irq_regs);
    -EXPORT_PER_CPU_SYMBOL(irq_regs);
    -
    atomic_t irq_err_count;

    /*
    \
     
     \ /
      Last update: 2020-05-16 02:13    [W:4.042 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site