All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: xen: events: fix build issues with disabled Xen HVC
@ 2022-07-04 12:05 Dmytro Firsov
  2022-07-20 20:43 ` Nastya Vicodin
  2022-08-04 20:51 ` Tom Rini
  0 siblings, 2 replies; 8+ messages in thread
From: Dmytro Firsov @ 2022-07-04 12:05 UTC (permalink / raw)
  To: u-boot; +Cc: vicooodin, 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 <dmytro_firsov@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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: xen: events: fix build issues with disabled Xen HVC
  2022-07-04 12:05 [PATCH] drivers: xen: events: fix build issues with disabled Xen HVC Dmytro Firsov
@ 2022-07-20 20:43 ` Nastya Vicodin
  2022-08-02  8:48   ` Dmytro Firsov
  2022-08-04 20:51 ` Tom Rini
  1 sibling, 1 reply; 8+ messages in thread
From: Nastya Vicodin @ 2022-07-20 20:43 UTC (permalink / raw)
  To: Dmytro Firsov; +Cc: u-boot

Reviewed-by: Anastasiia Lukianenko <vicooodin@gmail.com>

On Mon, Jul 4, 2022 at 3:05 PM Dmytro Firsov <Dmytro_Firsov@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@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
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: xen: events: fix build issues with disabled Xen HVC
  2022-07-20 20:43 ` Nastya Vicodin
@ 2022-08-02  8:48   ` Dmytro Firsov
  2022-08-02 10:57     ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Dmytro Firsov @ 2022-08-02  8:48 UTC (permalink / raw)
  To: u-boot, trini

Can moderators, please, take a look on this patch?

On 20.07.22 23:43, Nastya Vicodin wrote:
Reviewed-by: Anastasiia Lukianenko <vicooodin@gmail.com<mailto:vicooodin@gmail.com>>

On Mon, Jul 4, 2022 at 3:05 PM Dmytro Firsov <Dmytro_Firsov@epam.com<mailto:Dmytro_Firsov@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@epam.com<mailto:dmytro_firsov@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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: xen: events: fix build issues with disabled Xen HVC
  2022-08-02  8:48   ` Dmytro Firsov
@ 2022-08-02 10:57     ` Tom Rini
  2022-08-02 18:49       ` Dmytro Firsov
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2022-08-02 10:57 UTC (permalink / raw)
  To: Dmytro Firsov; +Cc: u-boot

[-- Attachment #1: Type: text/plain, Size: 2072 bytes --]

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@gmail.com<mailto:vicooodin@gmail.com>>
> 
> On Mon, Jul 4, 2022 at 3:05 PM Dmytro Firsov <Dmytro_Firsov@epam.com<mailto:Dmytro_Firsov@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@epam.com<mailto:dmytro_firsov@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: xen: events: fix build issues with disabled Xen HVC
  2022-08-02 10:57     ` Tom Rini
@ 2022-08-02 18:49       ` Dmytro Firsov
  2022-08-02 19:11         ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Dmytro Firsov @ 2022-08-02 18:49 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot

It received reviewed-by from code maintainer. Does anything else needed 
to take it to u-boot/master?

On 02.08.22 13:57, Tom Rini wrote:
> 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@gmail.com<mailto:vicooodin@gmail.com>>
>>
>> On Mon, Jul 4, 2022 at 3:05 PM Dmytro Firsov <Dmytro_Firsov@epam.com<mailto:Dmytro_Firsov@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@epam.com<mailto:dmytro_firsov@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: xen: events: fix build issues with disabled Xen HVC
  2022-08-02 18:49       ` Dmytro Firsov
@ 2022-08-02 19:11         ` Tom Rini
  2022-08-02 19:19           ` Dmytro Firsov
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2022-08-02 19:11 UTC (permalink / raw)
  To: Dmytro Firsov; +Cc: u-boot

[-- Attachment #1: Type: text/plain, Size: 225 bytes --]

On Tue, Aug 02, 2022 at 06:49:49PM +0000, Dmytro Firsov wrote:

> 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.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: xen: events: fix build issues with disabled Xen HVC
  2022-08-02 19:11         ` Tom Rini
@ 2022-08-02 19:19           ` Dmytro Firsov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmytro Firsov @ 2022-08-02 19:19 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot

On 02.08.22 22:11, Tom Rini wrote:
> On Tue, Aug 02, 2022 at 06:49:49PM +0000, Dmytro Firsov wrote:
>
>> 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!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drivers: xen: events: fix build issues with disabled Xen HVC
  2022-07-04 12:05 [PATCH] drivers: xen: events: fix build issues with disabled Xen HVC Dmytro Firsov
  2022-07-20 20:43 ` Nastya Vicodin
@ 2022-08-04 20:51 ` Tom Rini
  1 sibling, 0 replies; 8+ messages in thread
From: Tom Rini @ 2022-08-04 20:51 UTC (permalink / raw)
  To: Dmytro Firsov; +Cc: u-boot, vicooodin

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

On Mon, Jul 04, 2022 at 12:05:38PM +0000, Dmytro Firsov 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@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>>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-04 20:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04 12:05 [PATCH] drivers: xen: events: fix build issues with disabled Xen HVC Dmytro Firsov
2022-07-20 20:43 ` Nastya Vicodin
2022-08-02  8:48   ` Dmytro Firsov
2022-08-02 10:57     ` Tom Rini
2022-08-02 18:49       ` Dmytro Firsov
2022-08-02 19:11         ` Tom Rini
2022-08-02 19:19           ` Dmytro Firsov
2022-08-04 20:51 ` Tom Rini

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.