aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-06 09:13:53 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-06 09:13:53 -0700
commitda104a83692cf07434ab3b20bf10093bdbc3f97e (patch)
tree6343600c318c600f0dcdf71406bf7d993823afd4 /drivers/s390/cio
parent96e1a87392293cf895ea99ab70758453897c7bbf (diff)
parentdc64bef5439c8e1fafea225054da4d8882c9d10c (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.
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/chsc.c25
-rw-r--r--drivers/s390/cio/cio.c6
2 files changed, 21 insertions, 10 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index 3bb4e472d73..07c7f19339d 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -200,11 +200,13 @@ css_get_ssd_info(struct subchannel *sch)
spin_unlock_irq(&sch->lock);
free_page((unsigned long)page);
if (!ret) {
- int j, chpid;
+ int j, chpid, mask;
/* Allocate channel path structures, if needed. */
for (j = 0; j < 8; j++) {
+ mask = 0x80 >> j;
chpid = sch->ssd_info.chpid[j];
- if (chpid && (get_chp_status(chpid) < 0))
+ if ((sch->schib.pmcw.pim & mask) &&
+ (get_chp_status(chpid) < 0))
new_channel_path(chpid);
}
}
@@ -222,13 +224,15 @@ s390_subchannel_remove_chpid(struct device *dev, void *data)
sch = to_subchannel(dev);
chpid = data;
- for (j = 0; j < 8; j++)
- if (sch->schib.pmcw.chpid[j] == chpid->id)
+ for (j = 0; j < 8; j++) {
+ mask = 0x80 >> j;
+ if ((sch->schib.pmcw.pim & mask) &&
+ (sch->schib.pmcw.chpid[j] == chpid->id))
break;
+ }
if (j >= 8)
return 0;
- mask = 0x80 >> j;
spin_lock_irq(&sch->lock);
stsch(sch->schid, &schib);
@@ -620,7 +624,7 @@ __chp_add_new_sch(struct subchannel_id schid)
static int
__chp_add(struct subchannel_id schid, void *data)
{
- int i;
+ int i, mask;
struct channel_path *chp;
struct subchannel *sch;
@@ -630,8 +634,10 @@ __chp_add(struct subchannel_id schid, void *data)
/* Check if the subchannel is now available. */
return __chp_add_new_sch(schid);
spin_lock_irq(&sch->lock);
- for (i=0; i<8; i++)
- if (sch->schib.pmcw.chpid[i] == chp->id) {
+ for (i=0; i<8; i++) {
+ mask = 0x80 >> i;
+ if ((sch->schib.pmcw.pim & mask) &&
+ (sch->schib.pmcw.chpid[i] == chp->id)) {
if (stsch(sch->schid, &sch->schib) != 0) {
/* Endgame. */
spin_unlock_irq(&sch->lock);
@@ -639,6 +645,7 @@ __chp_add(struct subchannel_id schid, void *data)
}
break;
}
+ }
if (i==8) {
spin_unlock_irq(&sch->lock);
return 0;
@@ -646,7 +653,7 @@ __chp_add(struct subchannel_id schid, void *data)
sch->lpm = ((sch->schib.pmcw.pim &
sch->schib.pmcw.pam &
sch->schib.pmcw.pom)
- | 0x80 >> i) & sch->opm;
+ | mask) & sch->opm;
if (sch->driver && sch->driver->verify)
sch->driver->verify(&sch->dev);
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index 2e2882daefb..f18b1623cad 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -19,6 +19,7 @@
#include <asm/cio.h>
#include <asm/delay.h>
#include <asm/irq.h>
+#include <asm/irq_regs.h>
#include <asm/setup.h>
#include "airq.h"
#include "cio.h"
@@ -606,15 +607,17 @@ do_IRQ (struct pt_regs *regs)
struct tpi_info *tpi_info;
struct subchannel *sch;
struct irb *irb;
+ struct pt_regs *old_regs;
irq_enter ();
+ old_regs = set_irq_regs(regs);
asm volatile ("mc 0,0");
if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer)
/**
* Make sure that the i/o interrupt did not "overtake"
* the last HZ timer interrupt.
*/
- account_ticks(regs);
+ account_ticks();
/*
* Get interrupt information from lowcore
*/
@@ -652,6 +655,7 @@ do_IRQ (struct pt_regs *regs)
* out of the sie which costs more cycles than it saves.
*/
} while (!MACHINE_IS_VM && tpi (NULL) != 0);
+ set_irq_regs(old_regs);
irq_exit ();
}