diff options
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/ide.h | 4 | ||||
-rw-r--r-- | include/asm-i386/system.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h index 1947b62c0..886eebb91 100644 --- a/include/asm-i386/ide.h +++ b/include/asm-i386/ide.h @@ -16,7 +16,11 @@ #include <linux/config.h> #ifndef MAX_HWIFS +# ifdef CONFIG_BLK_DEV_IDEPCI #define MAX_HWIFS 10 +# else +#define MAX_HWIFS 6 +# endif #endif #define ide__sti() __sti() diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index ac0ff6e1e..36f2c8855 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h @@ -279,6 +279,8 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, #define __restore_flags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") #define __cli() __asm__ __volatile__("cli": : :"memory") #define __sti() __asm__ __volatile__("sti": : :"memory") +/* used in the idle loop; sti takes one instruction cycle to complete */ +#define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory") /* For spinlocks etc */ #define local_irq_save(x) __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory") |