diff options
author | Dmytro Firsov <Dmytro_Firsov@epam.com> | 2022-07-04 12:05:38 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-08-04 13:59:59 -0400 |
commit | c588ca873488605b3b4ee9fa756b2e25d3bd167a (patch) | |
tree | 61bb4e772b80b17e5bd61b0b0a688d9e96fd8de3 | |
parent | 6ac4774426d687b5c365c79c9187e88f6c874878 (diff) | |
download | u-boot-c588ca873488605b3b4ee9fa756b2e25d3bd167a.zip u-boot-c588ca873488605b3b4ee9fa756b2e25d3bd167a.tar.gz u-boot-c588ca873488605b3b4ee9fa756b2e25d3bd167a.tar.bz2 |
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.
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Reviewed-by: Anastasiia Lukianenko <vicooodin@gmail.com>
Reviewed-by: Anastasiia Lukianenko <vicooodin@gmail.com<mailto:vicooodin@gmail.com>>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com<mailto:dmytro_firsov@epam.com>>
-rw-r--r-- | drivers/xen/events.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 5e90a65..532216f 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -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); |