diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-06 12:13:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-06 12:13:53 -0400 |
commit | da104a83692cf07434ab3b20bf10093bdbc3f97e (patch) | |
tree | 6343600c318c600f0dcdf71406bf7d993823afd4 | |
parent | 96e1a87392293cf895ea99ab70758453897c7bbf (diff) | |
parent | dc64bef5439c8e1fafea225054da4d8882c9d10c (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] Use CONFIG_GENERIC_TIME and define TOD clock source.
[PATCH] sysrq: irq change build fix.
[S390] irq change build fixes.
[S390] cio: 0 is a valid chpid.
[S390] monwriter buffer limit.
[S390] ap bus poll thread priority.
-rw-r--r-- | arch/s390/Kconfig | 3 | ||||
-rw-r--r-- | arch/s390/defconfig | 1 | ||||
-rw-r--r-- | arch/s390/kernel/s390_ext.c | 9 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/time.c | 103 | ||||
-rw-r--r-- | arch/s390/kernel/traps.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/vtime.c | 5 | ||||
-rw-r--r-- | arch/s390/mm/fault.c | 2 | ||||
-rw-r--r-- | drivers/char/sysrq.c | 1 | ||||
-rw-r--r-- | drivers/s390/block/dasd_diag.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/ctrlchar.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/keyboard.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/monwriter.c | 10 | ||||
-rw-r--r-- | drivers/s390/char/sclp.c | 4 | ||||
-rw-r--r-- | drivers/s390/cio/chsc.c | 25 | ||||
-rw-r--r-- | drivers/s390/cio/cio.c | 6 | ||||
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/iucv.c | 4 | ||||
-rw-r--r-- | include/asm-s390/hardirq.h | 2 | ||||
-rw-r--r-- | include/asm-s390/irq_regs.h | 1 | ||||
-rw-r--r-- | include/asm-s390/s390_ext.h | 2 |
21 files changed, 83 insertions, 107 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 51c2dfe89c62..608193cfe43f 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -30,6 +30,9 @@ config GENERIC_CALIBRATE_DELAY | |||
30 | bool | 30 | bool |
31 | default y | 31 | default y |
32 | 32 | ||
33 | config GENERIC_TIME | ||
34 | def_bool y | ||
35 | |||
33 | config GENERIC_BUST_SPINLOCK | 36 | config GENERIC_BUST_SPINLOCK |
34 | bool | 37 | bool |
35 | 38 | ||
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index b6cad75fd1f4..a3257398ea8d 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -9,6 +9,7 @@ CONFIG_STACKTRACE_SUPPORT=y | |||
9 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 9 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
10 | CONFIG_GENERIC_HWEIGHT=y | 10 | CONFIG_GENERIC_HWEIGHT=y |
11 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 11 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
12 | CONFIG_GENERIC_TIME=y | ||
12 | CONFIG_S390=y | 13 | CONFIG_S390=y |
13 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 14 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
14 | 15 | ||
diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c index c1b383537fec..c49ab8c784d2 100644 --- a/arch/s390/kernel/s390_ext.c +++ b/arch/s390/kernel/s390_ext.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <asm/lowcore.h> | 17 | #include <asm/lowcore.h> |
18 | #include <asm/s390_ext.h> | 18 | #include <asm/s390_ext.h> |
19 | #include <asm/irq_regs.h> | ||
19 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
20 | 21 | ||
21 | /* | 22 | /* |
@@ -114,26 +115,28 @@ void do_extint(struct pt_regs *regs, unsigned short code) | |||
114 | { | 115 | { |
115 | ext_int_info_t *p; | 116 | ext_int_info_t *p; |
116 | int index; | 117 | int index; |
118 | struct pt_regs *old_regs; | ||
117 | 119 | ||
118 | irq_enter(); | 120 | irq_enter(); |
121 | old_regs = set_irq_regs(regs); | ||
119 | asm volatile ("mc 0,0"); | 122 | asm volatile ("mc 0,0"); |
120 | if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) | 123 | if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) |
121 | /** | 124 | /** |
122 | * Make sure that the i/o interrupt did not "overtake" | 125 | * Make sure that the i/o interrupt did not "overtake" |
123 | * the last HZ timer interrupt. | 126 | * the last HZ timer interrupt. |
124 | */ | 127 | */ |
125 | account_ticks(regs); | 128 | account_ticks(); |
126 | kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; | 129 | kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; |
127 | index = ext_hash(code); | 130 | index = ext_hash(code); |
128 | for (p = ext_int_hash[index]; p; p = p->next) { | 131 | for (p = ext_int_hash[index]; p; p = p->next) { |
129 | if (likely(p->code == code)) { | 132 | if (likely(p->code == code)) { |
130 | if (likely(p->handler)) | 133 | if (likely(p->handler)) |
131 | p->handler(regs, code); | 134 | p->handler(code); |
132 | } | 135 | } |
133 | } | 136 | } |
137 | set_irq_regs(old_regs); | ||
134 | irq_exit(); | 138 | irq_exit(); |
135 | } | 139 | } |
136 | 140 | ||
137 | EXPORT_SYMBOL(register_external_interrupt); | 141 | EXPORT_SYMBOL(register_external_interrupt); |
138 | EXPORT_SYMBOL(unregister_external_interrupt); | 142 | EXPORT_SYMBOL(unregister_external_interrupt); |
139 | |||
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index a8e6199755d4..62822245f9be 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -339,7 +339,7 @@ void machine_power_off_smp(void) | |||
339 | * cpus are handled. | 339 | * cpus are handled. |
340 | */ | 340 | */ |
341 | 341 | ||
342 | void do_ext_call_interrupt(struct pt_regs *regs, __u16 code) | 342 | void do_ext_call_interrupt(__u16 code) |
343 | { | 343 | { |
344 | unsigned long bits; | 344 | unsigned long bits; |
345 | 345 | ||
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 4bf66cc4a267..6cceed4df73e 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -28,12 +28,14 @@ | |||
28 | #include <linux/profile.h> | 28 | #include <linux/profile.h> |
29 | #include <linux/timex.h> | 29 | #include <linux/timex.h> |
30 | #include <linux/notifier.h> | 30 | #include <linux/notifier.h> |
31 | #include <linux/clocksource.h> | ||
31 | 32 | ||
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
33 | #include <asm/delay.h> | 34 | #include <asm/delay.h> |
34 | #include <asm/s390_ext.h> | 35 | #include <asm/s390_ext.h> |
35 | #include <asm/div64.h> | 36 | #include <asm/div64.h> |
36 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
38 | #include <asm/irq_regs.h> | ||
37 | #include <asm/timer.h> | 39 | #include <asm/timer.h> |
38 | 40 | ||
39 | /* change this if you have some constant time drift */ | 41 | /* change this if you have some constant time drift */ |
@@ -81,78 +83,10 @@ void tod_to_timeval(__u64 todval, struct timespec *xtime) | |||
81 | xtime->tv_nsec = ((todval * 1000) >> 12); | 83 | xtime->tv_nsec = ((todval * 1000) >> 12); |
82 | } | 84 | } |
83 | 85 | ||
84 | static inline unsigned long do_gettimeoffset(void) | ||
85 | { | ||
86 | __u64 now; | ||
87 | |||
88 | now = (get_clock() - jiffies_timer_cc) >> 12; | ||
89 | now -= (__u64) jiffies * USECS_PER_JIFFY; | ||
90 | return (unsigned long) now; | ||
91 | } | ||
92 | |||
93 | /* | ||
94 | * This version of gettimeofday has microsecond resolution. | ||
95 | */ | ||
96 | void do_gettimeofday(struct timeval *tv) | ||
97 | { | ||
98 | unsigned long flags; | ||
99 | unsigned long seq; | ||
100 | unsigned long usec, sec; | ||
101 | |||
102 | do { | ||
103 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | ||
104 | |||
105 | sec = xtime.tv_sec; | ||
106 | usec = xtime.tv_nsec / 1000 + do_gettimeoffset(); | ||
107 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | ||
108 | |||
109 | while (usec >= 1000000) { | ||
110 | usec -= 1000000; | ||
111 | sec++; | ||
112 | } | ||
113 | |||
114 | tv->tv_sec = sec; | ||
115 | tv->tv_usec = usec; | ||
116 | } | ||
117 | |||
118 | EXPORT_SYMBOL(do_gettimeofday); | ||
119 | |||
120 | int do_settimeofday(struct timespec *tv) | ||
121 | { | ||
122 | time_t wtm_sec, sec = tv->tv_sec; | ||
123 | long wtm_nsec, nsec = tv->tv_nsec; | ||
124 | |||
125 | if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) | ||
126 | return -EINVAL; | ||
127 | |||
128 | write_seqlock_irq(&xtime_lock); | ||
129 | /* This is revolting. We need to set the xtime.tv_nsec | ||
130 | * correctly. However, the value in this location is | ||
131 | * is value at the last tick. | ||
132 | * Discover what correction gettimeofday | ||
133 | * would have done, and then undo it! | ||
134 | */ | ||
135 | nsec -= do_gettimeoffset() * 1000; | ||
136 | |||
137 | wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); | ||
138 | wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); | ||
139 | |||
140 | set_normalized_timespec(&xtime, sec, nsec); | ||
141 | set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); | ||
142 | |||
143 | ntp_clear(); | ||
144 | write_sequnlock_irq(&xtime_lock); | ||
145 | clock_was_set(); | ||
146 | return 0; | ||
147 | } | ||
148 | |||
149 | EXPORT_SYMBOL(do_settimeofday); | ||
150 | |||
151 | |||
152 | #ifdef CONFIG_PROFILING | 86 | #ifdef CONFIG_PROFILING |
153 | #define s390_do_profile(regs) profile_tick(CPU_PROFILING, regs) | 87 | #define s390_do_profile() profile_tick(CPU_PROFILING) |
154 | #else | 88 | #else |
155 | #define s390_do_profile(regs) do { ; } while(0) | 89 | #define s390_do_profile() do { ; } while(0) |
156 | #endif /* CONFIG_PROFILING */ | 90 | #endif /* CONFIG_PROFILING */ |
157 | 91 | ||
158 | 92 | ||
@@ -160,7 +94,7 @@ EXPORT_SYMBOL(do_settimeofday); | |||
160 | * timer_interrupt() needs to keep up the real-time clock, | 94 | * timer_interrupt() needs to keep up the real-time clock, |
161 | * as well as call the "do_timer()" routine every clocktick | 95 | * as well as call the "do_timer()" routine every clocktick |
162 | */ | 96 | */ |
163 | void account_ticks(struct pt_regs *regs) | 97 | void account_ticks(void) |
164 | { | 98 | { |
165 | __u64 tmp; | 99 | __u64 tmp; |
166 | __u32 ticks; | 100 | __u32 ticks; |
@@ -221,10 +155,10 @@ void account_ticks(struct pt_regs *regs) | |||
221 | account_tick_vtime(current); | 155 | account_tick_vtime(current); |
222 | #else | 156 | #else |
223 | while (ticks--) | 157 | while (ticks--) |
224 | update_process_times(user_mode(regs)); | 158 | update_process_times(user_mode(get_irq_regs())); |
225 | #endif | 159 | #endif |
226 | 160 | ||
227 | s390_do_profile(regs); | 161 | s390_do_profile(); |
228 | } | 162 | } |
229 | 163 | ||
230 | #ifdef CONFIG_NO_IDLE_HZ | 164 | #ifdef CONFIG_NO_IDLE_HZ |
@@ -285,9 +219,11 @@ static inline void stop_hz_timer(void) | |||
285 | */ | 219 | */ |
286 | static inline void start_hz_timer(void) | 220 | static inline void start_hz_timer(void) |
287 | { | 221 | { |
222 | BUG_ON(!in_interrupt()); | ||
223 | |||
288 | if (!cpu_isset(smp_processor_id(), nohz_cpu_mask)) | 224 | if (!cpu_isset(smp_processor_id(), nohz_cpu_mask)) |
289 | return; | 225 | return; |
290 | account_ticks(task_pt_regs(current)); | 226 | account_ticks(); |
291 | cpu_clear(smp_processor_id(), nohz_cpu_mask); | 227 | cpu_clear(smp_processor_id(), nohz_cpu_mask); |
292 | } | 228 | } |
293 | 229 | ||
@@ -337,6 +273,22 @@ void init_cpu_timer(void) | |||
337 | 273 | ||
338 | extern void vtime_init(void); | 274 | extern void vtime_init(void); |
339 | 275 | ||
276 | static cycle_t read_tod_clock(void) | ||
277 | { | ||
278 | return get_clock(); | ||
279 | } | ||
280 | |||
281 | static struct clocksource clocksource_tod = { | ||
282 | .name = "tod", | ||
283 | .rating = 100, | ||
284 | .read = read_tod_clock, | ||
285 | .mask = -1ULL, | ||
286 | .mult = 1000, | ||
287 | .shift = 12, | ||
288 | .is_continuous = 1, | ||
289 | }; | ||
290 | |||
291 | |||
340 | /* | 292 | /* |
341 | * Initialize the TOD clock and the CPU timer of | 293 | * Initialize the TOD clock and the CPU timer of |
342 | * the boot cpu. | 294 | * the boot cpu. |
@@ -381,6 +333,9 @@ void __init time_init(void) | |||
381 | &ext_int_info_cc) != 0) | 333 | &ext_int_info_cc) != 0) |
382 | panic("Couldn't request external interrupt 0x1004"); | 334 | panic("Couldn't request external interrupt 0x1004"); |
383 | 335 | ||
336 | if (clocksource_register(&clocksource_tod) != 0) | ||
337 | panic("Could not register TOD clock source"); | ||
338 | |||
384 | init_cpu_timer(); | 339 | init_cpu_timer(); |
385 | 340 | ||
386 | #ifdef CONFIG_NO_IDLE_HZ | 341 | #ifdef CONFIG_NO_IDLE_HZ |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 3eb4fab048b8..05bf3cc8530a 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -61,7 +61,7 @@ extern pgm_check_handler_t do_dat_exception; | |||
61 | #ifdef CONFIG_PFAULT | 61 | #ifdef CONFIG_PFAULT |
62 | extern int pfault_init(void); | 62 | extern int pfault_init(void); |
63 | extern void pfault_fini(void); | 63 | extern void pfault_fini(void); |
64 | extern void pfault_interrupt(struct pt_regs *regs, __u16 error_code); | 64 | extern void pfault_interrupt(__u16 error_code); |
65 | static ext_int_info_t ext_int_pfault; | 65 | static ext_int_info_t ext_int_pfault; |
66 | #endif | 66 | #endif |
67 | extern pgm_check_handler_t do_monitor_call; | 67 | extern pgm_check_handler_t do_monitor_call; |
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 2306cd83fca1..1d7d3938b2b1 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/s390_ext.h> | 23 | #include <asm/s390_ext.h> |
24 | #include <asm/timer.h> | 24 | #include <asm/timer.h> |
25 | #include <asm/irq_regs.h> | ||
25 | 26 | ||
26 | static ext_int_info_t ext_int_info_timer; | 27 | static ext_int_info_t ext_int_info_timer; |
27 | DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer); | 28 | DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer); |
@@ -241,7 +242,7 @@ static void do_callbacks(struct list_head *cb_list, struct pt_regs *regs) | |||
241 | /* | 242 | /* |
242 | * Handler for the virtual CPU timer. | 243 | * Handler for the virtual CPU timer. |
243 | */ | 244 | */ |
244 | static void do_cpu_timer_interrupt(struct pt_regs *regs, __u16 error_code) | 245 | static void do_cpu_timer_interrupt(__u16 error_code) |
245 | { | 246 | { |
246 | int cpu; | 247 | int cpu; |
247 | __u64 next, delta; | 248 | __u64 next, delta; |
@@ -274,7 +275,7 @@ static void do_cpu_timer_interrupt(struct pt_regs *regs, __u16 error_code) | |||
274 | list_move_tail(&event->entry, &cb_list); | 275 | list_move_tail(&event->entry, &cb_list); |
275 | } | 276 | } |
276 | spin_unlock(&vt_list->lock); | 277 | spin_unlock(&vt_list->lock); |
277 | do_callbacks(&cb_list, regs); | 278 | do_callbacks(&cb_list, get_irq_regs()); |
278 | 279 | ||
279 | /* next event is first in list */ | 280 | /* next event is first in list */ |
280 | spin_lock(&vt_list->lock); | 281 | spin_lock(&vt_list->lock); |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 9c3c19fe62fc..1c323bbfda91 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -451,7 +451,7 @@ void pfault_fini(void) | |||
451 | } | 451 | } |
452 | 452 | ||
453 | asmlinkage void | 453 | asmlinkage void |
454 | pfault_interrupt(struct pt_regs *regs, __u16 error_code) | 454 | pfault_interrupt(__u16 error_code) |
455 | { | 455 | { |
456 | struct task_struct *tsk; | 456 | struct task_struct *tsk; |
457 | __u16 subcode; | 457 | __u16 subcode; |
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 4c0e08685705..5f49280779fb 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/irq.h> | 38 | #include <linux/irq.h> |
39 | 39 | ||
40 | #include <asm/ptrace.h> | 40 | #include <asm/ptrace.h> |
41 | #include <asm/irq_regs.h> | ||
41 | 42 | ||
42 | /* Whether we react on sysrq keys or just ignore them */ | 43 | /* Whether we react on sysrq keys or just ignore them */ |
43 | int sysrq_enabled = 1; | 44 | int sysrq_enabled = 1; |
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index 222a8a71a5e8..53db58a68617 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c | |||
@@ -218,7 +218,7 @@ dasd_diag_term_IO(struct dasd_ccw_req * cqr) | |||
218 | 218 | ||
219 | /* Handle external interruption. */ | 219 | /* Handle external interruption. */ |
220 | static void | 220 | static void |
221 | dasd_ext_handler(struct pt_regs *regs, __u16 code) | 221 | dasd_ext_handler(__u16 code) |
222 | { | 222 | { |
223 | struct dasd_ccw_req *cqr, *next; | 223 | struct dasd_ccw_req *cqr, *next; |
224 | struct dasd_device *device; | 224 | struct dasd_device *device; |
diff --git a/drivers/s390/char/ctrlchar.c b/drivers/s390/char/ctrlchar.c index d83eb6358bac..49e9628d9297 100644 --- a/drivers/s390/char/ctrlchar.c +++ b/drivers/s390/char/ctrlchar.c | |||
@@ -20,7 +20,7 @@ static int ctrlchar_sysrq_key; | |||
20 | static void | 20 | static void |
21 | ctrlchar_handle_sysrq(void *tty) | 21 | ctrlchar_handle_sysrq(void *tty) |
22 | { | 22 | { |
23 | handle_sysrq(ctrlchar_sysrq_key, NULL, (struct tty_struct *) tty); | 23 | handle_sysrq(ctrlchar_sysrq_key, (struct tty_struct *) tty); |
24 | } | 24 | } |
25 | 25 | ||
26 | static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, NULL); | 26 | static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, NULL); |
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index 3be06569180d..e3491a5f5219 100644 --- a/drivers/s390/char/keyboard.c +++ b/drivers/s390/char/keyboard.c | |||
@@ -304,7 +304,7 @@ kbd_keycode(struct kbd_data *kbd, unsigned int keycode) | |||
304 | if (kbd->sysrq) { | 304 | if (kbd->sysrq) { |
305 | if (kbd->sysrq == K(KT_LATIN, '-')) { | 305 | if (kbd->sysrq == K(KT_LATIN, '-')) { |
306 | kbd->sysrq = 0; | 306 | kbd->sysrq = 0; |
307 | handle_sysrq(value, NULL, kbd->tty); | 307 | handle_sysrq(value, kbd->tty); |
308 | return; | 308 | return; |
309 | } | 309 | } |
310 | if (value == '-') { | 310 | if (value == '-') { |
diff --git a/drivers/s390/char/monwriter.c b/drivers/s390/char/monwriter.c index 1e3939aeb8ab..4362ff260244 100644 --- a/drivers/s390/char/monwriter.c +++ b/drivers/s390/char/monwriter.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #define MONWRITE_MAX_DATALEN 4024 | 26 | #define MONWRITE_MAX_DATALEN 4024 |
27 | 27 | ||
28 | static int mon_max_bufs = 255; | 28 | static int mon_max_bufs = 255; |
29 | static int mon_buf_count; | ||
29 | 30 | ||
30 | struct mon_buf { | 31 | struct mon_buf { |
31 | struct list_head list; | 32 | struct list_head list; |
@@ -40,7 +41,6 @@ struct mon_private { | |||
40 | size_t hdr_to_read; | 41 | size_t hdr_to_read; |
41 | size_t data_to_read; | 42 | size_t data_to_read; |
42 | struct mon_buf *current_buf; | 43 | struct mon_buf *current_buf; |
43 | int mon_buf_count; | ||
44 | }; | 44 | }; |
45 | 45 | ||
46 | /* | 46 | /* |
@@ -99,13 +99,13 @@ static int monwrite_new_hdr(struct mon_private *monpriv) | |||
99 | rc = monwrite_diag(monhdr, monbuf->data, | 99 | rc = monwrite_diag(monhdr, monbuf->data, |
100 | APPLDATA_STOP_REC); | 100 | APPLDATA_STOP_REC); |
101 | list_del(&monbuf->list); | 101 | list_del(&monbuf->list); |
102 | monpriv->mon_buf_count--; | 102 | mon_buf_count--; |
103 | kfree(monbuf->data); | 103 | kfree(monbuf->data); |
104 | kfree(monbuf); | 104 | kfree(monbuf); |
105 | monbuf = NULL; | 105 | monbuf = NULL; |
106 | } | 106 | } |
107 | } else { | 107 | } else { |
108 | if (monpriv->mon_buf_count >= mon_max_bufs) | 108 | if (mon_buf_count >= mon_max_bufs) |
109 | return -ENOSPC; | 109 | return -ENOSPC; |
110 | monbuf = kzalloc(sizeof(struct mon_buf), GFP_KERNEL); | 110 | monbuf = kzalloc(sizeof(struct mon_buf), GFP_KERNEL); |
111 | if (!monbuf) | 111 | if (!monbuf) |
@@ -118,7 +118,7 @@ static int monwrite_new_hdr(struct mon_private *monpriv) | |||
118 | } | 118 | } |
119 | monbuf->hdr = *monhdr; | 119 | monbuf->hdr = *monhdr; |
120 | list_add_tail(&monbuf->list, &monpriv->list); | 120 | list_add_tail(&monbuf->list, &monpriv->list); |
121 | monpriv->mon_buf_count++; | 121 | mon_buf_count++; |
122 | } | 122 | } |
123 | monpriv->current_buf = monbuf; | 123 | monpriv->current_buf = monbuf; |
124 | return 0; | 124 | return 0; |
@@ -186,7 +186,7 @@ static int monwrite_close(struct inode *inode, struct file *filp) | |||
186 | if (entry->hdr.mon_function != MONWRITE_GEN_EVENT) | 186 | if (entry->hdr.mon_function != MONWRITE_GEN_EVENT) |
187 | monwrite_diag(&entry->hdr, entry->data, | 187 | monwrite_diag(&entry->hdr, entry->data, |
188 | APPLDATA_STOP_REC); | 188 | APPLDATA_STOP_REC); |
189 | monpriv->mon_buf_count--; | 189 | mon_buf_count--; |
190 | list_del(&entry->list); | 190 | list_del(&entry->list); |
191 | kfree(entry->data); | 191 | kfree(entry->data); |
192 | kfree(entry); | 192 | kfree(entry); |
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index 31e335751d6d..8a056df09d6b 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c | |||
@@ -324,7 +324,7 @@ __sclp_find_req(u32 sccb) | |||
324 | * Prepare read event data request if necessary. Start processing of next | 324 | * Prepare read event data request if necessary. Start processing of next |
325 | * request on queue. */ | 325 | * request on queue. */ |
326 | static void | 326 | static void |
327 | sclp_interrupt_handler(struct pt_regs *regs, __u16 code) | 327 | sclp_interrupt_handler(__u16 code) |
328 | { | 328 | { |
329 | struct sclp_req *req; | 329 | struct sclp_req *req; |
330 | u32 finished_sccb; | 330 | u32 finished_sccb; |
@@ -743,7 +743,7 @@ EXPORT_SYMBOL(sclp_reactivate); | |||
743 | /* Handler for external interruption used during initialization. Modify | 743 | /* Handler for external interruption used during initialization. Modify |
744 | * request state to done. */ | 744 | * request state to done. */ |
745 | static void | 745 | static void |
746 | sclp_check_handler(struct pt_regs *regs, __u16 code) | 746 | sclp_check_handler(__u16 code) |
747 | { | 747 | { |
748 | u32 finished_sccb; | 748 | u32 finished_sccb; |
749 | 749 | ||
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 3bb4e472d73d..07c7f19339d2 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -200,11 +200,13 @@ css_get_ssd_info(struct subchannel *sch) | |||
200 | spin_unlock_irq(&sch->lock); | 200 | spin_unlock_irq(&sch->lock); |
201 | free_page((unsigned long)page); | 201 | free_page((unsigned long)page); |
202 | if (!ret) { | 202 | if (!ret) { |
203 | int j, chpid; | 203 | int j, chpid, mask; |
204 | /* Allocate channel path structures, if needed. */ | 204 | /* Allocate channel path structures, if needed. */ |
205 | for (j = 0; j < 8; j++) { | 205 | for (j = 0; j < 8; j++) { |
206 | mask = 0x80 >> j; | ||
206 | chpid = sch->ssd_info.chpid[j]; | 207 | chpid = sch->ssd_info.chpid[j]; |
207 | if (chpid && (get_chp_status(chpid) < 0)) | 208 | if ((sch->schib.pmcw.pim & mask) && |
209 | (get_chp_status(chpid) < 0)) | ||
208 | new_channel_path(chpid); | 210 | new_channel_path(chpid); |
209 | } | 211 | } |
210 | } | 212 | } |
@@ -222,13 +224,15 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) | |||
222 | 224 | ||
223 | sch = to_subchannel(dev); | 225 | sch = to_subchannel(dev); |
224 | chpid = data; | 226 | chpid = data; |
225 | for (j = 0; j < 8; j++) | 227 | for (j = 0; j < 8; j++) { |
226 | if (sch->schib.pmcw.chpid[j] == chpid->id) | 228 | mask = 0x80 >> j; |
229 | if ((sch->schib.pmcw.pim & mask) && | ||
230 | (sch->schib.pmcw.chpid[j] == chpid->id)) | ||
227 | break; | 231 | break; |
232 | } | ||
228 | if (j >= 8) | 233 | if (j >= 8) |
229 | return 0; | 234 | return 0; |
230 | 235 | ||
231 | mask = 0x80 >> j; | ||
232 | spin_lock_irq(&sch->lock); | 236 | spin_lock_irq(&sch->lock); |
233 | 237 | ||
234 | stsch(sch->schid, &schib); | 238 | stsch(sch->schid, &schib); |
@@ -620,7 +624,7 @@ __chp_add_new_sch(struct subchannel_id schid) | |||
620 | static int | 624 | static int |
621 | __chp_add(struct subchannel_id schid, void *data) | 625 | __chp_add(struct subchannel_id schid, void *data) |
622 | { | 626 | { |
623 | int i; | 627 | int i, mask; |
624 | struct channel_path *chp; | 628 | struct channel_path *chp; |
625 | struct subchannel *sch; | 629 | struct subchannel *sch; |
626 | 630 | ||
@@ -630,8 +634,10 @@ __chp_add(struct subchannel_id schid, void *data) | |||
630 | /* Check if the subchannel is now available. */ | 634 | /* Check if the subchannel is now available. */ |
631 | return __chp_add_new_sch(schid); | 635 | return __chp_add_new_sch(schid); |
632 | spin_lock_irq(&sch->lock); | 636 | spin_lock_irq(&sch->lock); |
633 | for (i=0; i<8; i++) | 637 | for (i=0; i<8; i++) { |
634 | if (sch->schib.pmcw.chpid[i] == chp->id) { | 638 | mask = 0x80 >> i; |
639 | if ((sch->schib.pmcw.pim & mask) && | ||
640 | (sch->schib.pmcw.chpid[i] == chp->id)) { | ||
635 | if (stsch(sch->schid, &sch->schib) != 0) { | 641 | if (stsch(sch->schid, &sch->schib) != 0) { |
636 | /* Endgame. */ | 642 | /* Endgame. */ |
637 | spin_unlock_irq(&sch->lock); | 643 | spin_unlock_irq(&sch->lock); |
@@ -639,6 +645,7 @@ __chp_add(struct subchannel_id schid, void *data) | |||
639 | } | 645 | } |
640 | break; | 646 | break; |
641 | } | 647 | } |
648 | } | ||
642 | if (i==8) { | 649 | if (i==8) { |
643 | spin_unlock_irq(&sch->lock); | 650 | spin_unlock_irq(&sch->lock); |
644 | return 0; | 651 | return 0; |
@@ -646,7 +653,7 @@ __chp_add(struct subchannel_id schid, void *data) | |||
646 | sch->lpm = ((sch->schib.pmcw.pim & | 653 | sch->lpm = ((sch->schib.pmcw.pim & |
647 | sch->schib.pmcw.pam & | 654 | sch->schib.pmcw.pam & |
648 | sch->schib.pmcw.pom) | 655 | sch->schib.pmcw.pom) |
649 | | 0x80 >> i) & sch->opm; | 656 | | mask) & sch->opm; |
650 | 657 | ||
651 | if (sch->driver && sch->driver->verify) | 658 | if (sch->driver && sch->driver->verify) |
652 | sch->driver->verify(&sch->dev); | 659 | sch->driver->verify(&sch->dev); |
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 2e2882daefbb..f18b1623cad7 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/cio.h> | 19 | #include <asm/cio.h> |
20 | #include <asm/delay.h> | 20 | #include <asm/delay.h> |
21 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
22 | #include <asm/irq_regs.h> | ||
22 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
23 | #include "airq.h" | 24 | #include "airq.h" |
24 | #include "cio.h" | 25 | #include "cio.h" |
@@ -606,15 +607,17 @@ do_IRQ (struct pt_regs *regs) | |||
606 | struct tpi_info *tpi_info; | 607 | struct tpi_info *tpi_info; |
607 | struct subchannel *sch; | 608 | struct subchannel *sch; |
608 | struct irb *irb; | 609 | struct irb *irb; |
610 | struct pt_regs *old_regs; | ||
609 | 611 | ||
610 | irq_enter (); | 612 | irq_enter (); |
613 | old_regs = set_irq_regs(regs); | ||
611 | asm volatile ("mc 0,0"); | 614 | asm volatile ("mc 0,0"); |
612 | if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) | 615 | if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) |
613 | /** | 616 | /** |
614 | * Make sure that the i/o interrupt did not "overtake" | 617 | * Make sure that the i/o interrupt did not "overtake" |
615 | * the last HZ timer interrupt. | 618 | * the last HZ timer interrupt. |
616 | */ | 619 | */ |
617 | account_ticks(regs); | 620 | account_ticks(); |
618 | /* | 621 | /* |
619 | * Get interrupt information from lowcore | 622 | * Get interrupt information from lowcore |
620 | */ | 623 | */ |
@@ -652,6 +655,7 @@ do_IRQ (struct pt_regs *regs) | |||
652 | * out of the sie which costs more cycles than it saves. | 655 | * out of the sie which costs more cycles than it saves. |
653 | */ | 656 | */ |
654 | } while (!MACHINE_IS_VM && tpi (NULL) != 0); | 657 | } while (!MACHINE_IS_VM && tpi (NULL) != 0); |
658 | set_irq_regs(old_regs); | ||
655 | irq_exit (); | 659 | irq_exit (); |
656 | } | 660 | } |
657 | 661 | ||
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index cd30f37fceae..c5ccd20b110c 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -1062,7 +1062,7 @@ static int ap_poll_thread(void *data) | |||
1062 | unsigned long flags; | 1062 | unsigned long flags; |
1063 | int requests; | 1063 | int requests; |
1064 | 1064 | ||
1065 | set_user_nice(current, -20); | 1065 | set_user_nice(current, 19); |
1066 | while (1) { | 1066 | while (1) { |
1067 | if (need_resched()) { | 1067 | if (need_resched()) { |
1068 | schedule(); | 1068 | schedule(); |
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c index 809dd8d7f47a..1476ce2b437c 100644 --- a/drivers/s390/net/iucv.c +++ b/drivers/s390/net/iucv.c | |||
@@ -116,7 +116,7 @@ static DEFINE_SPINLOCK(iucv_irq_queue_lock); | |||
116 | *Internal function prototypes | 116 | *Internal function prototypes |
117 | */ | 117 | */ |
118 | static void iucv_tasklet_handler(unsigned long); | 118 | static void iucv_tasklet_handler(unsigned long); |
119 | static void iucv_irq_handler(struct pt_regs *, __u16); | 119 | static void iucv_irq_handler(__u16); |
120 | 120 | ||
121 | static DECLARE_TASKLET(iucv_tasklet,iucv_tasklet_handler,0); | 121 | static DECLARE_TASKLET(iucv_tasklet,iucv_tasklet_handler,0); |
122 | 122 | ||
@@ -2251,7 +2251,7 @@ iucv_sever(__u16 pathid, __u8 user_data[16]) | |||
2251 | * Places the interrupt buffer on a queue and schedules iucv_tasklet_handler(). | 2251 | * Places the interrupt buffer on a queue and schedules iucv_tasklet_handler(). |
2252 | */ | 2252 | */ |
2253 | static void | 2253 | static void |
2254 | iucv_irq_handler(struct pt_regs *regs, __u16 code) | 2254 | iucv_irq_handler(__u16 code) |
2255 | { | 2255 | { |
2256 | iucv_irqdata *irqdata; | 2256 | iucv_irqdata *irqdata; |
2257 | 2257 | ||
diff --git a/include/asm-s390/hardirq.h b/include/asm-s390/hardirq.h index e84b7ef54aac..c2f6a8782d31 100644 --- a/include/asm-s390/hardirq.h +++ b/include/asm-s390/hardirq.h | |||
@@ -32,6 +32,6 @@ typedef struct { | |||
32 | 32 | ||
33 | #define HARDIRQ_BITS 8 | 33 | #define HARDIRQ_BITS 8 |
34 | 34 | ||
35 | extern void account_ticks(struct pt_regs *); | 35 | extern void account_ticks(void); |
36 | 36 | ||
37 | #endif /* __ASM_HARDIRQ_H */ | 37 | #endif /* __ASM_HARDIRQ_H */ |
diff --git a/include/asm-s390/irq_regs.h b/include/asm-s390/irq_regs.h new file mode 100644 index 000000000000..3dd9c0b70270 --- /dev/null +++ b/include/asm-s390/irq_regs.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/irq_regs.h> | |||
diff --git a/include/asm-s390/s390_ext.h b/include/asm-s390/s390_ext.h index e9a2862b230d..df9b1017b703 100644 --- a/include/asm-s390/s390_ext.h +++ b/include/asm-s390/s390_ext.h | |||
@@ -10,7 +10,7 @@ | |||
10 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 10 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
11 | */ | 11 | */ |
12 | 12 | ||
13 | typedef void (*ext_int_handler_t)(struct pt_regs *regs, __u16 code); | 13 | typedef void (*ext_int_handler_t)(__u16 code); |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * Warning: if you change ext_int_info_t you have to change the | 16 | * Warning: if you change ext_int_info_t you have to change the |