qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Ott <sebott@linux.vnet.ibm.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: linux-s390 <linux-s390@vger.kernel.org>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Rusty Russell <rusty@rustcorp.com.au>, KVM <kvm@vger.kernel.org>,
	Carsten Otte <cotte@de.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Avi Kivity <avi@redhat.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 2/4] s390: Add a mechanism to get the subchannel id.
Date: Mon, 13 Aug 2012 19:16:48 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1208131859540.1774@c4eb> (raw)
In-Reply-To: <1344351168-2568-3-git-send-email-cornelia.huck@de.ibm.com>

On Tue, 7 Aug 2012, Cornelia Huck wrote:
> This will be needed by the new virtio-ccw transport.

We already have ccw_device_get_subchannel_id which is currently used by
qdio only and thus buried in an internal header file. So it would be
better to just clean up this one and make it available to virtio-ccw.
The function looks a little different to what you suggested by it should
do the trick.

---
 arch/s390/include/asm/ccwdev.h |    2 ++
 drivers/s390/cio/device.c      |   11 -----------
 drivers/s390/cio/device.h      |    2 --
 drivers/s390/cio/device_ops.c  |   13 +++++++++++++
 4 files changed, 15 insertions(+), 13 deletions(-)

--- a/arch/s390/include/asm/ccwdev.h
+++ b/arch/s390/include/asm/ccwdev.h
@@ -10,6 +10,7 @@
 
 #include <linux/device.h>
 #include <linux/mod_devicetable.h>
+#include <asm/schid.h>
 #include <asm/fcx.h>
 #include <asm/irq.h>
 
@@ -226,5 +227,6 @@ int ccw_device_siosl(struct ccw_device *
 // FIXME: these have to go
 extern int _ccw_device_get_subchannel_number(struct ccw_device *);
 
+extern struct subchannel_id ccw_device_get_subchannel_id(struct ccw_device *);
 extern void *ccw_device_get_chp_desc(struct ccw_device *, int);
 #endif /* _S390_CCWDEV_H_ */
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -2037,16 +2037,6 @@ void ccw_driver_unregister(struct ccw_dr
 	driver_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;
-}
-
 static void ccw_device_todo(struct work_struct *work)
 {
 	struct ccw_device_private *priv;
@@ -2139,4 +2129,3 @@ EXPORT_SYMBOL(ccw_device_set_offline);
 EXPORT_SYMBOL(ccw_driver_register);
 EXPORT_SYMBOL(ccw_driver_unregister);
 EXPORT_SYMBOL(get_ccwdev_by_busid);
-EXPORT_SYMBOL_GPL(ccw_device_get_subchannel_id);
--- a/drivers/s390/cio/device.h
+++ b/drivers/s390/cio/device.h
@@ -142,9 +142,7 @@ int ccw_device_notify(struct ccw_device 
 void ccw_device_set_disconnected(struct ccw_device *cdev);
 void ccw_device_set_notoper(struct ccw_device *cdev);
 
-/* qdio needs this. */
 void ccw_device_set_timeout(struct ccw_device *, int);
-extern struct subchannel_id ccw_device_get_subchannel_id(struct ccw_device *);
 
 /* Channel measurement facility related */
 void retry_set_schib(struct ccw_device *cdev);
--- a/drivers/s390/cio/device_ops.c
+++ b/drivers/s390/cio/device_ops.c
@@ -763,6 +763,19 @@ _ccw_device_get_subchannel_number(struct
 	return cdev->private->schid.sch_no;
 }
 
+/**
+ * ccw_device_get_subchannel_id - obtain a subchannel id
+ * @cdev: device to obtain the id for
+ * Return struct subchannel_id of the parent subchannel.
+ */
+struct subchannel_id ccw_device_get_subchannel_id(struct ccw_device *cdev)
+{
+	struct subchannel *sch;
+
+	sch = to_subchannel(cdev->dev.parent);
+	return sch->schid;
+}
+EXPORT_SYMBOL_GPL(ccw_device_get_subchannel_id);
 
 MODULE_LICENSE("GPL");
 EXPORT_SYMBOL(ccw_device_set_options_mask);

  reply	other threads:[~2012-08-13 17:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07 14:52 [Qemu-devel] [RFC PATCH 0/4] s390: virtio-ccw guest kernel support Cornelia Huck
2012-08-07 14:52 ` [Qemu-devel] [PATCH 1/4] s390/kvm: Handle hosts not supporting s390-virtio Cornelia Huck
2012-08-09 10:03   ` Avi Kivity
2012-08-09 10:41     ` Cornelia Huck
2012-08-10  8:42       ` Heiko Carstens
2012-08-10 11:03         ` Cornelia Huck
2012-08-09 23:09   ` Alexander Graf
2012-08-10  7:45     ` Cornelia Huck
2012-08-07 14:52 ` [Qemu-devel] [PATCH 2/4] s390: Add a mechanism to get the subchannel id Cornelia Huck
2012-08-13 17:16   ` Sebastian Ott [this message]
2012-08-14  8:52   ` Sebastian Ott
2012-08-14 10:38     ` Cornelia Huck
2012-08-14 10:53       ` Sebastian Ott
2012-08-07 14:52 ` [Qemu-devel] [PATCH 3/4] s390/kvm: Add a channel I/O based virtio transport driver Cornelia Huck
2012-08-08  4:22   ` Rusty Russell
2012-08-13  8:56     ` Cornelia Huck
2012-08-14  0:10       ` Rusty Russell
2012-08-14 11:03         ` Cornelia Huck
2012-08-15  3:15           ` Rusty Russell
2012-08-14 19:56   ` Anthony Liguori
2012-08-15  7:28     ` Rusty Russell
2012-08-15  7:48       ` Christian Borntraeger
2012-08-21  5:35         ` Rusty Russell
2012-08-07 14:52 ` [Qemu-devel] [PATCH 4/4] s390/kvm: Split out early console code Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.02.1208131859540.1774@c4eb \
    --to=sebott@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rusty@rustcorp.com.au \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).