s390: introduce struct subchannel_id.
Subsystems (2)
PATCH 12/17 s390: introduce struct subchannel_id.
From: Cornelia Huck <[email protected]>
[patch 12/17] s390: introduce struct subchannel_id.
This patch introduces a struct subchannel_id containing the subchannel number (formerly referred to as "irq") and switches code formerly relying on the subchannel number over to it.
While we're touching inline assemblies anyway, make sure they have correct memory constraints.
Signed-off-by Cornelia Huck <[email protected]>
Signed-off-by Martin Schwidefsky <[email protected]>
---
drivers/s390/cio/blacklist.c | 23 ++++---- drivers/s390/cio/chsc.c | 63 ++++++++++++---------- drivers/s390/cio/cio.c | 84 ++++++++++++++++-------------- drivers/s390/cio/cio.h | 11 ++-- drivers/s390/cio/cmf.c | 8 +- drivers/s390/cio/css.c | 69 +++++++++++++------------ drivers/s390/cio/css.h | 13 ++-- drivers/s390/cio/device.c | 17 +++++- drivers/s390/cio/device.h | 1 drivers/s390/cio/device_fsm.c | 18 +++--- drivers/s390/cio/device_id.c | 6 +- drivers/s390/cio/device_ops.c | 4 - drivers/s390/cio/device_pgid.c | 13 ++-- drivers/s390/cio/device_status.c | 8 +- drivers/s390/cio/ioasm.h | 55 +++++++++++--------- drivers/s390/cio/qdio.c | 107 ++++++++++++++++++++------------------- drivers/s390/cio/qdio.h | 26 +++++---- drivers/s390/cio/schid.h | 25 +++++++++ 18 files changed, 313 insertions(+), 238 deletions(-)
drivers/s390/cio/blacklist.c +12 -11
@@ -35,7 +35,7 @@*/ /* 65536 bits to indicate if a devno is blacklisted or not */ -#define __BL_DEV_WORDS ((__MAX_SUBCHANNELS + (8*sizeof(long) - 1)) / \ +#define __BL_DEV_WORDS ((__MAX_SUBCHANNEL + (8*sizeof(long) - 1)) / \ (8*sizeof(long)))static unsigned long bl_dev[__BL_DEV_WORDS];typedef enum {add, free}range_action ;
@@ -50,7 +50,7 @@ blacklist_range (range_action action, unif (!to) to = from; -if (from > to || to > __MAX_SUBCHANNELS) { +if (from > to || to > __MAX_SUBCHANNEL) {printk (KERN_WARNING "Invalid blacklist range " "0x%04x to 0x%04x, skipping\n" , from, to);return ;
@@ -143,7 +143,7 @@ blacklist_parse_parameters (char *str, rif (strncmp (str,"all," ,4 ) ==0 ||strcmp (str,"all" ) ==0 ||strncmp (str,"all\n" ,4 ) ==0 ||strncmp (str,"all " ,4 ) ==0 ) { from =0 ; - to = __MAX_SUBCHANNELS; + to = __MAX_SUBCHANNEL; str +=3 ; }else {int rc;
@@ -226,20 +226,21 @@ is_blacklisted (int devno)static inline void s390_redo_validation (void ) { -unsigned int irq; +struct subchannel_id schid;CIO_TRACE_EVENT (0 ,"redoval" ); -for (irq =0 ; irq < __MAX_SUBCHANNELS; irq++) { +init_subchannel_id (&schid); + do { int ret; struct subchannel *sch; - sch =get_subchannel_by_schid (irq); + sch = get_subchannel_by_schid(schid); if (sch) { /* Already known. */ put_device(&sch->dev); continue; } - ret =css_probe_device (irq); + ret = css_probe_device(schid); if (ret == -ENXIO) break; /* We're through. */ if (ret == -ENOMEM)
@@ -248,7 +249,7 @@ s390_redo_validation (void)* panic. */ break ; - } + }while (schid.sch_no++ < __MAX_SUBCHANNEL); }/*
@@ -289,12 +290,12 @@ static int cio_ignore_read (char *page, len =0 ;for (devno = off;/* abuse the page variable * as counter, see fs/proc/generic.c */ - devno < __MAX_SUBCHANNELS && len + entry_size < count; devno++) { + devno < __MAX_SUBCHANNEL && len + entry_size < count; devno++) {if (!test_bit (devno, bl_dev))continue ; len +=sprintf (page + len,"0.0.%04lx" , devno);if (test_bit (devno +1 , bl_dev)) {/* print range */ -while (++devno < __MAX_SUBCHANNELS) +while (++devno < __MAX_SUBCHANNEL)if (!test_bit (devno, bl_dev))break ; len +=sprintf (page + len,"-0.0.%04lx" , --devno);
@@ -302,7 +303,7 @@ static int cio_ignore_read (char *page, len +=sprintf (page + len,"\n" ); } -if (devno < __MAX_SUBCHANNELS) +if (devno < __MAX_SUBCHANNEL) *eof =1 ; *start = (char *) (devno - off);/* number of checked entries */ return len;
drivers/s390/cio/chsc.c +35 -28
205 lines not on this page · raw message
drivers/s390/cio/cio.c +45 -39
284 lines not on this page · raw message
drivers/s390/cio/cio.h +7 -4
@@ -1,6 +1,8 @@#ifndef S390_CIO_H #define S390_CIO_H +#include "schid.h" +/* * where we put the ssd info */
@@ -83,7 +85,7 @@ struct orb {/* subchannel data structure used by I/O subroutines */ struct subchannel { -unsigned int irq;/* aka. subchannel number */ +struct subchannel_id schid;spinlock_t lock;/* subchannel lock */ enum {
@@ -114,7 +116,7 @@ struct subchannel {#define to_subchannel (n) container_of(n, struct subchannel, dev) -extern int cio_validate_subchannel (struct subchannel *,unsigned int ); +extern int cio_validate_subchannel (struct subchannel *,struct subchannel_id );extern int cio_enable_subchannel (struct subchannel *,unsigned int );extern int cio_disable_subchannel (struct subchannel *);extern int cio_cancel (struct subchannel *);
@@ -127,14 +129,15 @@ extern int cio_cancel (struct subchannelextern int cio_set_options (struct subchannel *,int );extern int cio_get_options (struct subchannel *);extern int cio_modify (struct subchannel *); +/* Use with care. */ #ifdef CONFIG_CCW_CONSOLE extern struct subchannel *cio_probe_console (void );extern void cio_release_console (void ); -extern int cio_is_console (int irq); +extern int cio_is_console (struct subchannel_id );extern struct subchannel *cio_get_console_subchannel (void );#else -#define cio_is_console (irq) 0 +#define cio_is_console (schid) 0#define cio_get_console_subchannel () NULL#endif
drivers/s390/cio/cmf.c +4 -4
@@ -1,5 +1,5 @@/* -* linux/drivers/s390/cio/cmf.c ($Revision: 1.16 $) +* linux/drivers/s390/cio/cmf.c ($Revision: 1.19 $) * * Linux on zSeries Channel Measurement Facility support *
@@ -178,7 +178,7 @@ set_schib(struct ccw_device *cdev, u32 m/* msch can silently fail, so do it again if necessary */ for (retry =0 ; retry <3 ; retry++) {/* prepare schib */ -stsch (sch->irq, schib); +stsch (sch->schid, schib); schib->pmcw.mme = mme; schib->pmcw.mbfc = mbfc;/* address can be either a block address or a block index */
@@ -188,7 +188,7 @@ set_schib(struct ccw_device *cdev, u32 m schib->pmcw.mbi = address;/* try to submit it */ -switch (ret =msch_err (sch->irq, schib)) { +switch (ret =msch_err (sch->schid, schib)) {case 0 :break ;case 1 :
@@ -202,7 +202,7 @@ set_schib(struct ccw_device *cdev, u32 m ret = -EINVAL ;break ; } -stsch (sch->irq, schib);/* restore the schib */ +stsch (sch->schid, schib);/* restore the schib */ if (ret)break ;
drivers/s390/cio/css.c +38 -31
215 lines not on this page · raw message
drivers/s390/cio/css.h +7 -6
@@ -6,6 +6,8 @@#include <asm/cio.h> +#include "schid.h" +/* * path grouping stuff */
@@ -68,7 +70,7 @@ struct ccw_device_private {atomic_t onoff;unsigned long registered;__u16 devno;/* device number */ -__u16 irq;/* subchannel number */ +__u16 sch_no;/* subchannel number */ __u8 imask;/* lpm mask for SNID/SID/SPGID */ int iretry;/* retry counter SNID/SID/SPGID */ struct {
@@ -121,12 +123,11 @@ struct css_driver {extern struct bus_type css_bus_type;extern struct css_driver io_subchannel_driver; -int css_probe_device (int irq); -extern struct subchannel *get_subchannel_by_schid (int irq); -extern unsigned int highest_subchannel; +extern int css_probe_device (struct subchannel_id ); +extern struct subchannel *get_subchannel_by_schid (struct subchannel_id );extern int css_init_done; -#define __MAX_SUBCHANNELS 65536 +#define __MAX_SUBCHANNEL 65535extern struct bus_type css_bus_type;extern struct device css_bus_device;
@@ -144,7 +145,7 @@ void device_set_waiting(struct subchannevoid device_kill_pending_timer (struct subchannel *);/* Helper functions to build lists for the slow path. */ -int css_enqueue_subchannel_slow (unsigned long schid); +extern int css_enqueue_subchannel_slow (struct subchannel_id schid);void css_walk_subchannel_slow_list (void (*fn)(unsigned long ));void css_clear_subchannel_slow_list (void );int css_slow_subchannels_exist (void );
drivers/s390/cio/device.c +14 -3
@@ -622,7 +622,7 @@ ccw_device_do_unreg_rereg(void *data) other_sch =to_subchannel (other_cdev->dev.parent);if (get_device (&other_sch->dev)) { -stsch (other_sch->irq, &other_sch->schib); +stsch (other_sch->schid, &other_sch->schib);if (other_sch->schib.pmcw.dnv) { other_sch->schib.pmcw.intparm =0 ;cio_modify (other_sch);
@@ -772,7 +772,7 @@ io_subchannel_recog(struct ccw_device *c/* Init private data. */ priv = cdev->private; priv->devno = sch->schib.pmcw.dev; - priv->irq = sch->irq; + priv->sch_no = sch->schid.sch_no; priv->state =DEV_STATE_NOT_OPER ;INIT_LIST_HEAD (&priv->cmb_list);init_waitqueue_head (&priv->wait_q);
@@ -951,7 +951,7 @@ io_subchannel_shutdown(struct device *de sch =to_subchannel (dev); cdev = dev->driver_data; -if (cio_is_console (sch->irq)) +if (cio_is_console (sch->schid))return ;if (!sch->schib.pmcw.ena)/* Nothing to do. */
@@ -1146,6 +1146,16 @@ ccw_driver_unregister (struct ccw_driverdriver_unregister (&cdriver->driver); } +/* Helper func for qdio. */ +struct subchannel_id +ccw_device_get_subchannel_id (struct ccw_device *cdev) +{ +struct subchannel *sch; + + sch =to_subchannel (cdev->dev.parent); +return sch->schid; +} +MODULE_LICENSE ("GPL" );EXPORT_SYMBOL (ccw_device_set_online);EXPORT_SYMBOL (ccw_device_set_offline);
@@ -1155,3 +1165,4 @@ EXPORT_SYMBOL(get_ccwdev_by_busid);EXPORT_SYMBOL (ccw_bus_type);EXPORT_SYMBOL (ccw_device_work);EXPORT_SYMBOL (ccw_device_notify_work); +EXPORT_SYMBOL_GPL (ccw_device_get_subchannel_id);
drivers/s390/cio/device_fsm.c +9 -9
@@ -133,7 +133,7 @@ ccw_device_cancel_halt_clear(struct ccw_int ret; sch =to_subchannel (cdev->dev.parent); - ret =stsch (sch->irq, &sch->schib); + ret =stsch (sch->schid, &sch->schib);if (ret || !sch->schib.pmcw.dnv)return -ENODEV ;if (!sch->schib.pmcw.ena || sch->schib.scsw.actl ==0 )
@@ -231,7 +231,7 @@ ccw_device_recog_done(struct ccw_device* through ssch() and the path information is up to date. */ old_lpm = sch->lpm; -stsch (sch->irq, &sch->schib); +stsch (sch->schid, &sch->schib); sch->lpm = sch->schib.pmcw.pim & sch->schib.pmcw.pam & sch->schib.pmcw.pom &
@@ -258,7 +258,7 @@ ccw_device_recog_done(struct ccw_devicecase DEV_STATE_NOT_OPER :CIO_DEBUG (KERN_WARNING ,2 ,"SenseID : unknown device %04x on subchannel %04x\n" , - cdev->private->devno, sch->irq); + cdev->private->devno, sch->schid.sch_no);break ;case DEV_STATE_OFFLINE :if (cdev->private->state ==DEV_STATE_DISCONNECTED_SENSE_ID ) {
@@ -291,7 +291,7 @@ ccw_device_recog_done(struct ccw_devicecase DEV_STATE_BOXED :CIO_DEBUG (KERN_WARNING ,2 ,"SenseID : boxed device %04x on subchannel %04x\n" , - cdev->private->devno, sch->irq); + cdev->private->devno, sch->schid.sch_no);break ; } cdev->private->state = state;
@@ -359,7 +359,7 @@ ccw_device_done(struct ccw_device *cdev,if (state ==DEV_STATE_BOXED )CIO_DEBUG (KERN_WARNING ,2 ,"Boxed device %04x on subchannel %04x\n" , - cdev->private->devno, sch->irq); + cdev->private->devno, sch->schid.sch_no);if (cdev->private->flags.donotify) { cdev->private->flags.donotify =0 ;
@@ -592,7 +592,7 @@ ccw_device_offline(struct ccw_device *cdstruct subchannel *sch; sch =to_subchannel (cdev->dev.parent); -if (stsch (sch->irq, &sch->schib) || !sch->schib.pmcw.dnv) +if (stsch (sch->schid, &sch->schib) || !sch->schib.pmcw.dnv)return -ENODEV ;if (cdev->private->state !=DEV_STATE_ONLINE ) {if (sch->schib.scsw.actl !=0 )
@@ -711,7 +711,7 @@ ccw_device_online_verify(struct ccw_devi* Since we might not just be coming from an interrupt from the * subchannel we have to update the schib. */ -stsch (sch->irq, &sch->schib); +stsch (sch->schid, &sch->schib);if (sch->schib.scsw.actl !=0 || (cdev->private->irb.scsw.stctl &SCSW_STCTL_STATUS_PEND )) {
@@ -923,7 +923,7 @@ ccw_device_wait4io_irq(struct ccw_device/* Iff device is idle, reset timeout. */ sch =to_subchannel (cdev->dev.parent); -if (!stsch (sch->irq, &sch->schib)) +if (!stsch (sch->schid, &sch->schib))if (sch->schib.scsw.actl ==0 )ccw_device_set_timeout (cdev,0 );/* Call the handler. */
@@ -1035,7 +1035,7 @@ device_trigger_reprobe(struct subchannelreturn ;/* Update some values. */ -if (stsch (sch->irq, &sch->schib)) +if (stsch (sch->schid, &sch->schib))return ;/*
drivers/s390/cio/device.h +1 -0
@@ -110,6 +110,7 @@ int ccw_device_stlck(struct ccw_device */* qdio needs this. */ void ccw_device_set_timeout (struct ccw_device *,int ); +extern struct subchannel_id ccw_device_get_subchannel_id (struct ccw_device *);void retry_set_schib (struct ccw_device *cdev);#endif
drivers/s390/cio/device_id.c +3 -3
@@ -258,7 +258,7 @@ ccw_device_check_sense_id(struct ccw_dev*/ CIO_MSG_EVENT (2 ,"SenseID : device %04x on Subchannel %04x " "reports cmd reject\n" , - cdev->private->devno, sch->irq); + cdev->private->devno, sch->schid.sch_no);return -EOPNOTSUPP ; }if (irb->esw.esw0.erw.cons) {
@@ -280,13 +280,13 @@ ccw_device_check_sense_id(struct ccw_devCIO_MSG_EVENT (2 ,"SenseID : path %02X for device %04x on" " subchannel %04x is 'not operational'\n" , sch->orb.lpm, cdev->private->devno, - sch->irq); + sch->schid.sch_no);return -EACCES ; }/* Hmm, whatever happened, try again. */ CIO_MSG_EVENT (2 ,"SenseID : start_IO() for device %04x on " "subchannel %04x returns status %02X%02X\n" , - cdev->private->devno, sch->irq, + cdev->private->devno, sch->schid.sch_no, irb->scsw.dstat, irb->scsw.cstat);return -EAGAIN ; }
drivers/s390/cio/device_ops.c +2 -2
@@ -1,7 +1,7 @@/* * drivers/s390/cio/device_ops.c * -* $Revision: 1.57 $ +* $Revision: 1.58 $ * * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation
@@ -570,7 +570,7 @@ ccw_device_get_chp_desc(struct ccw_devicint _ccw_device_get_subchannel_number (struct ccw_device *cdev) { -return cdev->private->irq; +return cdev->private->sch_no; }int
drivers/s390/cio/device_pgid.c +7 -6
@@ -59,7 +59,7 @@ __ccw_device_sense_pgid_start(struct ccwCIO_MSG_EVENT (2 ,"SNID - Device %04x on Subchannel " "%04x, lpm %02X, became 'not " "operational'\n" , - cdev->private->devno, sch->irq, + cdev->private->devno, sch->schid.sch_no, cdev->private->imask); }
@@ -121,13 +121,14 @@ __ccw_device_check_sense_pgid(struct ccwif (irb->scsw.cc ==3 ) {CIO_MSG_EVENT (2 ,"SNID - Device %04x on Subchannel " "%04x, lpm %02X, became 'not operational'\n" , - cdev->private->devno, sch->irq, sch->orb.lpm); + cdev->private->devno, sch->schid.sch_no, + sch->orb.lpm);return -EACCES ; }if (cdev->private->pgid.inf.ps.state2 ==SNID_STATE2_RESVD_ELSE ) {CIO_MSG_EVENT (2 ,"SNID - Device %04x on Subchannel %04x " "is reserved by someone else\n" , - cdev->private->devno, sch->irq); + cdev->private->devno, sch->schid.sch_no);return -EUSERS ; }return 0 ;
@@ -237,7 +238,7 @@ __ccw_device_do_pgid(struct ccw_device * sch->vpm &= ~cdev->private->imask;CIO_MSG_EVENT (2 ,"SPID - Device %04x on Subchannel " "%04x, lpm %02X, became 'not operational'\n" , - cdev->private->devno, sch->irq, cdev->private->imask); + cdev->private->devno, sch->schid.sch_no, cdev->private->imask);return ret; }
@@ -271,7 +272,7 @@ __ccw_device_check_pgid(struct ccw_devicif (irb->scsw.cc ==3 ) {CIO_MSG_EVENT (2 ,"SPID - Device %04x on Subchannel " "%04x, lpm %02X, became 'not operational'\n" , - cdev->private->devno, sch->irq, + cdev->private->devno, sch->schid.sch_no, cdev->private->imask);return -EACCES ; }
@@ -373,7 +374,7 @@ ccw_device_verify_start(struct ccw_devic* Update sch->lpm with current values to catch paths becoming * available again. */ -if (stsch (sch->irq, &sch->schib)) { +if (stsch (sch->schid, &sch->schib)) {ccw_device_verify_done (cdev, -ENODEV );return ; }
drivers/s390/cio/device_status.c +4 -4
@@ -38,13 +38,13 @@ ccw_device_msg_control_check(struct ccw_"received" " ... device %04X on subchannel %04X, dev_stat " ": %02X sch_stat : %02X\n" , - cdev->private->devno, cdev->private->irq, + cdev->private->devno, cdev->private->sch_no, irb->scsw.dstat, irb->scsw.cstat);if (irb->scsw.cc !=3 ) {char dbf_text[15 ]; -sprintf (dbf_text,"chk%x" , cdev->private->irq); +sprintf (dbf_text,"chk%x" , cdev->private->sch_no);CIO_TRACE_EVENT (0 , dbf_text);CIO_HEX_EVENT (0 , irb,sizeof (struct irb )); }
@@ -59,10 +59,10 @@ ccw_device_path_notoper(struct ccw_devicstruct subchannel *sch; sch =to_subchannel (cdev->dev.parent); -stsch (sch->irq, &sch->schib); +stsch (sch->schid, &sch->schib);CIO_MSG_EVENT (0 ,"%s(%04x) - path(s) %02x are " -"not operational \n" , __FUNCTION__, sch->irq, +"not operational \n" , __FUNCTION__, sch->schid.sch_no, sch->schib.pmcw.pnom); sch->lpm &= ~sch->schib.pmcw.pnom;
drivers/s390/cio/ioasm.h +31 -24
174 lines not on this page · raw message
drivers/s390/cio/qdio.c +55 -52
384 lines not on this page · raw message
drivers/s390/cio/qdio.h +14 -12
@@ -3,7 +3,9 @@#include <asm/page.h> -#define VERSION_CIO_QDIO_H "$Revision: 1.37 $" +#include "schid.h" + +#define VERSION_CIO_QDIO_H "$Revision: 1.40 $"#ifdef CONFIG_QDIO_DEBUG #define QDIO_VERBOSE_LEVEL 9
@@ -317,7 +319,7 @@ do_eqbs(unsigned long sch, unsigned charstatic inline int -do_siga_sync (unsigned int irq,unsigned int mask1,unsigned int mask2) +do_siga_sync (struct subchannel_id schid,unsigned int mask1,unsigned int mask2) {int cc;
@@ -331,7 +333,7 @@ do_siga_sync(unsigned int irq, unsigned "ipm %0 \n\t" "srl %0,28 \n\t" : "=d" (cc) - : "d" (irq), "d" (mask1), "d" (mask2) + : "d" (schid), "d" (mask1), "d" (mask2) : "cc", "0", "1", "2", "3" );#else /* CONFIG_ARCH_S390X */
@@ -344,7 +346,7 @@ do_siga_sync(unsigned int irq, unsigned "ipm %0 \n\t" "srl %0,28 \n\t" : "=d" (cc) - : "d" (irq), "d" (mask1), "d" (mask2) + : "d" (schid), "d" (mask1), "d" (mask2) : "cc", "0", "1", "2", "3" );#endif /* CONFIG_ARCH_S390X */
@@ -352,7 +354,7 @@ do_siga_sync(unsigned int irq, unsigned }static inline int -do_siga_input (unsigned int irq,unsigned int mask) +do_siga_input (struct subchannel_id schid,unsigned int mask) {int cc;
@@ -365,7 +367,7 @@ do_siga_input(unsigned int irq, unsigned "ipm %0 \n\t" "srl %0,28 \n\t" : "=d" (cc) - : "d" (irq), "d" (mask) + : "d" (schid), "d" (mask) : "cc", "0", "1", "2", "memory" );#else /* CONFIG_ARCH_S390X */
@@ -377,7 +379,7 @@ do_siga_input(unsigned int irq, unsigned "ipm %0 \n\t" "srl %0,28 \n\t" : "=d" (cc) - : "d" (irq), "d" (mask) + : "d" (schid), "d" (mask) : "cc", "0", "1", "2", "memory" );#endif /* CONFIG_ARCH_S390X */
@@ -386,7 +388,7 @@ do_siga_input(unsigned int irq, unsigned }static inline int -do_siga_output (unsigned long irq,unsigned long mask,__u32 *bb, +do_siga_output (unsigned long schid,unsigned long mask,__u32 *bb,unsigned int fc) {int cc;
@@ -418,7 +420,7 @@ do_siga_output(unsigned long irq, unsign ".long 0b,2b \n\t" ".previous \n\t" : "=d" (cc), "=d" (busy_bit) - : "d" (irq), "d" (mask), + : "d" (schid), "d" (mask)," i" (QDIO_SIGA_ERROR_ACCESS_EXCEPTION) : "cc", "0", "1", "2", "memory" );
@@ -443,7 +445,7 @@ do_siga_output(unsigned long irq, unsign ".quad 0b,1b \n\t" ".previous \n\t" : "=d" (cc), "=d" (busy_bit) - : "d" (irq), "d" (mask), + : "d" (schid), "d" (mask)," i" (QDIO_SIGA_ERROR_ACCESS_EXCEPTION), " d" (fc) : "cc", "0", "1", "2", "memory" );
@@ -554,7 +556,7 @@ struct qdio_q {__u32 * dev_st_chg_ind;int is_input_q; -int irq; +struct subchannel_id schid;struct ccw_device *cdev;unsigned int is_iqdio_q;
@@ -649,7 +651,7 @@ struct qdio_irq {__u32 *volatile dev_st_chg_ind;unsigned long int_parm; -int irq; +struct subchannel_id schid;unsigned int is_iqdio_irq;unsigned int is_thinint_irq;
drivers/s390/cio/schid.h +25 -0
@@ -0,0 +1,25 @@ +#ifndef S390_SCHID_H +#define S390_SCHID_H + +struct subchannel_id { +__u32 reserved:15 ; +__u32 one:1 ; +__u32 sch_no:16 ; +} __attribute__ ((packed,aligned (4 ))); + + +/* Helper function for sane state of pre-allocated subchannel_id. */ +static inline void +init_subchannel_id (struct subchannel_id *schid) +{ +memset (schid,0 ,sizeof (struct subchannel_id )); + schid->one =1 ; +} + +static inline int +schid_equal (struct subchannel_id *schid1,struct subchannel_id *schid2) +{ +return !memcmp (schid1, schid2,sizeof (struct subchannel_id )); +} + +#endif /* S390_SCHID_H */