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: <20251209212600.GA1133021-robh@kernel.org>
Date: Tue, 9 Dec 2025 15:26:00 -0600
From: Rob Herring <robh@...nel.org>
To: Khairul Anuar Romli <khairul.anuar.romli@...era.com>
Cc: Dinh Nguyen <dinguyen@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>,
	Vinod Koul <vkoul@...nel.org>, dmaengine@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/4] dt-bindings: dma: snps,dw-axi-dmac: Add
 #address-cells and #size-cells

On Mon, Dec 08, 2025 at 09:57:43AM +0800, Khairul Anuar Romli wrote:
> Add '#address-cells' and '#size-cells' to resolved the dt-schema build
> build issue when dma-ranges is presence. Without address-cells and
> size-cells presence in DT, kernel panic is observed due to of_base driver
> treats address-cells as two and size-cells as one.

Why are you fixing a problem the previous patch created?

Thinking about this some more, really 'dma-ranges' is supposed to be in 
a bus node, not the device node. So you should probably move the dma 
controllers down a level adding another simple-bus node with dma-ranges. 
Then you only need to add the new compatible.

> 
> Defining these cells explicitly ensures the binding correctly documents the
> necessary structure for nodes that describe the DMA-accessible memory
> space.
> 
> The supported enumeration for both properties is [1, 2], accommodating both
> 32-bit and 64-bit address/size representations.
> 
> Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@...era.com>
> ---
> Changes in v2:
> 	- Add address-cells and size-cells patch into the series
> ---
>  .../devicetree/bindings/dma/snps,dw-axi-dmac.yaml      | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml
> index 1a1800d9b544..2b542ff9a6cd 100644
> --- a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml
> +++ b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml
> @@ -33,6 +33,16 @@ properties:
>        - description: Address range of the DMAC registers
>        - description: Address range of the DMAC APB registers
>  
> +  '#address-cells':
> +    description: The number of cells used to represent physical base address
> +      in the host address space.
> +    enum: [1, 2]
> +
> +  '#size-cells':
> +    description: The number of cells used to represent the size of an address
> +      range in the host address space.
> +    enum: [1, 2]
> +
>    reg-names:
>      items:
>        - const: axidma_ctrl_regs
> -- 
> 2.43.7
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ