2023-06-21 19:14:40

by Conor Dooley

[permalink] [raw]
Subject: [PATCH v1] RISC-V: make ARCH_THEAD preclude XIP_KERNEL

From: Conor Dooley <[email protected]>

Randy reported build errors in linux-next where XIP_KERNEL was enabled.
ARCH_THEAD requires alternatives to support the non-standard ISA
extensions used by the THEAD cores, which are mutually exclusive with
XIP kernels. Clone the dependency list from the Allwinner entry, since
Allwinner's D1 uses T-Head cores with the same non-standard extensions.

Reported-by: Randy Dunlap <[email protected]>
Reviewed-by: Randy Dunlap <[email protected]>
Tested-by: Randy Dunlap <[email protected]> # build-tested
Link: https://lore.kernel.org/all/[email protected]/
Fixes: da47ce003963 ("riscv: Add the T-HEAD SoC family Kconfig option")
Signed-off-by: Conor Dooley <[email protected]>
---
CC: Paul Walmsley <[email protected]>
CC: Palmer Dabbelt <[email protected]>
CC: Albert Ou <[email protected]>
CC: Jisheng Zhang <[email protected]>
CC: [email protected]
CC: [email protected]
---
arch/riscv/Kconfig.socs | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index ce10a38dff37..6833d01e2e70 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -43,6 +43,7 @@ config ARCH_SUNXI

config ARCH_THEAD
bool "T-HEAD RISC-V SoCs"
+ depends on MMU && !XIP_KERNEL
select ERRATA_THEAD
help
This enables support for the RISC-V based T-HEAD SoCs.
--
2.39.2



2023-06-21 20:20:05

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v1] RISC-V: make ARCH_THEAD preclude XIP_KERNEL

On Wed, Jun 21, 2023 at 12:57:02PM -0700, Palmer Dabbelt wrote:

> Reviewed-by: Palmer Dabbelt <[email protected]>
> Acked-by: Palmer Dabbelt <[email protected]>
>
> I don't have an ARCH_THEAD, though, so not sure where this is aimed at.

I need to take it, I applied the patches.
Sorry, probably should have said it below the --- line.


Attachments:
(No filename) (353.00 B)
signature.asc (235.00 B)
Download all attachments

2023-06-21 20:27:43

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: [PATCH v1] RISC-V: make ARCH_THEAD preclude XIP_KERNEL

On Wed, 21 Jun 2023 12:00:31 PDT (-0700), Conor Dooley wrote:
> From: Conor Dooley <[email protected]>
>
> Randy reported build errors in linux-next where XIP_KERNEL was enabled.
> ARCH_THEAD requires alternatives to support the non-standard ISA
> extensions used by the THEAD cores, which are mutually exclusive with
> XIP kernels. Clone the dependency list from the Allwinner entry, since
> Allwinner's D1 uses T-Head cores with the same non-standard extensions.
>
> Reported-by: Randy Dunlap <[email protected]>
> Reviewed-by: Randy Dunlap <[email protected]>
> Tested-by: Randy Dunlap <[email protected]> # build-tested
> Link: https://lore.kernel.org/all/[email protected]/
> Fixes: da47ce003963 ("riscv: Add the T-HEAD SoC family Kconfig option")
> Signed-off-by: Conor Dooley <[email protected]>
> ---
> CC: Paul Walmsley <[email protected]>
> CC: Palmer Dabbelt <[email protected]>
> CC: Albert Ou <[email protected]>
> CC: Jisheng Zhang <[email protected]>
> CC: [email protected]
> CC: [email protected]
> ---
> arch/riscv/Kconfig.socs | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
> index ce10a38dff37..6833d01e2e70 100644
> --- a/arch/riscv/Kconfig.socs
> +++ b/arch/riscv/Kconfig.socs
> @@ -43,6 +43,7 @@ config ARCH_SUNXI
>
> config ARCH_THEAD
> bool "T-HEAD RISC-V SoCs"
> + depends on MMU && !XIP_KERNEL
> select ERRATA_THEAD
> help
> This enables support for the RISC-V based T-HEAD SoCs.

Reviewed-by: Palmer Dabbelt <[email protected]>
Acked-by: Palmer Dabbelt <[email protected]>

I don't have an ARCH_THEAD, though, so not sure where this is aimed at.

2023-06-21 23:37:53

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: [PATCH v1] RISC-V: make ARCH_THEAD preclude XIP_KERNEL

On Wed, 21 Jun 2023 13:00:38 PDT (-0700), Conor Dooley wrote:
> On Wed, Jun 21, 2023 at 12:57:02PM -0700, Palmer Dabbelt wrote:
>
>> Reviewed-by: Palmer Dabbelt <[email protected]>
>> Acked-by: Palmer Dabbelt <[email protected]>
>>
>> I don't have an ARCH_THEAD, though, so not sure where this is aimed at.
>
> I need to take it, I applied the patches.
> Sorry, probably should have said it below the --- line.

No problem, I figured they were over there somewhere -- just kind of
hard to keep track with how much is in flight right now ;)

2023-06-22 16:32:32

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v1] RISC-V: make ARCH_THEAD preclude XIP_KERNEL

From: Conor Dooley <[email protected]>

On Wed, 21 Jun 2023 20:00:31 +0100, Conor Dooley wrote:
> Randy reported build errors in linux-next where XIP_KERNEL was enabled.
> ARCH_THEAD requires alternatives to support the non-standard ISA
> extensions used by the THEAD cores, which are mutually exclusive with
> XIP kernels. Clone the dependency list from the Allwinner entry, since
> Allwinner's D1 uses T-Head cores with the same non-standard extensions.
>
>
> [...]

Applied to riscv-dt-for-next, thanks!

[1/1] RISC-V: make ARCH_THEAD preclude XIP_KERNEL
https://git.kernel.org/conor/c/273235194e4d

Thanks,
Conor.