x86: fix duplication definication issue in making allyesconfig
Subsystems (2)
PATCH 1/2 x86: fix duplication definication issue in making allyesconfig
When making allyesconfig, there is duplication definication issue. To fix it, make them exclusive each other.
--- arch/x86/kernel/irq_pipeline.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
arch/x86/kernel/irq_pipeline.c +2 -4
@@ -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 definedCONFIG_ACRN_GUEST case HYPERVISOR_CALLBACK_VECTOR :__sysvec_acrn_hv_callback (regs);break ; -#endif -#ifdef CONFIG_XEN_PVHVM +#elif definedCONFIG_XEN_PVHVM case HYPERVISOR_CALLBACK_VECTOR :__sysvec_xen_hvm_callback (regs);break ;
Signature · 1 line
2.17.1
PATCH 2/2 clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM
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
--- drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/Kconfig +1 -1
@@ -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.
Signature · 1 line
2.17.1
Re: [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM
Quoted 16 lines · Hongzhan Chen via Xenomai
Currently,
GENERIC_CLOCKSOURCE_VDSOonly 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 functionclock_open_deviceSigned-off-by Hongzhan Chen <[email protected]>--- drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clocksource/Kconfig +0
-0
drivers/clocksource/Kconfig config CLKSRC_ST_LPC · line 650
Quoted 8 lines
drivers/clocksource/Kconfig +1
-1@@ -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?
Signature · 1 line
Philippe.
RE: [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM
Quoted 30 lines
-----Original Message-----
From: Philippe Gerum <[email protected]>
Sent: Saturday, April 2, 2022 5:11 PM
To: Chen, Hongzhan <[email protected]>
Cc: [email protected]
Subject: Re: [linux-dovetail PATCH 2/2] clocksource:GENERIC_CLOCKSOURCE_VDSOonly supported on ARMQuoted 20 lines · Hongzhan Chen via Xenomai
Currently,
GENERIC_CLOCKSOURCE_VDSOonly 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 functionclock_open_deviceSigned-off-by Hongzhan Chen <[email protected]>--- drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clocksource/Kconfig +0
-1@@ -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
Quoted 8 lines
drivers/clocksource/Kconfig config CLKSRC_ST_LPC · line 650
Quoted 4 lines
drivers/clocksource/Kconfig +1
-0+ 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_ARM64too. Which kernel release is this patch based on?
Sorry, I had not described it clearly. It is based on 5.10.
Regards
Hongzhan Chen
Quoted 3 lines
Signature · 2 lines
-- Philippe.
Re: [linux-dovetail PATCH 2/2] clocksource: GENERIC_CLOCKSOURCE_VDSO only supported on ARM
Quoted 39 lines · Hongzhan
Quoted 30 lines
-----Original Message-----
From: Philippe Gerum <[email protected]>
Sent: Saturday, April 2, 2022 5:11 PM
To: Chen, Hongzhan <[email protected]>
Cc: [email protected]
Subject: Re: [linux-dovetail PATCH 2/2] clocksource:GENERIC_CLOCKSOURCE_VDSOonly supported on ARMQuoted 20 lines · Hongzhan Chen via Xenomai
Currently,
GENERIC_CLOCKSOURCE_VDSOonly 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 functionclock_open_deviceSigned-off-by Hongzhan Chen <[email protected]>--- drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clocksource/Kconfig +0
-1@@ -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_VDSOQuoted 8 lines
drivers/clocksource/Kconfig config CLKSRC_ST_LPC · line 650
Quoted 4 lines
drivers/clocksource/Kconfig +1
-0+ 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_ARM64too. Which kernel release is this patch based on?
Quoted 2 lines
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
Signature · 1 line
Philippe.
Quoted 18 lines · Hongzhan Chen via Xenomai
When making allyesconfig, there is duplication definication issue. To fix it, make them exclusive each other.
Signed-off-by Hongzhan Chen <[email protected]>--- arch/x86/kernel/irq_pipeline.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)arch/x86/kernel/irq_pipeline.c +0
-2@@ -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
arch/x86/kernel/irq_pipeline.c static void do_sysvec_inband(struct irq_desc *desc) · line 148
Quoted 10 lines
arch/x86/kernel/irq_pipeline.c +2
-2+#elif definedCONFIG_ACRN_GUEST case HYPERVISOR_CALLBACK_VECTOR :__sysvec_acrn_hv_callback (regs);break ; -#endif -#ifdef CONFIG_XEN_PVHVM +#elif definedCONFIG_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.
Signature · 1 line
Philippe.