All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3]  Add RISC-V 32 NOMMU support
@ 2023-03-01  0:26 ` Jesse Taube
  0 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-01  0:26 UTC (permalink / raw)
  To: linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley

This patch-set aims to add NOMMU support to RV32.
Many people want to build simple emulators or HDL
models of RISC-V this patch makes it possible to
run linux on them.

Yimin Gu is the original author of this set.
Submitted here:
https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html

Though Jesse T rewrote the Dconf.

The new set:
https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
---
V1->V2:
 - Add Conor's clock patch for implicit div64
 - Fix typo in commit title 3/3
 - Fix typo in commit description 2/3
V2->V3
 - Change from defconfig file to a PHONY config
---

Conor Dooley (1):
  clk: k210: remove an implicit 64-bit division

Jesse Taube (1):
  riscv: configs: Add nommu PHONY defconfig for RV32

Yimin Gu (1):
  riscv: Kconfig: Allow RV32 to build with no MMU

 arch/riscv/Kconfig     | 5 ++---
 arch/riscv/Makefile    | 4 ++++
 drivers/clk/clk-k210.c | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

-- 
2.39.0


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

* [PATCH v3 0/3]  Add RISC-V 32 NOMMU support
@ 2023-03-01  0:26 ` Jesse Taube
  0 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-01  0:26 UTC (permalink / raw)
  To: linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley

This patch-set aims to add NOMMU support to RV32.
Many people want to build simple emulators or HDL
models of RISC-V this patch makes it possible to
run linux on them.

Yimin Gu is the original author of this set.
Submitted here:
https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html

Though Jesse T rewrote the Dconf.

The new set:
https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
---
V1->V2:
 - Add Conor's clock patch for implicit div64
 - Fix typo in commit title 3/3
 - Fix typo in commit description 2/3
V2->V3
 - Change from defconfig file to a PHONY config
---

Conor Dooley (1):
  clk: k210: remove an implicit 64-bit division

Jesse Taube (1):
  riscv: configs: Add nommu PHONY defconfig for RV32

Yimin Gu (1):
  riscv: Kconfig: Allow RV32 to build with no MMU

 arch/riscv/Kconfig     | 5 ++---
 arch/riscv/Makefile    | 4 ++++
 drivers/clk/clk-k210.c | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

-- 
2.39.0


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

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

* [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
  2023-03-01  0:26 ` Jesse Taube
@ 2023-03-01  0:26   ` Jesse Taube
  -1 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-01  0:26 UTC (permalink / raw)
  To: linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley, Conor Dooley, kernel test robot

From: Conor Dooley <conor.dooley@microchip.com>

The K210 clock driver depends on SOC_CANAAN, which is only selectable
when !MMU on RISC-V. !MMU is not possible on 32-bit yet, but patches
have been sent for its enabling. The kernel test robot reported this
implicit 64-bit division there.

Replace the implicit division with an explicit one.

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/linux-riscv/202301201538.zNlqgE4L-lkp@intel.com/
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
---
V1->V2:
 - new commit
V2->V3:
 - No change
---
 drivers/clk/clk-k210.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-k210.c b/drivers/clk/clk-k210.c
index 67a7cb3503c3..4eed667eddaf 100644
--- a/drivers/clk/clk-k210.c
+++ b/drivers/clk/clk-k210.c
@@ -495,7 +495,7 @@ static unsigned long k210_pll_get_rate(struct clk_hw *hw,
 	f = FIELD_GET(K210_PLL_CLKF, reg) + 1;
 	od = FIELD_GET(K210_PLL_CLKOD, reg) + 1;
 
-	return (u64)parent_rate * f / (r * od);
+	return div_u64((u64)parent_rate * f, r * od);
 }
 
 static const struct clk_ops k210_pll_ops = {
-- 
2.39.0


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

* [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
@ 2023-03-01  0:26   ` Jesse Taube
  0 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-01  0:26 UTC (permalink / raw)
  To: linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley, Conor Dooley, kernel test robot

From: Conor Dooley <conor.dooley@microchip.com>

The K210 clock driver depends on SOC_CANAAN, which is only selectable
when !MMU on RISC-V. !MMU is not possible on 32-bit yet, but patches
have been sent for its enabling. The kernel test robot reported this
implicit 64-bit division there.

Replace the implicit division with an explicit one.

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/linux-riscv/202301201538.zNlqgE4L-lkp@intel.com/
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
---
V1->V2:
 - new commit
V2->V3:
 - No change
---
 drivers/clk/clk-k210.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-k210.c b/drivers/clk/clk-k210.c
index 67a7cb3503c3..4eed667eddaf 100644
--- a/drivers/clk/clk-k210.c
+++ b/drivers/clk/clk-k210.c
@@ -495,7 +495,7 @@ static unsigned long k210_pll_get_rate(struct clk_hw *hw,
 	f = FIELD_GET(K210_PLL_CLKF, reg) + 1;
 	od = FIELD_GET(K210_PLL_CLKOD, reg) + 1;
 
-	return (u64)parent_rate * f / (r * od);
+	return div_u64((u64)parent_rate * f, r * od);
 }
 
 static const struct clk_ops k210_pll_ops = {
-- 
2.39.0


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

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

* [PATCH v3 2/3] riscv: Kconfig: Allow RV32 to build with no MMU
  2023-03-01  0:26 ` Jesse Taube
@ 2023-03-01  0:26   ` Jesse Taube
  -1 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-01  0:26 UTC (permalink / raw)
  To: linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley

From: Yimin Gu <ustcymgu@gmail.com>

Some RISC-V 32bit cores do not have an MMU, and the kernel should be
able to build for them. This patch enables the RV32 to be built with
no MMU support.

Signed-off-by: Yimin Gu <ustcymgu@gmail.com>
CC: Jesse Taube <Mr.Bossman075@gmail.com>
Tested-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
---
V1->V2:
 - Fix typo in commit description
V2->V3:
 - No change
---
 arch/riscv/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index c5e42cc37604..d1f661425790 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -177,8 +177,8 @@ config MMU
 
 config PAGE_OFFSET
 	hex
-	default 0xC0000000 if 32BIT
-	default 0x80000000 if 64BIT && !MMU
+	default 0xC0000000 if 32BIT && MMU
+	default 0x80000000 if !MMU
 	default 0xff60000000000000 if 64BIT
 
 config KASAN_SHADOW_OFFSET
@@ -279,7 +279,6 @@ config ARCH_RV32I
 	select GENERIC_LIB_ASHRDI3
 	select GENERIC_LIB_LSHRDI3
 	select GENERIC_LIB_UCMPDI2
-	select MMU
 
 config ARCH_RV64I
 	bool "RV64I"
-- 
2.39.0


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

* [PATCH v3 2/3] riscv: Kconfig: Allow RV32 to build with no MMU
@ 2023-03-01  0:26   ` Jesse Taube
  0 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-01  0:26 UTC (permalink / raw)
  To: linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley

From: Yimin Gu <ustcymgu@gmail.com>

Some RISC-V 32bit cores do not have an MMU, and the kernel should be
able to build for them. This patch enables the RV32 to be built with
no MMU support.

Signed-off-by: Yimin Gu <ustcymgu@gmail.com>
CC: Jesse Taube <Mr.Bossman075@gmail.com>
Tested-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
---
V1->V2:
 - Fix typo in commit description
V2->V3:
 - No change
---
 arch/riscv/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index c5e42cc37604..d1f661425790 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -177,8 +177,8 @@ config MMU
 
 config PAGE_OFFSET
 	hex
-	default 0xC0000000 if 32BIT
-	default 0x80000000 if 64BIT && !MMU
+	default 0xC0000000 if 32BIT && MMU
+	default 0x80000000 if !MMU
 	default 0xff60000000000000 if 64BIT
 
 config KASAN_SHADOW_OFFSET
@@ -279,7 +279,6 @@ config ARCH_RV32I
 	select GENERIC_LIB_ASHRDI3
 	select GENERIC_LIB_LSHRDI3
 	select GENERIC_LIB_UCMPDI2
-	select MMU
 
 config ARCH_RV64I
 	bool "RV64I"
-- 
2.39.0


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

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

* [PATCH v3 3/3] riscv: configs: Add nommu PHONY defconfig for RV32
  2023-03-01  0:26 ` Jesse Taube
@ 2023-03-01  0:26   ` Jesse Taube
  -1 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-01  0:26 UTC (permalink / raw)
  To: linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley, Conor Dooley

32bit risc-v can be configured to run without MMU. Introduce
rv32_nommu_virt_defconfig .PHONY target, that is based on
nommu_virt_defconfig. This is similar to how rv32_defconfig
is based on "defconfig".

Suggested-by: Conor Dooley <conor@kernel.org>
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
Cc: Yimin Gu <ustcymgu@gmail.com>
---
V1->V2:
 - Fix typo in commit title
V2->V3:
 - Change from defconfig file to a PHONY config
---
 arch/riscv/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 6203c3378922..1b276f62f22b 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -174,3 +174,7 @@ rv64_randconfig:
 PHONY += rv32_defconfig
 rv32_defconfig:
 	$(Q)$(MAKE) -f $(srctree)/Makefile defconfig 32-bit.config
+
+PHONY += rv32_nommu_virt_defconfig
+rv32_nommu_virt_defconfig:
+	$(Q)$(MAKE) -f $(srctree)/Makefile nommu_virt_defconfig 32-bit.config
-- 
2.39.0


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

* [PATCH v3 3/3] riscv: configs: Add nommu PHONY defconfig for RV32
@ 2023-03-01  0:26   ` Jesse Taube
  0 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-01  0:26 UTC (permalink / raw)
  To: linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley, Conor Dooley

32bit risc-v can be configured to run without MMU. Introduce
rv32_nommu_virt_defconfig .PHONY target, that is based on
nommu_virt_defconfig. This is similar to how rv32_defconfig
is based on "defconfig".

Suggested-by: Conor Dooley <conor@kernel.org>
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
Cc: Yimin Gu <ustcymgu@gmail.com>
---
V1->V2:
 - Fix typo in commit title
V2->V3:
 - Change from defconfig file to a PHONY config
---
 arch/riscv/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 6203c3378922..1b276f62f22b 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -174,3 +174,7 @@ rv64_randconfig:
 PHONY += rv32_defconfig
 rv32_defconfig:
 	$(Q)$(MAKE) -f $(srctree)/Makefile defconfig 32-bit.config
+
+PHONY += rv32_nommu_virt_defconfig
+rv32_nommu_virt_defconfig:
+	$(Q)$(MAKE) -f $(srctree)/Makefile nommu_virt_defconfig 32-bit.config
-- 
2.39.0


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

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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
  2023-03-01  0:26   ` Jesse Taube
@ 2023-03-01  1:19     ` Damien Le Moal
  -1 siblings, 0 replies; 56+ messages in thread
From: Damien Le Moal @ 2023-03-01  1:19 UTC (permalink / raw)
  To: Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley, Conor Dooley, kernel test robot

On 3/1/23 09:26, Jesse Taube wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> The K210 clock driver depends on SOC_CANAAN, which is only selectable
> when !MMU on RISC-V. !MMU is not possible on 32-bit yet, but patches
> have been sent for its enabling. The kernel test robot reported this
> implicit 64-bit division there.
> 
> Replace the implicit division with an explicit one.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/linux-riscv/202301201538.zNlqgE4L-lkp@intel.com/
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>

Looks OK to me.

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>


-- 
Damien Le Moal
Western Digital Research


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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
@ 2023-03-01  1:19     ` Damien Le Moal
  0 siblings, 0 replies; 56+ messages in thread
From: Damien Le Moal @ 2023-03-01  1:19 UTC (permalink / raw)
  To: Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley, Conor Dooley, kernel test robot

On 3/1/23 09:26, Jesse Taube wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> The K210 clock driver depends on SOC_CANAAN, which is only selectable
> when !MMU on RISC-V. !MMU is not possible on 32-bit yet, but patches
> have been sent for its enabling. The kernel test robot reported this
> implicit 64-bit division there.
> 
> Replace the implicit division with an explicit one.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/linux-riscv/202301201538.zNlqgE4L-lkp@intel.com/
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>

Looks OK to me.

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>


-- 
Damien Le Moal
Western Digital Research


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

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

* Re: [PATCH v3 2/3] riscv: Kconfig: Allow RV32 to build with no MMU
  2023-03-01  0:26   ` Jesse Taube
@ 2023-03-01  1:22     ` Damien Le Moal
  -1 siblings, 0 replies; 56+ messages in thread
From: Damien Le Moal @ 2023-03-01  1:22 UTC (permalink / raw)
  To: Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

On 3/1/23 09:26, Jesse Taube wrote:
> From: Yimin Gu <ustcymgu@gmail.com>
> 
> Some RISC-V 32bit cores do not have an MMU, and the kernel should be
> able to build for them. This patch enables the RV32 to be built with
> no MMU support.
> 
> Signed-off-by: Yimin Gu <ustcymgu@gmail.com>
> CC: Jesse Taube <Mr.Bossman075@gmail.com>
> Tested-by: Waldemar Brodkorb <wbx@openadk.org>
> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>

Looks OK.

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

-- 
Damien Le Moal
Western Digital Research


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

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

* Re: [PATCH v3 2/3] riscv: Kconfig: Allow RV32 to build with no MMU
@ 2023-03-01  1:22     ` Damien Le Moal
  0 siblings, 0 replies; 56+ messages in thread
From: Damien Le Moal @ 2023-03-01  1:22 UTC (permalink / raw)
  To: Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

On 3/1/23 09:26, Jesse Taube wrote:
> From: Yimin Gu <ustcymgu@gmail.com>
> 
> Some RISC-V 32bit cores do not have an MMU, and the kernel should be
> able to build for them. This patch enables the RV32 to be built with
> no MMU support.
> 
> Signed-off-by: Yimin Gu <ustcymgu@gmail.com>
> CC: Jesse Taube <Mr.Bossman075@gmail.com>
> Tested-by: Waldemar Brodkorb <wbx@openadk.org>
> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>

Looks OK.

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

-- 
Damien Le Moal
Western Digital Research


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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-01  0:26 ` Jesse Taube
@ 2023-03-01  4:07   ` Randy Dunlap
  -1 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-01  4:07 UTC (permalink / raw)
  To: Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

Hi--

On 2/28/23 16:26, Jesse Taube wrote:
> This patch-set aims to add NOMMU support to RV32.
> Many people want to build simple emulators or HDL
> models of RISC-V this patch makes it possible to
> run linux on them.
> 
> Yimin Gu is the original author of this set.
> Submitted here:
> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
> 
> Though Jesse T rewrote the Dconf.

Dconf?

> 
> The new set:
> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
> ---
> V1->V2:
>  - Add Conor's clock patch for implicit div64
>  - Fix typo in commit title 3/3
>  - Fix typo in commit description 2/3
> V2->V3
>  - Change from defconfig file to a PHONY config
> ---

Is this 'rv32_nommu_virt_defconfig' target the only build target
that is supported?

I ask because I applied the 3 patches and did 25 randconfig builds.
5 of them failed the same way:

riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'

because
# CONFIG_COMMON_CLK_K210 is not set


Maybe SOC_CANAAN needs some more selects for required code?

> Conor Dooley (1):
>   clk: k210: remove an implicit 64-bit division
> 
> Jesse Taube (1):
>   riscv: configs: Add nommu PHONY defconfig for RV32
> 
> Yimin Gu (1):
>   riscv: Kconfig: Allow RV32 to build with no MMU
> 
>  arch/riscv/Kconfig     | 5 ++---
>  arch/riscv/Makefile    | 4 ++++
>  drivers/clk/clk-k210.c | 2 +-
>  3 files changed, 7 insertions(+), 4 deletions(-)
> 

-- 
~Randy

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-01  4:07   ` Randy Dunlap
  0 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-01  4:07 UTC (permalink / raw)
  To: Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

Hi--

On 2/28/23 16:26, Jesse Taube wrote:
> This patch-set aims to add NOMMU support to RV32.
> Many people want to build simple emulators or HDL
> models of RISC-V this patch makes it possible to
> run linux on them.
> 
> Yimin Gu is the original author of this set.
> Submitted here:
> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
> 
> Though Jesse T rewrote the Dconf.

Dconf?

> 
> The new set:
> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
> ---
> V1->V2:
>  - Add Conor's clock patch for implicit div64
>  - Fix typo in commit title 3/3
>  - Fix typo in commit description 2/3
> V2->V3
>  - Change from defconfig file to a PHONY config
> ---

Is this 'rv32_nommu_virt_defconfig' target the only build target
that is supported?

I ask because I applied the 3 patches and did 25 randconfig builds.
5 of them failed the same way:

riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'

because
# CONFIG_COMMON_CLK_K210 is not set


Maybe SOC_CANAAN needs some more selects for required code?

> Conor Dooley (1):
>   clk: k210: remove an implicit 64-bit division
> 
> Jesse Taube (1):
>   riscv: configs: Add nommu PHONY defconfig for RV32
> 
> Yimin Gu (1):
>   riscv: Kconfig: Allow RV32 to build with no MMU
> 
>  arch/riscv/Kconfig     | 5 ++---
>  arch/riscv/Makefile    | 4 ++++
>  drivers/clk/clk-k210.c | 2 +-
>  3 files changed, 7 insertions(+), 4 deletions(-)
> 

-- 
~Randy

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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-01  4:07   ` Randy Dunlap
@ 2023-03-01  4:42     ` Damien Le Moal
  -1 siblings, 0 replies; 56+ messages in thread
From: Damien Le Moal @ 2023-03-01  4:42 UTC (permalink / raw)
  To: Randy Dunlap, Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

On 3/1/23 13:07, Randy Dunlap wrote:
> Hi--
> 
> On 2/28/23 16:26, Jesse Taube wrote:
>> This patch-set aims to add NOMMU support to RV32.
>> Many people want to build simple emulators or HDL
>> models of RISC-V this patch makes it possible to
>> run linux on them.
>>
>> Yimin Gu is the original author of this set.
>> Submitted here:
>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>
>> Though Jesse T rewrote the Dconf.
> 
> Dconf?
> 
>>
>> The new set:
>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>> ---
>> V1->V2:
>>  - Add Conor's clock patch for implicit div64
>>  - Fix typo in commit title 3/3
>>  - Fix typo in commit description 2/3
>> V2->V3
>>  - Change from defconfig file to a PHONY config
>> ---
> 
> Is this 'rv32_nommu_virt_defconfig' target the only build target
> that is supported?
> 
> I ask because I applied the 3 patches and did 25 randconfig builds.
> 5 of them failed the same way:
> 
> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'

Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
compile test with rv32 (or any arch), that driver provides the
k210_clk_early_init() function which is called very early in the boot process
from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
problem may be there. Probably should be disabled for rv32 if no SoC need that
sort of early init call.

> 
> because
> # CONFIG_COMMON_CLK_K210 is not set
> 
> 
> Maybe SOC_CANAAN needs some more selects for required code?
> 
>> Conor Dooley (1):
>>   clk: k210: remove an implicit 64-bit division
>>
>> Jesse Taube (1):
>>   riscv: configs: Add nommu PHONY defconfig for RV32
>>
>> Yimin Gu (1):
>>   riscv: Kconfig: Allow RV32 to build with no MMU
>>
>>  arch/riscv/Kconfig     | 5 ++---
>>  arch/riscv/Makefile    | 4 ++++
>>  drivers/clk/clk-k210.c | 2 +-
>>  3 files changed, 7 insertions(+), 4 deletions(-)
>>
> 

-- 
Damien Le Moal
Western Digital Research


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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-01  4:42     ` Damien Le Moal
  0 siblings, 0 replies; 56+ messages in thread
From: Damien Le Moal @ 2023-03-01  4:42 UTC (permalink / raw)
  To: Randy Dunlap, Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

On 3/1/23 13:07, Randy Dunlap wrote:
> Hi--
> 
> On 2/28/23 16:26, Jesse Taube wrote:
>> This patch-set aims to add NOMMU support to RV32.
>> Many people want to build simple emulators or HDL
>> models of RISC-V this patch makes it possible to
>> run linux on them.
>>
>> Yimin Gu is the original author of this set.
>> Submitted here:
>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>
>> Though Jesse T rewrote the Dconf.
> 
> Dconf?
> 
>>
>> The new set:
>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>> ---
>> V1->V2:
>>  - Add Conor's clock patch for implicit div64
>>  - Fix typo in commit title 3/3
>>  - Fix typo in commit description 2/3
>> V2->V3
>>  - Change from defconfig file to a PHONY config
>> ---
> 
> Is this 'rv32_nommu_virt_defconfig' target the only build target
> that is supported?
> 
> I ask because I applied the 3 patches and did 25 randconfig builds.
> 5 of them failed the same way:
> 
> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'

Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
compile test with rv32 (or any arch), that driver provides the
k210_clk_early_init() function which is called very early in the boot process
from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
problem may be there. Probably should be disabled for rv32 if no SoC need that
sort of early init call.

> 
> because
> # CONFIG_COMMON_CLK_K210 is not set
> 
> 
> Maybe SOC_CANAAN needs some more selects for required code?
> 
>> Conor Dooley (1):
>>   clk: k210: remove an implicit 64-bit division
>>
>> Jesse Taube (1):
>>   riscv: configs: Add nommu PHONY defconfig for RV32
>>
>> Yimin Gu (1):
>>   riscv: Kconfig: Allow RV32 to build with no MMU
>>
>>  arch/riscv/Kconfig     | 5 ++---
>>  arch/riscv/Makefile    | 4 ++++
>>  drivers/clk/clk-k210.c | 2 +-
>>  3 files changed, 7 insertions(+), 4 deletions(-)
>>
> 

-- 
Damien Le Moal
Western Digital Research


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

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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
  2023-03-01  0:26   ` Jesse Taube
@ 2023-03-06 22:31     ` Stephen Boyd
  -1 siblings, 0 replies; 56+ messages in thread
From: Stephen Boyd @ 2023-03-06 22:31 UTC (permalink / raw)
  To: Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley, Conor Dooley, kernel test robot

Quoting Jesse Taube (2023-02-28 16:26:55)
> diff --git a/drivers/clk/clk-k210.c b/drivers/clk/clk-k210.c
> index 67a7cb3503c3..4eed667eddaf 100644
> --- a/drivers/clk/clk-k210.c
> +++ b/drivers/clk/clk-k210.c
> @@ -495,7 +495,7 @@ static unsigned long k210_pll_get_rate(struct clk_hw *hw,
>         f = FIELD_GET(K210_PLL_CLKF, reg) + 1;
>         od = FIELD_GET(K210_PLL_CLKOD, reg) + 1;
>  
> -       return (u64)parent_rate * f / (r * od);
> +       return div_u64((u64)parent_rate * f, r * od);

The equation 'r * od' can't overflow 32-bits, right?

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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
@ 2023-03-06 22:31     ` Stephen Boyd
  0 siblings, 0 replies; 56+ messages in thread
From: Stephen Boyd @ 2023-03-06 22:31 UTC (permalink / raw)
  To: Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley, Conor Dooley, kernel test robot

Quoting Jesse Taube (2023-02-28 16:26:55)
> diff --git a/drivers/clk/clk-k210.c b/drivers/clk/clk-k210.c
> index 67a7cb3503c3..4eed667eddaf 100644
> --- a/drivers/clk/clk-k210.c
> +++ b/drivers/clk/clk-k210.c
> @@ -495,7 +495,7 @@ static unsigned long k210_pll_get_rate(struct clk_hw *hw,
>         f = FIELD_GET(K210_PLL_CLKF, reg) + 1;
>         od = FIELD_GET(K210_PLL_CLKOD, reg) + 1;
>  
> -       return (u64)parent_rate * f / (r * od);
> +       return div_u64((u64)parent_rate * f, r * od);

The equation 'r * od' can't overflow 32-bits, right?

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

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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
  2023-03-06 22:31     ` Stephen Boyd
@ 2023-03-06 22:35       ` Conor Dooley
  -1 siblings, 0 replies; 56+ messages in thread
From: Conor Dooley @ 2023-03-06 22:35 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Jesse Taube, linux-riscv, linux-clk, linux-kernel, Yimin Gu,
	Damien Le Moal, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley, Conor Dooley, kernel test robot

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

On Mon, Mar 06, 2023 at 02:31:00PM -0800, Stephen Boyd wrote:
> Quoting Jesse Taube (2023-02-28 16:26:55)
> > diff --git a/drivers/clk/clk-k210.c b/drivers/clk/clk-k210.c
> > index 67a7cb3503c3..4eed667eddaf 100644
> > --- a/drivers/clk/clk-k210.c
> > +++ b/drivers/clk/clk-k210.c
> > @@ -495,7 +495,7 @@ static unsigned long k210_pll_get_rate(struct clk_hw *hw,
> >         f = FIELD_GET(K210_PLL_CLKF, reg) + 1;
> >         od = FIELD_GET(K210_PLL_CLKOD, reg) + 1;
> >  
> > -       return (u64)parent_rate * f / (r * od);
> > +       return div_u64((u64)parent_rate * f, r * od);
> 
> The equation 'r * od' can't overflow 32-bits, right?

Yah, I checked that when writing the patch. They're 4-bit fields:
> /*
>  * PLL control register bits.
>  */
> #define K210_PLL_CLKR		GENMASK(3, 0)
> #define K210_PLL_CLKF		GENMASK(9, 4)
> #define K210_PLL_CLKOD		GENMASK(13, 10)

Cheers,
Conor.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
@ 2023-03-06 22:35       ` Conor Dooley
  0 siblings, 0 replies; 56+ messages in thread
From: Conor Dooley @ 2023-03-06 22:35 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Jesse Taube, linux-riscv, linux-clk, linux-kernel, Yimin Gu,
	Damien Le Moal, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley, Conor Dooley, kernel test robot


[-- Attachment #1.1: Type: text/plain, Size: 914 bytes --]

On Mon, Mar 06, 2023 at 02:31:00PM -0800, Stephen Boyd wrote:
> Quoting Jesse Taube (2023-02-28 16:26:55)
> > diff --git a/drivers/clk/clk-k210.c b/drivers/clk/clk-k210.c
> > index 67a7cb3503c3..4eed667eddaf 100644
> > --- a/drivers/clk/clk-k210.c
> > +++ b/drivers/clk/clk-k210.c
> > @@ -495,7 +495,7 @@ static unsigned long k210_pll_get_rate(struct clk_hw *hw,
> >         f = FIELD_GET(K210_PLL_CLKF, reg) + 1;
> >         od = FIELD_GET(K210_PLL_CLKOD, reg) + 1;
> >  
> > -       return (u64)parent_rate * f / (r * od);
> > +       return div_u64((u64)parent_rate * f, r * od);
> 
> The equation 'r * od' can't overflow 32-bits, right?

Yah, I checked that when writing the patch. They're 4-bit fields:
> /*
>  * PLL control register bits.
>  */
> #define K210_PLL_CLKR		GENMASK(3, 0)
> #define K210_PLL_CLKF		GENMASK(9, 4)
> #define K210_PLL_CLKOD		GENMASK(13, 10)

Cheers,
Conor.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

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

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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
  2023-03-06 22:35       ` Conor Dooley
@ 2023-03-06 22:37         ` Stephen Boyd
  -1 siblings, 0 replies; 56+ messages in thread
From: Stephen Boyd @ 2023-03-06 22:37 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Jesse Taube, linux-riscv, linux-clk, linux-kernel, Yimin Gu,
	Damien Le Moal, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley, Conor Dooley, kernel test robot

Quoting Conor Dooley (2023-03-06 14:35:01)
> On Mon, Mar 06, 2023 at 02:31:00PM -0800, Stephen Boyd wrote:
> > Quoting Jesse Taube (2023-02-28 16:26:55)
> > > diff --git a/drivers/clk/clk-k210.c b/drivers/clk/clk-k210.c
> > > index 67a7cb3503c3..4eed667eddaf 100644
> > > --- a/drivers/clk/clk-k210.c
> > > +++ b/drivers/clk/clk-k210.c
> > > @@ -495,7 +495,7 @@ static unsigned long k210_pll_get_rate(struct clk_hw *hw,
> > >         f = FIELD_GET(K210_PLL_CLKF, reg) + 1;
> > >         od = FIELD_GET(K210_PLL_CLKOD, reg) + 1;
> > >  
> > > -       return (u64)parent_rate * f / (r * od);
> > > +       return div_u64((u64)parent_rate * f, r * od);
> > 
> > The equation 'r * od' can't overflow 32-bits, right?
> 
> Yah, I checked that when writing the patch. They're 4-bit fields:

Awesome

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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
@ 2023-03-06 22:37         ` Stephen Boyd
  0 siblings, 0 replies; 56+ messages in thread
From: Stephen Boyd @ 2023-03-06 22:37 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Jesse Taube, linux-riscv, linux-clk, linux-kernel, Yimin Gu,
	Damien Le Moal, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley, Conor Dooley, kernel test robot

Quoting Conor Dooley (2023-03-06 14:35:01)
> On Mon, Mar 06, 2023 at 02:31:00PM -0800, Stephen Boyd wrote:
> > Quoting Jesse Taube (2023-02-28 16:26:55)
> > > diff --git a/drivers/clk/clk-k210.c b/drivers/clk/clk-k210.c
> > > index 67a7cb3503c3..4eed667eddaf 100644
> > > --- a/drivers/clk/clk-k210.c
> > > +++ b/drivers/clk/clk-k210.c
> > > @@ -495,7 +495,7 @@ static unsigned long k210_pll_get_rate(struct clk_hw *hw,
> > >         f = FIELD_GET(K210_PLL_CLKF, reg) + 1;
> > >         od = FIELD_GET(K210_PLL_CLKOD, reg) + 1;
> > >  
> > > -       return (u64)parent_rate * f / (r * od);
> > > +       return div_u64((u64)parent_rate * f, r * od);
> > 
> > The equation 'r * od' can't overflow 32-bits, right?
> 
> Yah, I checked that when writing the patch. They're 4-bit fields:

Awesome

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

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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
  2023-03-01  0:26   ` Jesse Taube
@ 2023-03-06 22:41     ` Stephen Boyd
  -1 siblings, 0 replies; 56+ messages in thread
From: Stephen Boyd @ 2023-03-06 22:41 UTC (permalink / raw)
  To: Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley, Conor Dooley, kernel test robot

Quoting Jesse Taube (2023-02-28 16:26:55)
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> The K210 clock driver depends on SOC_CANAAN, which is only selectable
> when !MMU on RISC-V. !MMU is not possible on 32-bit yet, but patches
> have been sent for its enabling. The kernel test robot reported this
> implicit 64-bit division there.
> 
> Replace the implicit division with an explicit one.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/linux-riscv/202301201538.zNlqgE4L-lkp@intel.com/
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> ---

Seems better to merge this one-liner earlier to unblock 32-bit.

Applied to clk-fixes

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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
@ 2023-03-06 22:41     ` Stephen Boyd
  0 siblings, 0 replies; 56+ messages in thread
From: Stephen Boyd @ 2023-03-06 22:41 UTC (permalink / raw)
  To: Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley, Conor Dooley, kernel test robot

Quoting Jesse Taube (2023-02-28 16:26:55)
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> The K210 clock driver depends on SOC_CANAAN, which is only selectable
> when !MMU on RISC-V. !MMU is not possible on 32-bit yet, but patches
> have been sent for its enabling. The kernel test robot reported this
> implicit 64-bit division there.
> 
> Replace the implicit division with an explicit one.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/linux-riscv/202301201538.zNlqgE4L-lkp@intel.com/
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> ---

Seems better to merge this one-liner earlier to unblock 32-bit.

Applied to clk-fixes

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

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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
  2023-03-06 22:41     ` Stephen Boyd
@ 2023-03-06 22:48       ` Palmer Dabbelt
  -1 siblings, 0 replies; 56+ messages in thread
From: Palmer Dabbelt @ 2023-03-06 22:48 UTC (permalink / raw)
  To: sboyd
  Cc: mr.bossman075, linux-riscv, linux-clk, linux-kernel,
	Mr.Bossman075, ustcymgu, damien.lemoal, mturquette, wbx, aou,
	Paul Walmsley, Conor Dooley, lkp

On Mon, 06 Mar 2023 14:41:11 PST (-0800), sboyd@kernel.org wrote:
> Quoting Jesse Taube (2023-02-28 16:26:55)
>> From: Conor Dooley <conor.dooley@microchip.com>
>> 
>> The K210 clock driver depends on SOC_CANAAN, which is only selectable
>> when !MMU on RISC-V. !MMU is not possible on 32-bit yet, but patches
>> have been sent for its enabling. The kernel test robot reported this
>> implicit 64-bit division there.
>> 
>> Replace the implicit division with an explicit one.
>> 
>> Reported-by: kernel test robot <lkp@intel.com>
>> Link: https://lore.kernel.org/linux-riscv/202301201538.zNlqgE4L-lkp@intel.com/
>> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
>> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
>> ---
>
> Seems better to merge this one-liner earlier to unblock 32-bit.
>
> Applied to clk-fixes

Thanks!

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

* Re: [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division
@ 2023-03-06 22:48       ` Palmer Dabbelt
  0 siblings, 0 replies; 56+ messages in thread
From: Palmer Dabbelt @ 2023-03-06 22:48 UTC (permalink / raw)
  To: sboyd
  Cc: mr.bossman075, linux-riscv, linux-clk, linux-kernel,
	Mr.Bossman075, ustcymgu, damien.lemoal, mturquette, wbx, aou,
	Paul Walmsley, Conor Dooley, lkp

On Mon, 06 Mar 2023 14:41:11 PST (-0800), sboyd@kernel.org wrote:
> Quoting Jesse Taube (2023-02-28 16:26:55)
>> From: Conor Dooley <conor.dooley@microchip.com>
>> 
>> The K210 clock driver depends on SOC_CANAAN, which is only selectable
>> when !MMU on RISC-V. !MMU is not possible on 32-bit yet, but patches
>> have been sent for its enabling. The kernel test robot reported this
>> implicit 64-bit division there.
>> 
>> Replace the implicit division with an explicit one.
>> 
>> Reported-by: kernel test robot <lkp@intel.com>
>> Link: https://lore.kernel.org/linux-riscv/202301201538.zNlqgE4L-lkp@intel.com/
>> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
>> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
>> ---
>
> Seems better to merge this one-liner earlier to unblock 32-bit.
>
> Applied to clk-fixes

Thanks!

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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-01  4:42     ` Damien Le Moal
@ 2023-03-08  1:26       ` Jesse Taube
  -1 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-08  1:26 UTC (permalink / raw)
  To: Damien Le Moal, Randy Dunlap, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 2/28/23 23:42, Damien Le Moal wrote:
> On 3/1/23 13:07, Randy Dunlap wrote:
>> Hi--
>>
>> On 2/28/23 16:26, Jesse Taube wrote:
>>> This patch-set aims to add NOMMU support to RV32.
>>> Many people want to build simple emulators or HDL
>>> models of RISC-V this patch makes it possible to
>>> run linux on them.
>>>
>>> Yimin Gu is the original author of this set.
>>> Submitted here:
>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>
>>> Though Jesse T rewrote the Dconf.
>>
>> Dconf?
>>
>>>
>>> The new set:
>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>> ---
>>> V1->V2:
>>>   - Add Conor's clock patch for implicit div64
>>>   - Fix typo in commit title 3/3
>>>   - Fix typo in commit description 2/3
>>> V2->V3
>>>   - Change from defconfig file to a PHONY config
>>> ---
>>
>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>> that is supported?
>>
>> I ask because I applied the 3 patches and did 25 randconfig builds.
>> 5 of them failed the same way:
>>
>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
I can not recreate this error.
can you send me the .config you used.

Thanks,
Jesse Taube
> 
> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
> compile test with rv32 (or any arch), that driver provides the
> k210_clk_early_init() function which is called very early in the boot process
> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
> problem may be there. Probably should be disabled for rv32 if no SoC need that
> sort of early init call.
> 
>>
>> because
>> # CONFIG_COMMON_CLK_K210 is not set
>>
>>
>> Maybe SOC_CANAAN needs some more selects for required code?
>>
>>> Conor Dooley (1):
>>>    clk: k210: remove an implicit 64-bit division
>>>
>>> Jesse Taube (1):
>>>    riscv: configs: Add nommu PHONY defconfig for RV32
>>>
>>> Yimin Gu (1):
>>>    riscv: Kconfig: Allow RV32 to build with no MMU
>>>
>>>   arch/riscv/Kconfig     | 5 ++---
>>>   arch/riscv/Makefile    | 4 ++++
>>>   drivers/clk/clk-k210.c | 2 +-
>>>   3 files changed, 7 insertions(+), 4 deletions(-)
>>>
>>
> 

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-08  1:26       ` Jesse Taube
  0 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-08  1:26 UTC (permalink / raw)
  To: Damien Le Moal, Randy Dunlap, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 2/28/23 23:42, Damien Le Moal wrote:
> On 3/1/23 13:07, Randy Dunlap wrote:
>> Hi--
>>
>> On 2/28/23 16:26, Jesse Taube wrote:
>>> This patch-set aims to add NOMMU support to RV32.
>>> Many people want to build simple emulators or HDL
>>> models of RISC-V this patch makes it possible to
>>> run linux on them.
>>>
>>> Yimin Gu is the original author of this set.
>>> Submitted here:
>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>
>>> Though Jesse T rewrote the Dconf.
>>
>> Dconf?
>>
>>>
>>> The new set:
>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>> ---
>>> V1->V2:
>>>   - Add Conor's clock patch for implicit div64
>>>   - Fix typo in commit title 3/3
>>>   - Fix typo in commit description 2/3
>>> V2->V3
>>>   - Change from defconfig file to a PHONY config
>>> ---
>>
>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>> that is supported?
>>
>> I ask because I applied the 3 patches and did 25 randconfig builds.
>> 5 of them failed the same way:
>>
>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
I can not recreate this error.
can you send me the .config you used.

Thanks,
Jesse Taube
> 
> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
> compile test with rv32 (or any arch), that driver provides the
> k210_clk_early_init() function which is called very early in the boot process
> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
> problem may be there. Probably should be disabled for rv32 if no SoC need that
> sort of early init call.
> 
>>
>> because
>> # CONFIG_COMMON_CLK_K210 is not set
>>
>>
>> Maybe SOC_CANAAN needs some more selects for required code?
>>
>>> Conor Dooley (1):
>>>    clk: k210: remove an implicit 64-bit division
>>>
>>> Jesse Taube (1):
>>>    riscv: configs: Add nommu PHONY defconfig for RV32
>>>
>>> Yimin Gu (1):
>>>    riscv: Kconfig: Allow RV32 to build with no MMU
>>>
>>>   arch/riscv/Kconfig     | 5 ++---
>>>   arch/riscv/Makefile    | 4 ++++
>>>   drivers/clk/clk-k210.c | 2 +-
>>>   3 files changed, 7 insertions(+), 4 deletions(-)
>>>
>>
> 

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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-08  1:26       ` Jesse Taube
@ 2023-03-08  2:16         ` Randy Dunlap
  -1 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-08  2:16 UTC (permalink / raw)
  To: Jesse Taube, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

[-- Attachment #1: Type: text/plain, Size: 2446 bytes --]

Hi--

On 3/7/23 17:26, Jesse Taube wrote:
> 
> 
> On 2/28/23 23:42, Damien Le Moal wrote:
>> On 3/1/23 13:07, Randy Dunlap wrote:
>>> Hi--
>>>
>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>> This patch-set aims to add NOMMU support to RV32.
>>>> Many people want to build simple emulators or HDL
>>>> models of RISC-V this patch makes it possible to
>>>> run linux on them.
>>>>
>>>> Yimin Gu is the original author of this set.
>>>> Submitted here:
>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>
>>>> Though Jesse T rewrote the Dconf.
>>>
>>> Dconf?
>>>
>>>>
>>>> The new set:
>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>> ---
>>>> V1->V2:
>>>>   - Add Conor's clock patch for implicit div64
>>>>   - Fix typo in commit title 3/3
>>>>   - Fix typo in commit description 2/3
>>>> V2->V3
>>>>   - Change from defconfig file to a PHONY config
>>>> ---
>>>
>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>> that is supported?
>>>
>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>> 5 of them failed the same way:
>>>
>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
> I can not recreate this error.
> can you send me the .config you used.
> 
> Thanks,
> Jesse Taube

Sure, it's attached.

>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>> compile test with rv32 (or any arch), that driver provides the
>> k210_clk_early_init() function which is called very early in the boot process
>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>> sort of early init call.
>>
>>>
>>> because
>>> # CONFIG_COMMON_CLK_K210 is not set
>>>
>>>
>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>
>>>> Conor Dooley (1):
>>>>    clk: k210: remove an implicit 64-bit division
>>>>
>>>> Jesse Taube (1):
>>>>    riscv: configs: Add nommu PHONY defconfig for RV32
>>>>
>>>> Yimin Gu (1):
>>>>    riscv: Kconfig: Allow RV32 to build with no MMU
>>>>
>>>>   arch/riscv/Kconfig     | 5 ++---
>>>>   arch/riscv/Makefile    | 4 ++++
>>>>   drivers/clk/clk-k210.c | 2 +-
>>>>   3 files changed, 7 insertions(+), 4 deletions(-)
>>>>
>>>
>>

-- 
~Randy

[-- Attachment #2: riscv32-canaan-clk-k210-undef.config --]
[-- Type: application/x-config, Size: 117445 bytes --]

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-08  2:16         ` Randy Dunlap
  0 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-08  2:16 UTC (permalink / raw)
  To: Jesse Taube, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

[-- Attachment #1: Type: text/plain, Size: 2446 bytes --]

Hi--

On 3/7/23 17:26, Jesse Taube wrote:
> 
> 
> On 2/28/23 23:42, Damien Le Moal wrote:
>> On 3/1/23 13:07, Randy Dunlap wrote:
>>> Hi--
>>>
>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>> This patch-set aims to add NOMMU support to RV32.
>>>> Many people want to build simple emulators or HDL
>>>> models of RISC-V this patch makes it possible to
>>>> run linux on them.
>>>>
>>>> Yimin Gu is the original author of this set.
>>>> Submitted here:
>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>
>>>> Though Jesse T rewrote the Dconf.
>>>
>>> Dconf?
>>>
>>>>
>>>> The new set:
>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>> ---
>>>> V1->V2:
>>>>   - Add Conor's clock patch for implicit div64
>>>>   - Fix typo in commit title 3/3
>>>>   - Fix typo in commit description 2/3
>>>> V2->V3
>>>>   - Change from defconfig file to a PHONY config
>>>> ---
>>>
>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>> that is supported?
>>>
>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>> 5 of them failed the same way:
>>>
>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
> I can not recreate this error.
> can you send me the .config you used.
> 
> Thanks,
> Jesse Taube

Sure, it's attached.

>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>> compile test with rv32 (or any arch), that driver provides the
>> k210_clk_early_init() function which is called very early in the boot process
>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>> sort of early init call.
>>
>>>
>>> because
>>> # CONFIG_COMMON_CLK_K210 is not set
>>>
>>>
>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>
>>>> Conor Dooley (1):
>>>>    clk: k210: remove an implicit 64-bit division
>>>>
>>>> Jesse Taube (1):
>>>>    riscv: configs: Add nommu PHONY defconfig for RV32
>>>>
>>>> Yimin Gu (1):
>>>>    riscv: Kconfig: Allow RV32 to build with no MMU
>>>>
>>>>   arch/riscv/Kconfig     | 5 ++---
>>>>   arch/riscv/Makefile    | 4 ++++
>>>>   drivers/clk/clk-k210.c | 2 +-
>>>>   3 files changed, 7 insertions(+), 4 deletions(-)
>>>>
>>>
>>

-- 
~Randy

[-- Attachment #2: riscv32-canaan-clk-k210-undef.config --]
[-- Type: application/x-config, Size: 117445 bytes --]

[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-08  2:16         ` Randy Dunlap
@ 2023-03-08  2:30           ` Jesse Taube
  -1 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-08  2:30 UTC (permalink / raw)
  To: Randy Dunlap, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 21:16, Randy Dunlap wrote:
> Hi--
> 
> On 3/7/23 17:26, Jesse Taube wrote:
>>
>>
>> On 2/28/23 23:42, Damien Le Moal wrote:
>>> On 3/1/23 13:07, Randy Dunlap wrote:
>>>> Hi--
>>>>
>>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>>> This patch-set aims to add NOMMU support to RV32.
>>>>> Many people want to build simple emulators or HDL
>>>>> models of RISC-V this patch makes it possible to
>>>>> run linux on them.
>>>>>
>>>>> Yimin Gu is the original author of this set.
>>>>> Submitted here:
>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>>
>>>>> Though Jesse T rewrote the Dconf.
>>>>
>>>> Dconf?
>>>>
>>>>>
>>>>> The new set:
>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>>> ---
>>>>> V1->V2:
>>>>>    - Add Conor's clock patch for implicit div64
>>>>>    - Fix typo in commit title 3/3
>>>>>    - Fix typo in commit description 2/3
>>>>> V2->V3
>>>>>    - Change from defconfig file to a PHONY config
>>>>> ---
>>>>
>>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>>> that is supported?
>>>>
>>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>>> 5 of them failed the same way:
>>>>
>>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
>> I can not recreate this error.
>> can you send me the .config you used.
>>
>> Thanks,
>> Jesse Taube
> 
> Sure, it's attached.

Hmmm, it links fine for me.

objdump -x vmlinux | grep k210_clk_early_init
81e40124 g     F .init.text     00000088 k210_clk_early_init

gcc version 11.3.0 (Buildroot 2022.11-361-g1be0d438f7)
GNU assembler version 2.38 (riscv32-buildroot-linux-uclibc)
GNU ld (GNU Binutils) 2.38

what gcc version are you using?

Thanks,
Jesse Taube

> 
>>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>>> compile test with rv32 (or any arch), that driver provides the
>>> k210_clk_early_init() function which is called very early in the boot process
>>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>>> sort of early init call.
>>>
>>>>
>>>> because
>>>> # CONFIG_COMMON_CLK_K210 is not set
>>>>
>>>>
>>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>>
>>>>> Conor Dooley (1):
>>>>>     clk: k210: remove an implicit 64-bit division
>>>>>
>>>>> Jesse Taube (1):
>>>>>     riscv: configs: Add nommu PHONY defconfig for RV32
>>>>>
>>>>> Yimin Gu (1):
>>>>>     riscv: Kconfig: Allow RV32 to build with no MMU
>>>>>
>>>>>    arch/riscv/Kconfig     | 5 ++---
>>>>>    arch/riscv/Makefile    | 4 ++++
>>>>>    drivers/clk/clk-k210.c | 2 +-
>>>>>    3 files changed, 7 insertions(+), 4 deletions(-)
>>>>>
>>>>
>>>
> 

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-08  2:30           ` Jesse Taube
  0 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-08  2:30 UTC (permalink / raw)
  To: Randy Dunlap, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 21:16, Randy Dunlap wrote:
> Hi--
> 
> On 3/7/23 17:26, Jesse Taube wrote:
>>
>>
>> On 2/28/23 23:42, Damien Le Moal wrote:
>>> On 3/1/23 13:07, Randy Dunlap wrote:
>>>> Hi--
>>>>
>>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>>> This patch-set aims to add NOMMU support to RV32.
>>>>> Many people want to build simple emulators or HDL
>>>>> models of RISC-V this patch makes it possible to
>>>>> run linux on them.
>>>>>
>>>>> Yimin Gu is the original author of this set.
>>>>> Submitted here:
>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>>
>>>>> Though Jesse T rewrote the Dconf.
>>>>
>>>> Dconf?
>>>>
>>>>>
>>>>> The new set:
>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>>> ---
>>>>> V1->V2:
>>>>>    - Add Conor's clock patch for implicit div64
>>>>>    - Fix typo in commit title 3/3
>>>>>    - Fix typo in commit description 2/3
>>>>> V2->V3
>>>>>    - Change from defconfig file to a PHONY config
>>>>> ---
>>>>
>>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>>> that is supported?
>>>>
>>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>>> 5 of them failed the same way:
>>>>
>>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
>> I can not recreate this error.
>> can you send me the .config you used.
>>
>> Thanks,
>> Jesse Taube
> 
> Sure, it's attached.

Hmmm, it links fine for me.

objdump -x vmlinux | grep k210_clk_early_init
81e40124 g     F .init.text     00000088 k210_clk_early_init

gcc version 11.3.0 (Buildroot 2022.11-361-g1be0d438f7)
GNU assembler version 2.38 (riscv32-buildroot-linux-uclibc)
GNU ld (GNU Binutils) 2.38

what gcc version are you using?

Thanks,
Jesse Taube

> 
>>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>>> compile test with rv32 (or any arch), that driver provides the
>>> k210_clk_early_init() function which is called very early in the boot process
>>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>>> sort of early init call.
>>>
>>>>
>>>> because
>>>> # CONFIG_COMMON_CLK_K210 is not set
>>>>
>>>>
>>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>>
>>>>> Conor Dooley (1):
>>>>>     clk: k210: remove an implicit 64-bit division
>>>>>
>>>>> Jesse Taube (1):
>>>>>     riscv: configs: Add nommu PHONY defconfig for RV32
>>>>>
>>>>> Yimin Gu (1):
>>>>>     riscv: Kconfig: Allow RV32 to build with no MMU
>>>>>
>>>>>    arch/riscv/Kconfig     | 5 ++---
>>>>>    arch/riscv/Makefile    | 4 ++++
>>>>>    drivers/clk/clk-k210.c | 2 +-
>>>>>    3 files changed, 7 insertions(+), 4 deletions(-)
>>>>>
>>>>
>>>
> 

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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-08  2:30           ` Jesse Taube
@ 2023-03-08  2:33             ` Randy Dunlap
  -1 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-08  2:33 UTC (permalink / raw)
  To: Jesse Taube, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 18:30, Jesse Taube wrote:
> 
> 
> On 3/7/23 21:16, Randy Dunlap wrote:
>> Hi--
>>
>> On 3/7/23 17:26, Jesse Taube wrote:
>>>
>>>
>>> On 2/28/23 23:42, Damien Le Moal wrote:
>>>> On 3/1/23 13:07, Randy Dunlap wrote:
>>>>> Hi--
>>>>>
>>>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>>>> This patch-set aims to add NOMMU support to RV32.
>>>>>> Many people want to build simple emulators or HDL
>>>>>> models of RISC-V this patch makes it possible to
>>>>>> run linux on them.
>>>>>>
>>>>>> Yimin Gu is the original author of this set.
>>>>>> Submitted here:
>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>>>
>>>>>> Though Jesse T rewrote the Dconf.
>>>>>
>>>>> Dconf?
>>>>>
>>>>>>
>>>>>> The new set:
>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>>>> ---
>>>>>> V1->V2:
>>>>>>    - Add Conor's clock patch for implicit div64
>>>>>>    - Fix typo in commit title 3/3
>>>>>>    - Fix typo in commit description 2/3
>>>>>> V2->V3
>>>>>>    - Change from defconfig file to a PHONY config
>>>>>> ---
>>>>>
>>>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>>>> that is supported?
>>>>>
>>>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>>>> 5 of them failed the same way:
>>>>>
>>>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
>>> I can not recreate this error.
>>> can you send me the .config you used.
>>>
>>> Thanks,
>>> Jesse Taube
>>
>> Sure, it's attached.
> 
> Hmmm, it links fine for me.
> 
> objdump -x vmlinux | grep k210_clk_early_init
> 81e40124 g     F .init.text     00000088 k210_clk_early_init
> 
> gcc version 11.3.0 (Buildroot 2022.11-361-g1be0d438f7)
> GNU assembler version 2.38 (riscv32-buildroot-linux-uclibc)
> GNU ld (GNU Binutils) 2.38
> 
> what gcc version are you using?


gcc (SUSE Linux) 12.2.1 20230124 [revision 193f7e62815b4089dfaed4c2bd34fd4f10209e27]
from opensuse Tumbleweed.

I'll try it on a current tree...

>>
>>>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>>>> compile test with rv32 (or any arch), that driver provides the
>>>> k210_clk_early_init() function which is called very early in the boot process
>>>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>>>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>>>> sort of early init call.
>>>>
>>>>>
>>>>> because
>>>>> # CONFIG_COMMON_CLK_K210 is not set
>>>>>
>>>>>
>>>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>>>
>>>>>> Conor Dooley (1):
>>>>>>     clk: k210: remove an implicit 64-bit division
>>>>>>
>>>>>> Jesse Taube (1):
>>>>>>     riscv: configs: Add nommu PHONY defconfig for RV32
>>>>>>
>>>>>> Yimin Gu (1):
>>>>>>     riscv: Kconfig: Allow RV32 to build with no MMU
>>>>>>
>>>>>>    arch/riscv/Kconfig     | 5 ++---
>>>>>>    arch/riscv/Makefile    | 4 ++++
>>>>>>    drivers/clk/clk-k210.c | 2 +-
>>>>>>    3 files changed, 7 insertions(+), 4 deletions(-)
>>>>>>
>>>>>
>>>>
>>

-- 
~Randy

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-08  2:33             ` Randy Dunlap
  0 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-08  2:33 UTC (permalink / raw)
  To: Jesse Taube, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 18:30, Jesse Taube wrote:
> 
> 
> On 3/7/23 21:16, Randy Dunlap wrote:
>> Hi--
>>
>> On 3/7/23 17:26, Jesse Taube wrote:
>>>
>>>
>>> On 2/28/23 23:42, Damien Le Moal wrote:
>>>> On 3/1/23 13:07, Randy Dunlap wrote:
>>>>> Hi--
>>>>>
>>>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>>>> This patch-set aims to add NOMMU support to RV32.
>>>>>> Many people want to build simple emulators or HDL
>>>>>> models of RISC-V this patch makes it possible to
>>>>>> run linux on them.
>>>>>>
>>>>>> Yimin Gu is the original author of this set.
>>>>>> Submitted here:
>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>>>
>>>>>> Though Jesse T rewrote the Dconf.
>>>>>
>>>>> Dconf?
>>>>>
>>>>>>
>>>>>> The new set:
>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>>>> ---
>>>>>> V1->V2:
>>>>>>    - Add Conor's clock patch for implicit div64
>>>>>>    - Fix typo in commit title 3/3
>>>>>>    - Fix typo in commit description 2/3
>>>>>> V2->V3
>>>>>>    - Change from defconfig file to a PHONY config
>>>>>> ---
>>>>>
>>>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>>>> that is supported?
>>>>>
>>>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>>>> 5 of them failed the same way:
>>>>>
>>>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
>>> I can not recreate this error.
>>> can you send me the .config you used.
>>>
>>> Thanks,
>>> Jesse Taube
>>
>> Sure, it's attached.
> 
> Hmmm, it links fine for me.
> 
> objdump -x vmlinux | grep k210_clk_early_init
> 81e40124 g     F .init.text     00000088 k210_clk_early_init
> 
> gcc version 11.3.0 (Buildroot 2022.11-361-g1be0d438f7)
> GNU assembler version 2.38 (riscv32-buildroot-linux-uclibc)
> GNU ld (GNU Binutils) 2.38
> 
> what gcc version are you using?


gcc (SUSE Linux) 12.2.1 20230124 [revision 193f7e62815b4089dfaed4c2bd34fd4f10209e27]
from opensuse Tumbleweed.

I'll try it on a current tree...

>>
>>>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>>>> compile test with rv32 (or any arch), that driver provides the
>>>> k210_clk_early_init() function which is called very early in the boot process
>>>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>>>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>>>> sort of early init call.
>>>>
>>>>>
>>>>> because
>>>>> # CONFIG_COMMON_CLK_K210 is not set
>>>>>
>>>>>
>>>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>>>
>>>>>> Conor Dooley (1):
>>>>>>     clk: k210: remove an implicit 64-bit division
>>>>>>
>>>>>> Jesse Taube (1):
>>>>>>     riscv: configs: Add nommu PHONY defconfig for RV32
>>>>>>
>>>>>> Yimin Gu (1):
>>>>>>     riscv: Kconfig: Allow RV32 to build with no MMU
>>>>>>
>>>>>>    arch/riscv/Kconfig     | 5 ++---
>>>>>>    arch/riscv/Makefile    | 4 ++++
>>>>>>    drivers/clk/clk-k210.c | 2 +-
>>>>>>    3 files changed, 7 insertions(+), 4 deletions(-)
>>>>>>
>>>>>
>>>>
>>

-- 
~Randy

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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-08  2:33             ` Randy Dunlap
@ 2023-03-08  2:51               ` Randy Dunlap
  -1 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-08  2:51 UTC (permalink / raw)
  To: Jesse Taube, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 18:33, Randy Dunlap wrote:
> 
> 
> On 3/7/23 18:30, Jesse Taube wrote:
>>
>>
>> On 3/7/23 21:16, Randy Dunlap wrote:
>>> Hi--
>>>
>>> On 3/7/23 17:26, Jesse Taube wrote:
>>>>
>>>>
>>>> On 2/28/23 23:42, Damien Le Moal wrote:
>>>>> On 3/1/23 13:07, Randy Dunlap wrote:
>>>>>> Hi--
>>>>>>
>>>>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>>>>> This patch-set aims to add NOMMU support to RV32.
>>>>>>> Many people want to build simple emulators or HDL
>>>>>>> models of RISC-V this patch makes it possible to
>>>>>>> run linux on them.
>>>>>>>
>>>>>>> Yimin Gu is the original author of this set.
>>>>>>> Submitted here:
>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>>>>
>>>>>>> Though Jesse T rewrote the Dconf.
>>>>>>
>>>>>> Dconf?
>>>>>>
>>>>>>>
>>>>>>> The new set:
>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>>>>> ---
>>>>>>> V1->V2:
>>>>>>>    - Add Conor's clock patch for implicit div64
>>>>>>>    - Fix typo in commit title 3/3
>>>>>>>    - Fix typo in commit description 2/3
>>>>>>> V2->V3
>>>>>>>    - Change from defconfig file to a PHONY config
>>>>>>> ---
>>>>>>
>>>>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>>>>> that is supported?
>>>>>>
>>>>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>>>>> 5 of them failed the same way:
>>>>>>
>>>>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>>>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
>>>> I can not recreate this error.
>>>> can you send me the .config you used.
>>>>
>>>> Thanks,
>>>> Jesse Taube
>>>
>>> Sure, it's attached.
>>
>> Hmmm, it links fine for me.
>>
>> objdump -x vmlinux | grep k210_clk_early_init
>> 81e40124 g     F .init.text     00000088 k210_clk_early_init
>>
>> gcc version 11.3.0 (Buildroot 2022.11-361-g1be0d438f7)
>> GNU assembler version 2.38 (riscv32-buildroot-linux-uclibc)
>> GNU ld (GNU Binutils) 2.38
>>
>> what gcc version are you using?
> 
> 
> gcc (SUSE Linux) 12.2.1 20230124 [revision 193f7e62815b4089dfaed4c2bd34fd4f10209e27]
> from opensuse Tumbleweed.
> 
> I'll try it on a current tree...

OK, I don't know how it happened. I cannot reproduce it now.
The failing .config files has CONFIG_MMU is not set (for RV32I), which
appears to be impossible.

Sorry to bother you.

Thanks.

>>>
>>>>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>>>>> compile test with rv32 (or any arch), that driver provides the
>>>>> k210_clk_early_init() function which is called very early in the boot process
>>>>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>>>>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>>>>> sort of early init call.
>>>>>
>>>>>>
>>>>>> because
>>>>>> # CONFIG_COMMON_CLK_K210 is not set
>>>>>>
>>>>>>
>>>>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>>>>
>>>>>>> Conor Dooley (1):
>>>>>>>     clk: k210: remove an implicit 64-bit division
>>>>>>>
>>>>>>> Jesse Taube (1):
>>>>>>>     riscv: configs: Add nommu PHONY defconfig for RV32
>>>>>>>
>>>>>>> Yimin Gu (1):
>>>>>>>     riscv: Kconfig: Allow RV32 to build with no MMU
>>>>>>>
>>>>>>>    arch/riscv/Kconfig     | 5 ++---
>>>>>>>    arch/riscv/Makefile    | 4 ++++
>>>>>>>    drivers/clk/clk-k210.c | 2 +-
>>>>>>>    3 files changed, 7 insertions(+), 4 deletions(-)
>>>>>>>
>>>>>>
>>>>>
>>>
> 

-- 
~Randy

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-08  2:51               ` Randy Dunlap
  0 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-08  2:51 UTC (permalink / raw)
  To: Jesse Taube, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 18:33, Randy Dunlap wrote:
> 
> 
> On 3/7/23 18:30, Jesse Taube wrote:
>>
>>
>> On 3/7/23 21:16, Randy Dunlap wrote:
>>> Hi--
>>>
>>> On 3/7/23 17:26, Jesse Taube wrote:
>>>>
>>>>
>>>> On 2/28/23 23:42, Damien Le Moal wrote:
>>>>> On 3/1/23 13:07, Randy Dunlap wrote:
>>>>>> Hi--
>>>>>>
>>>>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>>>>> This patch-set aims to add NOMMU support to RV32.
>>>>>>> Many people want to build simple emulators or HDL
>>>>>>> models of RISC-V this patch makes it possible to
>>>>>>> run linux on them.
>>>>>>>
>>>>>>> Yimin Gu is the original author of this set.
>>>>>>> Submitted here:
>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>>>>
>>>>>>> Though Jesse T rewrote the Dconf.
>>>>>>
>>>>>> Dconf?
>>>>>>
>>>>>>>
>>>>>>> The new set:
>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>>>>> ---
>>>>>>> V1->V2:
>>>>>>>    - Add Conor's clock patch for implicit div64
>>>>>>>    - Fix typo in commit title 3/3
>>>>>>>    - Fix typo in commit description 2/3
>>>>>>> V2->V3
>>>>>>>    - Change from defconfig file to a PHONY config
>>>>>>> ---
>>>>>>
>>>>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>>>>> that is supported?
>>>>>>
>>>>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>>>>> 5 of them failed the same way:
>>>>>>
>>>>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>>>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
>>>> I can not recreate this error.
>>>> can you send me the .config you used.
>>>>
>>>> Thanks,
>>>> Jesse Taube
>>>
>>> Sure, it's attached.
>>
>> Hmmm, it links fine for me.
>>
>> objdump -x vmlinux | grep k210_clk_early_init
>> 81e40124 g     F .init.text     00000088 k210_clk_early_init
>>
>> gcc version 11.3.0 (Buildroot 2022.11-361-g1be0d438f7)
>> GNU assembler version 2.38 (riscv32-buildroot-linux-uclibc)
>> GNU ld (GNU Binutils) 2.38
>>
>> what gcc version are you using?
> 
> 
> gcc (SUSE Linux) 12.2.1 20230124 [revision 193f7e62815b4089dfaed4c2bd34fd4f10209e27]
> from opensuse Tumbleweed.
> 
> I'll try it on a current tree...

OK, I don't know how it happened. I cannot reproduce it now.
The failing .config files has CONFIG_MMU is not set (for RV32I), which
appears to be impossible.

Sorry to bother you.

Thanks.

>>>
>>>>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>>>>> compile test with rv32 (or any arch), that driver provides the
>>>>> k210_clk_early_init() function which is called very early in the boot process
>>>>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>>>>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>>>>> sort of early init call.
>>>>>
>>>>>>
>>>>>> because
>>>>>> # CONFIG_COMMON_CLK_K210 is not set
>>>>>>
>>>>>>
>>>>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>>>>
>>>>>>> Conor Dooley (1):
>>>>>>>     clk: k210: remove an implicit 64-bit division
>>>>>>>
>>>>>>> Jesse Taube (1):
>>>>>>>     riscv: configs: Add nommu PHONY defconfig for RV32
>>>>>>>
>>>>>>> Yimin Gu (1):
>>>>>>>     riscv: Kconfig: Allow RV32 to build with no MMU
>>>>>>>
>>>>>>>    arch/riscv/Kconfig     | 5 ++---
>>>>>>>    arch/riscv/Makefile    | 4 ++++
>>>>>>>    drivers/clk/clk-k210.c | 2 +-
>>>>>>>    3 files changed, 7 insertions(+), 4 deletions(-)
>>>>>>>
>>>>>>
>>>>>
>>>
> 

-- 
~Randy

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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-08  2:51               ` Randy Dunlap
@ 2023-03-08  2:54                 ` Jesse Taube
  -1 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-08  2:54 UTC (permalink / raw)
  To: Randy Dunlap, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 21:51, Randy Dunlap wrote:
> 
> 
> On 3/7/23 18:33, Randy Dunlap wrote:
>>
>>
>> On 3/7/23 18:30, Jesse Taube wrote:
>>>
>>>
>>> On 3/7/23 21:16, Randy Dunlap wrote:
>>>> Hi--
>>>>
>>>> On 3/7/23 17:26, Jesse Taube wrote:
>>>>>
>>>>>
>>>>> On 2/28/23 23:42, Damien Le Moal wrote:
>>>>>> On 3/1/23 13:07, Randy Dunlap wrote:
>>>>>>> Hi--
>>>>>>>
>>>>>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>>>>>> This patch-set aims to add NOMMU support to RV32.
>>>>>>>> Many people want to build simple emulators or HDL
>>>>>>>> models of RISC-V this patch makes it possible to
>>>>>>>> run linux on them.
>>>>>>>>
>>>>>>>> Yimin Gu is the original author of this set.
>>>>>>>> Submitted here:
>>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>>>>>
>>>>>>>> Though Jesse T rewrote the Dconf.
>>>>>>>
>>>>>>> Dconf?
>>>>>>>
>>>>>>>>
>>>>>>>> The new set:
>>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>>>>>> ---
>>>>>>>> V1->V2:
>>>>>>>>     - Add Conor's clock patch for implicit div64
>>>>>>>>     - Fix typo in commit title 3/3
>>>>>>>>     - Fix typo in commit description 2/3
>>>>>>>> V2->V3
>>>>>>>>     - Change from defconfig file to a PHONY config
>>>>>>>> ---
>>>>>>>
>>>>>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>>>>>> that is supported?
>>>>>>>
>>>>>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>>>>>> 5 of them failed the same way:
>>>>>>>
>>>>>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>>>>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
>>>>> I can not recreate this error.
>>>>> can you send me the .config you used.
>>>>>
>>>>> Thanks,
>>>>> Jesse Taube
>>>>
>>>> Sure, it's attached.
>>>
>>> Hmmm, it links fine for me.
>>>
>>> objdump -x vmlinux | grep k210_clk_early_init
>>> 81e40124 g     F .init.text     00000088 k210_clk_early_init
>>>
>>> gcc version 11.3.0 (Buildroot 2022.11-361-g1be0d438f7)
>>> GNU assembler version 2.38 (riscv32-buildroot-linux-uclibc)
>>> GNU ld (GNU Binutils) 2.38
>>>
>>> what gcc version are you using?
>>
>>
>> gcc (SUSE Linux) 12.2.1 20230124 [revision 193f7e62815b4089dfaed4c2bd34fd4f10209e27]
>> from opensuse Tumbleweed.
>>
>> I'll try it on a current tree...
> 
> OK, I don't know how it happened. I cannot reproduce it now.
> The failing .config files has CONFIG_MMU is not set (for RV32I), which
> appears to be impossible.
These patches add `CONFIG_MMU is not set` (for RV32I).
But no worries it seems to be a non issue  now.

Your thoughts Damien?

Thanks,
Jesse Taube
> 
> Sorry to bother you.
> 
> Thanks.
> 
>>>>
>>>>>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>>>>>> compile test with rv32 (or any arch), that driver provides the
>>>>>> k210_clk_early_init() function which is called very early in the boot process
>>>>>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>>>>>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>>>>>> sort of early init call.
>>>>>>
>>>>>>>
>>>>>>> because
>>>>>>> # CONFIG_COMMON_CLK_K210 is not set
>>>>>>>
>>>>>>>
>>>>>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>>>>>
>>>>>>>> Conor Dooley (1):
>>>>>>>>      clk: k210: remove an implicit 64-bit division
>>>>>>>>
>>>>>>>> Jesse Taube (1):
>>>>>>>>      riscv: configs: Add nommu PHONY defconfig for RV32
>>>>>>>>
>>>>>>>> Yimin Gu (1):
>>>>>>>>      riscv: Kconfig: Allow RV32 to build with no MMU
>>>>>>>>
>>>>>>>>     arch/riscv/Kconfig     | 5 ++---
>>>>>>>>     arch/riscv/Makefile    | 4 ++++
>>>>>>>>     drivers/clk/clk-k210.c | 2 +-
>>>>>>>>     3 files changed, 7 insertions(+), 4 deletions(-)
>>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
> 

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-08  2:54                 ` Jesse Taube
  0 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-08  2:54 UTC (permalink / raw)
  To: Randy Dunlap, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 21:51, Randy Dunlap wrote:
> 
> 
> On 3/7/23 18:33, Randy Dunlap wrote:
>>
>>
>> On 3/7/23 18:30, Jesse Taube wrote:
>>>
>>>
>>> On 3/7/23 21:16, Randy Dunlap wrote:
>>>> Hi--
>>>>
>>>> On 3/7/23 17:26, Jesse Taube wrote:
>>>>>
>>>>>
>>>>> On 2/28/23 23:42, Damien Le Moal wrote:
>>>>>> On 3/1/23 13:07, Randy Dunlap wrote:
>>>>>>> Hi--
>>>>>>>
>>>>>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>>>>>> This patch-set aims to add NOMMU support to RV32.
>>>>>>>> Many people want to build simple emulators or HDL
>>>>>>>> models of RISC-V this patch makes it possible to
>>>>>>>> run linux on them.
>>>>>>>>
>>>>>>>> Yimin Gu is the original author of this set.
>>>>>>>> Submitted here:
>>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>>>>>
>>>>>>>> Though Jesse T rewrote the Dconf.
>>>>>>>
>>>>>>> Dconf?
>>>>>>>
>>>>>>>>
>>>>>>>> The new set:
>>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>>>>>> ---
>>>>>>>> V1->V2:
>>>>>>>>     - Add Conor's clock patch for implicit div64
>>>>>>>>     - Fix typo in commit title 3/3
>>>>>>>>     - Fix typo in commit description 2/3
>>>>>>>> V2->V3
>>>>>>>>     - Change from defconfig file to a PHONY config
>>>>>>>> ---
>>>>>>>
>>>>>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>>>>>> that is supported?
>>>>>>>
>>>>>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>>>>>> 5 of them failed the same way:
>>>>>>>
>>>>>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>>>>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
>>>>> I can not recreate this error.
>>>>> can you send me the .config you used.
>>>>>
>>>>> Thanks,
>>>>> Jesse Taube
>>>>
>>>> Sure, it's attached.
>>>
>>> Hmmm, it links fine for me.
>>>
>>> objdump -x vmlinux | grep k210_clk_early_init
>>> 81e40124 g     F .init.text     00000088 k210_clk_early_init
>>>
>>> gcc version 11.3.0 (Buildroot 2022.11-361-g1be0d438f7)
>>> GNU assembler version 2.38 (riscv32-buildroot-linux-uclibc)
>>> GNU ld (GNU Binutils) 2.38
>>>
>>> what gcc version are you using?
>>
>>
>> gcc (SUSE Linux) 12.2.1 20230124 [revision 193f7e62815b4089dfaed4c2bd34fd4f10209e27]
>> from opensuse Tumbleweed.
>>
>> I'll try it on a current tree...
> 
> OK, I don't know how it happened. I cannot reproduce it now.
> The failing .config files has CONFIG_MMU is not set (for RV32I), which
> appears to be impossible.
These patches add `CONFIG_MMU is not set` (for RV32I).
But no worries it seems to be a non issue  now.

Your thoughts Damien?

Thanks,
Jesse Taube
> 
> Sorry to bother you.
> 
> Thanks.
> 
>>>>
>>>>>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>>>>>> compile test with rv32 (or any arch), that driver provides the
>>>>>> k210_clk_early_init() function which is called very early in the boot process
>>>>>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>>>>>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>>>>>> sort of early init call.
>>>>>>
>>>>>>>
>>>>>>> because
>>>>>>> # CONFIG_COMMON_CLK_K210 is not set
>>>>>>>
>>>>>>>
>>>>>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>>>>>
>>>>>>>> Conor Dooley (1):
>>>>>>>>      clk: k210: remove an implicit 64-bit division
>>>>>>>>
>>>>>>>> Jesse Taube (1):
>>>>>>>>      riscv: configs: Add nommu PHONY defconfig for RV32
>>>>>>>>
>>>>>>>> Yimin Gu (1):
>>>>>>>>      riscv: Kconfig: Allow RV32 to build with no MMU
>>>>>>>>
>>>>>>>>     arch/riscv/Kconfig     | 5 ++---
>>>>>>>>     arch/riscv/Makefile    | 4 ++++
>>>>>>>>     drivers/clk/clk-k210.c | 2 +-
>>>>>>>>     3 files changed, 7 insertions(+), 4 deletions(-)
>>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
> 

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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-08  2:54                 ` Jesse Taube
@ 2023-03-08  3:23                   ` Randy Dunlap
  -1 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-08  3:23 UTC (permalink / raw)
  To: Jesse Taube, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 18:54, Jesse Taube wrote:
> 
> 
> On 3/7/23 21:51, Randy Dunlap wrote:
>>
>>
>> On 3/7/23 18:33, Randy Dunlap wrote:
>>>
>>>
>>> On 3/7/23 18:30, Jesse Taube wrote:
>>>>
>>>>
>>>> On 3/7/23 21:16, Randy Dunlap wrote:
>>>>> Hi--
>>>>>
>>>>> On 3/7/23 17:26, Jesse Taube wrote:
>>>>>>
>>>>>>
>>>>>> On 2/28/23 23:42, Damien Le Moal wrote:
>>>>>>> On 3/1/23 13:07, Randy Dunlap wrote:
>>>>>>>> Hi--
>>>>>>>>
>>>>>>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>>>>>>> This patch-set aims to add NOMMU support to RV32.
>>>>>>>>> Many people want to build simple emulators or HDL
>>>>>>>>> models of RISC-V this patch makes it possible to
>>>>>>>>> run linux on them.
>>>>>>>>>
>>>>>>>>> Yimin Gu is the original author of this set.
>>>>>>>>> Submitted here:
>>>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>>>>>>
>>>>>>>>> Though Jesse T rewrote the Dconf.
>>>>>>>>
>>>>>>>> Dconf?
>>>>>>>>
>>>>>>>>>
>>>>>>>>> The new set:
>>>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>>>>>>> ---
>>>>>>>>> V1->V2:
>>>>>>>>>     - Add Conor's clock patch for implicit div64
>>>>>>>>>     - Fix typo in commit title 3/3
>>>>>>>>>     - Fix typo in commit description 2/3
>>>>>>>>> V2->V3
>>>>>>>>>     - Change from defconfig file to a PHONY config
>>>>>>>>> ---
>>>>>>>>
>>>>>>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>>>>>>> that is supported?
>>>>>>>>
>>>>>>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>>>>>>> 5 of them failed the same way:
>>>>>>>>
>>>>>>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>>>>>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
>>>>>> I can not recreate this error.
>>>>>> can you send me the .config you used.
>>>>>>
>>>>>> Thanks,
>>>>>> Jesse Taube
>>>>>
>>>>> Sure, it's attached.
>>>>
>>>> Hmmm, it links fine for me.
>>>>
>>>> objdump -x vmlinux | grep k210_clk_early_init
>>>> 81e40124 g     F .init.text     00000088 k210_clk_early_init
>>>>
>>>> gcc version 11.3.0 (Buildroot 2022.11-361-g1be0d438f7)
>>>> GNU assembler version 2.38 (riscv32-buildroot-linux-uclibc)
>>>> GNU ld (GNU Binutils) 2.38
>>>>
>>>> what gcc version are you using?
>>>
>>>
>>> gcc (SUSE Linux) 12.2.1 20230124 [revision 193f7e62815b4089dfaed4c2bd34fd4f10209e27]
>>> from opensuse Tumbleweed.
>>>
>>> I'll try it on a current tree...
>>
>> OK, I don't know how it happened. I cannot reproduce it now.
>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>> appears to be impossible.
> These patches add `CONFIG_MMU is not set` (for RV32I).
> But no worries it seems to be a non issue  now.
> 
> Your thoughts Damien?
> 

Thanks for reminding me.

With these 3 patches applied to linux-next-20230307,
I still get this build error.


> Thanks,
> Jesse Taube
>>
>> Sorry to bother you.
>>
>> Thanks.
>>
>>>>>
>>>>>>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>>>>>>> compile test with rv32 (or any arch), that driver provides the
>>>>>>> k210_clk_early_init() function which is called very early in the boot process
>>>>>>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>>>>>>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>>>>>>> sort of early init call.
>>>>>>>
>>>>>>>>
>>>>>>>> because
>>>>>>>> # CONFIG_COMMON_CLK_K210 is not set
>>>>>>>>
>>>>>>>>
>>>>>>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>>>>>>
>>>>>>>>> Conor Dooley (1):
>>>>>>>>>      clk: k210: remove an implicit 64-bit division
>>>>>>>>>
>>>>>>>>> Jesse Taube (1):
>>>>>>>>>      riscv: configs: Add nommu PHONY defconfig for RV32
>>>>>>>>>
>>>>>>>>> Yimin Gu (1):
>>>>>>>>>      riscv: Kconfig: Allow RV32 to build with no MMU
>>>>>>>>>
>>>>>>>>>     arch/riscv/Kconfig     | 5 ++---
>>>>>>>>>     arch/riscv/Makefile    | 4 ++++
>>>>>>>>>     drivers/clk/clk-k210.c | 2 +-
>>>>>>>>>     3 files changed, 7 insertions(+), 4 deletions(-)
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>
>>

-- 
~Randy

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-08  3:23                   ` Randy Dunlap
  0 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-08  3:23 UTC (permalink / raw)
  To: Jesse Taube, Damien Le Moal, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 18:54, Jesse Taube wrote:
> 
> 
> On 3/7/23 21:51, Randy Dunlap wrote:
>>
>>
>> On 3/7/23 18:33, Randy Dunlap wrote:
>>>
>>>
>>> On 3/7/23 18:30, Jesse Taube wrote:
>>>>
>>>>
>>>> On 3/7/23 21:16, Randy Dunlap wrote:
>>>>> Hi--
>>>>>
>>>>> On 3/7/23 17:26, Jesse Taube wrote:
>>>>>>
>>>>>>
>>>>>> On 2/28/23 23:42, Damien Le Moal wrote:
>>>>>>> On 3/1/23 13:07, Randy Dunlap wrote:
>>>>>>>> Hi--
>>>>>>>>
>>>>>>>> On 2/28/23 16:26, Jesse Taube wrote:
>>>>>>>>> This patch-set aims to add NOMMU support to RV32.
>>>>>>>>> Many people want to build simple emulators or HDL
>>>>>>>>> models of RISC-V this patch makes it possible to
>>>>>>>>> run linux on them.
>>>>>>>>>
>>>>>>>>> Yimin Gu is the original author of this set.
>>>>>>>>> Submitted here:
>>>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
>>>>>>>>>
>>>>>>>>> Though Jesse T rewrote the Dconf.
>>>>>>>>
>>>>>>>> Dconf?
>>>>>>>>
>>>>>>>>>
>>>>>>>>> The new set:
>>>>>>>>> https://lists.buildroot.org/pipermail/buildroot/2022-December/658258.html
>>>>>>>>> ---
>>>>>>>>> V1->V2:
>>>>>>>>>     - Add Conor's clock patch for implicit div64
>>>>>>>>>     - Fix typo in commit title 3/3
>>>>>>>>>     - Fix typo in commit description 2/3
>>>>>>>>> V2->V3
>>>>>>>>>     - Change from defconfig file to a PHONY config
>>>>>>>>> ---
>>>>>>>>
>>>>>>>> Is this 'rv32_nommu_virt_defconfig' target the only build target
>>>>>>>> that is supported?
>>>>>>>>
>>>>>>>> I ask because I applied the 3 patches and did 25 randconfig builds.
>>>>>>>> 5 of them failed the same way:
>>>>>>>>
>>>>>>>> riscv32-linux-ld: drivers/soc/canaan/k210-sysctl.o: in function `k210_soc_early_init':
>>>>>>>> k210-sysctl.c:(.init.text+0x78): undefined reference to `k210_clk_early_init'
>>>>>> I can not recreate this error.
>>>>>> can you send me the .config you used.
>>>>>>
>>>>>> Thanks,
>>>>>> Jesse Taube
>>>>>
>>>>> Sure, it's attached.
>>>>
>>>> Hmmm, it links fine for me.
>>>>
>>>> objdump -x vmlinux | grep k210_clk_early_init
>>>> 81e40124 g     F .init.text     00000088 k210_clk_early_init
>>>>
>>>> gcc version 11.3.0 (Buildroot 2022.11-361-g1be0d438f7)
>>>> GNU assembler version 2.38 (riscv32-buildroot-linux-uclibc)
>>>> GNU ld (GNU Binutils) 2.38
>>>>
>>>> what gcc version are you using?
>>>
>>>
>>> gcc (SUSE Linux) 12.2.1 20230124 [revision 193f7e62815b4089dfaed4c2bd34fd4f10209e27]
>>> from opensuse Tumbleweed.
>>>
>>> I'll try it on a current tree...
>>
>> OK, I don't know how it happened. I cannot reproduce it now.
>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>> appears to be impossible.
> These patches add `CONFIG_MMU is not set` (for RV32I).
> But no worries it seems to be a non issue  now.
> 
> Your thoughts Damien?
> 

Thanks for reminding me.

With these 3 patches applied to linux-next-20230307,
I still get this build error.


> Thanks,
> Jesse Taube
>>
>> Sorry to bother you.
>>
>> Thanks.
>>
>>>>>
>>>>>>> Arg. Forgot about that. k210 is rv64 only and while the clk driver could still
>>>>>>> compile test with rv32 (or any arch), that driver provides the
>>>>>>> k210_clk_early_init() function which is called very early in the boot process
>>>>>>> from k210_soc_early_init(), which is an SOC_EARLY_INIT_DECLARE() call. The
>>>>>>> problem may be there. Probably should be disabled for rv32 if no SoC need that
>>>>>>> sort of early init call.
>>>>>>>
>>>>>>>>
>>>>>>>> because
>>>>>>>> # CONFIG_COMMON_CLK_K210 is not set
>>>>>>>>
>>>>>>>>
>>>>>>>> Maybe SOC_CANAAN needs some more selects for required code?
>>>>>>>>
>>>>>>>>> Conor Dooley (1):
>>>>>>>>>      clk: k210: remove an implicit 64-bit division
>>>>>>>>>
>>>>>>>>> Jesse Taube (1):
>>>>>>>>>      riscv: configs: Add nommu PHONY defconfig for RV32
>>>>>>>>>
>>>>>>>>> Yimin Gu (1):
>>>>>>>>>      riscv: Kconfig: Allow RV32 to build with no MMU
>>>>>>>>>
>>>>>>>>>     arch/riscv/Kconfig     | 5 ++---
>>>>>>>>>     arch/riscv/Makefile    | 4 ++++
>>>>>>>>>     drivers/clk/clk-k210.c | 2 +-
>>>>>>>>>     3 files changed, 7 insertions(+), 4 deletions(-)
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>
>>

-- 
~Randy

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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-08  3:23                   ` Randy Dunlap
@ 2023-03-08  3:42                     ` Damien Le Moal
  -1 siblings, 0 replies; 56+ messages in thread
From: Damien Le Moal @ 2023-03-08  3:42 UTC (permalink / raw)
  To: Randy Dunlap, Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

On 3/8/23 12:23, Randy Dunlap wrote:
>>> OK, I don't know how it happened. I cannot reproduce it now.
>>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>>> appears to be impossible.
>> These patches add `CONFIG_MMU is not set` (for RV32I).
>> But no worries it seems to be a non issue  now.
>>
>> Your thoughts Damien?
>>
> 
> Thanks for reminding me.
> 
> With these 3 patches applied to linux-next-20230307,
> I still get this build error.

Does this help ?

diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
index 2527cf5757ec..7796c5f1d109 100644
--- a/drivers/soc/canaan/Kconfig
+++ b/drivers/soc/canaan/Kconfig
@@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
        bool "Canaan Kendryte K210 SoC system controller"
        depends on RISCV && SOC_CANAAN && OF
        default SOC_CANAAN
-        select PM
-        select MFD_SYSCON
+       select COMMON_CLK_K210
+       select PM
+       select MFD_SYSCON
        help
          Canaan Kendryte K210 SoC system controller driver.

(just noticed that there are whitespace errors here...)

Note that both the sysctl and clk driver depend on RISCV. I think these should
probably also depend on 64BIT, and eventually add a "|| COMPILE_TEST" as well.
So something like this:

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index b6c5bf69a2b2..657a36d2640d 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -431,7 +431,7 @@ config COMMON_CLK_FIXED_MMIO

 config COMMON_CLK_K210
        bool "Clock driver for the Canaan Kendryte K210 SoC"
-       depends on OF && RISCV && SOC_CANAAN
+       depends on OF && RISCV && SOC_CANAAN && (64BIT || COMPILE_TEST)
        default SOC_CANAAN
        help
          Support for the Canaan Kendryte K210 RISC-V SoC clocks.
diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
index 2527cf5757ec..1745a614d2a7 100644
--- a/drivers/soc/canaan/Kconfig
+++ b/drivers/soc/canaan/Kconfig
@@ -2,9 +2,10 @@

 config SOC_K210_SYSCTL
        bool "Canaan Kendryte K210 SoC system controller"
-       depends on RISCV && SOC_CANAAN && OF
+       depends on RISCV && SOC_CANAAN && OF && (64BIT || COMPILE_TEST)
        default SOC_CANAAN
-        select PM
-        select MFD_SYSCON
+       select COMMON_CLK_K210
+       select PM
+       select MFD_SYSCON
        help
          Canaan Kendryte K210 SoC system controller driver.

COMPILE_TEST is optional though, but I do not see any reason why not eventhough
in practice these drivers will likely never end up in 32-bits SoC.


-- 
Damien Le Moal
Western Digital Research


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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-08  3:42                     ` Damien Le Moal
  0 siblings, 0 replies; 56+ messages in thread
From: Damien Le Moal @ 2023-03-08  3:42 UTC (permalink / raw)
  To: Randy Dunlap, Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

On 3/8/23 12:23, Randy Dunlap wrote:
>>> OK, I don't know how it happened. I cannot reproduce it now.
>>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>>> appears to be impossible.
>> These patches add `CONFIG_MMU is not set` (for RV32I).
>> But no worries it seems to be a non issue  now.
>>
>> Your thoughts Damien?
>>
> 
> Thanks for reminding me.
> 
> With these 3 patches applied to linux-next-20230307,
> I still get this build error.

Does this help ?

diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
index 2527cf5757ec..7796c5f1d109 100644
--- a/drivers/soc/canaan/Kconfig
+++ b/drivers/soc/canaan/Kconfig
@@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
        bool "Canaan Kendryte K210 SoC system controller"
        depends on RISCV && SOC_CANAAN && OF
        default SOC_CANAAN
-        select PM
-        select MFD_SYSCON
+       select COMMON_CLK_K210
+       select PM
+       select MFD_SYSCON
        help
          Canaan Kendryte K210 SoC system controller driver.

(just noticed that there are whitespace errors here...)

Note that both the sysctl and clk driver depend on RISCV. I think these should
probably also depend on 64BIT, and eventually add a "|| COMPILE_TEST" as well.
So something like this:

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index b6c5bf69a2b2..657a36d2640d 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -431,7 +431,7 @@ config COMMON_CLK_FIXED_MMIO

 config COMMON_CLK_K210
        bool "Clock driver for the Canaan Kendryte K210 SoC"
-       depends on OF && RISCV && SOC_CANAAN
+       depends on OF && RISCV && SOC_CANAAN && (64BIT || COMPILE_TEST)
        default SOC_CANAAN
        help
          Support for the Canaan Kendryte K210 RISC-V SoC clocks.
diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
index 2527cf5757ec..1745a614d2a7 100644
--- a/drivers/soc/canaan/Kconfig
+++ b/drivers/soc/canaan/Kconfig
@@ -2,9 +2,10 @@

 config SOC_K210_SYSCTL
        bool "Canaan Kendryte K210 SoC system controller"
-       depends on RISCV && SOC_CANAAN && OF
+       depends on RISCV && SOC_CANAAN && OF && (64BIT || COMPILE_TEST)
        default SOC_CANAAN
-        select PM
-        select MFD_SYSCON
+       select COMMON_CLK_K210
+       select PM
+       select MFD_SYSCON
        help
          Canaan Kendryte K210 SoC system controller driver.

COMPILE_TEST is optional though, but I do not see any reason why not eventhough
in practice these drivers will likely never end up in 32-bits SoC.


-- 
Damien Le Moal
Western Digital Research


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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-08  3:42                     ` Damien Le Moal
@ 2023-03-08  3:46                       ` Jesse Taube
  -1 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-08  3:46 UTC (permalink / raw)
  To: Damien Le Moal, Randy Dunlap, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 22:42, Damien Le Moal wrote:
> On 3/8/23 12:23, Randy Dunlap wrote:
>>>> OK, I don't know how it happened. I cannot reproduce it now.
>>>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>>>> appears to be impossible.
>>> These patches add `CONFIG_MMU is not set` (for RV32I).
>>> But no worries it seems to be a non issue  now.
>>>
>>> Your thoughts Damien?
>>>
>>
>> Thanks for reminding me.
>>
>> With these 3 patches applied to linux-next-20230307,
>> I still get this build error.
> 
> Does this help ?
> 
> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
> index 2527cf5757ec..7796c5f1d109 100644
> --- a/drivers/soc/canaan/Kconfig
> +++ b/drivers/soc/canaan/Kconfig
> @@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
>          bool "Canaan Kendryte K210 SoC system controller"
>          depends on RISCV && SOC_CANAAN && OF
>          default SOC_CANAAN
> -        select PM
> -        select MFD_SYSCON
> +       select COMMON_CLK_K210
> +       select PM
> +       select MFD_SYSCON
>          help
>            Canaan Kendryte K210 SoC system controller driver.
> 
> (just noticed that there are whitespace errors here...)
> 
> Note that both the sysctl and clk driver depend on RISCV. I think these should
> probably also depend on 64BIT, and eventually add a "|| COMPILE_TEST" as well.
> So something like this:
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index b6c5bf69a2b2..657a36d2640d 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -431,7 +431,7 @@ config COMMON_CLK_FIXED_MMIO
> 
>   config COMMON_CLK_K210
>          bool "Clock driver for the Canaan Kendryte K210 SoC"
> -       depends on OF && RISCV && SOC_CANAAN
> +       depends on OF && RISCV && SOC_CANAAN && (64BIT || COMPILE_TEST)
>          default SOC_CANAAN
>          help
>            Support for the Canaan Kendryte K210 RISC-V SoC clocks.
> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
> index 2527cf5757ec..1745a614d2a7 100644
> --- a/drivers/soc/canaan/Kconfig
> +++ b/drivers/soc/canaan/Kconfig
> @@ -2,9 +2,10 @@
> 
>   config SOC_K210_SYSCTL
>          bool "Canaan Kendryte K210 SoC system controller"
> -       depends on RISCV && SOC_CANAAN && OF
> +       depends on RISCV && SOC_CANAAN && OF && (64BIT || COMPILE_TEST)
>          default SOC_CANAAN
> -        select PM
> -        select MFD_SYSCON
> +       select COMMON_CLK_K210
> +       select PM
> +       select MFD_SYSCON
>          help
>            Canaan Kendryte K210 SoC system controller driver.
> 
> COMPILE_TEST is optional though, but I do not see any reason why not eventhough
> in practice these drivers will likely never end up in 32-bits SoC.
> 
> 

Oh thanks I was in the in the midst of making a similar patch.
Do you want to submit it or shall I. Also thanks for the help with this, 
was using tag 6.2.


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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-08  3:46                       ` Jesse Taube
  0 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-08  3:46 UTC (permalink / raw)
  To: Damien Le Moal, Randy Dunlap, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 22:42, Damien Le Moal wrote:
> On 3/8/23 12:23, Randy Dunlap wrote:
>>>> OK, I don't know how it happened. I cannot reproduce it now.
>>>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>>>> appears to be impossible.
>>> These patches add `CONFIG_MMU is not set` (for RV32I).
>>> But no worries it seems to be a non issue  now.
>>>
>>> Your thoughts Damien?
>>>
>>
>> Thanks for reminding me.
>>
>> With these 3 patches applied to linux-next-20230307,
>> I still get this build error.
> 
> Does this help ?
> 
> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
> index 2527cf5757ec..7796c5f1d109 100644
> --- a/drivers/soc/canaan/Kconfig
> +++ b/drivers/soc/canaan/Kconfig
> @@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
>          bool "Canaan Kendryte K210 SoC system controller"
>          depends on RISCV && SOC_CANAAN && OF
>          default SOC_CANAAN
> -        select PM
> -        select MFD_SYSCON
> +       select COMMON_CLK_K210
> +       select PM
> +       select MFD_SYSCON
>          help
>            Canaan Kendryte K210 SoC system controller driver.
> 
> (just noticed that there are whitespace errors here...)
> 
> Note that both the sysctl and clk driver depend on RISCV. I think these should
> probably also depend on 64BIT, and eventually add a "|| COMPILE_TEST" as well.
> So something like this:
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index b6c5bf69a2b2..657a36d2640d 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -431,7 +431,7 @@ config COMMON_CLK_FIXED_MMIO
> 
>   config COMMON_CLK_K210
>          bool "Clock driver for the Canaan Kendryte K210 SoC"
> -       depends on OF && RISCV && SOC_CANAAN
> +       depends on OF && RISCV && SOC_CANAAN && (64BIT || COMPILE_TEST)
>          default SOC_CANAAN
>          help
>            Support for the Canaan Kendryte K210 RISC-V SoC clocks.
> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
> index 2527cf5757ec..1745a614d2a7 100644
> --- a/drivers/soc/canaan/Kconfig
> +++ b/drivers/soc/canaan/Kconfig
> @@ -2,9 +2,10 @@
> 
>   config SOC_K210_SYSCTL
>          bool "Canaan Kendryte K210 SoC system controller"
> -       depends on RISCV && SOC_CANAAN && OF
> +       depends on RISCV && SOC_CANAAN && OF && (64BIT || COMPILE_TEST)
>          default SOC_CANAAN
> -        select PM
> -        select MFD_SYSCON
> +       select COMMON_CLK_K210
> +       select PM
> +       select MFD_SYSCON
>          help
>            Canaan Kendryte K210 SoC system controller driver.
> 
> COMPILE_TEST is optional though, but I do not see any reason why not eventhough
> in practice these drivers will likely never end up in 32-bits SoC.
> 
> 

Oh thanks I was in the in the midst of making a similar patch.
Do you want to submit it or shall I. Also thanks for the help with this, 
was using tag 6.2.


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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-08  3:42                     ` Damien Le Moal
@ 2023-03-08  3:51                       ` Randy Dunlap
  -1 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-08  3:51 UTC (permalink / raw)
  To: Damien Le Moal, Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 19:42, Damien Le Moal wrote:
> On 3/8/23 12:23, Randy Dunlap wrote:
>>>> OK, I don't know how it happened. I cannot reproduce it now.
>>>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>>>> appears to be impossible.
>>> These patches add `CONFIG_MMU is not set` (for RV32I).
>>> But no worries it seems to be a non issue  now.
>>>
>>> Your thoughts Damien?
>>>
>>
>> Thanks for reminding me.
>>
>> With these 3 patches applied to linux-next-20230307,
>> I still get this build error.
> 
> Does this help ?
> 
> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
> index 2527cf5757ec..7796c5f1d109 100644
> --- a/drivers/soc/canaan/Kconfig
> +++ b/drivers/soc/canaan/Kconfig
> @@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
>         bool "Canaan Kendryte K210 SoC system controller"
>         depends on RISCV && SOC_CANAAN && OF
>         default SOC_CANAAN
> -        select PM
> -        select MFD_SYSCON
> +       select COMMON_CLK_K210
> +       select PM
> +       select MFD_SYSCON
>         help
>           Canaan Kendryte K210 SoC system controller driver.
> 
> (just noticed that there are whitespace errors here...)

Yes, this patch allows it to build cleanly.
Thanks.

I didn't test any of the below changes.

> Note that both the sysctl and clk driver depend on RISCV. I think these should
> probably also depend on 64BIT, and eventually add a "|| COMPILE_TEST" as well.
> So something like this:
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index b6c5bf69a2b2..657a36d2640d 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -431,7 +431,7 @@ config COMMON_CLK_FIXED_MMIO
> 
>  config COMMON_CLK_K210
>         bool "Clock driver for the Canaan Kendryte K210 SoC"
> -       depends on OF && RISCV && SOC_CANAAN
> +       depends on OF && RISCV && SOC_CANAAN && (64BIT || COMPILE_TEST)
>         default SOC_CANAAN
>         help
>           Support for the Canaan Kendryte K210 RISC-V SoC clocks.
> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
> index 2527cf5757ec..1745a614d2a7 100644
> --- a/drivers/soc/canaan/Kconfig
> +++ b/drivers/soc/canaan/Kconfig
> @@ -2,9 +2,10 @@
> 
>  config SOC_K210_SYSCTL
>         bool "Canaan Kendryte K210 SoC system controller"
> -       depends on RISCV && SOC_CANAAN && OF
> +       depends on RISCV && SOC_CANAAN && OF && (64BIT || COMPILE_TEST)
>         default SOC_CANAAN
> -        select PM
> -        select MFD_SYSCON
> +       select COMMON_CLK_K210
> +       select PM
> +       select MFD_SYSCON
>         help
>           Canaan Kendryte K210 SoC system controller driver.
> 
> COMPILE_TEST is optional though, but I do not see any reason why not eventhough
> in practice these drivers will likely never end up in 32-bits SoC.
> 
> 

-- 
~Randy

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-08  3:51                       ` Randy Dunlap
  0 siblings, 0 replies; 56+ messages in thread
From: Randy Dunlap @ 2023-03-08  3:51 UTC (permalink / raw)
  To: Damien Le Moal, Jesse Taube, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley



On 3/7/23 19:42, Damien Le Moal wrote:
> On 3/8/23 12:23, Randy Dunlap wrote:
>>>> OK, I don't know how it happened. I cannot reproduce it now.
>>>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>>>> appears to be impossible.
>>> These patches add `CONFIG_MMU is not set` (for RV32I).
>>> But no worries it seems to be a non issue  now.
>>>
>>> Your thoughts Damien?
>>>
>>
>> Thanks for reminding me.
>>
>> With these 3 patches applied to linux-next-20230307,
>> I still get this build error.
> 
> Does this help ?
> 
> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
> index 2527cf5757ec..7796c5f1d109 100644
> --- a/drivers/soc/canaan/Kconfig
> +++ b/drivers/soc/canaan/Kconfig
> @@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
>         bool "Canaan Kendryte K210 SoC system controller"
>         depends on RISCV && SOC_CANAAN && OF
>         default SOC_CANAAN
> -        select PM
> -        select MFD_SYSCON
> +       select COMMON_CLK_K210
> +       select PM
> +       select MFD_SYSCON
>         help
>           Canaan Kendryte K210 SoC system controller driver.
> 
> (just noticed that there are whitespace errors here...)

Yes, this patch allows it to build cleanly.
Thanks.

I didn't test any of the below changes.

> Note that both the sysctl and clk driver depend on RISCV. I think these should
> probably also depend on 64BIT, and eventually add a "|| COMPILE_TEST" as well.
> So something like this:
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index b6c5bf69a2b2..657a36d2640d 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -431,7 +431,7 @@ config COMMON_CLK_FIXED_MMIO
> 
>  config COMMON_CLK_K210
>         bool "Clock driver for the Canaan Kendryte K210 SoC"
> -       depends on OF && RISCV && SOC_CANAAN
> +       depends on OF && RISCV && SOC_CANAAN && (64BIT || COMPILE_TEST)
>         default SOC_CANAAN
>         help
>           Support for the Canaan Kendryte K210 RISC-V SoC clocks.
> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
> index 2527cf5757ec..1745a614d2a7 100644
> --- a/drivers/soc/canaan/Kconfig
> +++ b/drivers/soc/canaan/Kconfig
> @@ -2,9 +2,10 @@
> 
>  config SOC_K210_SYSCTL
>         bool "Canaan Kendryte K210 SoC system controller"
> -       depends on RISCV && SOC_CANAAN && OF
> +       depends on RISCV && SOC_CANAAN && OF && (64BIT || COMPILE_TEST)
>         default SOC_CANAAN
> -        select PM
> -        select MFD_SYSCON
> +       select COMMON_CLK_K210
> +       select PM
> +       select MFD_SYSCON
>         help
>           Canaan Kendryte K210 SoC system controller driver.
> 
> COMPILE_TEST is optional though, but I do not see any reason why not eventhough
> in practice these drivers will likely never end up in 32-bits SoC.
> 
> 

-- 
~Randy

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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-08  3:46                       ` Jesse Taube
@ 2023-03-08  4:11                         ` Damien Le Moal
  -1 siblings, 0 replies; 56+ messages in thread
From: Damien Le Moal @ 2023-03-08  4:11 UTC (permalink / raw)
  To: Jesse Taube, Randy Dunlap, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

On 3/8/23 12:46, Jesse Taube wrote:
> 
> 
> On 3/7/23 22:42, Damien Le Moal wrote:
>> On 3/8/23 12:23, Randy Dunlap wrote:
>>>>> OK, I don't know how it happened. I cannot reproduce it now.
>>>>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>>>>> appears to be impossible.
>>>> These patches add `CONFIG_MMU is not set` (for RV32I).
>>>> But no worries it seems to be a non issue  now.
>>>>
>>>> Your thoughts Damien?
>>>>
>>>
>>> Thanks for reminding me.
>>>
>>> With these 3 patches applied to linux-next-20230307,
>>> I still get this build error.
>>
>> Does this help ?
>>
>> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
>> index 2527cf5757ec..7796c5f1d109 100644
>> --- a/drivers/soc/canaan/Kconfig
>> +++ b/drivers/soc/canaan/Kconfig
>> @@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
>>          bool "Canaan Kendryte K210 SoC system controller"
>>          depends on RISCV && SOC_CANAAN && OF
>>          default SOC_CANAAN
>> -        select PM
>> -        select MFD_SYSCON
>> +       select COMMON_CLK_K210
>> +       select PM
>> +       select MFD_SYSCON
>>          help
>>            Canaan Kendryte K210 SoC system controller driver.
>>
>> (just noticed that there are whitespace errors here...)
>>
>> Note that both the sysctl and clk driver depend on RISCV. I think these should
>> probably also depend on 64BIT, and eventually add a "|| COMPILE_TEST" as well.
>> So something like this:
>>
>> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
>> index b6c5bf69a2b2..657a36d2640d 100644
>> --- a/drivers/clk/Kconfig
>> +++ b/drivers/clk/Kconfig
>> @@ -431,7 +431,7 @@ config COMMON_CLK_FIXED_MMIO
>>
>>   config COMMON_CLK_K210
>>          bool "Clock driver for the Canaan Kendryte K210 SoC"
>> -       depends on OF && RISCV && SOC_CANAAN
>> +       depends on OF && RISCV && SOC_CANAAN && (64BIT || COMPILE_TEST)
>>          default SOC_CANAAN
>>          help
>>            Support for the Canaan Kendryte K210 RISC-V SoC clocks.
>> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
>> index 2527cf5757ec..1745a614d2a7 100644
>> --- a/drivers/soc/canaan/Kconfig
>> +++ b/drivers/soc/canaan/Kconfig
>> @@ -2,9 +2,10 @@
>>
>>   config SOC_K210_SYSCTL
>>          bool "Canaan Kendryte K210 SoC system controller"
>> -       depends on RISCV && SOC_CANAAN && OF
>> +       depends on RISCV && SOC_CANAAN && OF && (64BIT || COMPILE_TEST)
>>          default SOC_CANAAN
>> -        select PM
>> -        select MFD_SYSCON
>> +       select COMMON_CLK_K210
>> +       select PM
>> +       select MFD_SYSCON
>>          help
>>            Canaan Kendryte K210 SoC system controller driver.
>>
>> COMPILE_TEST is optional though, but I do not see any reason why not eventhough
>> in practice these drivers will likely never end up in 32-bits SoC.
>>
>>
> 
> Oh thanks I was in the in the midst of making a similar patch.
> Do you want to submit it or shall I. Also thanks for the help with this, 
> was using tag 6.2.

I am busy with other stuff and do not have time to properly test this. So please
feel free to go ahead and send something fully tested.

-- 
Damien Le Moal
Western Digital Research


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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-08  4:11                         ` Damien Le Moal
  0 siblings, 0 replies; 56+ messages in thread
From: Damien Le Moal @ 2023-03-08  4:11 UTC (permalink / raw)
  To: Jesse Taube, Randy Dunlap, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley

On 3/8/23 12:46, Jesse Taube wrote:
> 
> 
> On 3/7/23 22:42, Damien Le Moal wrote:
>> On 3/8/23 12:23, Randy Dunlap wrote:
>>>>> OK, I don't know how it happened. I cannot reproduce it now.
>>>>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>>>>> appears to be impossible.
>>>> These patches add `CONFIG_MMU is not set` (for RV32I).
>>>> But no worries it seems to be a non issue  now.
>>>>
>>>> Your thoughts Damien?
>>>>
>>>
>>> Thanks for reminding me.
>>>
>>> With these 3 patches applied to linux-next-20230307,
>>> I still get this build error.
>>
>> Does this help ?
>>
>> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
>> index 2527cf5757ec..7796c5f1d109 100644
>> --- a/drivers/soc/canaan/Kconfig
>> +++ b/drivers/soc/canaan/Kconfig
>> @@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
>>          bool "Canaan Kendryte K210 SoC system controller"
>>          depends on RISCV && SOC_CANAAN && OF
>>          default SOC_CANAAN
>> -        select PM
>> -        select MFD_SYSCON
>> +       select COMMON_CLK_K210
>> +       select PM
>> +       select MFD_SYSCON
>>          help
>>            Canaan Kendryte K210 SoC system controller driver.
>>
>> (just noticed that there are whitespace errors here...)
>>
>> Note that both the sysctl and clk driver depend on RISCV. I think these should
>> probably also depend on 64BIT, and eventually add a "|| COMPILE_TEST" as well.
>> So something like this:
>>
>> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
>> index b6c5bf69a2b2..657a36d2640d 100644
>> --- a/drivers/clk/Kconfig
>> +++ b/drivers/clk/Kconfig
>> @@ -431,7 +431,7 @@ config COMMON_CLK_FIXED_MMIO
>>
>>   config COMMON_CLK_K210
>>          bool "Clock driver for the Canaan Kendryte K210 SoC"
>> -       depends on OF && RISCV && SOC_CANAAN
>> +       depends on OF && RISCV && SOC_CANAAN && (64BIT || COMPILE_TEST)
>>          default SOC_CANAAN
>>          help
>>            Support for the Canaan Kendryte K210 RISC-V SoC clocks.
>> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
>> index 2527cf5757ec..1745a614d2a7 100644
>> --- a/drivers/soc/canaan/Kconfig
>> +++ b/drivers/soc/canaan/Kconfig
>> @@ -2,9 +2,10 @@
>>
>>   config SOC_K210_SYSCTL
>>          bool "Canaan Kendryte K210 SoC system controller"
>> -       depends on RISCV && SOC_CANAAN && OF
>> +       depends on RISCV && SOC_CANAAN && OF && (64BIT || COMPILE_TEST)
>>          default SOC_CANAAN
>> -        select PM
>> -        select MFD_SYSCON
>> +       select COMMON_CLK_K210
>> +       select PM
>> +       select MFD_SYSCON
>>          help
>>            Canaan Kendryte K210 SoC system controller driver.
>>
>> COMPILE_TEST is optional though, but I do not see any reason why not eventhough
>> in practice these drivers will likely never end up in 32-bits SoC.
>>
>>
> 
> Oh thanks I was in the in the midst of making a similar patch.
> Do you want to submit it or shall I. Also thanks for the help with this, 
> was using tag 6.2.

I am busy with other stuff and do not have time to properly test this. So please
feel free to go ahead and send something fully tested.

-- 
Damien Le Moal
Western Digital Research


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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-08  4:11                         ` Damien Le Moal
@ 2023-03-14 18:35                           ` Jesse Taube
  -1 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-14 18:35 UTC (permalink / raw)
  To: Damien Le Moal, Randy Dunlap, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley, Conor Dooley



On 3/7/23 23:11, Damien Le Moal wrote:
> On 3/8/23 12:46, Jesse Taube wrote:
>>
>>
>> On 3/7/23 22:42, Damien Le Moal wrote:
>>> On 3/8/23 12:23, Randy Dunlap wrote:
>>>>>> OK, I don't know how it happened. I cannot reproduce it now.
>>>>>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>>>>>> appears to be impossible.
>>>>> These patches add `CONFIG_MMU is not set` (for RV32I).
>>>>> But no worries it seems to be a non issue  now.
>>>>>
>>>>> Your thoughts Damien?
>>>>>
>>>>
>>>> Thanks for reminding me.
>>>>
>>>> With these 3 patches applied to linux-next-20230307,
>>>> I still get this build error.
>>>
>>> Does this help ?
>>>
>>> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
>>> index 2527cf5757ec..7796c5f1d109 100644
>>> --- a/drivers/soc/canaan/Kconfig
>>> +++ b/drivers/soc/canaan/Kconfig
>>> @@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
>>>           bool "Canaan Kendryte K210 SoC system controller"
>>>           depends on RISCV && SOC_CANAAN && OF
>>>           default SOC_CANAAN
>>> -        select PM
>>> -        select MFD_SYSCON
>>> +       select COMMON_CLK_K210

Ok so this has nothing to do with my patch-set actually and will happen 
on 64BIT as well.
the commit that brought in this bug is:

RISC-V: stop directly selecting drivers for SOC_CANAAN 
3af577f9826fdddefac42b35fc5eb3912c5b7d85

I have tested the patches Damien here they work on 64BIT and 32BIT.
The change to drivers/clk/Kconfig is not strictly necessary but makes 
scene. I don't think they need to be tested on 32bit so we can omit 
COMPILE_TEST.

If needed i can submit the patches, which I will author under Damien.

As far as I can see there is nothing holding back this set as the issue 
found has no relation to this set.

Thanks,
Jesse Taube

>>> +       select PM
>>> +       select MFD_SYSCON
>>>           help
>>>             Canaan Kendryte K210 SoC system controller driver.
>>>
>>> (just noticed that there are whitespace errors here...)
>>>
>>> Note that both the sysctl and clk driver depend on RISCV. I think these should
>>> probably also depend on 64BIT, and eventually add a "|| COMPILE_TEST" as well.
>>> So something like this:
>>>
>>> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
>>> index b6c5bf69a2b2..657a36d2640d 100644
>>> --- a/drivers/clk/Kconfig
>>> +++ b/drivers/clk/Kconfig
>>> @@ -431,7 +431,7 @@ config COMMON_CLK_FIXED_MMIO
>>>
>>>    config COMMON_CLK_K210
>>>           bool "Clock driver for the Canaan Kendryte K210 SoC"
>>> -       depends on OF && RISCV && SOC_CANAAN
>>> +       depends on OF && RISCV && SOC_CANAAN && (64BIT || COMPILE_TEST)
>>>           default SOC_CANAAN
>>>           help
>>>             Support for the Canaan Kendryte K210 RISC-V SoC clocks.
>>> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
>>> index 2527cf5757ec..1745a614d2a7 100644
>>> --- a/drivers/soc/canaan/Kconfig
>>> +++ b/drivers/soc/canaan/Kconfig
>>> @@ -2,9 +2,10 @@
>>>
>>>    config SOC_K210_SYSCTL
>>>           bool "Canaan Kendryte K210 SoC system controller"
>>> -       depends on RISCV && SOC_CANAAN && OF
>>> +       depends on RISCV && SOC_CANAAN && OF && (64BIT || COMPILE_TEST)
>>>           default SOC_CANAAN
>>> -        select PM
>>> -        select MFD_SYSCON
>>> +       select COMMON_CLK_K210
>>> +       select PM
>>> +       select MFD_SYSCON
>>>           help
>>>             Canaan Kendryte K210 SoC system controller driver.
>>>
>>> COMPILE_TEST is optional though, but I do not see any reason why not eventhough
>>> in practice these drivers will likely never end up in 32-bits SoC.
>>>
>>>
>>
>> Oh thanks I was in the in the midst of making a similar patch.
>> Do you want to submit it or shall I. Also thanks for the help with this,
>> was using tag 6.2.
> 
> I am busy with other stuff and do not have time to properly test this. So please
> feel free to go ahead and send something fully tested.
> 

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-14 18:35                           ` Jesse Taube
  0 siblings, 0 replies; 56+ messages in thread
From: Jesse Taube @ 2023-03-14 18:35 UTC (permalink / raw)
  To: Damien Le Moal, Randy Dunlap, linux-riscv
  Cc: linux-clk, linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley, Conor Dooley



On 3/7/23 23:11, Damien Le Moal wrote:
> On 3/8/23 12:46, Jesse Taube wrote:
>>
>>
>> On 3/7/23 22:42, Damien Le Moal wrote:
>>> On 3/8/23 12:23, Randy Dunlap wrote:
>>>>>> OK, I don't know how it happened. I cannot reproduce it now.
>>>>>> The failing .config files has CONFIG_MMU is not set (for RV32I), which
>>>>>> appears to be impossible.
>>>>> These patches add `CONFIG_MMU is not set` (for RV32I).
>>>>> But no worries it seems to be a non issue  now.
>>>>>
>>>>> Your thoughts Damien?
>>>>>
>>>>
>>>> Thanks for reminding me.
>>>>
>>>> With these 3 patches applied to linux-next-20230307,
>>>> I still get this build error.
>>>
>>> Does this help ?
>>>
>>> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
>>> index 2527cf5757ec..7796c5f1d109 100644
>>> --- a/drivers/soc/canaan/Kconfig
>>> +++ b/drivers/soc/canaan/Kconfig
>>> @@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
>>>           bool "Canaan Kendryte K210 SoC system controller"
>>>           depends on RISCV && SOC_CANAAN && OF
>>>           default SOC_CANAAN
>>> -        select PM
>>> -        select MFD_SYSCON
>>> +       select COMMON_CLK_K210

Ok so this has nothing to do with my patch-set actually and will happen 
on 64BIT as well.
the commit that brought in this bug is:

RISC-V: stop directly selecting drivers for SOC_CANAAN 
3af577f9826fdddefac42b35fc5eb3912c5b7d85

I have tested the patches Damien here they work on 64BIT and 32BIT.
The change to drivers/clk/Kconfig is not strictly necessary but makes 
scene. I don't think they need to be tested on 32bit so we can omit 
COMPILE_TEST.

If needed i can submit the patches, which I will author under Damien.

As far as I can see there is nothing holding back this set as the issue 
found has no relation to this set.

Thanks,
Jesse Taube

>>> +       select PM
>>> +       select MFD_SYSCON
>>>           help
>>>             Canaan Kendryte K210 SoC system controller driver.
>>>
>>> (just noticed that there are whitespace errors here...)
>>>
>>> Note that both the sysctl and clk driver depend on RISCV. I think these should
>>> probably also depend on 64BIT, and eventually add a "|| COMPILE_TEST" as well.
>>> So something like this:
>>>
>>> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
>>> index b6c5bf69a2b2..657a36d2640d 100644
>>> --- a/drivers/clk/Kconfig
>>> +++ b/drivers/clk/Kconfig
>>> @@ -431,7 +431,7 @@ config COMMON_CLK_FIXED_MMIO
>>>
>>>    config COMMON_CLK_K210
>>>           bool "Clock driver for the Canaan Kendryte K210 SoC"
>>> -       depends on OF && RISCV && SOC_CANAAN
>>> +       depends on OF && RISCV && SOC_CANAAN && (64BIT || COMPILE_TEST)
>>>           default SOC_CANAAN
>>>           help
>>>             Support for the Canaan Kendryte K210 RISC-V SoC clocks.
>>> diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
>>> index 2527cf5757ec..1745a614d2a7 100644
>>> --- a/drivers/soc/canaan/Kconfig
>>> +++ b/drivers/soc/canaan/Kconfig
>>> @@ -2,9 +2,10 @@
>>>
>>>    config SOC_K210_SYSCTL
>>>           bool "Canaan Kendryte K210 SoC system controller"
>>> -       depends on RISCV && SOC_CANAAN && OF
>>> +       depends on RISCV && SOC_CANAAN && OF && (64BIT || COMPILE_TEST)
>>>           default SOC_CANAAN
>>> -        select PM
>>> -        select MFD_SYSCON
>>> +       select COMMON_CLK_K210
>>> +       select PM
>>> +       select MFD_SYSCON
>>>           help
>>>             Canaan Kendryte K210 SoC system controller driver.
>>>
>>> COMPILE_TEST is optional though, but I do not see any reason why not eventhough
>>> in practice these drivers will likely never end up in 32-bits SoC.
>>>
>>>
>>
>> Oh thanks I was in the in the midst of making a similar patch.
>> Do you want to submit it or shall I. Also thanks for the help with this,
>> was using tag 6.2.
> 
> I am busy with other stuff and do not have time to properly test this. So please
> feel free to go ahead and send something fully tested.
> 

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

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-14 18:35                           ` Jesse Taube
@ 2023-03-14 19:16                             ` Conor Dooley
  -1 siblings, 0 replies; 56+ messages in thread
From: Conor Dooley @ 2023-03-14 19:16 UTC (permalink / raw)
  To: Jesse Taube
  Cc: Damien Le Moal, Randy Dunlap, linux-riscv, linux-clk,
	linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley, Conor Dooley

[-- Attachment #1: Type: text/plain, Size: 2619 bytes --]

On Tue, Mar 14, 2023 at 02:35:39PM -0400, Jesse Taube wrote:
> 
> 
> On 3/7/23 23:11, Damien Le Moal wrote:
> > On 3/8/23 12:46, Jesse Taube wrote:
> > > 
> > > 
> > > On 3/7/23 22:42, Damien Le Moal wrote:
> > > > On 3/8/23 12:23, Randy Dunlap wrote:
> > > > > > > OK, I don't know how it happened. I cannot reproduce it now.
> > > > > > > The failing .config files has CONFIG_MMU is not set (for RV32I), which
> > > > > > > appears to be impossible.
> > > > > > These patches add `CONFIG_MMU is not set` (for RV32I).
> > > > > > But no worries it seems to be a non issue  now.
> > > > > > 
> > > > > > Your thoughts Damien?
> > > > > > 
> > > > > 
> > > > > Thanks for reminding me.
> > > > > 
> > > > > With these 3 patches applied to linux-next-20230307,
> > > > > I still get this build error.
> > > > 
> > > > Does this help ?
> > > > 
> > > > diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
> > > > index 2527cf5757ec..7796c5f1d109 100644
> > > > --- a/drivers/soc/canaan/Kconfig
> > > > +++ b/drivers/soc/canaan/Kconfig
> > > > @@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
> > > >           bool "Canaan Kendryte K210 SoC system controller"
> > > >           depends on RISCV && SOC_CANAAN && OF
> > > >           default SOC_CANAAN
> > > > -        select PM
> > > > -        select MFD_SYSCON
> > > > +       select COMMON_CLK_K210

Ideally this would be depends on, rather than select, so that we avoid
selecting user visible symbols like that.

> Ok so this has nothing to do with my patch-set actually and will happen on
> 64BIT as well.
> the commit that brought in this bug is:
> 
> RISC-V: stop directly selecting drivers for SOC_CANAAN
> 3af577f9826fdddefac42b35fc5eb3912c5b7d85

Ah right, because the select in Kconfig.socs enforced that if the
conditions were correct for the system controller driver to be enabled,
the clock driver would always be present.
In converting the select in kconfig.socs to a default "on location", I
preserved the default behaviour but not the dependency.

> I have tested the patches Damien here they work on 64BIT and 32BIT.
> The change to drivers/clk/Kconfig is not strictly necessary but makes scene.
> I don't think they need to be tested on 32bit so we can omit COMPILE_TEST.
> 
> If needed i can submit the patches, which I will author under Damien.

It probably does need fixing to satisfy the randconfigs, submit away!

> As far as I can see there is nothing holding back this set as the issue
> found has no relation to this set.

Yup. You're currently in the queue on patchwork.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-14 19:16                             ` Conor Dooley
  0 siblings, 0 replies; 56+ messages in thread
From: Conor Dooley @ 2023-03-14 19:16 UTC (permalink / raw)
  To: Jesse Taube
  Cc: Damien Le Moal, Randy Dunlap, linux-riscv, linux-clk,
	linux-kernel, Yimin Gu, Damien Le Moal, Stephen Boyd,
	Michael Turquette, Waldemar Brodkorb, Albert Ou, Palmer Dabbelt,
	Paul Walmsley, Conor Dooley


[-- Attachment #1.1: Type: text/plain, Size: 2619 bytes --]

On Tue, Mar 14, 2023 at 02:35:39PM -0400, Jesse Taube wrote:
> 
> 
> On 3/7/23 23:11, Damien Le Moal wrote:
> > On 3/8/23 12:46, Jesse Taube wrote:
> > > 
> > > 
> > > On 3/7/23 22:42, Damien Le Moal wrote:
> > > > On 3/8/23 12:23, Randy Dunlap wrote:
> > > > > > > OK, I don't know how it happened. I cannot reproduce it now.
> > > > > > > The failing .config files has CONFIG_MMU is not set (for RV32I), which
> > > > > > > appears to be impossible.
> > > > > > These patches add `CONFIG_MMU is not set` (for RV32I).
> > > > > > But no worries it seems to be a non issue  now.
> > > > > > 
> > > > > > Your thoughts Damien?
> > > > > > 
> > > > > 
> > > > > Thanks for reminding me.
> > > > > 
> > > > > With these 3 patches applied to linux-next-20230307,
> > > > > I still get this build error.
> > > > 
> > > > Does this help ?
> > > > 
> > > > diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
> > > > index 2527cf5757ec..7796c5f1d109 100644
> > > > --- a/drivers/soc/canaan/Kconfig
> > > > +++ b/drivers/soc/canaan/Kconfig
> > > > @@ -4,7 +4,8 @@ config SOC_K210_SYSCTL
> > > >           bool "Canaan Kendryte K210 SoC system controller"
> > > >           depends on RISCV && SOC_CANAAN && OF
> > > >           default SOC_CANAAN
> > > > -        select PM
> > > > -        select MFD_SYSCON
> > > > +       select COMMON_CLK_K210

Ideally this would be depends on, rather than select, so that we avoid
selecting user visible symbols like that.

> Ok so this has nothing to do with my patch-set actually and will happen on
> 64BIT as well.
> the commit that brought in this bug is:
> 
> RISC-V: stop directly selecting drivers for SOC_CANAAN
> 3af577f9826fdddefac42b35fc5eb3912c5b7d85

Ah right, because the select in Kconfig.socs enforced that if the
conditions were correct for the system controller driver to be enabled,
the clock driver would always be present.
In converting the select in kconfig.socs to a default "on location", I
preserved the default behaviour but not the dependency.

> I have tested the patches Damien here they work on 64BIT and 32BIT.
> The change to drivers/clk/Kconfig is not strictly necessary but makes scene.
> I don't think they need to be tested on 32bit so we can omit COMPILE_TEST.
> 
> If needed i can submit the patches, which I will author under Damien.

It probably does need fixing to satisfy the randconfigs, submit away!

> As far as I can see there is nothing holding back this set as the issue
> found has no relation to this set.

Yup. You're currently in the queue on patchwork.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

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

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

* Re: [PATCH v3 0/3]  Add RISC-V 32 NOMMU support
  2023-03-01  0:26 ` Jesse Taube
@ 2023-03-25 11:57   ` Conor Dooley
  -1 siblings, 0 replies; 56+ messages in thread
From: Conor Dooley @ 2023-03-25 11:57 UTC (permalink / raw)
  To: Jesse Taube
  Cc: linux-riscv, linux-clk, linux-kernel, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

On Tue, Feb 28, 2023 at 07:26:54PM -0500, Jesse Taube wrote:
> This patch-set aims to add NOMMU support to RV32.
> Many people want to build simple emulators or HDL
> models of RISC-V this patch makes it possible to
> run linux on them.

> Jesse Taube (1):
>   riscv: configs: Add nommu PHONY defconfig for RV32
> Yimin Gu (1):
>   riscv: Kconfig: Allow RV32 to build with no MMU

For these two:
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

I'll add an rv32 nommu build to the patchwork CI once this lands I
suppose!

Thanks,
Conor.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v3 0/3]  Add RISC-V 32 NOMMU support
@ 2023-03-25 11:57   ` Conor Dooley
  0 siblings, 0 replies; 56+ messages in thread
From: Conor Dooley @ 2023-03-25 11:57 UTC (permalink / raw)
  To: Jesse Taube
  Cc: linux-riscv, linux-clk, linux-kernel, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley


[-- Attachment #1.1: Type: text/plain, Size: 545 bytes --]

On Tue, Feb 28, 2023 at 07:26:54PM -0500, Jesse Taube wrote:
> This patch-set aims to add NOMMU support to RV32.
> Many people want to build simple emulators or HDL
> models of RISC-V this patch makes it possible to
> run linux on them.

> Jesse Taube (1):
>   riscv: configs: Add nommu PHONY defconfig for RV32
> Yimin Gu (1):
>   riscv: Kconfig: Allow RV32 to build with no MMU

For these two:
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

I'll add an rv32 nommu build to the patchwork CI once this lands I
suppose!

Thanks,
Conor.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

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

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

* Re: (subset) [PATCH v3 0/3] Add RISC-V 32 NOMMU support
  2023-03-01  0:26 ` Jesse Taube
@ 2023-03-28 18:50   ` Palmer Dabbelt
  -1 siblings, 0 replies; 56+ messages in thread
From: Palmer Dabbelt @ 2023-03-28 18:50 UTC (permalink / raw)
  To: linux-riscv, Jesse Taube
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley


On Tue, 28 Feb 2023 19:26:54 -0500, Jesse Taube wrote:
> This patch-set aims to add NOMMU support to RV32.
> Many people want to build simple emulators or HDL
> models of RISC-V this patch makes it possible to
> run linux on them.
> 
> Yimin Gu is the original author of this set.
> Submitted here:
> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
> 
> [...]

Applied, thanks!

[2/3] riscv: Kconfig: Allow RV32 to build with no MMU
      https://git.kernel.org/palmer/c/b5e2c507b06c
[3/3] riscv: configs: Add nommu PHONY defconfig for RV32
      https://git.kernel.org/palmer/c/77c0c966719f

Best regards,
-- 
Palmer Dabbelt <palmer@rivosinc.com>


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

* Re: (subset) [PATCH v3 0/3] Add RISC-V 32 NOMMU support
@ 2023-03-28 18:50   ` Palmer Dabbelt
  0 siblings, 0 replies; 56+ messages in thread
From: Palmer Dabbelt @ 2023-03-28 18:50 UTC (permalink / raw)
  To: linux-riscv, Jesse Taube
  Cc: linux-clk, linux-kernel, Jesse Taube, Yimin Gu, Damien Le Moal,
	Stephen Boyd, Michael Turquette, Waldemar Brodkorb, Albert Ou,
	Palmer Dabbelt, Paul Walmsley


On Tue, 28 Feb 2023 19:26:54 -0500, Jesse Taube wrote:
> This patch-set aims to add NOMMU support to RV32.
> Many people want to build simple emulators or HDL
> models of RISC-V this patch makes it possible to
> run linux on them.
> 
> Yimin Gu is the original author of this set.
> Submitted here:
> https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html
> 
> [...]

Applied, thanks!

[2/3] riscv: Kconfig: Allow RV32 to build with no MMU
      https://git.kernel.org/palmer/c/b5e2c507b06c
[3/3] riscv: configs: Add nommu PHONY defconfig for RV32
      https://git.kernel.org/palmer/c/77c0c966719f

Best regards,
-- 
Palmer Dabbelt <palmer@rivosinc.com>


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

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

end of thread, other threads:[~2023-03-28 20:00 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01  0:26 [PATCH v3 0/3] Add RISC-V 32 NOMMU support Jesse Taube
2023-03-01  0:26 ` Jesse Taube
2023-03-01  0:26 ` [PATCH v3 1/3] clk: k210: remove an implicit 64-bit division Jesse Taube
2023-03-01  0:26   ` Jesse Taube
2023-03-01  1:19   ` Damien Le Moal
2023-03-01  1:19     ` Damien Le Moal
2023-03-06 22:31   ` Stephen Boyd
2023-03-06 22:31     ` Stephen Boyd
2023-03-06 22:35     ` Conor Dooley
2023-03-06 22:35       ` Conor Dooley
2023-03-06 22:37       ` Stephen Boyd
2023-03-06 22:37         ` Stephen Boyd
2023-03-06 22:41   ` Stephen Boyd
2023-03-06 22:41     ` Stephen Boyd
2023-03-06 22:48     ` Palmer Dabbelt
2023-03-06 22:48       ` Palmer Dabbelt
2023-03-01  0:26 ` [PATCH v3 2/3] riscv: Kconfig: Allow RV32 to build with no MMU Jesse Taube
2023-03-01  0:26   ` Jesse Taube
2023-03-01  1:22   ` Damien Le Moal
2023-03-01  1:22     ` Damien Le Moal
2023-03-01  0:26 ` [PATCH v3 3/3] riscv: configs: Add nommu PHONY defconfig for RV32 Jesse Taube
2023-03-01  0:26   ` Jesse Taube
2023-03-01  4:07 ` [PATCH v3 0/3] Add RISC-V 32 NOMMU support Randy Dunlap
2023-03-01  4:07   ` Randy Dunlap
2023-03-01  4:42   ` Damien Le Moal
2023-03-01  4:42     ` Damien Le Moal
2023-03-08  1:26     ` Jesse Taube
2023-03-08  1:26       ` Jesse Taube
2023-03-08  2:16       ` Randy Dunlap
2023-03-08  2:16         ` Randy Dunlap
2023-03-08  2:30         ` Jesse Taube
2023-03-08  2:30           ` Jesse Taube
2023-03-08  2:33           ` Randy Dunlap
2023-03-08  2:33             ` Randy Dunlap
2023-03-08  2:51             ` Randy Dunlap
2023-03-08  2:51               ` Randy Dunlap
2023-03-08  2:54               ` Jesse Taube
2023-03-08  2:54                 ` Jesse Taube
2023-03-08  3:23                 ` Randy Dunlap
2023-03-08  3:23                   ` Randy Dunlap
2023-03-08  3:42                   ` Damien Le Moal
2023-03-08  3:42                     ` Damien Le Moal
2023-03-08  3:46                     ` Jesse Taube
2023-03-08  3:46                       ` Jesse Taube
2023-03-08  4:11                       ` Damien Le Moal
2023-03-08  4:11                         ` Damien Le Moal
2023-03-14 18:35                         ` Jesse Taube
2023-03-14 18:35                           ` Jesse Taube
2023-03-14 19:16                           ` Conor Dooley
2023-03-14 19:16                             ` Conor Dooley
2023-03-08  3:51                     ` Randy Dunlap
2023-03-08  3:51                       ` Randy Dunlap
2023-03-25 11:57 ` Conor Dooley
2023-03-25 11:57   ` Conor Dooley
2023-03-28 18:50 ` (subset) " Palmer Dabbelt
2023-03-28 18:50   ` Palmer Dabbelt

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.