drivers: xen: events: fix build issues with disabled Xen HVC
PATCH 1/1 drivers: xen: events: fix build issues with disabled Xen HVC
Some setups do not use Xen hypervisor console for logging, e.g. they use emulated PL011 hardware or shared peripherals (real UART). In such cases Xen HVC will be disabled on a build time and will cause issues in current driver implementation.
This commit fixes build issues in Xen event channel driver, caused by absense of console event channel, that is not available when console config is disabled. Now console related code will be removed when Xen HVC is turned off.
--- drivers/xen/events.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/xen/events.c +5 -0
@@ -23,7 +23,9 @@#include <xen/events.h> #include <xen/hvm.h> +#if CONFIG_IS_ENABLED (XEN_SERIAL )extern u32 console_evtchn; +#endif /* CONFIG_IS_ENABLED(XEN_SERIAL) */ #define NR_EVS 1024
@@ -51,8 +53,11 @@ void unbind_all_ports(void)struct vcpu_info *vcpu_info = &s->vcpu_info[cpu];for (i =0 ; i <NR_EVS ; i++) { +#if CONFIG_IS_ENABLED (XEN_SERIAL )if (i == console_evtchn)continue ; +#endif /* CONFIG_IS_ENABLED(XEN_SERIAL) */ +if (test_and_clear_bit (i, bound_ports)) {printf ("port %d still bound!\n" , i);unbind_evtchn (i);
Signature · 1 line
2.25.1
Quoted 44 lines · Dmytro Firsov
Some setups do not use Xen hypervisor console for logging, e.g. they use emulated PL011 hardware or shared peripherals (real UART). In such cases Xen HVC will be disabled on a build time and will cause issues in current driver implementation.
This commit fixes build issues in Xen event channel driver, caused by absense of console event channel, that is not available when console config is disabled. Now console related code will be removed when Xen HVC is turned off.
Signed-off-by Dmytro Firsov <[email protected]>--- drivers/xen/events.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/xen/events.c +5
-1@@ -23,7 +23,9 @@#include <xen/events.h> #include <xen/hvm.h> +#if CONFIG_IS_ENABLED (XEN_SERIAL )extern u32 console_evtchn; +#endif /* CONFIG_IS_ENABLED(XEN_SERIAL) */ #define NR_EVS 1024@@ -51,8 +53,11 @@ void unbind_all_ports(void)struct vcpu_info *vcpu_info = &s->vcpu_info[cpu];for (i =0 ; i <NR_EVS ; i++) { +#if CONFIG_IS_ENABLED (XEN_SERIAL )if (i == console_evtchn)continue ; +#endif /* CONFIG_IS_ENABLED(XEN_SERIAL) */ +if (test_and_clear_bit (i, bound_ports)) {printf ("port %d still bound!\n" , i);unbind_evtchn (i); --2.25.1
Dmytro Firsov
Reviewed-by Anastasiia LukianenkoCan moderators, please, take a look on this patch?
On 20.07.22 23:43, Nastya Vicodin wrote:
On Mon, Jul 4, 2022 at 3:05 PM Dmytro Firsov <[email protected]<mailto:[email protected]>> wrote:
Some setups do not use Xen hypervisor console for logging, e.g. they
use emulated PL011 hardware or shared peripherals (real UART). In such
cases Xen HVC will be disabled on a build time and will cause issues in
current driver implementation.
This commit fixes build issues in Xen event channel driver, caused by absense of console event channel, that is not available when console config is disabled. Now console related code will be removed when Xen HVC is turned off.
--- drivers/xen/events.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/xen/events.c +5 -0
@@ -23,7 +23,9 @@#include <xen/events.h> #include <xen/hvm.h> +#if CONFIG_IS_ENABLED (XEN_SERIAL )extern u32 console_evtchn; +#endif /* CONFIG_IS_ENABLED(XEN_SERIAL) */ #define NR_EVS 1024
@@ -51,8 +53,11 @@ void unbind_all_ports(void)struct vcpu_info *vcpu_info = &s->vcpu_info[cpu];for (i =0 ; i <NR_EVS ; i++) { +#if CONFIG_IS_ENABLED (XEN_SERIAL )if (i == console_evtchn)continue ; +#endif /* CONFIG_IS_ENABLED(XEN_SERIAL) */ +if (test_and_clear_bit (i, bound_ports)) {printf ("port %d still bound!\n" , i);unbind_evtchn (i);
--
2.25.1
Quoted 1 line · Dmytro Firsov
Can moderators, please, take a look on this patch?
What about it?
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Quoted 48 lines · Nastya Vicodin
On Mon, Jul 4, 2022 at 3:05 PM Dmytro Firsov <[email protected]<mailto:[email protected]>> wrote:
Some setups do not use Xen hypervisor console for logging, e.g. they
use emulated PL011 hardware or shared peripherals (real UART). In such
cases Xen HVC will be disabled on a build time and will cause issues in
current driver implementation.This commit fixes build issues in Xen event channel driver, caused by absense of console event channel, that is not available when console config is disabled. Now console related code will be removed when Xen HVC is turned off.
--- drivers/xen/events.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/xen/events.c +5
-1@@ -23,7 +23,9 @@#include <xen/events.h> #include <xen/hvm.h> +#if CONFIG_IS_ENABLED (XEN_SERIAL )extern u32 console_evtchn; +#endif /* CONFIG_IS_ENABLED(XEN_SERIAL) */ #define NR_EVS 1024@@ -51,8 +53,11 @@ void unbind_all_ports(void)struct vcpu_info *vcpu_info = &s->vcpu_info[cpu];for (i =0 ; i <NR_EVS ; i++) { +#if CONFIG_IS_ENABLED (XEN_SERIAL )if (i == console_evtchn)continue ; +#endif /* CONFIG_IS_ENABLED(XEN_SERIAL) */ +if (test_and_clear_bit (i, bound_ports)) {printf ("port %d still bound!\n" , i);unbind_evtchn (i); --2.25.1
Signature · 1 line
Tom
It received reviewed-by from code maintainer. Does anything else needed to take it to u-boot/master?
Quoted 53 lines · Tom Rini
Quoted 1 line · Dmytro Firsov
Can moderators, please, take a look on this patch?
What about it?
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Quoted 47 lines · Nastya Vicodin
On Mon, Jul 4, 2022 at 3:05 PM Dmytro Firsov <[email protected]<mailto:[email protected]>> wrote:
Some setups do not use Xen hypervisor console for logging, e.g. they
use emulated PL011 hardware or shared peripherals (real UART). In such
cases Xen HVC will be disabled on a build time and will cause issues in
current driver implementation.This commit fixes build issues in Xen event channel driver, caused by absense of console event channel, that is not available when console config is disabled. Now console related code will be removed when Xen HVC is turned off.
--- drivers/xen/events.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/xen/events.c +5
-1@@ -23,7 +23,9 @@#include <xen/events.h> #include <xen/hvm.h> +#if CONFIG_IS_ENABLED (XEN_SERIAL )extern u32 console_evtchn; +#endif /* CONFIG_IS_ENABLED(XEN_SERIAL) */ #define NR_EVS 1024@@ -51,8 +53,11 @@ void unbind_all_ports(void)struct vcpu_info *vcpu_info = &s->vcpu_info[cpu];for (i =0 ; i <NR_EVS ; i++) { +#if CONFIG_IS_ENABLED (XEN_SERIAL )if (i == console_evtchn)continue ; +#endif /* CONFIG_IS_ENABLED(XEN_SERIAL) */ +if (test_and_clear_bit (i, bound_ports)) {printf ("port %d still bound!\n" , i);unbind_evtchn (i); --2.25.1
Quoted 2 lines · Dmytro Firsov
It received reviewed-by from code maintainer. Does anything else needed to take it to u-boot/master?
Ah. I'll probably pick it up soon.
Signature · 1 line
Tom
Quoted 6 lines · Tom Rini
Quoted 2 lines · Dmytro Firsov
It received reviewed-by from code maintainer. Does anything else needed to take it to u-boot/master?
Ah. I'll probably pick it up soon.
Thanks!
Quoted 10 lines · Dmytro Firsov
Some setups do not use Xen hypervisor console for logging, e.g. they use emulated PL011 hardware or shared peripherals (real UART). In such cases Xen HVC will be disabled on a build time and will cause issues in current driver implementation.
This commit fixes build issues in Xen event channel driver, caused by absense of console event channel, that is not available when console config is disabled. Now console related code will be removed when Xen HVC is turned off.
Quoted 4 lines
Signed-off-by Dmytro Firsov <[email protected]>Reviewed-by Anastasiia Lukianenko <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom