lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3fb242e-646e-50b5-7dba-17b228bb32aa@opensource.wdc.com>
Date:   Wed, 8 Mar 2023 12:42:06 +0900
From:   Damien Le Moal <damien.lemoal@...nsource.wdc.com>
To:     Randy Dunlap <rdunlap@...radead.org>,
        Jesse Taube <mr.bossman075@...il.com>,
        linux-riscv@...ts.infradead.org
Cc:     linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        Yimin Gu <ustcymgu@...il.com>,
        Damien Le Moal <damien.lemoal@....com>,
        Stephen Boyd <sboyd@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Waldemar Brodkorb <wbx@...nadk.org>,
        Albert Ou <aou@...s.berkeley.edu>,
        Palmer Dabbelt <palmer@...belt.com>,
        Paul Walmsley <paul.walmsley@...ive.com>
Subject: Re: [PATCH v3 0/3] Add RISC-V 32 NOMMU support

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ