diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:33:52 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:33:52 -0800 |
| commit | 5aa875d2cbee34727963bd81aa992b64480045ca (patch) | |
| tree | 56e417ffca41ad67797b4354d3e4ab19bd078502 /include | |
| parent | 6293d56ca18db9ed322b2a5550ac7b27bd538cff (diff) | |
v2.4.14.7 -> v2.4.14.8
- Richard Henderson: alpha update
- Andrew Morton: fix ext3/minix/sysv fsync behaviour.
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-alpha/semaphore.h | 11 | ||||
| -rw-r--r-- | include/asm-alpha/spinlock.h | 15 | ||||
| -rw-r--r-- | include/linux/pci.h | 16 | ||||
| -rw-r--r-- | include/linux/sched.h | 1 |
4 files changed, 19 insertions, 24 deletions
diff --git a/include/asm-alpha/semaphore.h b/include/asm-alpha/semaphore.h index b5d6082085c1..ab26cfbaddbf 100644 --- a/include/asm-alpha/semaphore.h +++ b/include/asm-alpha/semaphore.h @@ -15,9 +15,6 @@ #include <linux/wait.h> #include <linux/rwsem.h> -#define DEBUG_SEMAPHORE 0 -#define DEBUG_RW_SEMAPHORE 0 - struct semaphore { /* Careful, inline assembly knows about the position of these two. */ atomic_t count __attribute__((aligned(8))); @@ -92,14 +89,14 @@ extern void __up_wakeup(struct semaphore *); static inline void __down(struct semaphore *sem) { long count = atomic_dec_return(&sem->count); - if (__builtin_expect(count < 0, 0)) + if (unlikely(count < 0)) __down_failed(sem); } static inline int __down_interruptible(struct semaphore *sem) { long count = atomic_dec_return(&sem->count); - if (__builtin_expect(count < 0, 0)) + if (unlikely(count < 0)) return __down_failed_interruptible(sem); return 0; } @@ -201,11 +198,11 @@ static inline void __up(struct semaphore *sem) : "m"(*sem), "r"(0x0000000100000000) : "memory"); - if (__builtin_expect(ret <= 0, 0)) + if (unlikely(ret <= 0)) __up_wakeup(sem); } -#if !WAITQUEUE_DEBUG && !DEBUG_SEMAPHORE +#if !WAITQUEUE_DEBUG && !defined(CONFIG_DEBUG_SEMAPHORE) extern inline void down(struct semaphore *sem) { __down(sem); diff --git a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h index bf560fde0a35..f93eac565509 100644 --- a/include/asm-alpha/spinlock.h +++ b/include/asm-alpha/spinlock.h @@ -1,12 +1,11 @@ #ifndef _ALPHA_SPINLOCK_H #define _ALPHA_SPINLOCK_H +#include <linux/config.h> #include <asm/system.h> #include <linux/kernel.h> #include <asm/current.h> -#define DEBUG_SPINLOCK 0 -#define DEBUG_RWLOCK 0 /* * Simple spin lock operations. There are two variants, one clears IRQ's @@ -17,7 +16,7 @@ typedef struct { volatile unsigned int lock /*__attribute__((aligned(32))) */; -#if DEBUG_SPINLOCK +#if CONFIG_DEBUG_SPINLOCK int on_cpu; int line_no; void *previous; @@ -26,7 +25,7 @@ typedef struct { #endif } spinlock_t; -#if DEBUG_SPINLOCK +#if CONFIG_DEBUG_SPINLOCK #define SPIN_LOCK_UNLOCKED (spinlock_t) {0, -1, 0, 0, 0, 0} #define spin_lock_init(x) \ ((x)->lock = 0, (x)->on_cpu = -1, (x)->previous = 0, (x)->task = 0) @@ -38,7 +37,7 @@ typedef struct { #define spin_is_locked(x) ((x)->lock != 0) #define spin_unlock_wait(x) ({ do { barrier(); } while ((x)->lock); }) -#if DEBUG_SPINLOCK +#if CONFIG_DEBUG_SPINLOCK extern void spin_unlock(spinlock_t * lock); extern void debug_spin_lock(spinlock_t * lock, const char *, int); extern int debug_spin_trylock(spinlock_t * lock, const char *, int); @@ -86,7 +85,7 @@ static inline void spin_lock(spinlock_t * lock) #define spin_trylock(lock) (!test_and_set_bit(0,(lock))) #define spin_lock_own(LOCK, LOCATION) ((void)0) -#endif /* DEBUG_SPINLOCK */ +#endif /* CONFIG_DEBUG_SPINLOCK */ /***********************************************************/ @@ -98,7 +97,7 @@ typedef struct { #define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0) -#if DEBUG_RWLOCK +#if CONFIG_DEBUG_RWLOCK extern void write_lock(rwlock_t * lock); extern void read_lock(rwlock_t * lock); #else @@ -141,7 +140,7 @@ static inline void read_lock(rwlock_t * lock) : "=m" (*(volatile int *)lock), "=&r" (regx) : "m" (*(volatile int *)lock) : "memory"); } -#endif /* DEBUG_RWLOCK */ +#endif /* CONFIG_DEBUG_RWLOCK */ static inline void write_unlock(rwlock_t * lock) { diff --git a/include/linux/pci.h b/include/linux/pci.h index e1cd3b4203e0..4971fa3c3586 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -116,21 +116,21 @@ #define PCI_SEC_LATENCY_TIMER 0x1b /* Latency timer for secondary interface */ #define PCI_IO_BASE 0x1c /* I/O range behind the bridge */ #define PCI_IO_LIMIT 0x1d -#define PCI_IO_RANGE_TYPE_MASK 0x0f /* I/O bridging type */ +#define PCI_IO_RANGE_TYPE_MASK 0x0fUL /* I/O bridging type */ #define PCI_IO_RANGE_TYPE_16 0x00 #define PCI_IO_RANGE_TYPE_32 0x01 -#define PCI_IO_RANGE_MASK ~0x0f +#define PCI_IO_RANGE_MASK (~0x0fUL) #define PCI_SEC_STATUS 0x1e /* Secondary status register, only bit 14 used */ #define PCI_MEMORY_BASE 0x20 /* Memory range behind */ #define PCI_MEMORY_LIMIT 0x22 -#define PCI_MEMORY_RANGE_TYPE_MASK 0x0f -#define PCI_MEMORY_RANGE_MASK ~0x0f +#define PCI_MEMORY_RANGE_TYPE_MASK 0x0fUL +#define PCI_MEMORY_RANGE_MASK (~0x0fUL) #define PCI_PREF_MEMORY_BASE 0x24 /* Prefetchable memory range behind */ #define PCI_PREF_MEMORY_LIMIT 0x26 -#define PCI_PREF_RANGE_TYPE_MASK 0x0f +#define PCI_PREF_RANGE_TYPE_MASK 0x0fUL #define PCI_PREF_RANGE_TYPE_32 0x00 #define PCI_PREF_RANGE_TYPE_64 0x01 -#define PCI_PREF_RANGE_MASK ~0x0f +#define PCI_PREF_RANGE_MASK (~0x0fUL) #define PCI_PREF_BASE_UPPER32 0x28 /* Upper half of prefetchable memory range */ #define PCI_PREF_LIMIT_UPPER32 0x2c #define PCI_IO_BASE_UPPER16 0x30 /* Upper half of I/O addresses */ @@ -168,7 +168,7 @@ #define PCI_CB_IO_BASE_1_HI 0x36 #define PCI_CB_IO_LIMIT_1 0x38 #define PCI_CB_IO_LIMIT_1_HI 0x3a -#define PCI_CB_IO_RANGE_MASK ~0x03 +#define PCI_CB_IO_RANGE_MASK (~0x03UL) /* 0x3c-0x3d are same as for htype 0 */ #define PCI_CB_BRIDGE_CONTROL 0x3e #define PCI_CB_BRIDGE_CTL_PARITY 0x01 /* Similar to standard bridge control register */ @@ -402,7 +402,7 @@ struct pci_dev { #define PCI_BRIDGE_RESOURCES 7 #define PCI_NUM_RESOURCES 11 -#define PCI_REGION_FLAG_MASK 0x0f /* These bits of resource flags tell us the PCI region flags */ +#define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ struct pci_bus { struct list_head node; /* node in list of buses */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 1501cd0e9f8d..9cdc5e05d025 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -88,7 +88,6 @@ extern int last_pid; #define TASK_UNINTERRUPTIBLE 2 #define TASK_ZOMBIE 4 #define TASK_STOPPED 8 -#define TASK_DEAD 16 #define __set_task_state(tsk, state_value) \ do { (tsk)->state = (state_value); } while (0) |
