On Mon, Jul 19, 2021 at 8:31 PM Will Deacon <[email protected]> wrote:
>
> When CONFIG_OF_ADDRESS=n, of_dma_set_restricted_buffer() returns -ENODEV
> and breaks the boot for sparc[64] machines. Return 0 instead, since the
> function is essentially a glorified NOP in this configuration.
>
> Cc: Claire Chang <[email protected]>
> Cc: Konrad Rzeszutek Wilk <[email protected]>
> Reported-by: Guenter Roeck <[email protected]>
> Suggested-by: Robin Murphy <[email protected]>
> Tested-by: Guenter Roeck <[email protected]>

Tested-by: Claire Chang <[email protected]>

> Link: https://lore.kernel.org/r/[email protected]
> Fixes: fec9b625095f ("of: Add plumbing for restricted DMA pool")
> Signed-off-by: Will Deacon <[email protected]>
> ---
>  drivers/of/of_private.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
> index 376462798f7e..f557bd22b0cf 100644
> --- a/drivers/of/of_private.h
> +++ b/drivers/of/of_private.h
> @@ -173,7 +173,8 @@ static inline int of_dma_get_range(struct device_node *np,
>  static inline int of_dma_set_restricted_buffer(struct device *dev,
>                                                struct device_node *np)
>  {
> -       return -ENODEV;
> +       /* Do nothing, successfully. */
> +       return 0;
>  }
>  #endif
>
> --
> 2.32.0.402.g57bb445576-goog
>
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to