All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Report support for optional ARMv8.2 half-precision floating point extension
@ 2022-09-01 14:13 ` george pee
  0 siblings, 0 replies; 24+ messages in thread
From: george pee @ 2022-09-01 14:13 UTC (permalink / raw)
  Cc: george pee, Russell King, Russell King (Oracle),
	Catalin Marinas, Kirill A. Shutemov, Austin Kim, Ard Biesheuvel,
	Mike Rapoport, linux-arm-kernel, linux-kernel

Report as fphp to be consistent with arm64

Signed-off-by: george pee <georgepee@gmail.com>
---
 arch/arm/include/uapi/asm/hwcap.h | 1 +
 arch/arm/kernel/setup.c           | 1 +
 arch/arm/vfp/vfpmodule.c          | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/arch/arm/include/uapi/asm/hwcap.h b/arch/arm/include/uapi/asm/hwcap.h
index 990199d8b7c6..f975845ce5d3 100644
--- a/arch/arm/include/uapi/asm/hwcap.h
+++ b/arch/arm/include/uapi/asm/hwcap.h
@@ -28,6 +28,7 @@
 #define HWCAP_IDIV	(HWCAP_IDIVA | HWCAP_IDIVT)
 #define HWCAP_LPAE	(1 << 20)
 #define HWCAP_EVTSTRM	(1 << 21)
+#define HWCAP_FPHP	(1 << 22)
 
 /*
  * HWCAP2 flags - for elf_hwcap2 (in kernel) and AT_HWCAP2
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 1e8a50a97edf..6694ced0552a 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -1249,6 +1249,7 @@ static const char *hwcap_str[] = {
 	"vfpd32",
 	"lpae",
 	"evtstrm",
+	"fphp",
 	NULL
 };
 
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 2cb355c1b5b7..cef8c64ce8bd 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -831,6 +831,8 @@ static int __init vfp_init(void)
 
 			if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000)
 				elf_hwcap |= HWCAP_VFPv4;
+			if ((fmrx(MVFR1) & 0x0f000000) == 0x03000000)
+				elf_hwcap |= HWCAP_FPHP;
 		}
 	/* Extract the architecture version on pre-cpuid scheme */
 	} else {
-- 
2.37.3


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

end of thread, other threads:[~2022-09-12 18:11 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 14:13 [PATCH] Report support for optional ARMv8.2 half-precision floating point extension george pee
2022-09-01 14:13 ` george pee
2022-09-09 11:39 ` Catalin Marinas
2022-09-09 11:39   ` Catalin Marinas
2022-09-09 13:35   ` George Pee
2022-09-09 13:35     ` George Pee
2022-09-09 12:46 ` Robin Murphy
2022-09-09 12:46   ` Robin Murphy
2022-09-09 13:34   ` George Pee
2022-09-09 13:34     ` George Pee
2022-09-09 14:07     ` Catalin Marinas
2022-09-09 14:07       ` Catalin Marinas
2022-09-09 14:57       ` George Pee
2022-09-09 14:57         ` George Pee
2022-09-09 15:05         ` Catalin Marinas
2022-09-09 15:05           ` Catalin Marinas
2022-09-12 13:05           ` Russell King (Oracle)
2022-09-12 13:05             ` Russell King (Oracle)
2022-09-12 18:09             ` George Pee
2022-09-12 18:09               ` George Pee
2022-09-09 14:17     ` Robin Murphy
2022-09-09 14:17       ` Robin Murphy
2022-09-09 14:54       ` George Pee
2022-09-09 14:54         ` George Pee

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.