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: <tencent_E7385EE2AEC4B486DC343AF1A108DE68370A@qq.com>
Date: Wed, 6 Mar 2024 00:55:52 +0800
From: Yangyu Chen <cyy@...self.name>
To: Damien Le Moal <dlemoal@...nel.org>
Cc: linux-riscv@...ts.infradead.org,
 Conor Dooley <conor@...nel.org>,
 Rob Herring <robh+dt@...nel.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
 Paul Walmsley <paul.walmsley@...ive.com>,
 Palmer Dabbelt <palmer@...belt.com>,
 Albert Ou <aou@...s.berkeley.edu>,
 Guo Ren <guoren@...nel.org>,
 devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org,
 Conor Dooley <conor.dooley@...rochip.com>
Subject: Re: [PATCH v3 7/7] riscv: config: enable SOC_CANAAN in defconfig



> On Mar 5, 2024, at 07:50, Damien Le Moal <dlemoal@...nel.org> wrote:
> 
> On 3/5/24 06:06, Yangyu Chen wrote:
>> Since K230 has been supported, allow SOC_CANAAN to be selected to build dt
>> and drivers for it in defconfig.
>> 
>> Signed-off-by: Yangyu Chen <cyy@...self.name>
>> Reviewed-by: Conor Dooley <conor.dooley@...rochip.com>
>> ---
>> arch/riscv/configs/defconfig | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
>> index 89a009a580fe..20b557ec28df 100644
>> --- a/arch/riscv/configs/defconfig
>> +++ b/arch/riscv/configs/defconfig
>> @@ -33,6 +33,7 @@ CONFIG_SOC_STARFIVE=y
>> CONFIG_ARCH_SUNXI=y
>> CONFIG_ARCH_THEAD=y
>> CONFIG_SOC_VIRT=y
>> +CONFIG_SOC_CANAAN=y
> 
> Given that the k210 need !MMU, including it like this in the defconfig is
> odd... I do not even see how that could work. But that depends on patch 5,
> which does not seem OK to me.
> 

I don’t know why “not seem OK” here.

I will show the console to tell you what changes in defconfig:

```console
$  linux git:(rv_builtin_dtb_v3) make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- defconfig
*** Default configuration is based on 'defconfig'
#
# configuration written to .config
#
$  linux git:(rv_builtin_dtb_v3) cp .config .config.bak
$  linux git:(rv_builtin_dtb_v3) git checkout k230_dt_initial_v3
Switched to branch 'k230_dt_initial_v3'
$  linux git:(k230_dt_initial_v3) make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- defconfig
*** Default configuration is based on 'defconfig'
#
# configuration written to .config
#
$  linux git:(k230_dt_initial_v3) diff .config .config.bak
301,302d300
< CONFIG_ARCH_CANAAN=y
< CONFIG_SOC_CANAAN=y
2678d2675
< CONFIG_PINCTRL_K210=y
4621d4617
< CONFIG_COMMON_CLK_K210=y
4<
706,4707d4701
< CONFIG_SOC_K210_SYSCTL=y
5334d5327
< CONFIG_ARCH_HAS_RESET_CONTROLLER=y
5336d5328
< CONFIG_RESET_K210=y
$  linux git:(k230_dt_initial_v3) grep -r "CONFIG_ARCH_HAS_RESET_CONTROLLER"
kernel/config_data:CONFIG_ARCH_HAS_RESET_CONTROLLER=y
include/config/auto.conf:CONFIG_ARCH_HAS_RESET_CONTROLLER=y
include/generated/autoconf.h:#define CONFIG_ARCH_HAS_RESET_CONTROLLER 1
include/generated/rustc_cfg:--cfg=CONFIG_ARCH_HAS_RESET_CONTROLLER
include/generated/rustc_cfg:--cfg=CONFIG_ARCH_HAS_RESET_CONTROLLER="y"
config:CONFIG_ARCH_HAS_RESET_CONTROLLER=y
$  linux git:(k230_dt_initial_v3)
```

As you can see, we only have some drivers enabled for K210 and
CONFIG_ARCH_HAS_RESET_CONTROLLER being enabled. The next grep -r shows it
does not change the kernel behavior.

>> CONFIG_SMP=y
>> CONFIG_HOTPLUG_CPU=y
>> CONFIG_PM=y
> 
> -- 
> Damien Le Moal
> Western Digital Research



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ