diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2006-08-04 22:50:27 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-08-04 22:50:27 -0400 |
commit | d932cb7e630cae3b6b5307b767d296ff1a597c5e (patch) | |
tree | f930d068a12a256fabef0864bcdf8e85f095369e /include/asm-s390 | |
parent | 73b59a3b1c09e4bfc678400b77b96134dcfbf112 (diff) | |
parent | f5d635f649607b09b0b4620d25d028fd2b1b7ea5 (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'include/asm-s390')
-rw-r--r-- | include/asm-s390/bug.h | 11 | ||||
-rw-r--r-- | include/asm-s390/ccwdev.h | 2 | ||||
-rw-r--r-- | include/asm-s390/cio.h | 2 | ||||
-rw-r--r-- | include/asm-s390/futex.h | 5 | ||||
-rw-r--r-- | include/asm-s390/irqflags.h | 18 | ||||
-rw-r--r-- | include/asm-s390/pgalloc.h | 2 | ||||
-rw-r--r-- | include/asm-s390/processor.h | 16 | ||||
-rw-r--r-- | include/asm-s390/setup.h | 3 | ||||
-rw-r--r-- | include/asm-s390/system.h | 10 | ||||
-rw-r--r-- | include/asm-s390/timex.h | 4 |
10 files changed, 47 insertions, 26 deletions
diff --git a/include/asm-s390/bug.h b/include/asm-s390/bug.h index 7ddaa05b98d8..876898363944 100644 --- a/include/asm-s390/bug.h +++ b/include/asm-s390/bug.h | |||
@@ -5,9 +5,18 @@ | |||
5 | 5 | ||
6 | #ifdef CONFIG_BUG | 6 | #ifdef CONFIG_BUG |
7 | 7 | ||
8 | static inline __attribute__((noreturn)) void __do_illegal_op(void) | ||
9 | { | ||
10 | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) | ||
11 | __builtin_trap(); | ||
12 | #else | ||
13 | asm volatile(".long 0"); | ||
14 | #endif | ||
15 | } | ||
16 | |||
8 | #define BUG() do { \ | 17 | #define BUG() do { \ |
9 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 18 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ |
10 | __builtin_trap(); \ | 19 | __do_illegal_op(); \ |
11 | } while (0) | 20 | } while (0) |
12 | 21 | ||
13 | #define HAVE_ARCH_BUG | 22 | #define HAVE_ARCH_BUG |
diff --git a/include/asm-s390/ccwdev.h b/include/asm-s390/ccwdev.h index 12456cb2f882..58c70acffc73 100644 --- a/include/asm-s390/ccwdev.h +++ b/include/asm-s390/ccwdev.h | |||
@@ -63,7 +63,7 @@ ccw_device_id_match(const struct ccw_device_id *array, | |||
63 | return id; | 63 | return id; |
64 | } | 64 | } |
65 | 65 | ||
66 | return 0; | 66 | return NULL; |
67 | } | 67 | } |
68 | 68 | ||
69 | /* The struct ccw device is our replacement for the globally accessible | 69 | /* The struct ccw device is our replacement for the globally accessible |
diff --git a/include/asm-s390/cio.h b/include/asm-s390/cio.h index 2b1619306351..28fdd6e2b8ba 100644 --- a/include/asm-s390/cio.h +++ b/include/asm-s390/cio.h | |||
@@ -276,6 +276,8 @@ extern void wait_cons_dev(void); | |||
276 | 276 | ||
277 | extern void clear_all_subchannels(void); | 277 | extern void clear_all_subchannels(void); |
278 | 278 | ||
279 | extern void cio_reset_channel_paths(void); | ||
280 | |||
279 | extern void css_schedule_reprobe(void); | 281 | extern void css_schedule_reprobe(void); |
280 | 282 | ||
281 | #endif | 283 | #endif |
diff --git a/include/asm-s390/futex.h b/include/asm-s390/futex.h index 1802775568b9..ffedf14f89f6 100644 --- a/include/asm-s390/futex.h +++ b/include/asm-s390/futex.h | |||
@@ -98,9 +98,10 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | |||
98 | 98 | ||
99 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | 99 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) |
100 | return -EFAULT; | 100 | return -EFAULT; |
101 | asm volatile(" cs %1,%4,0(%5)\n" | 101 | asm volatile(" sacf 256\n" |
102 | " cs %1,%4,0(%5)\n" | ||
102 | "0: lr %0,%1\n" | 103 | "0: lr %0,%1\n" |
103 | "1:\n" | 104 | "1: sacf 0\n" |
104 | #ifndef __s390x__ | 105 | #ifndef __s390x__ |
105 | ".section __ex_table,\"a\"\n" | 106 | ".section __ex_table,\"a\"\n" |
106 | " .align 4\n" | 107 | " .align 4\n" |
diff --git a/include/asm-s390/irqflags.h b/include/asm-s390/irqflags.h index 65f4db627e7a..3b566a5b3cc7 100644 --- a/include/asm-s390/irqflags.h +++ b/include/asm-s390/irqflags.h | |||
@@ -25,16 +25,22 @@ | |||
25 | __flags; \ | 25 | __flags; \ |
26 | }) | 26 | }) |
27 | 27 | ||
28 | #define raw_local_save_flags(x) \ | 28 | #define raw_local_save_flags(x) \ |
29 | __asm__ __volatile__("stosm 0(%1),0" : "=m" (x) : "a" (&x), "m" (x) ) | 29 | do { \ |
30 | 30 | typecheck(unsigned long, x); \ | |
31 | #define raw_local_irq_restore(x) \ | 31 | __asm__ __volatile__("stosm 0(%1),0" : "=m" (x) : "a" (&x), "m" (x) ); \ |
32 | __asm__ __volatile__("ssm 0(%0)" : : "a" (&x), "m" (x) : "memory") | 32 | } while (0) |
33 | |||
34 | #define raw_local_irq_restore(x) \ | ||
35 | do { \ | ||
36 | typecheck(unsigned long, x); \ | ||
37 | __asm__ __volatile__("ssm 0(%0)" : : "a" (&x), "m" (x) : "memory"); \ | ||
38 | } while (0) | ||
33 | 39 | ||
34 | #define raw_irqs_disabled() \ | 40 | #define raw_irqs_disabled() \ |
35 | ({ \ | 41 | ({ \ |
36 | unsigned long flags; \ | 42 | unsigned long flags; \ |
37 | local_save_flags(flags); \ | 43 | raw_local_save_flags(flags); \ |
38 | !((flags >> __FLAG_SHIFT) & 3); \ | 44 | !((flags >> __FLAG_SHIFT) & 3); \ |
39 | }) | 45 | }) |
40 | 46 | ||
diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h index 3002fda89d33..a78e853e0dd5 100644 --- a/include/asm-s390/pgalloc.h +++ b/include/asm-s390/pgalloc.h | |||
@@ -142,7 +142,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long vmaddr) | |||
142 | pte_t *pte = pte_alloc_one_kernel(mm, vmaddr); | 142 | pte_t *pte = pte_alloc_one_kernel(mm, vmaddr); |
143 | if (pte) | 143 | if (pte) |
144 | return virt_to_page(pte); | 144 | return virt_to_page(pte); |
145 | return 0; | 145 | return NULL; |
146 | } | 146 | } |
147 | 147 | ||
148 | static inline void pte_free_kernel(pte_t *pte) | 148 | static inline void pte_free_kernel(pte_t *pte) |
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index c5cbc4bd8414..5b71d3731723 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h | |||
@@ -199,15 +199,13 @@ unsigned long get_wchan(struct task_struct *p); | |||
199 | /* | 199 | /* |
200 | * Give up the time slice of the virtual PU. | 200 | * Give up the time slice of the virtual PU. |
201 | */ | 201 | */ |
202 | #ifndef __s390x__ | 202 | static inline void cpu_relax(void) |
203 | # define cpu_relax() asm volatile ("diag 0,0,68" : : : "memory") | 203 | { |
204 | #else /* __s390x__ */ | 204 | if (MACHINE_HAS_DIAG44) |
205 | # define cpu_relax() \ | 205 | asm volatile ("diag 0,0,68" : : : "memory"); |
206 | do { \ | 206 | else |
207 | if (MACHINE_HAS_DIAG44) \ | 207 | barrier(); |
208 | asm volatile ("diag 0,0,68" : : : "memory"); \ | 208 | } |
209 | } while (0) | ||
210 | #endif /* __s390x__ */ | ||
211 | 209 | ||
212 | /* | 210 | /* |
213 | * Set PSW to specified value. | 211 | * Set PSW to specified value. |
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h index da3fd4a7bb32..19e31979309a 100644 --- a/include/asm-s390/setup.h +++ b/include/asm-s390/setup.h | |||
@@ -40,15 +40,16 @@ extern unsigned long machine_flags; | |||
40 | #define MACHINE_IS_VM (machine_flags & 1) | 40 | #define MACHINE_IS_VM (machine_flags & 1) |
41 | #define MACHINE_IS_P390 (machine_flags & 4) | 41 | #define MACHINE_IS_P390 (machine_flags & 4) |
42 | #define MACHINE_HAS_MVPG (machine_flags & 16) | 42 | #define MACHINE_HAS_MVPG (machine_flags & 16) |
43 | #define MACHINE_HAS_DIAG44 (machine_flags & 32) | ||
44 | #define MACHINE_HAS_IDTE (machine_flags & 128) | 43 | #define MACHINE_HAS_IDTE (machine_flags & 128) |
45 | 44 | ||
46 | #ifndef __s390x__ | 45 | #ifndef __s390x__ |
47 | #define MACHINE_HAS_IEEE (machine_flags & 2) | 46 | #define MACHINE_HAS_IEEE (machine_flags & 2) |
48 | #define MACHINE_HAS_CSP (machine_flags & 8) | 47 | #define MACHINE_HAS_CSP (machine_flags & 8) |
48 | #define MACHINE_HAS_DIAG44 (1) | ||
49 | #else /* __s390x__ */ | 49 | #else /* __s390x__ */ |
50 | #define MACHINE_HAS_IEEE (1) | 50 | #define MACHINE_HAS_IEEE (1) |
51 | #define MACHINE_HAS_CSP (1) | 51 | #define MACHINE_HAS_CSP (1) |
52 | #define MACHINE_HAS_DIAG44 (machine_flags & 32) | ||
52 | #endif /* __s390x__ */ | 53 | #endif /* __s390x__ */ |
53 | 54 | ||
54 | 55 | ||
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index 9ab186ffde23..16040048cd1b 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
@@ -128,8 +128,13 @@ extern void account_system_vtime(struct task_struct *); | |||
128 | 128 | ||
129 | #define nop() __asm__ __volatile__ ("nop") | 129 | #define nop() __asm__ __volatile__ ("nop") |
130 | 130 | ||
131 | #define xchg(ptr,x) \ | 131 | #define xchg(ptr,x) \ |
132 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(void *)(ptr),sizeof(*(ptr)))) | 132 | ({ \ |
133 | __typeof__(*(ptr)) __ret; \ | ||
134 | __ret = (__typeof__(*(ptr))) \ | ||
135 | __xchg((unsigned long)(x), (void *)(ptr),sizeof(*(ptr))); \ | ||
136 | __ret; \ | ||
137 | }) | ||
133 | 138 | ||
134 | static inline unsigned long __xchg(unsigned long x, void * ptr, int size) | 139 | static inline unsigned long __xchg(unsigned long x, void * ptr, int size) |
135 | { | 140 | { |
@@ -299,7 +304,6 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
299 | 304 | ||
300 | 305 | ||
301 | #define set_mb(var, value) do { var = value; mb(); } while (0) | 306 | #define set_mb(var, value) do { var = value; mb(); } while (0) |
302 | #define set_wmb(var, value) do { var = value; wmb(); } while (0) | ||
303 | 307 | ||
304 | #ifdef __s390x__ | 308 | #ifdef __s390x__ |
305 | 309 | ||
diff --git a/include/asm-s390/timex.h b/include/asm-s390/timex.h index 4848057dafe4..5d0332a4c2bd 100644 --- a/include/asm-s390/timex.h +++ b/include/asm-s390/timex.h | |||
@@ -19,7 +19,7 @@ static inline cycles_t get_cycles(void) | |||
19 | { | 19 | { |
20 | cycles_t cycles; | 20 | cycles_t cycles; |
21 | 21 | ||
22 | __asm__("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc"); | 22 | __asm__ __volatile__ ("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc"); |
23 | return cycles >> 2; | 23 | return cycles >> 2; |
24 | } | 24 | } |
25 | 25 | ||
@@ -27,7 +27,7 @@ static inline unsigned long long get_clock (void) | |||
27 | { | 27 | { |
28 | unsigned long long clk; | 28 | unsigned long long clk; |
29 | 29 | ||
30 | __asm__("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc"); | 30 | __asm__ __volatile__ ("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc"); |
31 | return clk; | 31 | return clk; |
32 | } | 32 | } |
33 | 33 | ||