diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2010-02-26 16:37:43 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-02-26 16:37:31 -0500 |
commit | cbb870c8221147ae337612e04b2bb0211f31a74b (patch) | |
tree | aa0c80fde4a271d8a366afc76912c5dacdb7542a /drivers/s390/cio/device_fsm.c | |
parent | d96221ab1e7d86dc0d4666466979117cd1915386 (diff) |
[S390] Cleanup struct _lowcore usage and defines.
Use asm offsets to make sure the offset defines to struct _lowcore and
its layout don't get out of sync.
Also add a BUILD_BUG_ON() which checks that the size of the structure
is sane.
And while being at it change those sites which use odd casts to access
the current lowcore. These should use S390_lowcore 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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 2cb01861ce34..c56ab94612f9 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -690,7 +690,7 @@ ccw_device_irq(struct ccw_device *cdev, enum dev_event dev_event) | |||
690 | struct irb *irb; | 690 | struct irb *irb; |
691 | int is_cmd; | 691 | int is_cmd; |
692 | 692 | ||
693 | irb = (struct irb *) __LC_IRB; | 693 | irb = (struct irb *)&S390_lowcore.irb; |
694 | is_cmd = !scsw_is_tm(&irb->scsw); | 694 | is_cmd = !scsw_is_tm(&irb->scsw); |
695 | /* Check for unsolicited interrupt. */ | 695 | /* Check for unsolicited interrupt. */ |
696 | if (!scsw_is_solicited(&irb->scsw)) { | 696 | if (!scsw_is_solicited(&irb->scsw)) { |
@@ -755,7 +755,7 @@ ccw_device_w4sense(struct ccw_device *cdev, enum dev_event dev_event) | |||
755 | { | 755 | { |
756 | struct irb *irb; | 756 | struct irb *irb; |
757 | 757 | ||
758 | irb = (struct irb *) __LC_IRB; | 758 | irb = (struct irb *)&S390_lowcore.irb; |
759 | /* Check for unsolicited interrupt. */ | 759 | /* Check for unsolicited interrupt. */ |
760 | if (scsw_stctl(&irb->scsw) == | 760 | if (scsw_stctl(&irb->scsw) == |
761 | (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { | 761 | (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { |