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: <IA1PR20MB49534EDF586FCC784C81C5ABBBC1A@IA1PR20MB4953.namprd20.prod.outlook.com>
Date:   Thu, 28 Sep 2023 08:34:42 +0800
From:   Inochi Amaoto <inochiama@...look.com>
To:     Conor Dooley <conor@...nel.org>
Cc:     aou@...s.berkeley.edu, chao.wei@...hgo.com,
        devicetree@...r.kernel.org, emil.renner.berthing@...onical.com,
        guoren@...nel.org, jszhang@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, linux-kernel@...r.kernel.org,
        linux-riscv@...ts.infradead.org, palmer@...belt.com,
        paul.walmsley@...ive.com, robh+dt@...nel.org,
        xiaoguang.xing@...hgo.com, Anup Patel <apatel@...tanamicro.com>,
        Chen Wang <wangchen20@...as.ac.cn>,
        Inochi Amaoto <inochiama@...look.com>
Subject: Re: [PATCH v3 06/11] dt-bindings: timer: Add Sophgo sg2042 CLINT timer

>Hey,
>
>On Wed, Sep 27, 2023 at 05:01:37PM +0800, Chen Wang wrote:
>> From: Inochi Amaoto <inochiama@...look.com>
>>
>> The clint of Sophgo sg2042 is incompatible with the standard sifive
>> clint, as the timer and ipi device on the different address, and can
>> not be handled by the sifive,clint DT.
>>
>> In addition, the timers of sg2042 are mapped by per cluster, which is
>> hard to merge with its ipi device.
>
>I think the description here is kinda poor, it needs to be explained
>that this is an implementation of the not frozen & likely abandoned
>aclint spec.
>

Thanks, I will explain this.

>> To avoid conficts caused by using the same clint compatible string when
>> this device is parsed by SBI, add a new vendor specific compatible string
>> to identify the timer of sg2042 soc.
>
>And this whole section about avoiding conflicts is not relevant, since
>the binding is specifically for the timer. It'd be better to mention why
>a single compatible cannot work for all elements, than bring up a
>situation that does not exist and would be a misuse of the binding in
>the first place.
>

Thanks

>> Signed-off-by: Inochi Amaoto <inochiama@...look.com>
>> Signed-off-by: Chen Wang <wangchen20@...as.ac.cn>
>> Signed-off-by: Chen Wang <unicornxw@...il.com>
>
>You only need to sign this off once. The iscas one looks like it
>probably is the relevant signoff?
>
>> ---
>>  .../timer/sophgo,sg2042-clint-mtimer.yaml     | 42 +++++++++++++++++++
>>  1 file changed, 42 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/timer/sophgo,sg2042-clint-mtimer.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/timer/sophgo,sg2042-clint-mtimer.yaml b/Documentation/devicetree/bindings/timer/sophgo,sg2042-clint-mtimer.yaml
>> new file mode 100644
>> index 000000000000..5da0947d048a
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/timer/sophgo,sg2042-clint-mtimer.yaml
>> @@ -0,0 +1,42 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/timer/sophgo,sg2042-clint-mtimer.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Sophgo CLINT Timer
>> +
>> +maintainers:
>> +  - Inochi Amaoto <inochiama@...look.com>
>> +
>> +properties:
>> +  compatible:
>> +    oneOf:
>> +      - items:
>> +          - const: sophgo,sg2042-clint-mtimer
>
>There's only one of these, so you don't need the oneOf.

Thanks

>Also, is the clint here not a thead IP? In which case, you need to add a

Yes, The clint is a thead IP, like that of th1520 and allwinner D1.

>second compatible IMO. That second compatible then would be the one that
>appears in opensbi etc.
>

As this is a thead IP, maybe use thead,c900-clint-mtimer is fine?
If so, whether we should replace the "thead,c900-clint" with these separate
DT to describe the thead clint? The DT binding said the thead clint is not
compatible with the sifive clint, so maybe this is a chance to just move
them out.

>Otherwise, this looks fine.
>
>Thanks,
>Conor.
>
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  interrupts-extended:
>> +    minItems: 1
>> +    maxItems: 4095
>> +
>> +additionalProperties: false
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - interrupts-extended
>> +
>> +examples:
>> +  - |
>> +    timer@...00000 {
>> +      compatible = "sophgo,sg2042-clint-mtimer";
>> +      interrupts-extended = <&cpu1intc 7>,
>> +                            <&cpu2intc 7>,
>> +                            <&cpu3intc 7>,
>> +                            <&cpu4intc 7>;
>> +      reg = <0xac000000 0x00010000>;
>> +    };
>> +...
>> --
>> 2.25.1
>>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ