* [PATCH v1] pv_console: remove unnecessary #ifdefs
@ 2018-03-06 8:51 Sergey Dyasli
2018-03-06 9:08 ` Jan Beulich
2018-03-06 11:07 ` Wei Liu
0 siblings, 2 replies; 3+ messages in thread
From: Sergey Dyasli @ 2018-03-06 8:51 UTC (permalink / raw)
To: xen-devel
Cc: Andrew Cooper, Sergey Dyasli, Wei Liu, Jan Beulich, Roger Pau Monné
The header for PV console contains empty function definitions in case of
!CONFIG_XEN_GUEST specially to avoid #ifdefs in a code that uses them
to make the code look cleaner.
Unfortunately, during the release of shim-comet, PV console functions
were enclosed into unnecessary #ifdefs CONFIG_X86. Remove them.
Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
---
Compile tested with aarch64 compiler.
---
xen/drivers/char/console.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 121073c8ed..47aff69869 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -30,10 +30,10 @@
#include <xen/hypercall.h> /* for do_console_io */
#include <xen/early_printk.h>
#include <xen/warning.h>
+#include <xen/pv_console.h>
#ifdef CONFIG_X86
#include <xen/consoled.h>
-#include <xen/pv_console.h>
#include <asm/guest.h>
#endif
@@ -347,10 +347,8 @@ static void sercon_puts(const char *s)
else
serial_puts(sercon_handle, s);
-#ifdef CONFIG_X86
/* Copy all serial output into PV console */
pv_console_puts(s);
-#endif
}
static void dump_console_ring_key(unsigned char key)
@@ -816,9 +814,9 @@ void __init console_init_preirq(void)
p++;
if ( !strncmp(p, "vga", 3) )
video_init();
-#ifdef CONFIG_X86
else if ( !strncmp(p, "pv", 2) )
pv_console_init();
+#ifdef CONFIG_X86
else if ( !strncmp(p, "xen", 3) )
opt_console_xen = true;
#endif
@@ -841,10 +839,7 @@ void __init console_init_preirq(void)
}
serial_set_rx_handler(sercon_handle, serial_rx);
-
-#ifdef CONFIG_X86
pv_console_set_rx_handler(serial_rx);
-#endif
/* HELLO WORLD --- start-of-day banner text. */
spin_lock(&console_lock);
@@ -897,10 +892,7 @@ void __init console_init_ring(void)
void __init console_init_postirq(void)
{
serial_init_postirq();
-
-#ifdef CONFIG_X86
pv_console_init_postirq();
-#endif
if ( conring != _conring )
return;
--
2.14.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] pv_console: remove unnecessary #ifdefs
2018-03-06 8:51 [PATCH v1] pv_console: remove unnecessary #ifdefs Sergey Dyasli
@ 2018-03-06 9:08 ` Jan Beulich
2018-03-06 11:07 ` Wei Liu
1 sibling, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2018-03-06 9:08 UTC (permalink / raw)
To: Sergey Dyasli; +Cc: Andrew Cooper, xen-devel, Wei Liu, Roger Pau Monné
>>> On 06.03.18 at 09:51, <sergey.dyasli@citrix.com> wrote:
> The header for PV console contains empty function definitions in case of
> !CONFIG_XEN_GUEST specially to avoid #ifdefs in a code that uses them
> to make the code look cleaner.
>
> Unfortunately, during the release of shim-comet, PV console functions
> were enclosed into unnecessary #ifdefs CONFIG_X86. Remove them.
>
> Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
with one remark:
> @@ -816,9 +814,9 @@ void __init console_init_preirq(void)
> p++;
> if ( !strncmp(p, "vga", 3) )
> video_init();
> -#ifdef CONFIG_X86
> else if ( !strncmp(p, "pv", 2) )
Would be nice to fix the indentation issue here at the same
time; can be done while committing of course.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] pv_console: remove unnecessary #ifdefs
2018-03-06 8:51 [PATCH v1] pv_console: remove unnecessary #ifdefs Sergey Dyasli
2018-03-06 9:08 ` Jan Beulich
@ 2018-03-06 11:07 ` Wei Liu
1 sibling, 0 replies; 3+ messages in thread
From: Wei Liu @ 2018-03-06 11:07 UTC (permalink / raw)
To: Sergey Dyasli
Cc: Andrew Cooper, Roger Pau Monné, Wei Liu, Jan Beulich, xen-devel
On Tue, Mar 06, 2018 at 08:51:56AM +0000, Sergey Dyasli wrote:
> The header for PV console contains empty function definitions in case of
> !CONFIG_XEN_GUEST specially to avoid #ifdefs in a code that uses them
> to make the code look cleaner.
>
> Unfortunately, during the release of shim-comet, PV console functions
> were enclosed into unnecessary #ifdefs CONFIG_X86. Remove them.
>
> Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-06 11:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-06 8:51 [PATCH v1] pv_console: remove unnecessary #ifdefs Sergey Dyasli
2018-03-06 9:08 ` Jan Beulich
2018-03-06 11:07 ` Wei Liu
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.