aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/cio.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2010-02-26 16:37:43 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-02-26 16:37:31 -0500
commitcbb870c8221147ae337612e04b2bb0211f31a74b (patch)
treeaa0c80fde4a271d8a366afc76912c5dacdb7542a /drivers/s390/cio/cio.c
parentd96221ab1e7d86dc0d4666466979117cd1915386 (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/cio.c')
-rw-r--r--drivers/s390/cio/cio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index f9d8c7936a09..f736cdcf08ad 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -625,8 +625,8 @@ void __irq_entry do_IRQ(struct pt_regs *regs)
625 /* 625 /*
626 * Get interrupt information from lowcore 626 * Get interrupt information from lowcore
627 */ 627 */
628 tpi_info = (struct tpi_info *) __LC_SUBCHANNEL_ID; 628 tpi_info = (struct tpi_info *)&S390_lowcore.subchannel_id;
629 irb = (struct irb *) __LC_IRB; 629 irb = (struct irb *)&S390_lowcore.irb;
630 do { 630 do {
631 kstat_cpu(smp_processor_id()).irqs[IO_INTERRUPT]++; 631 kstat_cpu(smp_processor_id()).irqs[IO_INTERRUPT]++;
632 /* 632 /*
@@ -682,10 +682,10 @@ static int cio_tpi(void)
682 struct irb *irb; 682 struct irb *irb;
683 int irq_context; 683 int irq_context;
684 684
685 tpi_info = (struct tpi_info *) __LC_SUBCHANNEL_ID; 685 tpi_info = (struct tpi_info *)&S390_lowcore.subchannel_id;
686 if (tpi(NULL) != 1) 686 if (tpi(NULL) != 1)
687 return 0; 687 return 0;
688 irb = (struct irb *) __LC_IRB; 688 irb = (struct irb *)&S390_lowcore.irb;
689 /* Store interrupt response block to lowcore. */ 689 /* Store interrupt response block to lowcore. */
690 if (tsch(tpi_info->schid, irb) != 0) 690 if (tsch(tpi_info->schid, irb) != 0)
691 /* Not status pending or not operational. */ 691 /* Not status pending or not operational. */
@@ -885,7 +885,7 @@ __clear_io_subchannel_easy(struct subchannel_id schid)
885 struct tpi_info ti; 885 struct tpi_info ti;
886 886
887 if (tpi(&ti)) { 887 if (tpi(&ti)) {
888 tsch(ti.schid, (struct irb *)__LC_IRB); 888 tsch(ti.schid, (struct irb *)&S390_lowcore.irb);
889 if (schid_equal(&ti.schid, &schid)) 889 if (schid_equal(&ti.schid, &schid))
890 return 0; 890 return 0;
891 } 891 }
@@ -1083,7 +1083,7 @@ int __init cio_get_iplinfo(struct cio_iplinfo *iplinfo)
1083 struct subchannel_id schid; 1083 struct subchannel_id schid;
1084 struct schib schib; 1084 struct schib schib;
1085 1085
1086 schid = *(struct subchannel_id *)__LC_SUBCHANNEL_ID; 1086 schid = *(struct subchannel_id *)&S390_lowcore.subchannel_id;
1087 if (!schid.one) 1087 if (!schid.one)
1088 return -ENODEV; 1088 return -ENODEV;
1089 if (stsch(schid, &schib)) 1089 if (stsch(schid, &schib))