/linux-2.4.37.9/arch/ppc/lib/ |
D | locks.c | 99 void _read_lock(rwlock_t *rw) in _read_lock() argument 106 atomic_inc((atomic_t *) &(rw)->lock); in _read_lock() 107 if ( (signed long)((rw)->lock) < 0) /* someone has a write lock */ in _read_lock() 110 atomic_dec((atomic_t *) &(rw)->lock); in _read_lock() 112 while ((signed long)((rw)->lock) < 0) in _read_lock() 116 printk("_read_lock(%p) CPU#%d\n", rw, cpu); in _read_lock() 126 void _read_unlock(rwlock_t *rw) in _read_unlock() argument 128 if ( rw->lock == 0 ) in _read_unlock() 131 rw->lock); in _read_unlock() 133 atomic_dec((atomic_t *) &(rw)->lock); in _read_unlock() [all …]
|
/linux-2.4.37.9/include/asm-x86_64/ |
D | rwlock.h | 26 #define __build_read_lock_ptr(rw, helper) \ argument 34 ::"a" (rw) : "memory") 36 #define __build_read_lock_const(rw, helper) \ argument 47 :"=m" (*((volatile int *)rw))::"memory") 49 #define __build_read_lock(rw, helper) do { \ argument 50 if (__builtin_constant_p(rw)) \ 51 __build_read_lock_const(rw, helper); \ 53 __build_read_lock_ptr(rw, helper); \ 56 #define __build_write_lock_ptr(rw, helper) \ argument 64 ::"a" (rw) : "memory") [all …]
|
D | spinlock.h | 152 extern inline void read_lock(rwlock_t *rw) in read_lock() argument 155 if (rw->magic != RWLOCK_MAGIC) in read_lock() 158 __build_read_lock(rw, "__read_lock_failed"); in read_lock() 161 static inline void write_lock(rwlock_t *rw) in write_lock() argument 164 if (rw->magic != RWLOCK_MAGIC) in write_lock() 167 __build_write_lock(rw, "__write_lock_failed"); in write_lock() 170 #define read_unlock(rw) asm volatile("lock ; incl %0" :"=m" ((rw)->lock) : : "memory") argument 171 #define write_unlock(rw) asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ",%0":"=m" ((rw)->lock) : : … argument
|
/linux-2.4.37.9/include/asm-i386/ |
D | rwlock.h | 23 #define __build_read_lock_ptr(rw, helper) \ argument 31 ::"a" (rw) : "memory") 33 #define __build_read_lock_const(rw, helper) \ argument 44 :"=m" (*(volatile int *)rw) : : "memory") 46 #define __build_read_lock(rw, helper) do { \ argument 47 if (__builtin_constant_p(rw)) \ 48 __build_read_lock_const(rw, helper); \ 50 __build_read_lock_ptr(rw, helper); \ 53 #define __build_write_lock_ptr(rw, helper) \ argument 61 ::"a" (rw) : "memory") [all …]
|
D | spinlock.h | 182 static inline void read_lock(rwlock_t *rw) in read_lock() argument 185 if (rw->magic != RWLOCK_MAGIC) in read_lock() 188 __build_read_lock(rw, "__read_lock_failed"); in read_lock() 191 static inline void write_lock(rwlock_t *rw) in write_lock() argument 194 if (rw->magic != RWLOCK_MAGIC) in write_lock() 197 __build_write_lock(rw, "__write_lock_failed"); in write_lock() 200 #define read_unlock(rw) asm volatile("lock ; incl %0" :"=m" ((rw)->lock) : : "memory") argument 201 #define write_unlock(rw) asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ",%0":"=m" ((rw)->lock) : : … argument
|
/linux-2.4.37.9/include/asm-ppc/ |
D | spinlock.h | 108 extern void _read_lock(rwlock_t *rw); 109 extern void _read_unlock(rwlock_t *rw); 110 extern void _write_lock(rwlock_t *rw); 111 extern void _write_unlock(rwlock_t *rw); 113 #define read_lock(rw) _read_lock(rw) argument 114 #define write_lock(rw) _write_lock(rw) argument 115 #define write_unlock(rw) _write_unlock(rw) argument 116 #define read_unlock(rw) _read_unlock(rw) argument 120 static __inline__ void read_lock(rwlock_t *rw) in read_lock() argument 137 : "r"(&rw->lock) in read_lock() [all …]
|
/linux-2.4.37.9/include/asm-parisc/ |
D | spinlock.h | 24 static inline void read_lock(rwlock_t *rw) in read_lock() argument 27 spin_lock_irqsave(&rw->lock, flags); in read_lock() 29 rw->counter++; in read_lock() 31 spin_unlock_irqrestore(&rw->lock, flags); in read_lock() 34 static inline void read_unlock(rwlock_t *rw) in read_unlock() argument 37 spin_lock_irqsave(&rw->lock, flags); in read_unlock() 39 rw->counter--; in read_unlock() 41 spin_unlock_irqrestore(&rw->lock, flags); in read_unlock() 53 static inline void write_lock(rwlock_t *rw) in write_lock() argument 56 spin_lock(&rw->lock); in write_lock() [all …]
|
/linux-2.4.37.9/include/asm-ppc64/ |
D | spinlock.h | 198 static __inline__ int read_trylock(rwlock_t *rw) in read_trylock() argument 213 : "r"(&rw->lock) in read_trylock() 220 static __inline__ void read_lock(rwlock_t *rw) in read_lock() argument 255 : "r"(&rw->lock) in read_lock() 261 static __inline__ void read_lock(rwlock_t *rw) in read_lock() argument 292 : "r"(&rw->lock) in read_lock() 296 static __inline__ void read_lock(rwlock_t *rw) in read_lock() argument 316 : "r"(&rw->lock) in read_lock() 322 static __inline__ void read_unlock(rwlock_t *rw) in read_unlock() argument 333 : "r"(&rw->lock) in read_unlock() [all …]
|
/linux-2.4.37.9/arch/sparc/lib/ |
D | debuglocks.c | 109 void _do_read_lock(rwlock_t *rw, char *str) in _do_read_lock() argument 119 __asm__ __volatile__("ldstub [%1 + 3], %0" : "=r" (val) : "r" (&(rw->lock))); in _do_read_lock() 121 while(rw->lock & 0xff) { in _do_read_lock() 123 show_read(str, rw, caller); in _do_read_lock() 131 rw->reader_pc[cpu] = caller; in _do_read_lock() 133 rw->lock++; in _do_read_lock() 136 void _do_read_unlock(rwlock_t *rw, char *str) in _do_read_unlock() argument 146 __asm__ __volatile__("ldstub [%1 + 3], %0" : "=r" (val) : "r" (&(rw->lock))); in _do_read_unlock() 148 while(rw->lock & 0xff) { in _do_read_unlock() 150 show_read(str, rw, caller); in _do_read_unlock() [all …]
|
/linux-2.4.37.9/arch/sparc64/lib/ |
D | debuglocks.c | 113 void _do_read_lock (rwlock_t *rw, char *str) in _do_read_lock() argument 123 while (((long)(rw->lock)) < 0) { in _do_read_lock() 126 show_read(str, rw, caller); in _do_read_lock() 140 : "0" (&(rw->lock)) in _do_read_lock() 145 rw->reader_pc[cpu] = ((unsigned int)caller); in _do_read_lock() 150 void _do_read_unlock (rwlock_t *rw, char *str) in _do_read_unlock() argument 160 rw->reader_pc[cpu] = 0; in _do_read_unlock() 172 : "0" (&(rw->lock)) in _do_read_unlock() 177 show_read(str, rw, caller); in _do_read_unlock() 184 void _do_write_lock (rwlock_t *rw, char *str) in _do_write_lock() argument [all …]
|
/linux-2.4.37.9/include/asm-mips/ |
D | spinlock.h | 83 static inline void read_lock(rwlock_t *rw) in read_lock() argument 96 : "=m" (rw->lock), "=&r" (tmp) in read_lock() 97 : "m" (rw->lock) in read_lock() 104 static inline void read_unlock(rwlock_t *rw) in read_unlock() argument 116 : "=m" (rw->lock), "=&r" (tmp) in read_unlock() 117 : "m" (rw->lock) in read_unlock() 121 static inline void write_lock(rwlock_t *rw) in write_lock() argument 134 : "=m" (rw->lock), "=&r" (tmp) in write_lock() 135 : "m" (rw->lock) in write_lock() 139 static inline void write_unlock(rwlock_t *rw) in write_unlock() argument [all …]
|
/linux-2.4.37.9/include/asm-mips64/ |
D | spinlock.h | 100 static inline void read_lock(rwlock_t *rw) in read_lock() argument 113 : "=m" (rw->lock), "=&r" (tmp) in read_lock() 114 : "m" (rw->lock) in read_lock() 121 static inline void read_unlock(rwlock_t *rw) in read_unlock() argument 133 : "=m" (rw->lock), "=&r" (tmp) in read_unlock() 134 : "m" (rw->lock) in read_unlock() 138 static inline void write_lock(rwlock_t *rw) in write_lock() argument 151 : "=m" (rw->lock), "=&r" (tmp) in write_lock() 152 : "m" (rw->lock) in write_lock() 156 static inline void write_unlock(rwlock_t *rw) in write_unlock() argument [all …]
|
/linux-2.4.37.9/arch/sparc/kernel/ |
D | process.c | 204 void show_regwindow(struct reg_window *rw) in show_regwindow() argument 208 rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3], in show_regwindow() 209 rw->locals[4], rw->locals[5], rw->locals[6], rw->locals[7]); in show_regwindow() 212 rw->ins[0], rw->ins[1], rw->ins[2], rw->ins[3], in show_regwindow() 213 rw->ins[4], rw->ins[5], rw->ins[6], rw->ins[7]); in show_regwindow() 220 struct reg_window *rw; in __show_backtrace() local 226 rw = (struct reg_window *)fp; in __show_backtrace() 227 while(rw && (((unsigned long) rw) >= PAGE_OFFSET) && in __show_backtrace() 228 !(((unsigned long) rw) & 0x7)) { in __show_backtrace() 231 rw->ins[0], rw->ins[1], rw->ins[2], rw->ins[3], in __show_backtrace() [all …]
|
/linux-2.4.37.9/arch/sparc64/kernel/ |
D | process.c | 173 struct reg_window32 *rw; in show_regwindow32() local 178 rw = (struct reg_window32 *)((long)(unsigned)regs->u_regs[14]); in show_regwindow32() 181 if (copy_from_user (&r_w, rw, sizeof(r_w))) { in show_regwindow32() 185 rw = &r_w; in show_regwindow32() 189 rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3], in show_regwindow32() 190 rw->locals[4], rw->locals[5], rw->locals[6], rw->locals[7]); in show_regwindow32() 193 rw->ins[0], rw->ins[1], rw->ins[2], rw->ins[3], in show_regwindow32() 194 rw->ins[4], rw->ins[5], rw->ins[6], rw->ins[7]); in show_regwindow32() 199 struct reg_window *rw; in show_regwindow() local 205 rw = (struct reg_window *)(regs->u_regs[14] + STACK_BIAS); in show_regwindow() [all …]
|
/linux-2.4.37.9/include/asm-sparc/ |
D | spinlock.h | 54 extern void _do_read_lock(rwlock_t *rw, char *str); 55 extern void _do_read_unlock(rwlock_t *rw, char *str); 56 extern void _do_write_lock(rwlock_t *rw, char *str); 57 extern void _do_write_unlock(rwlock_t *rw); 168 extern __inline__ void _read_lock(rwlock_t *rw) in _read_lock() argument 171 lp = rw; in _read_lock() 188 extern __inline__ void _read_unlock(rwlock_t *rw) in _read_unlock() argument 191 lp = rw; in _read_unlock() 208 extern __inline__ void write_lock(rwlock_t *rw) in write_lock() argument 211 lp = rw; in write_lock() [all …]
|
/linux-2.4.37.9/include/asm-s390/ |
D | spinlock.h | 79 #define read_lock(rw) \ argument 87 : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" ) 89 #define read_unlock(rw) \ argument 97 : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" ) 99 #define write_lock(rw) \ argument 107 : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" ) 109 #define write_unlock(rw) \ argument 117 : : "a" (&(rw)->lock) : "2", "3", "cc", "memory" )
|
/linux-2.4.37.9/include/asm-s390x/ |
D | spinlock.h | 94 #define read_lock(rw) \ argument 102 : : "a" (&(rw)->lock), "i" (__DIAG44_OPERAND) \ 105 #define read_unlock(rw) \ argument 113 : : "a" (&(rw)->lock), "i" (__DIAG44_OPERAND) \ 116 #define write_lock(rw) \ argument 123 : : "a" (&(rw)->lock), "i" (__DIAG44_OPERAND) \ 126 #define write_unlock(rw) \ argument 133 : : "a" (&(rw)->lock), "i" (__DIAG44_OPERAND) \
|
/linux-2.4.37.9/mm/ |
D | page_io.c | 36 static int rw_swap_page_base(int rw, swp_entry_t entry, struct page *page) in rw_swap_page_base() argument 45 if (rw == READ) { in rw_swap_page_base() 74 brw_page(rw, page, dev, zones, block_size); in rw_swap_page_base() 85 void rw_swap_page(int rw, struct page *page) in rw_swap_page() argument 95 if (!rw_swap_page_base(rw, entry, page)) in rw_swap_page() 104 void rw_swap_page_nolock(int rw, swp_entry_t entry, char *buf) in rw_swap_page_nolock() argument 114 if (rw_swap_page_base(rw, entry, page)) in rw_swap_page_nolock()
|
/linux-2.4.37.9/include/asm-ia64/ |
D | spinlock.h | 120 #define read_lock(rw) \ argument 139 : "r" (rw) : "p7", "memory"); \ 142 #define read_unlock(rw) \ argument 147 : "r" (rw) \ 151 #define write_lock(rw) \ argument 168 :: "r"(rw) : "ar.ccv", "p7", "r2", "r29", "memory"); \
|
/linux-2.4.37.9/drivers/ide/raid/ |
D | hptraid.c | 70 static int hptraidspan_make_request (request_queue_t *q, int rw, struct buffer_head * bh); 71 static int hptraid0_make_request (request_queue_t *q, int rw, struct buffer_head * bh); 72 static int hptraid1_make_request (request_queue_t *q, int rw, struct buffer_head * bh); 73 static int hptraid01_make_request (request_queue_t *q, int rw, struct buffer_head * bh); 230 static int hptraidspan_make_request (request_queue_t *q, int rw, struct buffer_head * bh) in hptraidspan_make_request() argument 278 int rw, struct buffer_head * bh) in hptraid0_compute_request() argument 362 static int hptraid0_make_request (request_queue_t *q, int rw, struct buffer_head * bh) in hptraid0_make_request() argument 381 if( hptraid0_compute_request(raid+device, q, rw, bh) != 1 ) { in hptraid0_make_request() 390 static int hptraid1_read_request (request_queue_t *q, int rw, struct buffer_head * bh) in hptraid1_read_request() argument 443 static int hptraid1_write_request(request_queue_t *q, int rw, struct buffer_head * bh) in hptraid1_write_request() argument [all …]
|
D | ataraid.c | 46 static void ataraid_split_request(request_queue_t *q, int rw, struct buffer_head * bh); 101 static int ataraid_make_request (request_queue_t *q, int rw, struct buffer_head * bh) in ataraid_make_request() argument 109 retval= (ataraid_ops[minor]->make_request)(q,rw,bh); in ataraid_make_request() 111 ataraid_split_request(q,rw,bh); in ataraid_make_request() 166 static void ataraid_split_request(request_queue_t *q, int rw, struct buffer_head * bh) in ataraid_split_request() argument 197 generic_make_request(rw,bh1); in ataraid_split_request() 198 generic_make_request(rw,bh2); in ataraid_split_request()
|
/linux-2.4.37.9/drivers/block/ |
D | ll_rw_blk.c | 481 static int __make_request(request_queue_t * q, int rw, struct buffer_head * bh); 549 static struct request *get_request(request_queue_t *q, int rw) in get_request() argument 564 if ((rw == WRITE) || (rw == READ && rl->pending[READ] > rlim)) in get_request() 574 rl->pending[rw]++; in get_request() 576 rq->cmd = rw; in get_request() 629 static struct request *__get_request_wait(request_queue_t *q, int rw) in __get_request_wait() argument 645 rq = get_request(q, rw); in __get_request_wait() 654 static void get_request_wait_wakeup(request_queue_t *q, int rw) in get_request_wait_wakeup() argument 690 inline void drive_stat_acct (kdev_t dev, int rw, in drive_stat_acct() argument 701 if (rw == READ) { in drive_stat_acct() [all …]
|
D | rd.c | 161 static int rd_blkdev_pagecache_IO(int rw, struct buffer_head * sbh, int minor) in rd_blkdev_pagecache_IO() argument 172 if (rw == WRITE) { in rd_blkdev_pagecache_IO() 203 if (rw == READ) { in rd_blkdev_pagecache_IO() 219 if (rw == READ) { in rd_blkdev_pagecache_IO() 240 static int rd_make_request(request_queue_t * q, int rw, struct buffer_head *sbh) in rd_make_request() argument 257 if (rw==READA) in rd_make_request() 258 rw=READ; in rd_make_request() 259 if ((rw != READ) && (rw != WRITE)) { in rd_make_request() 260 printk(KERN_INFO "RAMDISK: bad command: %d\n", rw); in rd_make_request() 264 if (rd_blkdev_pagecache_IO(rw, sbh, minor)) in rd_make_request()
|
/linux-2.4.37.9/drivers/sbus/char/ |
D | sab82532.c | 759 tmp = readb(&info->regs->rw.ccr0); in sab82532_init_line() 761 writeb(tmp, &info->regs->rw.ccr0); in sab82532_init_line() 805 tmp = readb(&info->regs->rw.mode); in startup() 808 writeb(tmp, &info->regs->rw.mode); in startup() 810 tmp = readb(&info->regs->rw.pvr); in startup() 812 writeb(tmp, &info->regs->rw.pvr); in startup() 904 writeb(tmp, &info->regs->rw.mode); in shutdown() 905 writeb(readb(&info->regs->rw.pvr) | info->pvr_dtr_bit, in shutdown() 906 &info->regs->rw.pvr); in shutdown() 910 tmp = readb(&info->regs->rw.dafo); in shutdown() [all …]
|
/linux-2.4.37.9/arch/ppc/platforms/ |
D | apus_pci.c | 68 #define APUS_PCI_OP(rw, size, type, op, mask) \ argument 70 apus_pcibios_##rw##_config_##size(struct pci_dev *dev, int offset, type val) \ 76 cfg_##rw##_bad; \ 80 cfg_##rw(val, apus_hose->cfg_data + (fnno<<5) + (offset ^ mask), \ 85 offset, cfg_##rw##_val(val)); \
|