Skip to contentSkip to conversation

perf: starfive: fix 64-bit only COMPILE_TEST condition

PATCH Applied Conor Dooley 6 participants 7 messages Mar 18, 2024 – Mar 19, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: starfive: fix 64-bit only COMPILE_TEST condition

From: Conor Dooley <[email protected]>

ARCH_STARFIVE is not restricted to 64-bit platforms, so while Will's addition of a 64-bit only condition satisfied the build robots doing COMPILE_TEST builds, Palmer ran into the same problems with writeq() being undefined during regular rv32 builds.

Promote the dependency on 64-bit to its own depends on so that the driver can never be included in 32-bit builds.

Fixes c2b24812f7bc ("perf: starfive: Add StarLink PMU support")
Fixes f0dbc6d0de38 ("perf: starfive: Only allow COMPILE_TEST for 64-bit architectures")

---
CC: Will Deacon <[email protected]>
CC: Mark Rutland <[email protected]>
CC: Ji Sheng Teoh <[email protected]>
CC: [email protected]
CC: [email protected]

---
 drivers/perf/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/perf/Kconfig +2 -1
index 5060e1f1ea10..7526a9e714fa 100644
@@ -87,7 +87,8 @@ config RISCV_PMU_SBI
 	  filtering, counter configuration.
 
 config STARFIVE_STARLINK_PMU
-	depends on ARCH_STARFIVE || (COMPILE_TEST && 64BIT)
+	depends on ARCH_STARFIVE || COMPILE_TEST
+	depends on 64BIT
 	bool "StarFive StarLink PMU"
 	help
 	   Provide support for StarLink Performance Monitor Unit.
Signature · 1 line
2.43.0
Reviewed-by Acked-by on v1 1/1
#1 lore raw
Quoted 29 lines · Conor Dooley

From: Conor Dooley <[email protected]>

ARCH_STARFIVE is not restricted to 64-bit platforms, so while Will's addition of a 64-bit only condition satisfied the build robots doing COMPILE_TEST builds, Palmer ran into the same problems with writeq() being undefined during regular rv32 builds.

Promote the dependency on 64-bit to its own depends on so that the driver can never be included in 32-bit builds.

Fixes c2b24812f7bc ("perf: starfive: Add StarLink PMU support")
Fixes f0dbc6d0de38 ("perf: starfive: Only allow COMPILE_TEST for 64-bit architectures")

---
CC: Will Deacon <[email protected]>
CC: Mark Rutland <[email protected]>
CC: Ji Sheng Teoh <[email protected]>
CC: [email protected]
CC: [email protected]

---
 drivers/perf/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/perf/Kconfig +0 -0
index 5060e1f1ea10..7526a9e714fa 100644

drivers/perf/Kconfig config RISCV_PMU_SBI · line 94

Quoted 9 lines
drivers/perf/Kconfig +2 -1
@@ -87,7 +87,8 @@ config RISCV_PMU_SBI
 	  filtering, counter configuration.
 
 config STARFIVE_STARLINK_PMU
-	depends on ARCH_STARFIVE || (COMPILE_TEST && 64BIT)
+	depends on ARCH_STARFIVE || COMPILE_TEST
+	depends on 64BIT
 	bool "StarFive StarLink PMU"
 	help
 	   Provide support for StarLink Performance Monitor Unit.
Acked-by
#2 lore raw
Quoted 44 lines

-----Original Message-----
From: Palmer Dabbelt <[email protected]>
Sent: Tuesday, March 19, 2024 12:15 AM
To: Conor Dooley <[email protected]>
Cc: [email protected]; Conor Dooley <[email protected]>; Conor Dooley <[email protected]>; Will Deacon <[email protected]>; Mark Rutland <[email protected]>; JiSheng Teoh <[email protected]>; linux-arm- [email protected]; [email protected]
Subject: Re: [PATCH v1] perf: starfive: fix 64-bit only COMPILE_TEST condition

Quoted 32 lines · Conor Dooley

From: Conor Dooley <[email protected]>

ARCH_STARFIVE is not restricted to 64-bit platforms, so while Will's addition of a 64-bit only condition satisfied the build robots doing COMPILE_TEST builds, Palmer ran into the same problems with writeq() being undefined during regular rv32 builds.

Promote the dependency on 64-bit to its own depends on so that the driver can never be included in 32-bit builds.

Fixes c2b24812f7bc ("perf: starfive: Add StarLink PMU support")
Fixes f0dbc6d0de38 ("perf: starfive: Only allow COMPILE_TEST for

64-bit architectures")

---
CC: Will Deacon <[email protected]>
CC: Mark Rutland <[email protected]>
CC: Ji Sheng Teoh <[email protected]>
CC: [email protected]
CC: [email protected]

---
 drivers/perf/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/perf/Kconfig index renamed from drivers/perf/Kconfig +0 -0

5060e1f1ea10..7526a9e714fa 100644

drivers/perf/Kconfig +0 -0
@@ -87,7 +87,8 @@ config RISCV_PMU_SBI
 	  filtering, counter configuration.
 
Quoted 10 lines

drivers/perf/Kconfig config RISCV_PMU_SBI · line 94

Quoted 7 lines
drivers/perf/Kconfig +2 -1
 config STARFIVE_STARLINK_PMU
-	depends on ARCH_STARFIVE || (COMPILE_TEST && 64BIT)
+	depends on ARCH_STARFIVE || COMPILE_TEST
+	depends on 64BIT
 	bool "StarFive StarLink PMU"
 	help
 	   Provide support for StarLink Performance Monitor Unit.

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

Acked-by on v1 1/1
#3 lore raw
In reply to Conor Dooley
Quoted 7 lines · Conor Dooley

From: Conor Dooley <[email protected]>

ARCH_STARFIVE is not restricted to 64-bit platforms, so while Will's addition of a 64-bit only condition satisfied the build robots doing COMPILE_TEST builds, Palmer ran into the same problems with writeq() being undefined during regular rv32 builds.

Quoted 7 lines

Promote the dependency on 64-bit to its own depends on so that the driver can never be included in 32-bit builds.

Fixes c2b24812f7bc ("perf: starfive: Add StarLink PMU support")
Fixes f0dbc6d0de38 ("perf: starfive: Only allow COMPILE_TEST for 64-bit architectures")
Quoted 28 lines

---
CC: Will Deacon <[email protected]>
CC: Mark Rutland <[email protected]>
CC: Ji Sheng Teoh <[email protected]>
CC: [email protected]
CC: [email protected]

---
 drivers/perf/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/perf/Kconfig +2 -2
index 5060e1f1ea10..7526a9e714fa 100644
@@ -87,7 +87,8 @@ config RISCV_PMU_SBI
 	  filtering, counter configuration.
 
 config STARFIVE_STARLINK_PMU
-	depends on ARCH_STARFIVE || (COMPILE_TEST && 64BIT)
+	depends on ARCH_STARFIVE || COMPILE_TEST
+	depends on 64BIT
 	bool "StarFive StarLink PMU"
 	help
 	   Provide support for StarLink Performance Monitor Unit.
--

2.43.0

Quoted 4 lines

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

maintainer Acked-by on v1 1/1
#4 lore raw
In reply to Conor Dooley
Quoted 40 lines · Conor Dooley

From: Conor Dooley <[email protected]>

ARCH_STARFIVE is not restricted to 64-bit platforms, so while Will's addition of a 64-bit only condition satisfied the build robots doing COMPILE_TEST builds, Palmer ran into the same problems with writeq() being undefined during regular rv32 builds.

Promote the dependency on 64-bit to its own depends on so that the driver can never be included in 32-bit builds.

Fixes c2b24812f7bc ("perf: starfive: Add StarLink PMU support")
Fixes f0dbc6d0de38 ("perf: starfive: Only allow COMPILE_TEST for 64-bit architectures")

---
CC: Will Deacon <[email protected]>
CC: Mark Rutland <[email protected]>
CC: Ji Sheng Teoh <[email protected]>
CC: [email protected]
CC: [email protected]

---
 drivers/perf/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/perf/Kconfig +2 -1
index 5060e1f1ea10..7526a9e714fa 100644
@@ -87,7 +87,8 @@ config RISCV_PMU_SBI
 	  filtering, counter configuration.
 
 config STARFIVE_STARLINK_PMU
-	depends on ARCH_STARFIVE || (COMPILE_TEST && 64BIT)
+	depends on ARCH_STARFIVE || COMPILE_TEST
+	depends on 64BIT
 	bool "StarFive StarLink PMU"
 	help
 	   Provide support for StarLink Performance Monitor Unit.
Signature · 1 line
2.43.0

Thanks guys, I don't know what a starfive is so sorry for not spotting this when I noticed the build failure on arm64.

Catalin -- please can you pick this into the arm64 fixes branch for -rc1?

Cheers,

Will

#5 lore raw
Quoted 2 lines · Will Deacon

Thanks guys, I don't know what a starfive is so sorry for not spotting this when I noticed the build failure on arm64.

It's a bit like a starfish, I guess you've seen them in sealife? Or maybe some David Attenborough show?

#6 lore raw
In reply to Conor Dooley
Quoted 9 lines · Conor Dooley

ARCH_STARFIVE is not restricted to 64-bit platforms, so while Will's addition of a 64-bit only condition satisfied the build robots doing COMPILE_TEST builds, Palmer ran into the same problems with writeq() being undefined during regular rv32 builds.

Promote the dependency on 64-bit to its own depends on so that the driver can never be included in 32-bit builds.

[...]

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

[1/1] perf: starfive: fix 64-bit only COMPILE_TEST condition

      https://git.kernel.org/arm64/c/1d63d1d9e5c5
Signature · 1 line
Catalin