From nobody Fri Oct 2 11:44:03 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84A88376A03 for ; Fri, 31 Jul 2026 20:14:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785528842; cv=none; b=V/LQ9z60WM99ds/jZXEr54z864foMMdusoGdlFcsgyIoALj5aDE7+IxxKTuS4dsH4XUhZRjeAIg9BxBdYXsdPCZmaAt7qDPLmf2/dZsX+UUVZ97/bu+FKyrP6xYLjDdIc0Od2wYhqjEjuIj7uy4Aezw/l9pMOKwhzKatp4PhFps= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785528842; c=relaxed/simple; bh=wxx/N3oxa7B4p5E42tkwwfXlEfEpHy00SbKKxL563KM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=JNBxnYKKeuwNCv3pn71pMTnuwpmhwjxxmXiJW44yn27OqCFtBCdBcz9pipilDY4nw1eseNxc9/lMC4hHPJO7tFeR1zrN1YJkkz7gYvgTUPrc8ZgMUYNaanktl/wUm9u8YLnldKJZJB4u2pfJKxjIWLMg9AncVKQsWmif58/vQCg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RwlZkIjD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RwlZkIjD" Received: by smtp.kernel.org (Postfix) with ESMTPS id 38200C2BCB9; Fri, 31 Jul 2026 20:14:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1785528841; bh=wxx/N3oxa7B4p5E42tkwwfXlEfEpHy00SbKKxL563KM=; h=From:Date:Subject:To:Cc:Reply-To:From; b=RwlZkIjDzyJK+HqVKtZCNhrQO6MKt2XFEKGBeFxwaov/PHBo0w8LvL9ngRMh5IixV Lqvhj2PanMQL1bnU+NXio/Ywed7OGMzMNwcDqz5vBMBVxqTBmPoSU7qB8RSvOIjUwZ z+6FDf3MAPzZLnsmuFY3iwNktlNWNq/X7DL04GiXMUxhxzdFwDS6+3vTRAVY4kNLoI pidmvcloyEfMP73htDx6yaaos2BWopUbOOwIoL8vHmovJSqjS2n3+umUkV6HKVQ04H vC2tNxhYbWEzXPblJFyRyahyJKZ9iUxgp5uK4JX56dmxJDVJCO0O+g5B6ZnVo2q//P hu6rczgr5ccGQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13CBDC55174; Fri, 31 Jul 2026 20:14:01 +0000 (UTC) From: Vincent Jardin via B4 Relay Date: Fri, 31 Jul 2026 22:13:49 +0200 Subject: [PATCH v2] bus: fsl-mc: set dma_mask for the DPRC devices Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260731-for-upstream-fsl-mc-dprc-dma-mask-v2-1-ea7058b90f06@free.fr> X-B4-Tracking: v=1; b=H4sIAPwBbWoC/5WNQQ6CMBBFr0K6dgytgNWV9zAsJmVGGq2QGSQaw t2t3MDNT95fvLcYJYmk5lwsRmiOGodnBrcrTOjxeSOIXWbjSteUR1cBDwKvUSchTMD6gBSgGyV PQkiod0BrqQo1+jo0JntGIY7vrXFtM/dRp0E+W3K2v/cf+2zBQsOlR/b+YE/1hYVoz2LadV2/T aCMfdAAAAA= To: Ioana Ciornei , Laurentiu Tudor , Greg Kroah-Hartman , Bogdan Purcareata , Stuart Yoder Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Vincent Jardin X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1785528840; l=2029; i=vjardin@free.fr; s=20260525; h=from:subject:message-id; bh=/JgIuzk3o1PHWS1podI6fxXs27SOl31EINS/+13QNvo=; b=zRdg1GZ1k6eyCaLcZYjSK3rD0C+hdoDwi4Gzv+yyomtGy2KFjWOYAfnZ6R0vpkdgMMm5mEoGR 1Rruc7+riHYDjqQ0xFNt1dwPRdvCD7vablyWHVgNu2i4NxNeqA2sI1C X-Developer-Key: i=vjardin@free.fr; a=ed25519; pk=hppgLeFpGpKOi7LNwGEZ4jOYofJCoGd4Jf1ltAabiLw= X-Endpoint-Received: by B4 Relay for vjardin@free.fr/20260525 with auth_id=871 X-Original-From: Vincent Jardin Reply-To: vjardin@free.fr From: Vincent Jardin On Layerscape platforms when SMMU is disabled by ATF, the root DPRC probes with its dma_mask pointer unset which leads to a notification: "DMA mask not set" so the device is left with a zero DMA mask instead of a sane default. Let's seed the masks for all cases. It was tested on LX2160A with no SMMU on the MC domain: the warning is gone and the DPAA2 children probe unchanged. Signed-off-by: Vincent Jardin Reviewed-by: Ioana Ciornei --- fsl_mc_device_add() already seeds a default dma_mask for non-DPRC objects, but never for the DPRC devices themselves. It was tested on LX2160A, SMMU disabled. --- Changes in v2: - seed the masks in the common path (Thanks Ioana) - rewrite the commit log, drop Fixes: and Cc: stable - Link to v1: https://lore.kernel.org/r/20260724-for-upstream-fsl-mc-dprc-d= ma-mask-v1-1-6f08af883195@free.fr --- drivers/bus/fsl-mc/fsl-mc-bus.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bu= s.c index 64d75eed0d34..35f480aa317b 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -797,6 +797,10 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc, } dev_set_name(&mc_dev->dev, "%s.%d", obj_desc->type, obj_desc->id); =20 + mc_dev->dma_mask =3D FSL_MC_DEFAULT_DMA_MASK; + mc_dev->dev.dma_mask =3D &mc_dev->dma_mask; + mc_dev->dev.coherent_dma_mask =3D mc_dev->dma_mask; + if (strcmp(obj_desc->type, "dprc") =3D=3D 0) { struct fsl_mc_io *mc_io2; =20 @@ -838,9 +842,6 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc, * parent's ICID. */ mc_dev->icid =3D parent_mc_dev->icid; - mc_dev->dma_mask =3D FSL_MC_DEFAULT_DMA_MASK; - mc_dev->dev.dma_mask =3D &mc_dev->dma_mask; - mc_dev->dev.coherent_dma_mask =3D mc_dev->dma_mask; } =20 /* --- base-commit: 248951ddc14de84de3910f9b13f51491a8cd91df change-id: 20260724-for-upstream-fsl-mc-dprc-dma-mask-a11e4c5a85c6 Best regards, --=20 Vincent Jardin