diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-08-30 08:33:35 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-08-30 08:33:35 -0400 |
commit | 292888c81e74115db5e5a4a838f730a7c3662982 (patch) | |
tree | 16f7b7bf39cd8a72fa8d3aa5b71c8dc890b57c96 /drivers/s390/cio/device_fsm.c | |
parent | 8f61701bdf536c7a80f0f614bac91c7883804c4c (diff) |
[S390] cio: kernel stack overflow.
Use different kind of assignment to make sure gcc doesn't create code
that creates temp variables on the stack, assigns values to it and
copies the content of the whole temp variable to the destination.
This reduces stack usage of e.g. ccwgroup_driver_register from 976
to 48 bytes instead.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device_fsm.c')
-rw-r--r-- | drivers/s390/cio/device_fsm.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 6d91c2eb205b..35e162ba6d54 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -267,12 +267,10 @@ ccw_device_recog_done(struct ccw_device *cdev, int state) | |||
267 | notify = 1; | 267 | notify = 1; |
268 | } | 268 | } |
269 | /* fill out sense information */ | 269 | /* fill out sense information */ |
270 | cdev->id = (struct ccw_device_id) { | 270 | cdev->id.cu_type = cdev->private->senseid.cu_type; |
271 | .cu_type = cdev->private->senseid.cu_type, | 271 | cdev->id.cu_model = cdev->private->senseid.cu_model; |
272 | .cu_model = cdev->private->senseid.cu_model, | 272 | cdev->id.dev_type = cdev->private->senseid.dev_type; |
273 | .dev_type = cdev->private->senseid.dev_type, | 273 | cdev->id.dev_model = cdev->private->senseid.dev_model; |
274 | .dev_model = cdev->private->senseid.dev_model, | ||
275 | }; | ||
276 | if (notify) { | 274 | if (notify) { |
277 | cdev->private->state = DEV_STATE_OFFLINE; | 275 | cdev->private->state = DEV_STATE_OFFLINE; |
278 | if (same_dev) { | 276 | if (same_dev) { |
@@ -566,12 +564,10 @@ ccw_device_verify_done(struct ccw_device *cdev, int err) | |||
566 | /* Deliver fake irb to device driver, if needed. */ | 564 | /* Deliver fake irb to device driver, if needed. */ |
567 | if (cdev->private->flags.fake_irb) { | 565 | if (cdev->private->flags.fake_irb) { |
568 | memset(&cdev->private->irb, 0, sizeof(struct irb)); | 566 | memset(&cdev->private->irb, 0, sizeof(struct irb)); |
569 | cdev->private->irb.scsw = (struct scsw) { | 567 | cdev->private->irb.scsw.cc = 1; |
570 | .cc = 1, | 568 | cdev->private->irb.scsw.fctl = SCSW_FCTL_START_FUNC; |
571 | .fctl = SCSW_FCTL_START_FUNC, | 569 | cdev->private->irb.scsw.actl = SCSW_ACTL_START_PEND; |
572 | .actl = SCSW_ACTL_START_PEND, | 570 | cdev->private->irb.scsw.stctl = SCSW_STCTL_STATUS_PEND; |
573 | .stctl = SCSW_STCTL_STATUS_PEND, | ||
574 | }; | ||
575 | cdev->private->flags.fake_irb = 0; | 571 | cdev->private->flags.fake_irb = 0; |
576 | if (cdev->handler) | 572 | if (cdev->handler) |
577 | cdev->handler(cdev, cdev->private->intparm, | 573 | cdev->handler(cdev, cdev->private->intparm, |