All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64/sme: Fix tests for 0b1111 value ID registers
@ 2022-06-07 16:51 Mark Brown
  2022-06-08 18:47 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2022-06-07 16:51 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon; +Cc: linux-arm-kernel, Mark Brown

For both ID_AA64SMFR0_EL1.I16I64 and ID_AA64SMFR0_EL1.I8I32 we check for
the presence of the feature by looking for a specific ID value of 0x4 but
should instead be checking for the value 0xf defined by the architecture.

This had no practical effect since we are looking for values >= our define
and the only valid values in the architecture are 0b0000 and 0b1111 so we
would detect things appropriately with the architecture as it stands even
with the incorrect defines.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/arm64/include/asm/sysreg.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h
index 084bacc16fa3..6d4f5683ba24 100644
--- a/arch/arm64/include/asm/sysreg.h
+++ b/arch/arm64/include/asm/sysreg.h
@@ -775,9 +775,9 @@
 #define ID_AA64SMFR0_F32F32_SHIFT	32
 
 #define ID_AA64SMFR0_FA64		0x1
-#define ID_AA64SMFR0_I16I64		0x4
+#define ID_AA64SMFR0_I16I64		0xf
 #define ID_AA64SMFR0_F64F64		0x1
-#define ID_AA64SMFR0_I8I32		0x4
+#define ID_AA64SMFR0_I8I32		0xf
 #define ID_AA64SMFR0_F16F32		0x1
 #define ID_AA64SMFR0_B16F32		0x1
 #define ID_AA64SMFR0_F32F32		0x1
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64/sme: Fix tests for 0b1111 value ID registers
  2022-06-07 16:51 [PATCH] arm64/sme: Fix tests for 0b1111 value ID registers Mark Brown
@ 2022-06-08 18:47 ` Catalin Marinas
  0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2022-06-08 18:47 UTC (permalink / raw)
  To: Will Deacon, Mark Brown; +Cc: linux-arm-kernel

On Tue, 7 Jun 2022 17:51:28 +0100, Mark Brown wrote:
> For both ID_AA64SMFR0_EL1.I16I64 and ID_AA64SMFR0_EL1.I8I32 we check for
> the presence of the feature by looking for a specific ID value of 0x4 but
> should instead be checking for the value 0xf defined by the architecture.
> 
> This had no practical effect since we are looking for values >= our define
> and the only valid values in the architecture are 0b0000 and 0b1111 so we
> would detect things appropriately with the architecture as it stands even
> with the incorrect defines.

The risk is that the architects start making use of the intermiediate
values. So better to have this fixed.

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64/sme: Fix tests for 0b1111 value ID registers
      https://git.kernel.org/arm64/c/a3d52ac77500

-- 
Catalin


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-06-08 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 16:51 [PATCH] arm64/sme: Fix tests for 0b1111 value ID registers Mark Brown
2022-06-08 18:47 ` Catalin Marinas

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.