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: <166811511627.1062682.15955440634711266362.robh@kernel.org>
Date:   Thu, 10 Nov 2022 15:18:39 -0600
From:   Rob Herring <robh@...nel.org>
To:     Serge Semin <Sergey.Semin@...kalelectronics.ru>
Cc:     Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
        Krzysztof WilczyƄski <kw@...ux.com>,
        Frank Li <Frank.Li@....com>, linux-pci@...r.kernel.org,
        Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
        linux-kernel@...r.kernel.org,
        Serge Semin <fancer.lancer@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        caihuoqing <caihuoqing@...du.com>,
        Cai Huoqing <cai.huoqing@...ux.dev>,
        Robin Murphy <robin.murphy@....com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        devicetree@...r.kernel.org, Vinod Koul <vkoul@...nel.org>,
        Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
        Pavel Parkhomenko <Pavel.Parkhomenko@...kalelectronics.ru>,
        Jingoo Han <jingoohan1@...il.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH v6 09/20] dt-bindings: PCI: dwc: Add
 interrupts/interrupt-names common properties


On Mon, 07 Nov 2022 23:49:23 +0300, Serge Semin wrote:
> Currently the 'interrupts' and 'interrupt-names' properties are defined
> being too generic to really describe any actual IRQ interface. Moreover
> the DW PCIe End-point devices are left with no IRQ signals. All of that
> can be fixed by adding the IRQ-related properties to the common DW PCIe
> DT-schemas in accordance with the hardware reference manual. The DW PCIe
> common DT-schema will contain the generic properties definitions with just
> a number of entries per property, while the DW PCIe RP/EP-specific schemas
> will have the particular number of items and the generic resource names
> listed.
> 
> Note since there are DW PCI-based vendor-specific DT-bindings with the
> custom names assigned to the same IRQ resources we have no much choice but
> to add them to the generic DT-schemas in order to have the schemas being
> applicable for such devices. These names are marked as vendor-specific and
> should be avoided being used in new bindings in favor of the generic
> names.
> 
> Signed-off-by: Serge Semin <Sergey.Semin@...kalelectronics.ru>
> 
> ---
> 
> Note without the next dtschema tool fix
> 
> --- a/lib.py 2022-09-29 15:17:13.100033810 +0300
> +++ b/lib.py     2022-09-29 15:19:54.886172794 +0300
> @@ -1307,7 +1307,7 @@
>  def format_error(filename, error, prefix="", nodename=None, verbose=False):
>      src = prefix + os.path.abspath(filename) + ':'
> 
> -    if error.linecol[0] >= 0:
> +    if hasattr(error, 'linecol') and error.linecol[0] >= 0:
>          src = src + '%i:%i: ' % (error.linecol[0]+1, error.linecol[1]+1)
>      else:
>          src += ' '
> @@ -1342,10 +1342,10 @@
>      else:
>          msg = error.message
> 
> -    if error.note:
> +    if hasattr(error, 'note') and error.note:
>          msg += '\n\t' + prefix + 'hint: ' + error.note
> 
> -    if error.schema_file:
> +    if hasattr(error, 'schema_file') and error.schema_file:
>          msg += '\n\t' + prefix + 'from schema $id: ' + error.schema_file
> 
>      return src + msg
> 
> any DT-bindings error will cause the dt-schema script crash:
> 
> Traceback (most recent call last):
>   File "/home/fancer/.local/bin/dt-validate", line 175, in <module>
>     sg.check_trees(filename, testtree)
>   File "/home/fancer/.local/bin/dt-validate", line 122, in check_trees
>     self.check_subtree(dt, subtree, False, "/", "/", filename)
>   File "/home/fancer/.local/bin/dt-validate", line 111, in check_subtree
>     self.check_subtree(tree, value, disabled, name, fullname + name, filename)
>   File "/home/fancer/.local/bin/dt-validate", line 111, in check_subtree
>     self.check_subtree(tree, value, disabled, name, fullname + name, filename)
>   File "/home/fancer/.local/bin/dt-validate", line 106, in check_subtree
>     self.check_node(tree, subtree, disabled, nodename, fullname, filename)
>   File "/home/fancer/.local/bin/dt-validate", line 84, in check_node
>     print(dtschema.format_error(filename, error, nodename=nodename, verbose=verbose) +
>   File "/home/fancer/.local/lib/python3.8/site-packages/dtschema/lib.py", line 1332, in format_error
>     msg += '\n' + format_error(filename, suberror, prefix=prefix+"\t", nodename=nodename, verbose=verbose)
>   File "/home/fancer/.local/lib/python3.8/site-packages/dtschema/lib.py", line 1310, in format_error
>     if error.linecol[0] >= 0:
> AttributeError: 'ValidationError' object has no attribute 'linecol'
> 
> Changelog v3:
> - This is a new patch unpinned from the next one:
>   https://lore.kernel.org/linux-pci/20220503214638.1895-2-Sergey.Semin@baikalelectronics.ru/
>   by the Rob' request. (@Rob)
> 
> Changelog v5:
> - Add platform-specific interrupt names, but mark them as deprecated.
> 
> Changelog v6:
> - Move the common interrupt-names definitions to the RP/EP schemas.
>   Thus drop the 'definitions' property. (@Rob)
> - Drop the 'deprecated' keywords from the vendor-specific names. (@Rob)
> ---
>  .../bindings/pci/snps,dw-pcie-common.yaml     | 19 ++++
>  .../bindings/pci/snps,dw-pcie-ep.yaml         | 52 +++++++++++
>  .../devicetree/bindings/pci/snps,dw-pcie.yaml | 90 ++++++++++++++++++-
>  3 files changed, 158 insertions(+), 3 deletions(-)
> 

Reviewed-by: Rob Herring <robh@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ