All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Goldstein <cardoe@cardoe.com>
To: xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>, Doug Goldstein <cardoe@cardoe.com>,
	Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Subject: [PATCHv2] 07/27] build: convert HAS_IOPORTS use to Kconfig
Date: Wed, 11 Nov 2015 10:49:57 -0600	[thread overview]
Message-ID: <1447260617-10138-8-git-send-email-cardoe@cardoe.com> (raw)
In-Reply-To: <1447260617-10138-1-git-send-email-cardoe@cardoe.com>

Use the Kconfig generated CONFIG_HAS_IOPORTS defines in the code base.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>

CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <jbeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
 xen/Rules.mk               |  1 -
 xen/arch/x86/Kconfig       |  1 +
 xen/arch/x86/Rules.mk      |  1 -
 xen/drivers/char/Kconfig   |  5 +++++
 xen/drivers/char/ns16550.c | 10 +++++-----
 5 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index fb270f6..870c548 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -61,7 +61,6 @@ CFLAGS-$(HAS_GDBSX)     += -DHAS_GDBSX
 CFLAGS-$(HAS_MEM_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
 CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
-CFLAGS-$(HAS_IOPORTS)   += -DHAS_IOPORTS
 CFLAGS-$(HAS_PDX)       += -DHAS_PDX
 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
 
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 1948996..57fe703 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -3,6 +3,7 @@ config X86_64
 
 config X86
 	def_bool y
+	select HAS_IOPORTS
 	select HAS_PASSTHROUGH
 	select HAS_PCI
 	select HAS_NS16550
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index f6b9d28..8dcdb72 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -1,7 +1,6 @@
 ########################################
 # x86-specific definitions
 
-HAS_IOPORTS := y
 HAS_ACPI := y
 HAS_VGA  := y
 HAS_VIDEO  := y
diff --git a/xen/drivers/char/Kconfig b/xen/drivers/char/Kconfig
index ca7924f..09cb79f 100644
--- a/xen/drivers/char/Kconfig
+++ b/xen/drivers/char/Kconfig
@@ -2,3 +2,8 @@
 # Select HAS_NS16550 if a 16550 UART is supported
 config HAS_NS16550
 	bool
+
+# Select HAS_IOPORTS if 16550 has I/O ports
+config HAS_IOPORTS
+	bool
+	depends on HAS_NS16550
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 615124c..98b660a 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -348,7 +348,7 @@ static void ns16550_delayed_resume(void *data);
 static char ns_read_reg(struct ns16550 *uart, int reg)
 {
     void __iomem *addr = uart->remapped_io_base + (reg << uart->reg_shift);
-#ifdef HAS_IOPORTS
+#ifdef CONFIG_HAS_IOPORTS
     if ( uart->remapped_io_base == NULL )
         return inb(uart->io_base + reg);
 #endif
@@ -366,7 +366,7 @@ static char ns_read_reg(struct ns16550 *uart, int reg)
 static void ns_write_reg(struct ns16550 *uart, int reg, char c)
 {
     void __iomem *addr = uart->remapped_io_base + (reg << uart->reg_shift);
-#ifdef HAS_IOPORTS
+#ifdef CONFIG_HAS_IOPORTS
     if ( uart->remapped_io_base == NULL )
         return outb(c, uart->io_base + reg);
 #endif
@@ -546,7 +546,7 @@ static void __init ns16550_init_preirq(struct serial_port *port)
 {
     struct ns16550 *uart = port->uart;
 
-#ifdef HAS_IOPORTS
+#ifdef CONFIG_HAS_IOPORTS
     /* I/O ports are distinguished by their size (16 bits). */
     if ( uart->io_base >= 0x10000 )
 #endif
@@ -716,7 +716,7 @@ static void ns16550_resume(struct serial_port *port)
 
 static void __init ns16550_endboot(struct serial_port *port)
 {
-#ifdef HAS_IOPORTS
+#ifdef CONFIG_HAS_IOPORTS
     struct ns16550 *uart = port->uart;
     int rv;
 
@@ -780,7 +780,7 @@ static int __init check_existence(struct ns16550 *uart)
 {
     unsigned char status, scratch, scratch2, scratch3;
 
-#ifdef HAS_IOPORTS
+#ifdef CONFIG_HAS_IOPORTS
     /*
      * We can't poke MMIO UARTs until they get I/O remapped later. Assume that
      * if we're getting MMIO UARTs, the arch code knows what it's doing.
-- 
2.4.10

  parent reply	other threads:[~2015-11-11 16:49 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 16:49 [PATCHv2] 00/27] Kconfig conversion Doug Goldstein
2015-11-11 16:49 ` [PATCHv2] 01/27] build: import Kbuild/Kconfig from Linux 4.2 Doug Goldstein
2015-11-11 16:49 ` [PATCHv2] 02/27] build: hookup Kconfig build and usage Doug Goldstein
2015-11-11 16:49 ` [PATCHv2] 03/27] build: convert HAS_PASSTHROUGH use to Kconfig Doug Goldstein
2015-11-12 15:48   ` Daniel De Graaf
2015-11-11 16:49 ` [PATCHv2] 04/27] build: convert HAS_DEVICE_TREE " Doug Goldstein
2015-11-12 15:49   ` Daniel De Graaf
2015-11-11 16:49 ` [PATCHv2] 05/27] build: convert HAS_PCI " Doug Goldstein
2015-11-12 15:50   ` Daniel De Graaf
2015-11-11 16:49 ` [PATCHv2] 06/27] build: convert HAS_NS16550 " Doug Goldstein
2015-11-11 16:49 ` Doug Goldstein [this message]
2015-11-11 16:49 ` [PATCHv2] 08/27] build: convert HAS_ACPI " Doug Goldstein
2015-11-11 16:49 ` [PATCHv2] 09/27] build: convert HAS_VIDEO " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 10/27] build: convert HAS_VGA " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 11/27] build: convert HAS_CPUFREQ " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 12/27] build: convert HAS_GDBSX " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 13/27] build: convert HAS_PDX " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 14/27] build: convert HAS_KEXEC " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 15/27] build: convert HAS_ARM_HDLCD " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 16/27] build: convert HAS_CADENCE_UART " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 17/27] build: convert HAS_PL011 " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 18/27] build: convert HAS_EXYNOS4210 " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 19/27] build: convert HAS_OMAP " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 20/27] build: convert HAS_SCIF " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 21/27] build: convert HAS_EHCI " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 22/27] build: convert HAS_MEM_ACCESS " Doug Goldstein
2015-11-12  8:58   ` Razvan Cojocaru
2015-11-12 15:51   ` Daniel De Graaf
2015-11-11 16:50 ` [PATCHv2] 23/27] build: convert HAS_MEM_PAGING " Doug Goldstein
2015-11-12  8:59   ` Razvan Cojocaru
2015-11-12 15:52   ` Daniel De Graaf
2015-11-11 16:50 ` [PATCHv2] 24/27] build: convert HAS_MEM_SHARING " Doug Goldstein
2015-11-12  9:00   ` Razvan Cojocaru
2015-11-12 15:52   ` Daniel De Graaf
2015-11-11 16:50 ` [PATCHv2] 25/27] build: convert HAS_GICV3 " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 26/27] build: convert CONFIG_COMPAT " Doug Goldstein
2015-11-11 17:46   ` Andrew Cooper
2015-11-11 16:50 ` [PATCHv2] 27/27] build: convert kexec options to CONFIG_KEXEC Doug Goldstein
2015-11-11 18:01 ` [PATCHv2] 00/27] Kconfig conversion Doug Goldstein

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=1447260617-10138-8-git-send-email-cardoe@cardoe.com \
    --to=cardoe@cardoe.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.