[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 2/2] x86: add a user configurable Kconfig option for the EHCI debug port


  • To: Julien Grall <julien.grall@xxxxxxx>
  • From: Derek Straka <derek@xxxxxxxxxxx>
  • Date: Mon, 19 Sep 2016 11:37:11 -0400
  • Cc: andrew.cooper3@xxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, xen-devel@xxxxxxxxxxxxx
  • Delivery-date: Mon, 19 Sep 2016 15:37:21 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=asterius.io; s=mailo; q=dns; h=Sender: MIME-Version: In-Reply-To: References: From: Date: Message-ID: Subject: To: Cc: Content-Type; b=DvZ2auBlIJ/LzCOmI1pVNLFN7xBmStod83inxIA1hdNiMwptV83+v/q2xzihrlTDLlG32F er6Xpr1A03s0YR5fVGOsUidcF6molPyXeX5EzEO40UTzUDsQNQa6lfkviL/leSZVKHv115l3 gTzM4joEHPOeFFUMnuJ2zEWI65Joc=
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Julien,

On Mon, Sep 19, 2016 at 10:56 AM, Julien Grall <julien.grall@xxxxxxx> wrote:
Hello,

On 19/09/2016 16:51, Derek Straka wrote:
Allows for the conditional inclusion of EHCI debug port driver on the x86
platform rather than having it always enabled.

The default configuration for the CONFIG_EHCI option remains 'y' on x86, so the
behavior out of the box remains unchanged.  The addition of the option allows
advanced users to enable/disable the inclusion of the EHCI debug port driver.

Signed-off-by: Derek Straka <derek@xxxxxxxxxxx>
---
 xen/drivers/char/Kconfig  |  5 +++++
 xen/drivers/char/Makefile |  2 +-
 xen/include/xen/serial.h  | 12 +++++++++---
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/xen/drivers/char/Kconfig b/xen/drivers/char/Kconfig
index 1d894a7..1c5400f 100644
--- a/xen/drivers/char/Kconfig
+++ b/xen/drivers/char/Kconfig
@@ -51,6 +51,11 @@ config HAS_SCIF

 config HAS_EHCI
        bool
+
+config EHCI
+       bool "EHCI debug port" if EXPERT = "y"
+       default y
+       depends on HAS_EHCI
        help
          This selects the USB based EHCI debug port to be used as a UART. If
          you have an x86 based system with USB, say Y.
diff --git a/xen/drivers/char/Makefile b/xen/drivers/char/Makefile
index 0afadaf..40c193b 100644
--- a/xen/drivers/char/Makefile
+++ b/xen/drivers/char/Makefile
@@ -5,6 +5,6 @@ obj-$(CONFIG_HAS_PL011) += pl011.o
 obj-$(CONFIG_HAS_EXYNOS4210) += exynos4210-uart.o
 obj-$(CONFIG_HAS_OMAP) += omap-uart.o
 obj-$(CONFIG_HAS_SCIF) += scif-uart.o
-obj-$(CONFIG_HAS_EHCI) += ehci-dbgp.o
+obj-$(CONFIG_EHCI) += ehci-dbgp.o
 obj-$(CONFIG_ARM) += arm-uart.o
 obj-y += serial.o
diff --git a/xen/include/xen/serial.h b/xen/include/xen/serial.h
index 46edff8..5c6cbe9 100644
--- a/xen/include/xen/serial.h
+++ b/xen/include/xen/serial.h
@@ -174,11 +174,17 @@ void ns16550_init(int index, struct ns16550_defaults *defaults);
 static inline void ns16550_init(int index, struct ns16550_defaults *defaults) {}
 #endif

-void ehci_dbgp_init(void);
-void arm_uart_init(void);

Why did you move arm_uart_init? It does not seem related to this patch...
I moved the EHCI code above the arm_uart_init since ehci_dbgp_init preceded the arm code originally, but I can certainly move the ECHI declarations after if you'd prefer.

-
 struct physdev_dbgp_op;
+
+#ifdef CONFIG_EHCI
 int dbgp_op(const struct physdev_dbgp_op *);
+void ehci_dbgp_init(void);
+#else
+static inline void ehci_dbgp_init(void) {}
+static inline int dbgp_op(const struct physdev_dbgp_op *op) { return 0; }
+#endif
+
+void arm_uart_init(void);

 /* Baud rate was pre-configured before invoking the UART driver. */
 #define BAUD_AUTO (-1)


Regards,

--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.