Skip to contentSkip to conversation

riscv: make t-head erratas depend on MMU

PATCH In review Heiko Stuebner 3 participants 6 messages Sep 7, 2022 – Sep 13, 2022 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: make t-head erratas depend on MMU

Both basic extensions of SVPBMT and ZICBOM depend on CONFIG_MMU. Make the T-Head errata implementations of the similar functionality also depend on it to prevent build errors.

Fixes a35707c3d850 ("riscv: add memory-type errata for T-Head")
Fixes d20ec7529236 ("riscv: implement cache-management errata for T-Head SoCs")
---
 arch/riscv/Kconfig.erratas | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/Kconfig.erratas +2 -2
index 6850e9389930..f3623df23b5f 100644
@@ -46,7 +46,7 @@ config ERRATA_THEAD
 
 config ERRATA_THEAD_PBMT
 	bool "Apply T-Head memory type errata"
-	depends on ERRATA_THEAD && 64BIT
+	depends on ERRATA_THEAD && 64BIT && MMU
 	select RISCV_ALTERNATIVE_EARLY
 	default y
 	help
@@ -57,7 +57,7 @@ config ERRATA_THEAD_PBMT
 
 config ERRATA_THEAD_CMO
 	bool "Apply T-Head cache management errata"
-	depends on ERRATA_THEAD
+	depends on ERRATA_THEAD && MMU
 	select RISCV_DMA_NONCOHERENT
 	default y
 	help
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 38 lines · Heiko Stuebner

Both basic extensions of SVPBMT and ZICBOM depend on CONFIG_MMU. Make the T-Head errata implementations of the similar functionality also depend on it to prevent build errors.

Fixes a35707c3d850 ("riscv: add memory-type errata for T-Head")
Fixes d20ec7529236 ("riscv: implement cache-management errata for T-Head SoCs")
---
 arch/riscv/Kconfig.erratas | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/Kconfig.erratas +2 -3
index 6850e9389930..f3623df23b5f 100644
@@ -46,7 +46,7 @@ config ERRATA_THEAD
 
 config ERRATA_THEAD_PBMT
        bool "Apply T-Head memory type errata"
-       depends on ERRATA_THEAD && 64BIT
+       depends on ERRATA_THEAD && 64BIT && MMU
        select RISCV_ALTERNATIVE_EARLY
        default y
        help
@@ -57,7 +57,7 @@ config ERRATA_THEAD_PBMT
 
 config ERRATA_THEAD_CMO
        bool "Apply T-Head cache management errata"
-       depends on ERRATA_THEAD
+       depends on ERRATA_THEAD && MMU
        select RISCV_DMA_NONCOHERENT
        default y
        help
--

2.35.1

Signature · 7 lines
Best Regards
 Guo Ren

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Reviewed-by on v1 1/1
#2 lore raw
In reply to Heiko Stuebner
Quoted 9 lines · Heiko Stuebner

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Both basic extensions of SVPBMT and ZICBOM depend on CONFIG_MMU. Make the T-Head errata implementations of the similar functionality also depend on it to prevent build errors.

Fixes a35707c3d850 ("riscv: add memory-type errata for T-Head")
Fixes d20ec7529236 ("riscv: implement cache-management errata for T-Head SoCs")

In case anyone cares:

Quoted 19 lines
---
 arch/riscv/Kconfig.erratas | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/Kconfig.erratas +1 -1
index 6850e9389930..f3623df23b5f 100644
@@ -46,7 +46,7 @@ config ERRATA_THEAD
 
 config ERRATA_THEAD_PBMT
        bool "Apply T-Head memory type errata"
-       depends on ERRATA_THEAD && 64BIT
+       depends on ERRATA_THEAD && 64BIT && MMU
        select RISCV_ALTERNATIVE_EARLY
        default y
        help

arch/riscv/Kconfig.erratas config ERRATA_THEAD_PBMT · line 60

Quoted 5 lines
arch/riscv/Kconfig.erratas +1 -1
@@ -57,7 +57,7 @@ config ERRATA_THEAD_PBMT
 
 config ERRATA_THEAD_CMO
        bool "Apply T-Head cache management errata"
-       depends on ERRATA_THEAD
+       depends on ERRATA_THEAD && MMU

"Random" thought/question:
These two (and the sifive) errata all use oneliner depends but the PMU series of yours has:
config ERRATA_THEAD_PMU
bool "Apply T-Head PMU errata"
depends on ERRATA_THEAD
depends on RISCV_PMU_SBI

What's the rationale behind not oneliner-ing that one?

That's obviously orthogonal to this patch though, so:

Quoted 11 lines
arch/riscv/Kconfig.erratas +0 -1
        select RISCV_DMA_NONCOHERENT
        default y
        help
--

2.35.1

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

#3 lore raw

Am Mittwoch, 7. September 2022, 18:35:50 CEST schrieb [email protected]:

Quoted 47 lines · Heiko Stuebner
Quoted 9 lines

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Both basic extensions of SVPBMT and ZICBOM depend on CONFIG_MMU. Make the T-Head errata implementations of the similar functionality also depend on it to prevent build errors.

Fixes a35707c3d850 ("riscv: add memory-type errata for T-Head")
Fixes d20ec7529236 ("riscv: implement cache-management errata for T-Head SoCs")

In case anyone cares:

Quoted 19 lines
---
 arch/riscv/Kconfig.erratas | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/Kconfig.erratas +1 -1
index 6850e9389930..f3623df23b5f 100644
@@ -46,7 +46,7 @@ config ERRATA_THEAD
 
 config ERRATA_THEAD_PBMT
        bool "Apply T-Head memory type errata"
-       depends on ERRATA_THEAD && 64BIT
+       depends on ERRATA_THEAD && 64BIT && MMU
        select RISCV_ALTERNATIVE_EARLY
        default y
        help

arch/riscv/Kconfig.erratas config ERRATA_THEAD_PBMT · line 60

Quoted 5 lines
arch/riscv/Kconfig.erratas +1 -1
@@ -57,7 +57,7 @@ config ERRATA_THEAD_PBMT
 
 config ERRATA_THEAD_CMO
        bool "Apply T-Head cache management errata"
-       depends on ERRATA_THEAD
+       depends on ERRATA_THEAD && MMU

"Random" thought/question:
These two (and the sifive) errata all use oneliner depends but the PMU series of yours has:
config ERRATA_THEAD_PMU
bool "Apply T-Head PMU errata"
depends on ERRATA_THEAD
depends on RISCV_PMU_SBI

Quoted 1 line

What's the rationale behind not oneliner-ing that one?

probably not thinking too much about it beforehand ;-) .

But yes going with one line is probably nicer, so I transplanted this comment over to the sbi-pmu patch, for when a v4 might be necessary.

Heiko

Quoted 16 lines

That's obviously orthogonal to this patch though, so:

Quoted 11 lines
arch/riscv/Kconfig.erratas +0 -1
        select RISCV_DMA_NONCOHERENT
        default y
        help
--

2.35.1

_______________________________________________
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

#4 lore raw
Quoted 50 lines · Heiko Stübner

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Am Mittwoch, 7. September 2022, 18:35:50 CEST schrieb [email protected]:

Quoted 47 lines · Heiko Stuebner
Quoted 9 lines

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Both basic extensions of SVPBMT and ZICBOM depend on CONFIG_MMU. Make the T-Head errata implementations of the similar functionality also depend on it to prevent build errors.

Fixes a35707c3d850 ("riscv: add memory-type errata for T-Head")
Fixes d20ec7529236 ("riscv: implement cache-management errata for T-Head SoCs")

In case anyone cares:

Quoted 19 lines
---
 arch/riscv/Kconfig.erratas | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/Kconfig.erratas +1 -1
index 6850e9389930..f3623df23b5f 100644
@@ -46,7 +46,7 @@ config ERRATA_THEAD
 
 config ERRATA_THEAD_PBMT
        bool "Apply T-Head memory type errata"
-       depends on ERRATA_THEAD && 64BIT
+       depends on ERRATA_THEAD && 64BIT && MMU
        select RISCV_ALTERNATIVE_EARLY
        default y
        help

arch/riscv/Kconfig.erratas config ERRATA_THEAD_PBMT · line 60

Quoted 5 lines
arch/riscv/Kconfig.erratas +1 -1
@@ -57,7 +57,7 @@ config ERRATA_THEAD_PBMT
 
 config ERRATA_THEAD_CMO
        bool "Apply T-Head cache management errata"
-       depends on ERRATA_THEAD
+       depends on ERRATA_THEAD && MMU

"Random" thought/question:
These two (and the sifive) errata all use oneliner depends but the PMU series of yours has:
config ERRATA_THEAD_PMU
bool "Apply T-Head PMU errata"
depends on ERRATA_THEAD
depends on RISCV_PMU_SBI

Quoted 6 lines
Quoted 1 line

What's the rationale behind not oneliner-ing that one?

probably not thinking too much about it beforehand ;-) .

But yes going with one line is probably nicer, so I transplanted this comment over to the sbi-pmu patch, for when a v4 might be necessary.

Ehh my OCD just got triggered by it that's all.
I've been kinda wondering in general what's a good policy for depends lines, seems like one of those things that just varies wildly tbh...

Quoted 25 lines

Heiko

Quoted 16 lines

That's obviously orthogonal to this patch though, so:

Quoted 11 lines
arch/riscv/Kconfig.erratas +0 -1
        select RISCV_DMA_NONCOHERENT
        default y
        help
--

2.35.1

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

#5 lore raw
In reply to Heiko Stuebner

Hi Palmer,

Am Mittwoch, 7. September 2022, 17:49:32 CEST schrieb Heiko Stuebner:

Quoted 8 lines

Both basic extensions of SVPBMT and ZICBOM depend on CONFIG_MMU. Make the T-Head errata implementations of the similar functionality also depend on it to prevent build errors.

Fixes a35707c3d850 ("riscv: add memory-type errata for T-Head")
Fixes d20ec7529236 ("riscv: implement cache-management errata for T-Head SoCs")

could you take a look at this too please?

As it would make the lkp robot happy :-)

Thanks
Heiko

Quoted 27 lines
---
 arch/riscv/Kconfig.erratas | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/Kconfig.erratas +2 -2
index 6850e9389930..f3623df23b5f 100644
@@ -46,7 +46,7 @@ config ERRATA_THEAD
 
 config ERRATA_THEAD_PBMT
 	bool "Apply T-Head memory type errata"
-	depends on ERRATA_THEAD && 64BIT
+	depends on ERRATA_THEAD && 64BIT && MMU
 	select RISCV_ALTERNATIVE_EARLY
 	default y
 	help
@@ -57,7 +57,7 @@ config ERRATA_THEAD_PBMT
 
 config ERRATA_THEAD_CMO
 	bool "Apply T-Head cache management errata"
-	depends on ERRATA_THEAD
+	depends on ERRATA_THEAD && MMU
 	select RISCV_DMA_NONCOHERENT
 	default y
 	help