Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121383
b: refs/heads/master
c: 191fd44
h: refs/heads/master
i:
  121381: 9718c59
  121379: dcf24bd
  121375: 75af7d7
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Dec 25, 2008
1 parent 566385b commit e8d1d1e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 39 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 547e3cec4f7a4846707db19cba43aa58eb07f48f
refs/heads/master: 191fd44c11e10daf9d2cabd16935952e9c735949
75 changes: 37 additions & 38 deletions trunk/drivers/s390/cio/cio.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,44 +104,6 @@ cio_get_options (struct subchannel *sch)
return flags;
}

/*
* Use tpi to get a pending interrupt, call the interrupt handler and
* return a pointer to the subchannel structure.
*/
static int
cio_tpi(void)
{
struct tpi_info *tpi_info;
struct subchannel *sch;
struct irb *irb;
int irq_context;

tpi_info = (struct tpi_info *) __LC_SUBCHANNEL_ID;
if (tpi (NULL) != 1)
return 0;
irb = (struct irb *) __LC_IRB;
/* Store interrupt response block to lowcore. */
if (tsch (tpi_info->schid, irb) != 0)
/* Not status pending or not operational. */
return 1;
sch = (struct subchannel *)(unsigned long)tpi_info->intparm;
if (!sch)
return 1;
irq_context = in_interrupt();
if (!irq_context)
local_bh_disable();
irq_enter ();
spin_lock(sch->lock);
memcpy(&sch->schib.scsw, &irb->scsw, sizeof(union scsw));
if (sch->driver && sch->driver->irq)
sch->driver->irq(sch);
spin_unlock(sch->lock);
irq_exit ();
if (!irq_context)
_local_bh_enable();
return 1;
}

static int
cio_start_handle_notoper(struct subchannel *sch, __u8 lpm)
{
Expand Down Expand Up @@ -687,6 +649,43 @@ static char console_sch_name[10] = "0.x.xxxx";
static struct io_subchannel_private console_priv;
static int console_subchannel_in_use;

/*
* Use tpi to get a pending interrupt, call the interrupt handler and
* return a pointer to the subchannel structure.
*/
static int cio_tpi(void)
{
struct tpi_info *tpi_info;
struct subchannel *sch;
struct irb *irb;
int irq_context;

tpi_info = (struct tpi_info *) __LC_SUBCHANNEL_ID;
if (tpi(NULL) != 1)
return 0;
irb = (struct irb *) __LC_IRB;
/* Store interrupt response block to lowcore. */
if (tsch(tpi_info->schid, irb) != 0)
/* Not status pending or not operational. */
return 1;
sch = (struct subchannel *)(unsigned long)tpi_info->intparm;
if (!sch)
return 1;
irq_context = in_interrupt();
if (!irq_context)
local_bh_disable();
irq_enter();
spin_lock(sch->lock);
memcpy(&sch->schib.scsw, &irb->scsw, sizeof(union scsw));
if (sch->driver && sch->driver->irq)
sch->driver->irq(sch);
spin_unlock(sch->lock);
irq_exit();
if (!irq_context)
_local_bh_enable();
return 1;
}

void *cio_get_console_priv(void)
{
return &console_priv;
Expand Down

0 comments on commit e8d1d1e

Please sign in to comment.