kernel: cobalt: Remove header file for newer kernels
PATCH v2 1/2 kernel: cobalt: Remove header file for newer kernels
5.4 kernels do not have compiler.h, only include this header file for kernels older then 5.4
--- kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h | 4 ++++ 1 file changed, 4 insertions(+)
kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h +4 -0
@@ -29,7 +29,11 @@#define XNARCH_HOST_TICK_IRQ __ipipe_hrtimer_irq#include <asm/barrier.h> + +#if LINUX_VERSION_CODE <KERNEL_VERSION (5 ,4 ,0 )#include <asm/compiler.h> +#endif +#include <asm/cmpxchg.h> #include <asm/switch_to.h> #include <asm/system_misc.h>
Signature · 1 line
2.25.1
PATCH v2 2/2 kernel: cobalt: Fix up elf_hwcap
Update to use ELF_HWCAP instead of elf_hwcap directly.
--- kernel/cobalt/arch/arm/include/asm/xenomai/fptest.h | 2 +- kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
kernel/cobalt/arch/arm/include/asm/xenomai/fptest.h +1 -1
@@ -23,7 +23,7 @@#include <asm/hwcap.h> #ifdef CONFIG_VFP -#define have_vfp (elf_hwcap & HWCAP_VFP) +#define have_vfp (ELF_HWCAP & HWCAP_VFP)#else /* !CONFIG_VFP */ #define have_vfp 0#endif /* !CONFIG_VFP */
kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h +1 -1
@@ -23,7 +23,7 @@#include <asm/xenomai/uapi/fptest.h> #include <asm/hwcap.h> -#define have_fp (elf_hwcap & HWCAP_FP) +#define have_fp (ELF_HWCAP & HWCAP_FP)static inline int fp_kernel_supported (void ) {
Signature · 1 line
2.25.1
Quoted 14 lines · Greg Gallagher via Xenomai
5.4 kernels do not have
compiler.h, only include this header file for kernels older then 5.4Signed-off-by Greg Gallagher <[email protected]>--- kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h | 4 ++++ 1 file changed, 4 insertions(+)kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h +0
-0@@ -29,7 +29,11 @@#define XNARCH_HOST_TICK_IRQ __ipipe_hrtimer_irq
kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h line 39
Quoted 10 lines
kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h +4
-0#include <asm/barrier.h> + +#if LINUX_VERSION_CODE <KERNEL_VERSION (5 ,4 ,0 )#include <asm/compiler.h> +#endif +#include <asm/cmpxchg.h> #include <asm/switch_to.h> #include <asm/system_misc.h>
There is still arch/arm64/include/asm/compiler.h in today's master.
What error exactly are you fixing? That we should rather including linux/compiler.h? Or is that header obsolete for us now, for all kernels?
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Re: [PATCH v2 2/2] kernel: cobalt: Fix up elf_hwcap
In reply to Greg GallagherQuoted 27 lines · Greg Gallagher via Xenomai
Update to use
ELF_HWCAPinstead ofelf_hwcapdirectly.Signen-off-by Greg Gallagher <[email protected]>--- kernel/cobalt/arch/arm/include/asm/xenomai/fptest.h | 2 +- kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)kernel/cobalt/arch/arm/include/asm/xenomai/fptest.h +1
-1@@ -23,7 +23,7 @@#include <asm/hwcap.h> #ifdef CONFIG_VFP -#define have_vfp (elf_hwcap & HWCAP_VFP) +#define have_vfp (ELF_HWCAP & HWCAP_VFP)#else /* !CONFIG_VFP */ #define have_vfp 0#endif /* !CONFIG_VFP */ kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h +0
-0
kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h line 29
Quoted 8 lines
kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h +1
-1@@ -23,7 +23,7 @@#include <asm/xenomai/uapi/fptest.h> #include <asm/hwcap.h> -#define have_fp (elf_hwcap & HWCAP_FP) +#define have_fp (ELF_HWCAP & HWCAP_FP)static inline int fp_kernel_supported (void ) {
Rebased and applied (and "signed-off" typo fixed).
Thanks,
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Quoted 28 lines · Jan Kiszka via Xenomai
Quoted 14 lines · Greg Gallagher via Xenomai
5.4 kernels do not have
compiler.h, only include this header file for kernels older then 5.4Signed-off-by Greg Gallagher <[email protected]>--- kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h | 4 ++++ 1 file changed, 4 insertions(+)kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h +0
-0@@ -29,7 +29,11 @@#define XNARCH_HOST_TICK_IRQ __ipipe_hrtimer_irqkernel/cobalt/arch/arm64/include/asm/xenomai/machine.h line 39
Quoted 10 lines
kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h +4
-0#include <asm/barrier.h> + +#if LINUX_VERSION_CODE <KERNEL_VERSION (5 ,4 ,0 )#include <asm/compiler.h> +#endif +#include <asm/cmpxchg.h> #include <asm/switch_to.h> #include <asm/system_misc.h> There is still
arch/arm64/include/asm/compiler.hin today's master.
Quoted 3 lines
What error exactly are you fixing? That we should rather including
linux/compiler.h? Or is that header obsolete for us now, for all kernels?
OK, that file vanished in 4.20 and resurrected in 5.7. Given that we do not head for ipipe over > 5.4, I will just merge this (ported to next).
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Quoted 35 lines · Jan Kiszka
Quoted 2 lines · Jan Kiszka via Xenomai
Quoted 1 line · Greg Gallagher via Xenomai
5.4 kernels do not have
compiler.h, only include this header file forkernels older then 5.4
Quoted 7 lines
Review
Quoted 7 lines
Signed-off-by Greg Gallagher <[email protected]>--- kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h | 4 ++++ 1 file changed, 4 insertions(+)(quoted diff) +0
-0
b/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.hQuoted 19 lines
Quoted 6 lines
index
7444cc823..17be10339100644kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h +0
-0@@ -29,7 +29,11 @@#define XNARCH_HOST_TICK_IRQ __ipipe_hrtimer_irqkernel/cobalt/arch/arm64/include/asm/xenomai/machine.h line 39
Quoted 10 lines
kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h +4
-0#include <asm/barrier.h> + +#if LINUX_VERSION_CODE <KERNEL_VERSION (5 ,4 ,0 )#include <asm/compiler.h> +#endif +#include <asm/cmpxchg.h> #include <asm/switch_to.h> #include <asm/system_misc.h> There is still
arch/arm64/include/asm/compiler.hin today's master.Quoted 3 lines
What error exactly are you fixing? That we should rather including
linux/compiler.h? Or is that header obsolete for us now, for all kernels?
Quoted 8 lines
OK, that file vanished in 4.20 and resurrected in 5.7. Given that we do not head for ipipe over > 5.4, I will just merge this (ported to next).
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
Sorry, I meant to look into that. I’m assuming this won’t impact the port to dovetail? We could always add it back for kernels greater then 5.6 and remove for 4.20 and above?
Greg
Quoted 2 lines
Quoted 53 lines · Greg Gallagher
On Fri, Feb 5, 2021 at 9:45 AM Jan Kiszka <[email protected] <mailto:[email protected]>> wrote:
On 03.02.21 10:50, Jan Kiszka via Xenomai wrote: > On 03.02.21 08:01, Greg Gallagher via Xenomai wrote: >> 5.4 kernels do not have compiler.h, only include this header file for kernels older then 5.4 >> >> Signed-off-by: Greg Gallagher <[email protected] <mailto:[email protected]>> >> --- >> kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h b/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h >> index 7444cc823..17be10339 100644 >> --- a/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h >> +++ b/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h >> @@ -29,7 +29,11 @@ >> #define XNARCH_HOST_TICK_IRQ __ipipe_hrtimer_irq >> >> #include <asm/barrier.h> >> + >> +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) >> #include <asm/compiler.h> >> +#endif >> + >> #include <asm/cmpxchg.h> >> #include <asm/switch_to.h> >> #include <asm/system_misc.h> >> > > There is still arch/arm64/include/asm/compiler.h in today's master. > > What error exactly are you fixing? That we should rather including > linux/compiler.h? Or is that header obsolete for us now, for all kernels? > OK, that file vanished in 4.20 and resurrected in 5.7. Given that we do not head for ipipe over > 5.4, I will just merge this (ported to next). Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Quoted 4 lines
Sorry, I meant to look into that. I’m assuming this won’t impact the port to dovetail? We could always add it back for kernels greater then 5.6 and remove for 4.20 and above?
Yes, 5.4 is EOL for that machine.h, thus we can ignore the reintroduction later on. I left an according remark in the commit.
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux