Release 4.10 arch/x86/include/asm/irqflags.h
#ifndef _X86_IRQFLAGS_H_
#define _X86_IRQFLAGS_H_
#include <asm/processor-flags.h>
#ifndef __ASSEMBLY__
/* Provide __cpuidle; we can't safely include <linux/cpu.h> */
#define __cpuidle __attribute__((__section__(".cpuidle.text")))
/*
* Interrupt control:
*/
static inline unsigned long native_save_fl(void)
{
unsigned long flags;
/*
* "=rm" is safe here, because "pop" adjusts the stack before
* it evaluates its effective address -- this is part of the
* documented behavior of the "pop" instruction.
*/
asm volatile("# __raw_save_flags\n\t"
"pushf ; pop %0"
: "=rm" (flags)
: /* no input */
: "memory");
return flags;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 18 | 78.26% | 1 | 33.33% |
joe perches | joe perches | 3 | 13.04% | 1 | 33.33% |
h. peter anvin | h. peter anvin | 2 | 8.70% | 1 | 33.33% |
| Total | 23 | 100.00% | 3 | 100.00% |
static inline void native_restore_fl(unsigned long flags)
{
asm volatile("push %0 ; popf"
: /* no output */
:"g" (flags)
:"memory", "cc");
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 12 | 75.00% | 1 | 50.00% |
joe perches | joe perches | 4 | 25.00% | 1 | 50.00% |
| Total | 16 | 100.00% | 2 | 100.00% |
static inline void native_irq_disable(void)
{
asm volatile("cli": : :"memory");
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline void native_irq_enable(void)
{
asm volatile("sti": : :"memory");
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline __cpuidle void native_safe_halt(void)
{
asm volatile("sti; hlt": : :"memory");
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 12 | 92.31% | 1 | 50.00% |
chris metcalf | chris metcalf | 1 | 7.69% | 1 | 50.00% |
| Total | 13 | 100.00% | 2 | 100.00% |
static inline __cpuidle void native_halt(void)
{
asm volatile("hlt": : :"memory");
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 12 | 92.31% | 1 | 50.00% |
chris metcalf | chris metcalf | 1 | 7.69% | 1 | 50.00% |
| Total | 13 | 100.00% | 2 | 100.00% |
#endif
#ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h>
#else
#ifndef __ASSEMBLY__
#include <linux/types.h>
static inline notrace unsigned long arch_local_save_flags(void)
{
return native_save_fl();
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 13 | 86.67% | 1 | 33.33% |
steven rostedt | steven rostedt | 1 | 6.67% | 1 | 33.33% |
david howells | david howells | 1 | 6.67% | 1 | 33.33% |
| Total | 15 | 100.00% | 3 | 100.00% |
static inline notrace void arch_local_irq_restore(unsigned long flags)
{
native_restore_fl(flags);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 15 | 88.24% | 1 | 33.33% |
david howells | david howells | 1 | 5.88% | 1 | 33.33% |
steven rostedt | steven rostedt | 1 | 5.88% | 1 | 33.33% |
| Total | 17 | 100.00% | 3 | 100.00% |
static inline notrace void arch_local_irq_disable(void)
{
native_irq_disable();
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 11 | 84.62% | 1 | 33.33% |
david howells | david howells | 1 | 7.69% | 1 | 33.33% |
steven rostedt | steven rostedt | 1 | 7.69% | 1 | 33.33% |
| Total | 13 | 100.00% | 3 | 100.00% |
static inline notrace void arch_local_irq_enable(void)
{
native_irq_enable();
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 11 | 84.62% | 1 | 33.33% |
steven rostedt | steven rostedt | 1 | 7.69% | 1 | 33.33% |
david howells | david howells | 1 | 7.69% | 1 | 33.33% |
| Total | 13 | 100.00% | 3 | 100.00% |
/*
* Used in the idle loop; sti takes one instruction cycle
* to complete:
*/
static inline __cpuidle void arch_safe_halt(void)
{
native_safe_halt();
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 11 | 84.62% | 1 | 33.33% |
chris metcalf | chris metcalf | 1 | 7.69% | 1 | 33.33% |
david howells | david howells | 1 | 7.69% | 1 | 33.33% |
| Total | 13 | 100.00% | 3 | 100.00% |
/*
* Used when interrupts are already enabled or to
* shutdown the processor:
*/
static inline __cpuidle void halt(void)
{
native_halt();
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 12 | 92.31% | 1 | 50.00% |
chris metcalf | chris metcalf | 1 | 7.69% | 1 | 50.00% |
| Total | 13 | 100.00% | 2 | 100.00% |
/*
* For spinlocks, etc:
*/
static inline notrace unsigned long arch_local_irq_save(void)
{
unsigned long flags = arch_local_save_flags();
arch_local_irq_disable();
return flags;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 20 | 83.33% | 1 | 33.33% |
david howells | david howells | 3 | 12.50% | 1 | 33.33% |
steven rostedt | steven rostedt | 1 | 4.17% | 1 | 33.33% |
| Total | 24 | 100.00% | 3 | 100.00% |
#else
#define ENABLE_INTERRUPTS(x) sti
#define DISABLE_INTERRUPTS(x) cli
#ifdef CONFIG_X86_64
#define SWAPGS swapgs
/*
* Currently paravirt can't handle swapgs nicely when we
* don't have a stack we can rely on (such as a user space
* stack). So we either find a way around these or just fault
* and emulate if a guest tries to call swapgs directly.
*
* Either way, this is a good way to document that we don't
* have a reliable stack. x86_64 only.
*/
#define SWAPGS_UNSAFE_STACK swapgs
#define PARAVIRT_ADJUST_EXCEPTION_FRAME
/* */
#define INTERRUPT_RETURN jmp native_iret
#define USERGS_SYSRET64 \
swapgs; \
sysretq;
#define USERGS_SYSRET32 \
swapgs; \
sysretl
#else
#define INTERRUPT_RETURN iret
#define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit
#define GET_CR0_INTO_EAX movl %cr0, %eax
#endif
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_PARAVIRT */
#ifndef __ASSEMBLY__
static inline int arch_irqs_disabled_flags(unsigned long flags)
{
return !(flags & X86_EFLAGS_IF);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 18 | 94.74% | 1 | 50.00% |
david howells | david howells | 1 | 5.26% | 1 | 50.00% |
| Total | 19 | 100.00% | 2 | 100.00% |
static inline int arch_irqs_disabled(void)
{
unsigned long flags = arch_local_save_flags();
return arch_irqs_disabled_flags(flags);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 19 | 86.36% | 1 | 50.00% |
david howells | david howells | 3 | 13.64% | 1 | 50.00% |
| Total | 22 | 100.00% | 2 | 100.00% |
#endif /* !__ASSEMBLY__ */
#ifdef __ASSEMBLY__
#ifdef CONFIG_TRACE_IRQFLAGS
# define TRACE_IRQS_ON call trace_hardirqs_on_thunk;
# define TRACE_IRQS_OFF call trace_hardirqs_off_thunk;
#else
# define TRACE_IRQS_ON
# define TRACE_IRQS_OFF
#endif
#ifdef CONFIG_DEBUG_LOCK_ALLOC
# ifdef CONFIG_X86_64
# define LOCKDEP_SYS_EXIT call lockdep_sys_exit_thunk
# define LOCKDEP_SYS_EXIT_IRQ \
TRACE_IRQS_ON; \
sti; \
call lockdep_sys_exit_thunk; \
cli; \
TRACE_IRQS_OFF;
# else
# define LOCKDEP_SYS_EXIT \
pushl %eax; \
pushl %ecx; \
pushl %edx; \
call lockdep_sys_exit; \
popl %edx; \
popl %ecx; \
popl %eax;
# define LOCKDEP_SYS_EXIT_IRQ
# endif
#else
# define LOCKDEP_SYS_EXIT
# define LOCKDEP_SYS_EXIT_IRQ
#endif
#endif /* __ASSEMBLY__ */
#endif
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
glauber de oliveira costa | glauber de oliveira costa | 321 | 77.35% | 1 | 6.67% |
denys vlasenko | denys vlasenko | 26 | 6.27% | 3 | 20.00% |
jeremy fitzhardinge | jeremy fitzhardinge | 21 | 5.06% | 4 | 26.67% |
david howells | david howells | 12 | 2.89% | 1 | 6.67% |
chris metcalf | chris metcalf | 9 | 2.17% | 1 | 6.67% |
thomas gleixner | thomas gleixner | 8 | 1.93% | 1 | 6.67% |
steven rostedt | steven rostedt | 8 | 1.93% | 1 | 6.67% |
joe perches | joe perches | 7 | 1.69% | 1 | 6.67% |
h. peter anvin | h. peter anvin | 2 | 0.48% | 1 | 6.67% |
andy lutomirski | andy lutomirski | 1 | 0.24% | 1 | 6.67% |
| Total | 415 | 100.00% | 15 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.