mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 06:35:12 +07:00
602447f954
Nadav reported that since the this_cpu_*() ops got asm-volatile constraints on, code generation suffered for do_IRQ(), but since this is all with IRQs disabled we can use __this_cpu_*(). smp_x86_platform_ipi 234 222 -12,+0 smp_kvm_posted_intr_ipi 74 66 -8,+0 smp_kvm_posted_intr_wakeup_ipi 86 78 -8,+0 smp_apic_timer_interrupt 292 284 -8,+0 smp_kvm_posted_intr_nested_ipi 74 66 -8,+0 do_IRQ 195 187 -8,+0 Reported-by: Nadav Amit <nadav.amit@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
33 lines
683 B
C
33 lines
683 B
C
/* 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 */
|