Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88142
b: refs/heads/master
c: bae1d25
h: refs/heads/master
v: v3
  • Loading branch information
Ravikiran G Thirumalai authored and Ingo Molnar committed Apr 4, 2008
1 parent d1192a2 commit 2fbdf42
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c9b81f77330ddc003a2de2f35fa6a20410c1a62
refs/heads/master: bae1d2507e44417455eda76d4435352fee14cf51
29 changes: 29 additions & 0 deletions trunk/include/asm-x86/irqflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,26 @@ static inline void raw_local_irq_restore(unsigned long flags)
native_restore_fl(flags);
}

#ifdef CONFIG_X86_VSMP

/*
* Interrupt control for the VSMP architecture:
*/

static inline void raw_local_irq_disable(void)
{
unsigned long flags = __raw_local_save_flags();
raw_local_irq_restore((flags & ~X86_EFLAGS_IF) | X86_EFLAGS_AC);
}

static inline void raw_local_irq_enable(void)
{
unsigned long flags = __raw_local_save_flags();
raw_local_irq_restore((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC));
}

#else

static inline void raw_local_irq_disable(void)
{
native_irq_disable();
Expand All @@ -80,6 +100,8 @@ static inline void raw_local_irq_enable(void)
native_irq_enable();
}

#endif

/*
* Used in the idle loop; sti takes one instruction cycle
* to complete:
Expand Down Expand Up @@ -137,10 +159,17 @@ static inline unsigned long __raw_local_irq_save(void)
#define raw_local_irq_save(flags) \
do { (flags) = __raw_local_irq_save(); } while (0)

#ifdef CONFIG_X86_VSMP
static inline int raw_irqs_disabled_flags(unsigned long flags)
{
return !(flags & X86_EFLAGS_IF) || (flags & X86_EFLAGS_AC);
}
#else
static inline int raw_irqs_disabled_flags(unsigned long flags)
{
return !(flags & X86_EFLAGS_IF);
}
#endif

static inline int raw_irqs_disabled(void)
{
Expand Down

0 comments on commit 2fbdf42

Please sign in to comment.