diff options
Diffstat (limited to 'arch/cris')
-rw-r--r-- | arch/cris/include/arch-v32/arch/spinlock.h | 62 | ||||
-rw-r--r-- | arch/cris/include/asm/elf.h | 2 | ||||
-rw-r--r-- | arch/cris/kernel/irq.c | 4 |
3 files changed, 33 insertions, 35 deletions
diff --git a/arch/cris/include/arch-v32/arch/spinlock.h b/arch/cris/include/arch-v32/arch/spinlock.h index 367a53ea10c5..f171a6600fbc 100644 --- a/arch/cris/include/arch-v32/arch/spinlock.h +++ b/arch/cris/include/arch-v32/arch/spinlock.h | |||
@@ -9,12 +9,12 @@ extern void cris_spin_unlock(void *l, int val); | |||
9 | extern void cris_spin_lock(void *l); | 9 | extern void cris_spin_lock(void *l); |
10 | extern int cris_spin_trylock(void *l); | 10 | extern int cris_spin_trylock(void *l); |
11 | 11 | ||
12 | static inline int __raw_spin_is_locked(raw_spinlock_t *x) | 12 | static inline int arch_spin_is_locked(arch_spinlock_t *x) |
13 | { | 13 | { |
14 | return *(volatile signed char *)(&(x)->slock) <= 0; | 14 | return *(volatile signed char *)(&(x)->slock) <= 0; |
15 | } | 15 | } |
16 | 16 | ||
17 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) | 17 | static inline void arch_spin_unlock(arch_spinlock_t *lock) |
18 | { | 18 | { |
19 | __asm__ volatile ("move.d %1,%0" \ | 19 | __asm__ volatile ("move.d %1,%0" \ |
20 | : "=m" (lock->slock) \ | 20 | : "=m" (lock->slock) \ |
@@ -22,26 +22,26 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
22 | : "memory"); | 22 | : "memory"); |
23 | } | 23 | } |
24 | 24 | ||
25 | static inline void __raw_spin_unlock_wait(raw_spinlock_t *lock) | 25 | static inline void arch_spin_unlock_wait(arch_spinlock_t *lock) |
26 | { | 26 | { |
27 | while (__raw_spin_is_locked(lock)) | 27 | while (arch_spin_is_locked(lock)) |
28 | cpu_relax(); | 28 | cpu_relax(); |
29 | } | 29 | } |
30 | 30 | ||
31 | static inline int __raw_spin_trylock(raw_spinlock_t *lock) | 31 | static inline int arch_spin_trylock(arch_spinlock_t *lock) |
32 | { | 32 | { |
33 | return cris_spin_trylock((void *)&lock->slock); | 33 | return cris_spin_trylock((void *)&lock->slock); |
34 | } | 34 | } |
35 | 35 | ||
36 | static inline void __raw_spin_lock(raw_spinlock_t *lock) | 36 | static inline void arch_spin_lock(arch_spinlock_t *lock) |
37 | { | 37 | { |
38 | cris_spin_lock((void *)&lock->slock); | 38 | cris_spin_lock((void *)&lock->slock); |
39 | } | 39 | } |
40 | 40 | ||
41 | static inline void | 41 | static inline void |
42 | __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) | 42 | arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags) |
43 | { | 43 | { |
44 | __raw_spin_lock(lock); | 44 | arch_spin_lock(lock); |
45 | } | 45 | } |
46 | 46 | ||
47 | /* | 47 | /* |
@@ -56,76 +56,76 @@ __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) | |||
56 | * | 56 | * |
57 | */ | 57 | */ |
58 | 58 | ||
59 | static inline int __raw_read_can_lock(raw_rwlock_t *x) | 59 | static inline int arch_read_can_lock(arch_rwlock_t *x) |
60 | { | 60 | { |
61 | return (int)(x)->lock > 0; | 61 | return (int)(x)->lock > 0; |
62 | } | 62 | } |
63 | 63 | ||
64 | static inline int __raw_write_can_lock(raw_rwlock_t *x) | 64 | static inline int arch_write_can_lock(arch_rwlock_t *x) |
65 | { | 65 | { |
66 | return (x)->lock == RW_LOCK_BIAS; | 66 | return (x)->lock == RW_LOCK_BIAS; |
67 | } | 67 | } |
68 | 68 | ||
69 | static inline void __raw_read_lock(raw_rwlock_t *rw) | 69 | static inline void arch_read_lock(arch_rwlock_t *rw) |
70 | { | 70 | { |
71 | __raw_spin_lock(&rw->slock); | 71 | arch_spin_lock(&rw->slock); |
72 | while (rw->lock == 0); | 72 | while (rw->lock == 0); |
73 | rw->lock--; | 73 | rw->lock--; |
74 | __raw_spin_unlock(&rw->slock); | 74 | arch_spin_unlock(&rw->slock); |
75 | } | 75 | } |
76 | 76 | ||
77 | static inline void __raw_write_lock(raw_rwlock_t *rw) | 77 | static inline void arch_write_lock(arch_rwlock_t *rw) |
78 | { | 78 | { |
79 | __raw_spin_lock(&rw->slock); | 79 | arch_spin_lock(&rw->slock); |
80 | while (rw->lock != RW_LOCK_BIAS); | 80 | while (rw->lock != RW_LOCK_BIAS); |
81 | rw->lock = 0; | 81 | rw->lock = 0; |
82 | __raw_spin_unlock(&rw->slock); | 82 | arch_spin_unlock(&rw->slock); |
83 | } | 83 | } |
84 | 84 | ||
85 | static inline void __raw_read_unlock(raw_rwlock_t *rw) | 85 | static inline void arch_read_unlock(arch_rwlock_t *rw) |
86 | { | 86 | { |
87 | __raw_spin_lock(&rw->slock); | 87 | arch_spin_lock(&rw->slock); |
88 | rw->lock++; | 88 | rw->lock++; |
89 | __raw_spin_unlock(&rw->slock); | 89 | arch_spin_unlock(&rw->slock); |
90 | } | 90 | } |
91 | 91 | ||
92 | static inline void __raw_write_unlock(raw_rwlock_t *rw) | 92 | static inline void arch_write_unlock(arch_rwlock_t *rw) |
93 | { | 93 | { |
94 | __raw_spin_lock(&rw->slock); | 94 | arch_spin_lock(&rw->slock); |
95 | while (rw->lock != RW_LOCK_BIAS); | 95 | while (rw->lock != RW_LOCK_BIAS); |
96 | rw->lock = RW_LOCK_BIAS; | 96 | rw->lock = RW_LOCK_BIAS; |
97 | __raw_spin_unlock(&rw->slock); | 97 | arch_spin_unlock(&rw->slock); |
98 | } | 98 | } |
99 | 99 | ||
100 | static inline int __raw_read_trylock(raw_rwlock_t *rw) | 100 | static inline int arch_read_trylock(arch_rwlock_t *rw) |
101 | { | 101 | { |
102 | int ret = 0; | 102 | int ret = 0; |
103 | __raw_spin_lock(&rw->slock); | 103 | arch_spin_lock(&rw->slock); |
104 | if (rw->lock != 0) { | 104 | if (rw->lock != 0) { |
105 | rw->lock--; | 105 | rw->lock--; |
106 | ret = 1; | 106 | ret = 1; |
107 | } | 107 | } |
108 | __raw_spin_unlock(&rw->slock); | 108 | arch_spin_unlock(&rw->slock); |
109 | return ret; | 109 | return ret; |
110 | } | 110 | } |
111 | 111 | ||
112 | static inline int __raw_write_trylock(raw_rwlock_t *rw) | 112 | static inline int arch_write_trylock(arch_rwlock_t *rw) |
113 | { | 113 | { |
114 | int ret = 0; | 114 | int ret = 0; |
115 | __raw_spin_lock(&rw->slock); | 115 | arch_spin_lock(&rw->slock); |
116 | if (rw->lock == RW_LOCK_BIAS) { | 116 | if (rw->lock == RW_LOCK_BIAS) { |
117 | rw->lock = 0; | 117 | rw->lock = 0; |
118 | ret = 1; | 118 | ret = 1; |
119 | } | 119 | } |
120 | __raw_spin_unlock(&rw->slock); | 120 | arch_spin_unlock(&rw->slock); |
121 | return 1; | 121 | return 1; |
122 | } | 122 | } |
123 | 123 | ||
124 | #define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock) | 124 | #define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock) |
125 | #define _raw_write_lock_flags(lock, flags) _raw_write_lock(lock) | 125 | #define _raw_write_lock_flags(lock, flags) _raw_write_lock(lock) |
126 | 126 | ||
127 | #define _raw_spin_relax(lock) cpu_relax() | 127 | #define arch_spin_relax(lock) cpu_relax() |
128 | #define _raw_read_relax(lock) cpu_relax() | 128 | #define arch_read_relax(lock) cpu_relax() |
129 | #define _raw_write_relax(lock) cpu_relax() | 129 | #define arch_write_relax(lock) cpu_relax() |
130 | 130 | ||
131 | #endif /* __ASM_ARCH_SPINLOCK_H */ | 131 | #endif /* __ASM_ARCH_SPINLOCK_H */ |
diff --git a/arch/cris/include/asm/elf.h b/arch/cris/include/asm/elf.h index 0f51b10b9f4f..8a3d8e2b33c1 100644 --- a/arch/cris/include/asm/elf.h +++ b/arch/cris/include/asm/elf.h | |||
@@ -64,8 +64,6 @@ typedef unsigned long elf_fpregset_t; | |||
64 | #define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004 | 64 | #define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004 |
65 | /* End of excerpt from {binutils}/include/elf/cris.h. */ | 65 | /* End of excerpt from {binutils}/include/elf/cris.h. */ |
66 | 66 | ||
67 | #define USE_ELF_CORE_DUMP | ||
68 | |||
69 | #define ELF_EXEC_PAGESIZE 8192 | 67 | #define ELF_EXEC_PAGESIZE 8192 |
70 | 68 | ||
71 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | 69 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical |
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index 0ca7d9892cc6..b5ce0724a88f 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c | |||
@@ -52,7 +52,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
52 | } | 52 | } |
53 | 53 | ||
54 | if (i < NR_IRQS) { | 54 | if (i < NR_IRQS) { |
55 | spin_lock_irqsave(&irq_desc[i].lock, flags); | 55 | raw_spin_lock_irqsave(&irq_desc[i].lock, flags); |
56 | action = irq_desc[i].action; | 56 | action = irq_desc[i].action; |
57 | if (!action) | 57 | if (!action) |
58 | goto skip; | 58 | goto skip; |
@@ -71,7 +71,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
71 | 71 | ||
72 | seq_putc(p, '\n'); | 72 | seq_putc(p, '\n'); |
73 | skip: | 73 | skip: |
74 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 74 | raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
75 | } | 75 | } |
76 | return 0; | 76 | return 0; |
77 | } | 77 | } |