All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-dovetail PATCH 1/2] x86: fix duplication definication issue in making allyesconfig
@ 2022-04-02  3:09 Hongzhan Chen
  2022-04-02  3:09 ` [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM Hongzhan Chen
  2022-04-02  9:45 ` [linux-dovetail PATCH 1/2] x86: fix duplication definication issue in making allyesconfig Philippe Gerum
  0 siblings, 2 replies; 6+ messages in thread
From: Hongzhan Chen @ 2022-04-02  3:09 UTC (permalink / raw)
  To: xenomai

When making allyesconfig, there is duplication definication issue.
To fix it, make them exclusive each other.

Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
---
 arch/x86/kernel/irq_pipeline.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/irq_pipeline.c b/arch/x86/kernel/irq_pipeline.c
index 8daac9f78ebe..624fad67fe56 100644
--- a/arch/x86/kernel/irq_pipeline.c
+++ b/arch/x86/kernel/irq_pipeline.c
@@ -138,13 +138,11 @@ static void do_sysvec_inband(struct irq_desc *desc)
 	case HYPERV_STIMER0_VECTOR:
 		__sysvec_hyperv_stimer0(regs);
 		break;
-#endif
-#ifdef CONFIG_ACRN_GUEST
+#elif defined CONFIG_ACRN_GUEST
 	case HYPERVISOR_CALLBACK_VECTOR:
 		__sysvec_acrn_hv_callback(regs);
 		break;
-#endif
-#ifdef CONFIG_XEN_PVHVM
+#elif defined CONFIG_XEN_PVHVM
 	case HYPERVISOR_CALLBACK_VECTOR:
 		__sysvec_xen_hvm_callback(regs);
 		break;
-- 
2.17.1



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

* [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM
  2022-04-02  3:09 [linux-dovetail PATCH 1/2] x86: fix duplication definication issue in making allyesconfig Hongzhan Chen
@ 2022-04-02  3:09 ` Hongzhan Chen
  2022-04-02  9:11   ` Philippe Gerum
  2022-04-02  9:45 ` [linux-dovetail PATCH 1/2] x86: fix duplication definication issue in making allyesconfig Philippe Gerum
  1 sibling, 1 reply; 6+ messages in thread
From: Hongzhan Chen @ 2022-04-02  3:09 UTC (permalink / raw)
  To: xenomai

Currently, GENERIC_CLOCKSOURCE_VDSO only supported well on ARM.
To fix build issue like following when make allyesconfig on x86 platform.

arch/x86/entry/vdso/../../../../lib/vdso/gettimeofday.c:145:14:
error: implicit declaration of function clock_open_device

Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
---
 drivers/clocksource/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 5138cd593373..1e8c1cd086d5 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -644,7 +644,7 @@ config CLKSRC_ST_LPC
 	bool "Low power clocksource found in the LPC" if COMPILE_TEST
 	select TIMER_OF if OF
 	depends on HAS_IOMEM
-	select GENERIC_CLOCKSOURCE_VDSO
+	select GENERIC_CLOCKSOURCE_VDSO if ARM
 	help
 	  Enable this option to use the Low Power controller timer
 	  as clocksource.
-- 
2.17.1



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

* Re: [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM
  2022-04-02  3:09 ` [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM Hongzhan Chen
@ 2022-04-02  9:11   ` Philippe Gerum
  2022-04-06  0:32     ` Chen, Hongzhan
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2022-04-02  9:11 UTC (permalink / raw)
  To: Hongzhan Chen; +Cc: xenomai


Hongzhan Chen via Xenomai <xenomai@xenomai.org> writes:

> Currently, GENERIC_CLOCKSOURCE_VDSO only supported well on ARM.
> To fix build issue like following when make allyesconfig on x86 platform.
>
> arch/x86/entry/vdso/../../../../lib/vdso/gettimeofday.c:145:14:
> error: implicit declaration of function clock_open_device
>
> Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
> ---
>  drivers/clocksource/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index 5138cd593373..1e8c1cd086d5 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -644,7 +644,7 @@ config CLKSRC_ST_LPC
>  	bool "Low power clocksource found in the LPC" if COMPILE_TEST
>  	select TIMER_OF if OF
>  	depends on HAS_IOMEM
> -	select GENERIC_CLOCKSOURCE_VDSO
> +	select GENERIC_CLOCKSOURCE_VDSO if ARM
>  	help
>  	  Enable this option to use the Low Power controller timer
>  	  as clocksource.

Starting from v5.17, Dovetail has generic support for clocksource access
via the vDSO for CONFIG_ARM64 too. Which kernel release is this patch
based on?

-- 
Philippe.


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

* Re: [linux-dovetail PATCH 1/2] x86: fix duplication definication issue in making allyesconfig
  2022-04-02  3:09 [linux-dovetail PATCH 1/2] x86: fix duplication definication issue in making allyesconfig Hongzhan Chen
  2022-04-02  3:09 ` [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM Hongzhan Chen
@ 2022-04-02  9:45 ` Philippe Gerum
  1 sibling, 0 replies; 6+ messages in thread
From: Philippe Gerum @ 2022-04-02  9:45 UTC (permalink / raw)
  To: Hongzhan Chen; +Cc: xenomai


Hongzhan Chen via Xenomai <xenomai@xenomai.org> writes:

> When making allyesconfig, there is duplication definication issue.
> To fix it, make them exclusive each other.
>
> Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
> ---
>  arch/x86/kernel/irq_pipeline.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/kernel/irq_pipeline.c b/arch/x86/kernel/irq_pipeline.c
> index 8daac9f78ebe..624fad67fe56 100644
> --- a/arch/x86/kernel/irq_pipeline.c
> +++ b/arch/x86/kernel/irq_pipeline.c
> @@ -138,13 +138,11 @@ static void do_sysvec_inband(struct irq_desc *desc)
>  	case HYPERV_STIMER0_VECTOR:
>  		__sysvec_hyperv_stimer0(regs);
>  		break;
> -#endif
> -#ifdef CONFIG_ACRN_GUEST
> +#elif defined CONFIG_ACRN_GUEST
>  	case HYPERVISOR_CALLBACK_VECTOR:
>  		__sysvec_acrn_hv_callback(regs);
>  		break;
> -#endif
> -#ifdef CONFIG_XEN_PVHVM
> +#elif defined CONFIG_XEN_PVHVM
>  	case HYPERVISOR_CALLBACK_VECTOR:
>  		__sysvec_xen_hvm_callback(regs);
>  		break;

There may be a broader issue in the original implementation which this
patch only papers over.

In theory, building a kernel image one could run on multiple flavors of
HV should be possible - there seems to be no mutal exclusion in the
Kconfig specs between XEN, ACRN and HYPERV client support - which this
change would disable by always preferring HYPERV over ACRN when it comes
to pipelining interrupts.

However, Dovetail does not cope well with paravirtualization ATM anyway,
which is why XEN depends on !IRQ_PIPELINE. As a result, there is no
point in keeping the case for XEN_PVHVM around. We should have the same
constraint on CONFIG_HYPERV, therefore the other conflicting case should
go away, leaving ACRN_GUEST as the sole user of
HYPERVISOR_CALLBACK_VECTOR, with no conflict anymore.

-- 
Philippe.


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

* RE: [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM
  2022-04-02  9:11   ` Philippe Gerum
@ 2022-04-06  0:32     ` Chen, Hongzhan
  2022-04-06  7:53       ` Philippe Gerum
  0 siblings, 1 reply; 6+ messages in thread
From: Chen, Hongzhan @ 2022-04-06  0:32 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai

>-----Original Message-----
>From: Philippe Gerum <rpm@xenomai.org> 
>Sent: Saturday, April 2, 2022 5:11 PM
>To: Chen, Hongzhan <hongzhan.chen@intel.com>
>Cc: xenomai@xenomai.org
>Subject: Re: [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM
>
>
>Hongzhan Chen via Xenomai <xenomai@xenomai.org> writes:
>
>> Currently, GENERIC_CLOCKSOURCE_VDSO only supported well on ARM.
>> To fix build issue like following when make allyesconfig on x86 platform.
>>
>> arch/x86/entry/vdso/../../../../lib/vdso/gettimeofday.c:145:14:
>> error: implicit declaration of function clock_open_device
>>
>> Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
>> ---
>>  drivers/clocksource/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
>> index 5138cd593373..1e8c1cd086d5 100644
>> --- a/drivers/clocksource/Kconfig
>> +++ b/drivers/clocksource/Kconfig
>> @@ -644,7 +644,7 @@ config CLKSRC_ST_LPC
>>  	bool "Low power clocksource found in the LPC" if COMPILE_TEST
>>  	select TIMER_OF if OF
>>  	depends on HAS_IOMEM
>> -	select GENERIC_CLOCKSOURCE_VDSO
>> +	select GENERIC_CLOCKSOURCE_VDSO if ARM
>>  	help
>>  	  Enable this option to use the Low Power controller timer
>>  	  as clocksource.
>
>Starting from v5.17, Dovetail has generic support for clocksource access
>via the vDSO for CONFIG_ARM64 too. Which kernel release is this patch
>based on?

Sorry, I had not described it clearly. It is based on 5.10.

Regards

Hongzhan Chen

>
>-- 
>Philippe.


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

* Re: [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM
  2022-04-06  0:32     ` Chen, Hongzhan
@ 2022-04-06  7:53       ` Philippe Gerum
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Gerum @ 2022-04-06  7:53 UTC (permalink / raw)
  To: Chen, Hongzhan; +Cc: xenomai


"Chen, Hongzhan" <hongzhan.chen@intel.com> writes:

>>-----Original Message-----
>>From: Philippe Gerum <rpm@xenomai.org> 
>>Sent: Saturday, April 2, 2022 5:11 PM
>>To: Chen, Hongzhan <hongzhan.chen@intel.com>
>>Cc: xenomai@xenomai.org
>>Subject: Re: [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM
>>
>>
>>Hongzhan Chen via Xenomai <xenomai@xenomai.org> writes:
>>
>>> Currently, GENERIC_CLOCKSOURCE_VDSO only supported well on ARM.
>>> To fix build issue like following when make allyesconfig on x86 platform.
>>>
>>> arch/x86/entry/vdso/../../../../lib/vdso/gettimeofday.c:145:14:
>>> error: implicit declaration of function clock_open_device
>>>
>>> Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
>>> ---
>>>  drivers/clocksource/Kconfig | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
>>> index 5138cd593373..1e8c1cd086d5 100644
>>> --- a/drivers/clocksource/Kconfig
>>> +++ b/drivers/clocksource/Kconfig
>>> @@ -644,7 +644,7 @@ config CLKSRC_ST_LPC
>>>  	bool "Low power clocksource found in the LPC" if COMPILE_TEST
>>>  	select TIMER_OF if OF
>>>  	depends on HAS_IOMEM
>>> -	select GENERIC_CLOCKSOURCE_VDSO
>>> +	select GENERIC_CLOCKSOURCE_VDSO if ARM
>>>  	help
>>>  	  Enable this option to use the Low Power controller timer
>>>  	  as clocksource.
>>
>>Starting from v5.17, Dovetail has generic support for clocksource access
>>via the vDSO for CONFIG_ARM64 too. Which kernel release is this patch
>>based on?
>
> Sorry, I had not described it clearly. It is based on 5.10.
>

No problem. I just backported the vDSO support to 5.10/arm64 along with
a fix for allyesconfig per your suggestion (v5.10.107-dovetail1-rebase),
so both LTS trees I'm maintaining have it now:

7585543a1ebb arm64: vDSO: export user-visible MMIO clocksources
143579c7945c clocksource/drivers: dovetail: fix dependency on GENERIC_CLOCKSOURCE_VDSO

-- 
Philippe.


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

end of thread, other threads:[~2022-04-06  7:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-02  3:09 [linux-dovetail PATCH 1/2] x86: fix duplication definication issue in making allyesconfig Hongzhan Chen
2022-04-02  3:09 ` [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM Hongzhan Chen
2022-04-02  9:11   ` Philippe Gerum
2022-04-06  0:32     ` Chen, Hongzhan
2022-04-06  7:53       ` Philippe Gerum
2022-04-02  9:45 ` [linux-dovetail PATCH 1/2] x86: fix duplication definication issue in making allyesconfig Philippe Gerum

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.