[PATCH] drivers: xen: events: fix build issues with disabled Xen HVC
Tom Rini
trini at konsulko.com
Tue Aug 2 12:57:17 CEST 2022
On Tue, Aug 02, 2022 at 08:48:51AM +0000, Dmytro Firsov wrote:
> Can moderators, please, take a look on this patch?
What about it?
https://patchwork.ozlabs.org/project/uboot/patch/20220704120533.42168-1-dmytro_firsov@epam.com/
>
> On 20.07.22 23:43, Nastya Vicodin wrote:
> Reviewed-by: Anastasiia Lukianenko <vicooodin at gmail.com<mailto:vicooodin at gmail.com>>
>
> On Mon, Jul 4, 2022 at 3:05 PM Dmytro Firsov <Dmytro_Firsov at epam.com<mailto:Dmytro_Firsov at epam.com>> 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.
>
> Signed-off-by: Dmytro Firsov <dmytro_firsov at epam.com<mailto:dmytro_firsov at epam.com>>
> ---
> drivers/xen/events.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/xen/events.c b/drivers/xen/events.c
> index 5e90a65846..532216fece 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);
> --
> 2.25.1
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220802/ddf89bd8/attachment.sig>
More information about the U-Boot
mailing list