diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-17 14:23:52 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-17 14:23:52 -0800 |
commit | e71d5126e77c68b7ed1fad275fdc8825e9597448 (patch) | |
tree | 038f23568881d65cb269c9c4b92e65a2d7131456 /drivers/s390 | |
parent | c3e9c04b89059a4c93c792da883ca284de182da5 (diff) | |
parent | ab35727eb879ccc9487c6df0a3796be124ed39d3 (diff) | |
download | linux-e71d5126e77c68b7ed1fad275fdc8825e9597448.tar.bz2 |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull second round of s390 updates from Martin Schwidefsky:
- rework of the vdso code to avoid the use of the access register mode
- use perf AUX buffers for the transport of diagnostic sample data
- add perf_regs and user stack dump support
- enable perf call graphs for user space programs
- add perf register support for floating-point registers
- all remaining s390 related timer_setup conversions
- bug fixes and cleanups
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (30 commits)
s390: remove unused parameter from Makefile
zfcp: purely mechanical update using timer API, plus blank lines
s390/scsi: Convert timers to use timer_setup()
s390/cpum_sf: correctly set the PID and TID in perf samples
s390/cpum_sf: load program parameter at sampler enablement
s390/perf: add perf register support for floating-point registers
s390/perf: extend perf_regs support to include floating-point registers
s390/perf: define common DWARF register string table
s390/perf: add support for perf_regs and libdw
s390/perf: add perf_regs support and user stack dump
s390/cpum_sf: do not register PMU if no sampling mode is authorized
s390/cpumf: remove raw event support in basic-only sampling mode
s390/perf: add callback to perf to enable using AUX buffer
s390/cpumf: enable using AUX buffer
s390/cpumf: introduce AUX buffer for dump diagnostic sample data
s390/disassembler: increase show_code buffer size
s390: Remove CONFIG_HARDENED_USERCOPY
s390: enable CPU alternatives unconditionally
s390/nmi: remove unused code
s390/mm: remove unused code
...
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/con3215.c | 6 | ||||
-rw-r--r-- | drivers/s390/char/con3270.c | 10 | ||||
-rw-r--r-- | drivers/s390/char/sclp.c | 45 | ||||
-rw-r--r-- | drivers/s390/char/sclp_con.c | 5 | ||||
-rw-r--r-- | drivers/s390/char/sclp_tty.c | 5 | ||||
-rw-r--r-- | drivers/s390/char/sclp_vt220.c | 6 | ||||
-rw-r--r-- | drivers/s390/char/tape_core.c | 14 | ||||
-rw-r--r-- | drivers/s390/char/tty3270.c | 8 | ||||
-rw-r--r-- | drivers/s390/cio/device.c | 8 | ||||
-rw-r--r-- | drivers/s390/cio/device.h | 2 | ||||
-rw-r--r-- | drivers/s390/cio/device_fsm.c | 10 | ||||
-rw-r--r-- | drivers/s390/cio/eadm_sch.c | 9 | ||||
-rw-r--r-- | drivers/s390/cio/qdio.h | 2 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 4 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_setup.c | 3 | ||||
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 10 | ||||
-rw-r--r-- | drivers/s390/crypto/ap_bus.h | 2 | ||||
-rw-r--r-- | drivers/s390/crypto/ap_queue.c | 2 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 15 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ext.h | 2 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 14 |
21 files changed, 90 insertions, 92 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 353f0bebcf8c..8c9d412b6d33 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c @@ -282,9 +282,9 @@ static void raw3215_start_io(struct raw3215_info *raw) /* * Function to start a delayed output after RAW3215_TIMEOUT seconds */ -static void raw3215_timeout(unsigned long __data) +static void raw3215_timeout(struct timer_list *t) { - struct raw3215_info *raw = (struct raw3215_info *) __data; + struct raw3215_info *raw = from_timer(raw, t, timer); unsigned long flags; spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); @@ -670,7 +670,7 @@ static struct raw3215_info *raw3215_alloc_info(void) return NULL; } - setup_timer(&info->timer, raw3215_timeout, (unsigned long)info); + timer_setup(&info->timer, raw3215_timeout, 0); init_waitqueue_head(&info->empty_wait); tasklet_init(&info->tlet, raw3215_wakeup, (unsigned long)info); tty_port_init(&info->port); diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c index be3e3c1206c2..fd2146bcc0ad 100644 --- a/drivers/s390/char/con3270.c +++ b/drivers/s390/char/con3270.c @@ -69,7 +69,7 @@ static struct con3270 *condev; #define CON_UPDATE_STATUS 4 /* Update status line. */ #define CON_UPDATE_ALL 8 /* Recreate screen. */ -static void con3270_update(struct con3270 *); +static void con3270_update(struct timer_list *); /* * Setup timeout for a device. On timeout trigger an update. @@ -205,8 +205,9 @@ con3270_write_callback(struct raw3270_request *rq, void *data) * Update console display. */ static void -con3270_update(struct con3270 *cp) +con3270_update(struct timer_list *t) { + struct con3270 *cp = from_timer(cp, t, timer); struct raw3270_request *wrq; char wcc, prolog[6]; unsigned long flags; @@ -552,7 +553,7 @@ con3270_flush(void) con3270_update_status(cp); while (cp->update_flags != 0) { spin_unlock_irqrestore(&cp->view.lock, flags); - con3270_update(cp); + con3270_update(&cp->timer); spin_lock_irqsave(&cp->view.lock, flags); con3270_wait_write(cp); } @@ -623,8 +624,7 @@ con3270_init(void) INIT_LIST_HEAD(&condev->lines); INIT_LIST_HEAD(&condev->update); - setup_timer(&condev->timer, (void (*)(unsigned long)) con3270_update, - (unsigned long) condev); + timer_setup(&condev->timer, con3270_update, 0); tasklet_init(&condev->readlet, (void (*)(unsigned long)) con3270_read_tasklet, (unsigned long) condev->read); diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index 41d8aa96801f..9b4c61c1e309 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -136,6 +136,7 @@ static enum sclp_suspend_state_t { #define SCLP_BUSY_INTERVAL 10 #define SCLP_RETRY_INTERVAL 30 +static void sclp_request_timeout(bool force_restart); static void sclp_process_queue(void); static void __sclp_make_read_req(void); static int sclp_init_mask(int calculate); @@ -154,25 +155,32 @@ __sclp_queue_read_req(void) /* Set up request retry timer. Called while sclp_lock is locked. */ static inline void -__sclp_set_request_timer(unsigned long time, void (*function)(unsigned long), - unsigned long data) +__sclp_set_request_timer(unsigned long time, void (*cb)(struct timer_list *)) { del_timer(&sclp_request_timer); - sclp_request_timer.function = function; - sclp_request_timer.data = data; + sclp_request_timer.function = (TIMER_FUNC_TYPE)cb; sclp_request_timer.expires = jiffies + time; add_timer(&sclp_request_timer); } -/* Request timeout handler. Restart the request queue. If DATA is non-zero, +static void sclp_request_timeout_restart(struct timer_list *unused) +{ + sclp_request_timeout(true); +} + +static void sclp_request_timeout_normal(struct timer_list *unused) +{ + sclp_request_timeout(false); +} + +/* Request timeout handler. Restart the request queue. If force_restart, * force restart of running request. */ -static void -sclp_request_timeout(unsigned long data) +static void sclp_request_timeout(bool force_restart) { unsigned long flags; spin_lock_irqsave(&sclp_lock, flags); - if (data) { + if (force_restart) { if (sclp_running_state == sclp_running_state_running) { /* Break running state and queue NOP read event request * to get a defined interface state. */ @@ -181,7 +189,7 @@ sclp_request_timeout(unsigned long data) } } else { __sclp_set_request_timer(SCLP_BUSY_INTERVAL * HZ, - sclp_request_timeout, 0); + sclp_request_timeout_normal); } spin_unlock_irqrestore(&sclp_lock, flags); sclp_process_queue(); @@ -239,7 +247,7 @@ out: * invokes callback. This timer can be set per request in situations where * waiting too long would be harmful to the system, e.g. during SE reboot. */ -static void sclp_req_queue_timeout(unsigned long data) +static void sclp_req_queue_timeout(struct timer_list *unused) { unsigned long flags, expires_next; struct sclp_req *req; @@ -276,12 +284,12 @@ __sclp_start_request(struct sclp_req *req) req->status = SCLP_REQ_RUNNING; sclp_running_state = sclp_running_state_running; __sclp_set_request_timer(SCLP_RETRY_INTERVAL * HZ, - sclp_request_timeout, 1); + sclp_request_timeout_restart); return 0; } else if (rc == -EBUSY) { /* Try again later */ __sclp_set_request_timer(SCLP_BUSY_INTERVAL * HZ, - sclp_request_timeout, 0); + sclp_request_timeout_normal); return 0; } /* Request failed */ @@ -315,7 +323,7 @@ sclp_process_queue(void) /* Cannot abort already submitted request - could still * be active at the SCLP */ __sclp_set_request_timer(SCLP_BUSY_INTERVAL * HZ, - sclp_request_timeout, 0); + sclp_request_timeout_normal); break; } do_post: @@ -558,7 +566,7 @@ sclp_sync_wait(void) if (timer_pending(&sclp_request_timer) && get_tod_clock_fast() > timeout && del_timer(&sclp_request_timer)) - sclp_request_timer.function(sclp_request_timer.data); + sclp_request_timer.function((TIMER_DATA_TYPE)&sclp_request_timer); cpu_relax(); } local_irq_disable(); @@ -915,7 +923,7 @@ static void sclp_check_handler(struct ext_code ext_code, /* Initial init mask request timed out. Modify request state to failed. */ static void -sclp_check_timeout(unsigned long data) +sclp_check_timeout(struct timer_list *unused) { unsigned long flags; @@ -954,7 +962,7 @@ sclp_check_interface(void) sclp_init_req.status = SCLP_REQ_RUNNING; sclp_running_state = sclp_running_state_running; __sclp_set_request_timer(SCLP_RETRY_INTERVAL * HZ, - sclp_check_timeout, 0); + sclp_check_timeout); spin_unlock_irqrestore(&sclp_lock, flags); /* Enable service-signal interruption - needs to happen * with IRQs enabled. */ @@ -1159,9 +1167,8 @@ sclp_init(void) INIT_LIST_HEAD(&sclp_req_queue); INIT_LIST_HEAD(&sclp_reg_list); list_add(&sclp_state_change_event.list, &sclp_reg_list); - init_timer(&sclp_request_timer); - init_timer(&sclp_queue_timer); - sclp_queue_timer.function = sclp_req_queue_timeout; + timer_setup(&sclp_request_timer, NULL, 0); + timer_setup(&sclp_queue_timer, sclp_req_queue_timeout, 0); /* Check interface */ spin_unlock_irqrestore(&sclp_lock, flags); rc = sclp_check_interface(); diff --git a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c index 7027e61a6931..8966a1c1b548 100644 --- a/drivers/s390/char/sclp_con.c +++ b/drivers/s390/char/sclp_con.c @@ -125,7 +125,7 @@ static void sclp_console_sync_queue(void) * temporary write buffer without further waiting on a final new line. */ static void -sclp_console_timeout(unsigned long data) +sclp_console_timeout(struct timer_list *unused) { sclp_conbuf_emit(); } @@ -211,7 +211,6 @@ sclp_console_write(struct console *console, const char *message, /* Setup timer to output current console buffer after 1/10 second */ if (sclp_conbuf != NULL && sclp_chars_in_buffer(sclp_conbuf) != 0 && !timer_pending(&sclp_con_timer)) { - setup_timer(&sclp_con_timer, sclp_console_timeout, 0UL); mod_timer(&sclp_con_timer, jiffies + HZ / 10); } out: @@ -332,7 +331,7 @@ sclp_console_init(void) INIT_LIST_HEAD(&sclp_con_outqueue); spin_lock_init(&sclp_con_lock); sclp_conbuf = NULL; - init_timer(&sclp_con_timer); + timer_setup(&sclp_con_timer, sclp_console_timeout, 0); /* Set output format */ if (MACHINE_IS_VM) diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c index 1cceefdc03e0..9f7b87d6d434 100644 --- a/drivers/s390/char/sclp_tty.c +++ b/drivers/s390/char/sclp_tty.c @@ -151,7 +151,7 @@ __sclp_ttybuf_emit(struct sclp_buffer *buffer) * temporary write buffer. */ static void -sclp_tty_timeout(unsigned long data) +sclp_tty_timeout(struct timer_list *unused) { unsigned long flags; struct sclp_buffer *buf; @@ -218,7 +218,6 @@ static int sclp_tty_write_string(const unsigned char *str, int count, int may_fa /* Setup timer to output current console buffer after 1/10 second */ if (sclp_ttybuf && sclp_chars_in_buffer(sclp_ttybuf) && !timer_pending(&sclp_tty_timer)) { - setup_timer(&sclp_tty_timer, sclp_tty_timeout, 0UL); mod_timer(&sclp_tty_timer, jiffies + HZ / 10); } spin_unlock_irqrestore(&sclp_tty_lock, flags); @@ -526,7 +525,7 @@ sclp_tty_init(void) } INIT_LIST_HEAD(&sclp_tty_outqueue); spin_lock_init(&sclp_tty_lock); - init_timer(&sclp_tty_timer); + timer_setup(&sclp_tty_timer, sclp_tty_timeout, 0); sclp_ttybuf = NULL; sclp_tty_buffer_count = 0; if (MACHINE_IS_VM) { diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index e84395d71389..3f9a6ef650fa 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c @@ -357,7 +357,7 @@ sclp_vt220_add_msg(struct sclp_vt220_request *request, * Emit buffer after having waited long enough for more data to arrive. */ static void -sclp_vt220_timeout(unsigned long data) +sclp_vt220_timeout(struct timer_list *unused) { sclp_vt220_emit_current(); } @@ -454,8 +454,6 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, /* Setup timer to output current console buffer after some time */ if (sclp_vt220_current_request != NULL && !timer_pending(&sclp_vt220_timer) && do_schedule) { - sclp_vt220_timer.function = sclp_vt220_timeout; - sclp_vt220_timer.data = 0UL; sclp_vt220_timer.expires = jiffies + BUFFER_MAX_DELAY; add_timer(&sclp_vt220_timer); } @@ -699,7 +697,7 @@ static int __init __sclp_vt220_init(int num_pages) spin_lock_init(&sclp_vt220_lock); INIT_LIST_HEAD(&sclp_vt220_empty); INIT_LIST_HEAD(&sclp_vt220_outqueue); - init_timer(&sclp_vt220_timer); + timer_setup(&sclp_vt220_timer, sclp_vt220_timeout, 0); tty_port_init(&sclp_vt220_port); sclp_vt220_current_request = NULL; sclp_vt220_buffered_chars = 0; diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 9dd4534823b3..32503a60ee85 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c @@ -32,7 +32,7 @@ static void __tape_do_irq (struct ccw_device *, unsigned long, struct irb *); static void tape_delayed_next_request(struct work_struct *); -static void tape_long_busy_timeout(unsigned long data); +static void tape_long_busy_timeout(struct timer_list *t); /* * One list to contain all tape devices of all disciplines, so @@ -381,8 +381,7 @@ tape_generic_online(struct tape_device *device, return -EINVAL; } - init_timer(&device->lb_timeout); - device->lb_timeout.function = tape_long_busy_timeout; + timer_setup(&device->lb_timeout, tape_long_busy_timeout, 0); /* Let the discipline have a go at the device. */ device->discipline = discipline; @@ -867,18 +866,16 @@ tape_delayed_next_request(struct work_struct *work) spin_unlock_irq(get_ccwdev_lock(device->cdev)); } -static void tape_long_busy_timeout(unsigned long data) +static void tape_long_busy_timeout(struct timer_list *t) { + struct tape_device *device = from_timer(device, t, lb_timeout); struct tape_request *request; - struct tape_device *device; - device = (struct tape_device *) data; spin_lock_irq(get_ccwdev_lock(device->cdev)); request = list_entry(device->req_queue.next, struct tape_request, list); BUG_ON(request->status != TAPE_REQUEST_LONG_BUSY); DBF_LH(6, "%08x: Long busy timeout.\n", device->cdev_id); __tape_start_next_request(device); - device->lb_timeout.data = 0UL; tape_put_device(device); spin_unlock_irq(get_ccwdev_lock(device->cdev)); } @@ -1157,7 +1154,6 @@ __tape_do_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb) if (req->status == TAPE_REQUEST_LONG_BUSY) { DBF_EVENT(3, "(%08x): del timer\n", device->cdev_id); if (del_timer(&device->lb_timeout)) { - device->lb_timeout.data = 0UL; tape_put_device(device); __tape_start_next_request(device); } @@ -1212,8 +1208,6 @@ __tape_do_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb) case TAPE_IO_PENDING: break; case TAPE_IO_LONG_BUSY: - device->lb_timeout.data = - (unsigned long) tape_get_device(device); device->lb_timeout.expires = jiffies + LONG_BUSY_TIMEOUT * HZ; DBF_EVENT(3, "(%08x): add timer\n", device->cdev_id); diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index e5ebe2fbee23..e417ccd9e299 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c @@ -118,7 +118,7 @@ struct tty3270 { #define TTY_UPDATE_STATUS 8 /* Update status line. */ #define TTY_UPDATE_ALL 16 /* Recreate screen. */ -static void tty3270_update(struct tty3270 *); +static void tty3270_update(struct timer_list *); static void tty3270_resize_work(struct work_struct *work); /* @@ -361,8 +361,9 @@ tty3270_write_callback(struct raw3270_request *rq, void *data) * Update 3270 display. */ static void -tty3270_update(struct tty3270 *tp) +tty3270_update(struct timer_list *t) { + struct tty3270 *tp = from_timer(tp, t, timer); static char invalid_sba[2] = { 0xff, 0xff }; struct raw3270_request *wrq; unsigned long updated; @@ -748,8 +749,7 @@ tty3270_alloc_view(void) goto out_reset; tty_port_init(&tp->port); - setup_timer(&tp->timer, (void (*)(unsigned long)) tty3270_update, - (unsigned long) tp); + timer_setup(&tp->timer, tty3270_update, 0); tasklet_init(&tp->readlet, (void (*)(unsigned long)) tty3270_read_tasklet, (unsigned long) tp->read); diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index e5c32f4b5287..318d8269f5de 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -142,7 +142,7 @@ static void io_subchannel_shutdown(struct subchannel *); static int io_subchannel_sch_event(struct subchannel *, int); static int io_subchannel_chp_event(struct subchannel *, struct chp_link *, int); -static void recovery_func(unsigned long data); +static void recovery_func(struct timer_list *unused); static struct css_device_id io_subchannel_ids[] = { { .match_flags = 0x1, .type = SUBCHANNEL_TYPE_IO, }, @@ -194,7 +194,7 @@ int __init io_subchannel_init(void) { int ret; - setup_timer(&recovery_timer, recovery_func, 0); + timer_setup(&recovery_timer, recovery_func, 0); ret = bus_register(&ccw_bus_type); if (ret) return ret; @@ -726,7 +726,7 @@ static int io_subchannel_initialize_dev(struct subchannel *sch, INIT_WORK(&priv->todo_work, ccw_device_todo); INIT_LIST_HEAD(&priv->cmb_list); init_waitqueue_head(&priv->wait_q); - init_timer(&priv->timer); + timer_setup(&priv->timer, ccw_device_timeout, 0); atomic_set(&priv->onoff, 0); cdev->ccwlock = sch->lock; @@ -1271,7 +1271,7 @@ static void recovery_work_func(struct work_struct *unused) static DECLARE_WORK(recovery_work, recovery_work_func); -static void recovery_func(unsigned long data) +static void recovery_func(struct timer_list *unused) { /* * We can't do our recovery in softirq context and it's not diff --git a/drivers/s390/cio/device.h b/drivers/s390/cio/device.h index b37c22adcc7a..f5c427ec24b1 100644 --- a/drivers/s390/cio/device.h +++ b/drivers/s390/cio/device.h @@ -4,6 +4,7 @@ #include <asm/ccwdev.h> #include <linux/atomic.h> +#include <linux/timer.h> #include <linux/wait.h> #include <linux/notifier.h> #include <linux/kernel_stat.h> @@ -134,6 +135,7 @@ int ccw_device_notify(struct ccw_device *, int); void ccw_device_set_disconnected(struct ccw_device *cdev); void ccw_device_set_notoper(struct ccw_device *cdev); +void ccw_device_timeout(struct timer_list *t); void ccw_device_set_timeout(struct ccw_device *, int); void ccw_device_schedule_recovery(void); diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index f98ea674c3d8..dd7d79d30edc 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c @@ -91,12 +91,12 @@ static void ccw_timeout_log(struct ccw_device *cdev) /* * Timeout function. It just triggers a DEV_EVENT_TIMEOUT. */ -static void -ccw_device_timeout(unsigned long data) +void +ccw_device_timeout(struct timer_list *t) { - struct ccw_device *cdev; + struct ccw_device_private *priv = from_timer(priv, t, timer); + struct ccw_device *cdev = priv->cdev; - cdev = (struct ccw_device *) data; spin_lock_irq(cdev->ccwlock); if (timeout_log_enabled) ccw_timeout_log(cdev); @@ -118,8 +118,6 @@ ccw_device_set_timeout(struct ccw_device *cdev, int expires) if (mod_timer(&cdev->private->timer, jiffies + expires)) return; } - cdev->private->timer.function = ccw_device_timeout; - cdev->private->timer.data = (unsigned long) cdev; cdev->private->timer.expires = jiffies + expires; add_timer(&cdev->private->timer); } diff --git a/drivers/s390/cio/eadm_sch.c b/drivers/s390/cio/eadm_sch.c index d14795f7110b..ce16e4f45d44 100644 --- a/drivers/s390/cio/eadm_sch.c +++ b/drivers/s390/cio/eadm_sch.c @@ -94,9 +94,10 @@ static int eadm_subchannel_clear(struct subchannel *sch) return 0; } -static void eadm_subchannel_timeout(unsigned long data) +static void eadm_subchannel_timeout(struct timer_list *t) { - struct subchannel *sch = (struct subchannel *) data; + struct eadm_private *private = from_timer(private, t, timer); + struct subchannel *sch = private->sch; spin_lock_irq(sch->lock); EADM_LOG(1, "timeout"); @@ -118,8 +119,6 @@ static void eadm_subchannel_set_timeout(struct subchannel *sch, int expires) if (mod_timer(&private->timer, jiffies + expires)) return; } - private->timer.function = eadm_subchannel_timeout; - private->timer.data = (unsigned long) sch; private->timer.expires = jiffies + expires; add_timer(&private->timer); } @@ -224,7 +223,7 @@ static int eadm_subchannel_probe(struct subchannel *sch) return -ENOMEM; INIT_LIST_HEAD(&private->head); - init_timer(&private->timer); + timer_setup(&private->timer, eadm_subchannel_timeout, 0); spin_lock_irq(sch->lock); set_eadm_private(sch, private); diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h index 29d6b5222f1c..a6f7c2986b94 100644 --- a/drivers/s390/cio/qdio.h +++ b/drivers/s390/cio/qdio.h @@ -393,7 +393,7 @@ int test_nonshared_ind(struct qdio_irq *); /* prototypes for setup */ void qdio_inbound_processing(unsigned long data); void qdio_outbound_processing(unsigned long data); -void qdio_outbound_timer(unsigned long data); +void qdio_outbound_timer(struct timer_list *t); void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb); int qdio_allocate_qs(struct qdio_irq *irq_ptr, int nr_input_qs, diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index a4ad39ba3873..ed4852fab44b 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -894,9 +894,9 @@ void qdio_outbound_processing(unsigned long data) __qdio_outbound_processing(q); } -void qdio_outbound_timer(unsigned long data) +void qdio_outbound_timer(struct timer_list *t) { - struct qdio_q *q = (struct qdio_q *)data; + struct qdio_q *q = from_timer(q, t, u.out.timer); qdio_tasklet_schedule(q); } diff --git a/drivers/s390/cio/qdio_setup.c b/drivers/s390/cio/qdio_setup.c index 48b3866a9ded..9ae1380cbc31 100644 --- a/drivers/s390/cio/qdio_setup.c +++ b/drivers/s390/cio/qdio_setup.c @@ -252,8 +252,7 @@ static void setup_queues(struct qdio_irq *irq_ptr, tasklet_init(&q->tasklet, qdio_outbound_processing, (unsigned long) q); - setup_timer(&q->u.out.timer, (void(*)(unsigned long)) - &qdio_outbound_timer, (unsigned long)q); + timer_setup(&q->u.out.timer, qdio_outbound_timer, 0); } } diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 8b5658b0bec3..faeba9db3d95 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -374,13 +374,13 @@ void ap_wait(enum ap_wait wait) /** * ap_request_timeout(): Handling of request timeouts - * @data: Holds the AP device. + * @t: timer making this callback * * Handles request timeouts. */ -void ap_request_timeout(unsigned long data) +void ap_request_timeout(struct timer_list *t) { - struct ap_queue *aq = (struct ap_queue *) data; + struct ap_queue *aq = from_timer(aq, t, timeout); if (ap_suspend_flag) return; @@ -1203,7 +1203,7 @@ out: mod_timer(&ap_config_timer, jiffies + ap_config_time * HZ); } -static void ap_config_timeout(unsigned long ptr) +static void ap_config_timeout(struct timer_list *unused) { if (ap_suspend_flag) return; @@ -1306,7 +1306,7 @@ int __init ap_module_init(void) goto out_bus; /* Setup the AP bus rescan timer. */ - setup_timer(&ap_config_timer, ap_config_timeout, 0); + timer_setup(&ap_config_timer, ap_config_timeout, 0); /* * Setup the high resultion poll timer. diff --git a/drivers/s390/crypto/ap_bus.h b/drivers/s390/crypto/ap_bus.h index 3a0e19d87e7c..7e45c4d08cad 100644 --- a/drivers/s390/crypto/ap_bus.h +++ b/drivers/s390/crypto/ap_bus.h @@ -241,7 +241,7 @@ void ap_flush_queue(struct ap_queue *aq); void *ap_airq_ptr(void); void ap_wait(enum ap_wait wait); -void ap_request_timeout(unsigned long data); +void ap_request_timeout(struct timer_list *t); void ap_bus_force_rescan(void); void ap_queue_init_reply(struct ap_queue *aq, struct ap_message *ap_msg); diff --git a/drivers/s390/crypto/ap_queue.c b/drivers/s390/crypto/ap_queue.c index a550d40921e7..ba3a2e13b0eb 100644 --- a/drivers/s390/crypto/ap_queue.c +++ b/drivers/s390/crypto/ap_queue.c @@ -634,7 +634,7 @@ struct ap_queue *ap_queue_create(ap_qid_t qid, int device_type) INIT_LIST_HEAD(&aq->list); INIT_LIST_HEAD(&aq->pendingq); INIT_LIST_HEAD(&aq->requestq); - setup_timer(&aq->timeout, ap_request_timeout, (unsigned long) aq); + timer_setup(&aq->timeout, ap_request_timeout, 0); return aq; } diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index cbb8156bf5e0..1d91a32db08e 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -564,21 +564,24 @@ void zfcp_erp_notify(struct zfcp_erp_action *erp_action, unsigned long set_mask) * zfcp_erp_timeout_handler - Trigger ERP action from timed out ERP request * @data: ERP action (from timer data) */ -void zfcp_erp_timeout_handler(unsigned long data) +void zfcp_erp_timeout_handler(struct timer_list *t) { - struct zfcp_erp_action *act = (struct zfcp_erp_action *) data; + struct zfcp_fsf_req *fsf_req = from_timer(fsf_req, t, timer); + struct zfcp_erp_action *act = fsf_req->erp_action; + zfcp_erp_notify(act, ZFCP_STATUS_ERP_TIMEDOUT); } -static void zfcp_erp_memwait_handler(unsigned long data) +static void zfcp_erp_memwait_handler(struct timer_list *t) { - zfcp_erp_notify((struct zfcp_erp_action *)data, 0); + struct zfcp_erp_action *act = from_timer(act, t, timer); + + zfcp_erp_notify(act, 0); } static void zfcp_erp_strategy_memwait(struct zfcp_erp_action *erp_action) { - setup_timer(&erp_action->timer, zfcp_erp_memwait_handler, - (unsigned long) erp_action); + timer_setup(&erp_action->timer, zfcp_erp_memwait_handler, 0); erp_action->timer.expires = jiffies + HZ; add_timer(&erp_action->timer); } diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index 8ca2ab7deaa9..bf8ea4df2bb8 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h @@ -69,7 +69,7 @@ extern int zfcp_erp_thread_setup(struct zfcp_adapter *); extern void zfcp_erp_thread_kill(struct zfcp_adapter *); extern void zfcp_erp_wait(struct zfcp_adapter *); extern void zfcp_erp_notify(struct zfcp_erp_action *, unsigned long); -extern void zfcp_erp_timeout_handler(unsigned long); +extern void zfcp_erp_timeout_handler(struct timer_list *t); /* zfcp_fc.c */ extern struct kmem_cache *zfcp_fc_req_cache; diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 00fb98f7b2cd..51b81c0a0652 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -21,9 +21,11 @@ struct kmem_cache *zfcp_fsf_qtcb_cache; -static void zfcp_fsf_request_timeout_handler(unsigned long data) +static void zfcp_fsf_request_timeout_handler(struct timer_list *t) { - struct zfcp_adapter *adapter = (struct zfcp_adapter *) data; + struct zfcp_fsf_req *fsf_req = from_timer(fsf_req, t, timer); + struct zfcp_adapter *adapter = fsf_req->adapter; + zfcp_qdio_siosl(adapter); zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, "fsrth_1"); @@ -32,8 +34,7 @@ static void zfcp_fsf_request_timeout_handler(unsigned long data) static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, unsigned long timeout) { - fsf_req->timer.function = zfcp_fsf_request_timeout_handler; - fsf_req->timer.data = (unsigned long) fsf_req->adapter; + fsf_req->timer.function = (TIMER_FUNC_TYPE)zfcp_fsf_request_timeout_handler; fsf_req->timer.expires = jiffies + timeout; add_timer(&fsf_req->timer); } @@ -41,8 +42,7 @@ static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, static void zfcp_fsf_start_erp_timer(struct zfcp_fsf_req *fsf_req) { BUG_ON(!fsf_req->erp_action); - fsf_req->timer.function = zfcp_erp_timeout_handler; - fsf_req->timer.data = (unsigned long) fsf_req->erp_action; + fsf_req->timer.function = (TIMER_FUNC_TYPE)zfcp_erp_timeout_handler; fsf_req->timer.expires = jiffies + 30 * HZ; add_timer(&fsf_req->timer); } @@ -692,7 +692,7 @@ static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_qdio *qdio, adapter->req_no++; INIT_LIST_HEAD(&req->list); - init_timer(&req->timer); + timer_setup(&req->timer, NULL, 0); init_completion(&req->completion); req->adapter = adapter; |