kernel: cobalt: Fix up elf_hwcap
PATCH 1/2 kernel: cobalt: Fix up elf_hwcap
Update elf_hwcap to ELF_HWCAP, this will work for newer 5.4 kernels
--- kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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
PATCH 2/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
Re: [PATCH 2/2] kernel: cobalt: Remove header file for newer kernels
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>
How about fixing arm as well at this chance? Same pattern.
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Re: [PATCH 2/2] kernel: cobalt: Remove header file for newer kernels
Quoted 30 lines · Jan Kiszka
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
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 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> How about fixing arm as well at this chance? Same pattern.
Quoted 6 lines
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
ACK, will send up another patch shortly.
Quoted 2 lines · Greg Gallagher via Xenomai
Update
elf_hwcaptoELF_HWCAP, this will work for newer 5.4 kernels
I assume you mean "also work" - or does it break on certain older kernels? Just asking before consulting our CI. ;)
Quoted 11 lines
Signen-off-by Greg Gallagher <[email protected]>--- kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)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 ) {
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Quoted 7 lines · Jan Kiszka via Xenomai
Quoted 2 lines · Greg Gallagher via Xenomai
Update
elf_hwcaptoELF_HWCAP, this will work for newer 5.4 kernelsI assume you mean "also work" - or does it break on certain older kernels? Just asking before consulting our CI. ;)
...and the same pattern exists on ARM.
Jan
Quoted 22 lines
Quoted 11 lines
Signen-off-by Greg Gallagher <[email protected]>--- kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h +0
-0kernel/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 ) {Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Quoted 37 lines · Jan Kiszka
Quoted 7 lines · Jan Kiszka via Xenomai
Quoted 2 lines · Greg Gallagher via Xenomai
Update
elf_hwcaptoELF_HWCAP, this will work for newer 5.4 kernelsI assume you mean "also work" - or does it break on certain older kernels? Just asking before consulting our CI. ;)
...and the same pattern exists on ARM.
Jan
Quoted 6 lines
Review
Quoted 6 lines
Signen-off-by Greg Gallagher <[email protected]>--- kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.hQuoted 7 lines
Quoted 7 lines
index
b7e3f52f2..291c9e5f0100644kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h +0
-0@@ -23,7 +23,7 @@#include <asm/xenomai/uapi/fptest.h> #include <asm/hwcap.h> Quoted 9 lines
kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h line 29
Quoted 6 lines
kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h +1
-1-#define have_fp (elf_hwcap & HWCAP_FP) +#define have_fp (ELF_HWCAP & HWCAP_FP)static inline int fp_kernel_supported (void ) {Jan
Quoted 4 lines
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
No problem, ACK. I'll put a more meaningful commit message as well. I thought I changed that before I sent the patch.
-Greg
Quoted 46 lines · Greg Gallagher
Quoted 37 lines · Jan Kiszka
Quoted 7 lines · Jan Kiszka via Xenomai
Quoted 2 lines · Greg Gallagher via Xenomai
Update
elf_hwcaptoELF_HWCAP, this will work for newer 5.4 kernelsI assume you mean "also work" - or does it break on certain older kernels? Just asking before consulting our CI. ;)
...and the same pattern exists on ARM.
Jan
Quoted 6 lines
Review
Quoted 6 lines
Signen-off-by Greg Gallagher <[email protected]>--- kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.hQuoted 7 lines
Quoted 7 lines
index
b7e3f52f2..291c9e5f0100644kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h +0
-0@@ -23,7 +23,7 @@#include <asm/xenomai/uapi/fptest.h> #include <asm/hwcap.h> Quoted 9 lines
kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h line 29
Quoted 6 lines
kernel/cobalt/arch/arm64/include/asm/xenomai/fptest.h +1
-1-#define have_fp (elf_hwcap & HWCAP_FP) +#define have_fp (ELF_HWCAP & HWCAP_FP)static inline int fp_kernel_supported (void ) {Jan
Quoted 4 lines
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
Quoted 5 lines
No problem, ACK. I'll put a more meaningful commit message as well. I thought I changed that before I sent the patch.
-Greg
These don't need to be updated on the arm (aarch32) side of things. I have that port running now and should have testing done this evening. I will update this patch with a better commit message.
-Greg