aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@tglx.tec.linutronix.de>2005-05-23 09:11:45 -0400
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-05-23 09:11:45 -0400
commitf08276136bdc8607c1da493279569beb9859b133 (patch)
tree5a4e7ea9300eece5ff5187fa7f64f0f48f37cf12 /include/linux
parent7d27c8143c8234e1cae8285fd2d43c19dad69bde (diff)
parent1263cc67c09bc7f913a6877f3ba0427f0b76617e (diff)
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/err.h4
-rw-r--r--include/linux/mmc/protocol.h27
-rw-r--r--include/linux/spinlock.h8
-rw-r--r--include/linux/vmalloc.h1
4 files changed, 35 insertions, 5 deletions
diff --git a/include/linux/err.h b/include/linux/err.h
index 17c55df13615..ff71d2af5da3 100644
--- a/include/linux/err.h
+++ b/include/linux/err.h
@@ -13,6 +13,8 @@
13 * This should be a per-architecture thing, to allow different 13 * This should be a per-architecture thing, to allow different
14 * error and pointer decisions. 14 * error and pointer decisions.
15 */ 15 */
16#define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L)
17
16static inline void *ERR_PTR(long error) 18static inline void *ERR_PTR(long error)
17{ 19{
18 return (void *) error; 20 return (void *) error;
@@ -25,7 +27,7 @@ static inline long PTR_ERR(const void *ptr)
25 27
26static inline long IS_ERR(const void *ptr) 28static inline long IS_ERR(const void *ptr)
27{ 29{
28 return unlikely((unsigned long)ptr > (unsigned long)-1000L); 30 return IS_ERR_VALUE((unsigned long)ptr);
29} 31}
30 32
31#endif /* _LINUX_ERR_H */ 33#endif /* _LINUX_ERR_H */
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h
index 7b904c5102f6..896342817b97 100644
--- a/include/linux/mmc/protocol.h
+++ b/include/linux/mmc/protocol.h
@@ -195,6 +195,33 @@ struct _mmc_csd {
195#define MMC_VDD_35_36 0x00800000 /* VDD voltage 3.5 ~ 3.6 */ 195#define MMC_VDD_35_36 0x00800000 /* VDD voltage 3.5 ~ 3.6 */
196#define MMC_CARD_BUSY 0x80000000 /* Card Power up status bit */ 196#define MMC_CARD_BUSY 0x80000000 /* Card Power up status bit */
197 197
198/*
199 * Card Command Classes (CCC)
200 */
201#define CCC_BASIC (1<<0) /* (0) Basic protocol functions */
202 /* (CMD0,1,2,3,4,7,9,10,12,13,15) */
203#define CCC_STREAM_READ (1<<1) /* (1) Stream read commands */
204 /* (CMD11) */
205#define CCC_BLOCK_READ (1<<2) /* (2) Block read commands */
206 /* (CMD16,17,18) */
207#define CCC_STREAM_WRITE (1<<3) /* (3) Stream write commands */
208 /* (CMD20) */
209#define CCC_BLOCK_WRITE (1<<4) /* (4) Block write commands */
210 /* (CMD16,24,25,26,27) */
211#define CCC_ERASE (1<<5) /* (5) Ability to erase blocks */
212 /* (CMD32,33,34,35,36,37,38,39) */
213#define CCC_WRITE_PROT (1<<6) /* (6) Able to write protect blocks */
214 /* (CMD28,29,30) */
215#define CCC_LOCK_CARD (1<<7) /* (7) Able to lock down card */
216 /* (CMD16,CMD42) */
217#define CCC_APP_SPEC (1<<8) /* (8) Application specific */
218 /* (CMD55,56,57,ACMD*) */
219#define CCC_IO_MODE (1<<9) /* (9) I/O mode */
220 /* (CMD5,39,40,52,53) */
221#define CCC_SWITCH (1<<10) /* (10) High speed switch */
222 /* (CMD6,34,35,36,37,50) */
223 /* (11) Reserved */
224 /* (CMD?) */
198 225
199/* 226/*
200 * CSD field definitions 227 * CSD field definitions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index e895f3eaf53a..d6ba068719b6 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -248,7 +248,7 @@ typedef struct {
248 248
249#define _spin_trylock_bh(lock) ({preempt_disable(); local_bh_disable(); \ 249#define _spin_trylock_bh(lock) ({preempt_disable(); local_bh_disable(); \
250 _raw_spin_trylock(lock) ? \ 250 _raw_spin_trylock(lock) ? \
251 1 : ({preempt_enable(); local_bh_enable(); 0;});}) 251 1 : ({preempt_enable_no_resched(); local_bh_enable(); 0;});})
252 252
253#define _spin_lock(lock) \ 253#define _spin_lock(lock) \
254do { \ 254do { \
@@ -383,7 +383,7 @@ do { \
383#define _spin_unlock_bh(lock) \ 383#define _spin_unlock_bh(lock) \
384do { \ 384do { \
385 _raw_spin_unlock(lock); \ 385 _raw_spin_unlock(lock); \
386 preempt_enable(); \ 386 preempt_enable_no_resched(); \
387 local_bh_enable(); \ 387 local_bh_enable(); \
388 __release(lock); \ 388 __release(lock); \
389} while (0) 389} while (0)
@@ -391,7 +391,7 @@ do { \
391#define _write_unlock_bh(lock) \ 391#define _write_unlock_bh(lock) \
392do { \ 392do { \
393 _raw_write_unlock(lock); \ 393 _raw_write_unlock(lock); \
394 preempt_enable(); \ 394 preempt_enable_no_resched(); \
395 local_bh_enable(); \ 395 local_bh_enable(); \
396 __release(lock); \ 396 __release(lock); \
397} while (0) 397} while (0)
@@ -423,8 +423,8 @@ do { \
423#define _read_unlock_bh(lock) \ 423#define _read_unlock_bh(lock) \
424do { \ 424do { \
425 _raw_read_unlock(lock); \ 425 _raw_read_unlock(lock); \
426 preempt_enable_no_resched(); \
426 local_bh_enable(); \ 427 local_bh_enable(); \
427 preempt_enable(); \
428 __release(lock); \ 428 __release(lock); \
429} while (0) 429} while (0)
430 430
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 3a358c895188..6409d9cf5965 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -41,6 +41,7 @@ extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags);
41extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, 41extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
42 unsigned long start, unsigned long end); 42 unsigned long start, unsigned long end);
43extern struct vm_struct *remove_vm_area(void *addr); 43extern struct vm_struct *remove_vm_area(void *addr);
44extern struct vm_struct *__remove_vm_area(void *addr);
44extern int map_vm_area(struct vm_struct *area, pgprot_t prot, 45extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
45 struct page ***pages); 46 struct page ***pages);
46extern void unmap_vm_area(struct vm_struct *area); 47extern void unmap_vm_area(struct vm_struct *area);