From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: [PATCH 3/3] xen: pvhvm: make it clearer that XEN_UNPLUG_* individual bits
Date: Thu, 19 Aug 2010 10:59:06 +0100 [thread overview]
Message-ID: <1282211946-8629-3-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1282211932.3170.2341.camel@zakaz.uk.xensource.com>
Make this clear by defining in terms of (1<<N)
XEN_UNPLUG_UNNECESSARY is only used within the kernel and is not
defined as a bit on the unplug IO port. Therefore use a bit which is
outside the potentially valid range of the 16 bit IO port.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
include/xen/platform_pci.h | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/include/xen/platform_pci.h b/include/xen/platform_pci.h
index b0dca21..dba26dd 100644
--- a/include/xen/platform_pci.h
+++ b/include/xen/platform_pci.h
@@ -16,11 +16,14 @@
#define XEN_IOPORT_PROTOVER (XEN_IOPORT_BASE + 2) /* 1 byte access (R) */
#define XEN_IOPORT_PRODNUM (XEN_IOPORT_BASE + 2) /* 2 byte access (W) */
-#define XEN_UNPLUG_ALL_IDE_DISKS 1
-#define XEN_UNPLUG_ALL_NICS 2
-#define XEN_UNPLUG_AUX_IDE_DISKS 4
-#define XEN_UNPLUG_ALL 7
-#define XEN_UNPLUG_UNNECESSARY 8
+#define XEN_UNPLUG_ALL_IDE_DISKS (1<<0)
+#define XEN_UNPLUG_ALL_NICS (1<<1)
+#define XEN_UNPLUG_AUX_IDE_DISKS (1<<2)
+#define XEN_UNPLUG_ALL (XEN_UNPLUG_ALL_IDE_DISKS|\
+ XEN_UNPLUG_ALL_NICS|\
+ XEN_UNPLUG_AUX_IDE_DISKS)
+
+#define XEN_UNPLUG_UNNECESSARY (1<<16)
static inline int xen_must_unplug_nics(void) {
#if (defined(CONFIG_XEN_NETDEV_FRONTEND) || \
--
1.5.6.5
prev parent reply other threads:[~2010-08-19 9:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-19 9:58 [GIT/PATCH 0/3] pvhvm emul unplug fixes Ian Campbell
2010-08-19 9:59 ` [PATCH 1/3] xen: pvhvm: allow user to request no emulated device unplug Ian Campbell
2010-08-19 10:37 ` Stefano Stabellini
2010-08-19 10:50 ` Ian Campbell
2010-08-19 10:52 ` Ian Campbell
2010-08-19 10:54 ` Stefano Stabellini
2010-08-19 16:10 ` Jeremy Fitzhardinge
2010-08-19 16:34 ` Gianni Tedesco
2010-08-19 16:44 ` Jeremy Fitzhardinge
2010-08-19 16:52 ` Ian Campbell
2010-08-20 8:13 ` [GIT/PATCH v2 0/3] pvhvm emul unplug fixes Ian Campbell
2010-08-20 8:14 ` [PATCH 1/3] xen: pvhvm: allow user to request no emulated device unplug Ian Campbell
2010-08-20 8:14 ` [PATCH 2/3] xen: pvhvm: rename xen_emul_unplug=ignore to =unnnecessary Ian Campbell
2010-08-20 8:14 ` [PATCH 3/3] xen: pvhvm: make it clearer that XEN_UNPLUG_* define bits in a bitfield Ian Campbell
2010-08-20 11:10 ` [GIT/PATCH v2 0/3] pvhvm emul unplug fixes Stefano Stabellini
2010-08-20 16:41 ` Jeremy Fitzhardinge
2010-08-19 9:59 ` [PATCH 2/3] xen: pvhvm: rename xen_emul_unplug=ignore to =unnnecessary Ian Campbell
2010-08-19 9:59 ` Ian Campbell [this message]
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=1282211946-8629-3-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=jeremy@goop.org \
--cc=xen-devel@lists.xensource.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).