diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /include/asm-s390 | |
parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) |
Merge branch 'linus'
Diffstat (limited to 'include/asm-s390')
-rw-r--r-- | include/asm-s390/atomic.h | 18 | ||||
-rw-r--r-- | include/asm-s390/percpu.h | 7 | ||||
-rw-r--r-- | include/asm-s390/pgalloc.h | 7 |
3 files changed, 17 insertions, 15 deletions
diff --git a/include/asm-s390/atomic.h b/include/asm-s390/atomic.h index be6fefe223d6..de1d9926aa60 100644 --- a/include/asm-s390/atomic.h +++ b/include/asm-s390/atomic.h | |||
@@ -89,10 +89,15 @@ static __inline__ int atomic_cmpxchg(atomic_t *v, int old, int new) | |||
89 | static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | 89 | static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) |
90 | { | 90 | { |
91 | int c, old; | 91 | int c, old; |
92 | |||
93 | c = atomic_read(v); | 92 | c = atomic_read(v); |
94 | while (c != u && (old = atomic_cmpxchg(v, c, c + a)) != c) | 93 | for (;;) { |
94 | if (unlikely(c == u)) | ||
95 | break; | ||
96 | old = atomic_cmpxchg(v, c, c + a); | ||
97 | if (likely(old == c)) | ||
98 | break; | ||
95 | c = old; | 99 | c = old; |
100 | } | ||
96 | return c != u; | 101 | return c != u; |
97 | } | 102 | } |
98 | 103 | ||
@@ -167,10 +172,15 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, | |||
167 | long long a, long long u) | 172 | long long a, long long u) |
168 | { | 173 | { |
169 | long long c, old; | 174 | long long c, old; |
170 | |||
171 | c = atomic64_read(v); | 175 | c = atomic64_read(v); |
172 | while (c != u && (old = atomic64_cmpxchg(v, c, c + a)) != c) | 176 | for (;;) { |
177 | if (unlikely(c == u)) | ||
178 | break; | ||
179 | old = atomic64_cmpxchg(v, c, c + a); | ||
180 | if (likely(old == c)) | ||
181 | break; | ||
173 | c = old; | 182 | c = old; |
183 | } | ||
174 | return c != u; | 184 | return c != u; |
175 | } | 185 | } |
176 | 186 | ||
diff --git a/include/asm-s390/percpu.h b/include/asm-s390/percpu.h index 123fcaca295e..e10ed87094f0 100644 --- a/include/asm-s390/percpu.h +++ b/include/asm-s390/percpu.h | |||
@@ -46,10 +46,9 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
46 | #define percpu_modcopy(pcpudst, src, size) \ | 46 | #define percpu_modcopy(pcpudst, src, size) \ |
47 | do { \ | 47 | do { \ |
48 | unsigned int __i; \ | 48 | unsigned int __i; \ |
49 | for (__i = 0; __i < NR_CPUS; __i++) \ | 49 | for_each_cpu(__i) \ |
50 | if (cpu_possible(__i)) \ | 50 | memcpy((pcpudst)+__per_cpu_offset[__i], \ |
51 | memcpy((pcpudst)+__per_cpu_offset[__i], \ | 51 | (src), (size)); \ |
52 | (src), (size)); \ | ||
53 | } while (0) | 52 | } while (0) |
54 | 53 | ||
55 | #else /* ! SMP */ | 54 | #else /* ! SMP */ |
diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h index 3417dd71ab43..e28aaf28e4a8 100644 --- a/include/asm-s390/pgalloc.h +++ b/include/asm-s390/pgalloc.h | |||
@@ -158,11 +158,4 @@ static inline void pte_free(struct page *pte) | |||
158 | 158 | ||
159 | #define __pte_free_tlb(tlb,pte) tlb_remove_page(tlb,pte) | 159 | #define __pte_free_tlb(tlb,pte) tlb_remove_page(tlb,pte) |
160 | 160 | ||
161 | /* | ||
162 | * This establishes kernel virtual mappings (e.g., as a result of a | ||
163 | * vmalloc call). Since s390-esame uses a separate kernel page table, | ||
164 | * there is nothing to do here... :) | ||
165 | */ | ||
166 | #define set_pgdir(addr,entry) do { } while(0) | ||
167 | |||
168 | #endif /* _S390_PGALLOC_H */ | 161 | #endif /* _S390_PGALLOC_H */ |