mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 18:24:14 +08:00
c6ae41e7d4
Since percpu_xxx() serial functions are duplicated with this_cpu_xxx(). Removing percpu_xxx() definition and replacing them by this_cpu_xxx() in code. There is no function change in this patch, just preparation for later percpu_xxx serial function removing. On x86 machine the this_cpu_xxx() serial functions are same as __this_cpu_xxx() without no unnecessary premmpt enable/disable. Thanks for Stephen Rothwell, he found and fixed a i386 build error in the patch. Also thanks for Andrew Morton, he kept updating the patchset in Linus' tree. Signed-off-by: Alex Shi <alex.shi@intel.com> Acked-by: Christoph Lameter <cl@gentwo.org> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Tejun Heo <tj@kernel.org>
32 lines
640 B
C
32 lines
640 B
C
/*
|
|
* 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 */
|