From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796064256; b=x1FsAdgIR0mJnRlLutbo98U8y+w841ROmfEzRLZQ0rCvFol01X3fVq0PD1woYKJvfdmd Sft3hQHlGi9+FRmjev/lt63Zy5d40x59YvD8tCb6XW3kx4gp2GaapsndISdV4TtapPT/s IX9R1KUzpLestrQ5NDKQogS/wdHlMA5ijgEKyvxkiAfyeIBE3OnkYcJOPZNgCfPxNG9zF 889Dk3GzesDc6YA1CPXYwxQIfAL+Br5QkC9v4B8U27qj0I6d+wrLM5/3qCZvYAggEMJuo sHWwD/kHYg2PlUkQTnK349Hy3AINGMp/CQbzGksnM39BBYOOGj/rMpAGrTNBKhCKkWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796064256; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: MIME-Version:Content-Type:Content-Disposition; bh=sqj3eQfAA3m0ePJIk0exues+vQHtegSACV+JFd2p0Hk=; b=ABfwXWvF7MJKHfM3Tm3zkjSj06ZXP53V/vnkcWqWVO41lAPItjPdxGHoTP5kPqAAkXP6 PmpPn4TDZYZsCXp0s/Q4VJA7u5s9HOeAGRQNFdB2bARxfK2mtOtrtDOjSR/sTOlQUIpt+ va3o222hZr33wC8XCVuqCccc1EO2KKx+1dCJpE+PVKeiqis4cI/p8Kzhc2SbQpGRO/4Wr vXkKaa8Lf58dggFEoXMnDrZnpw+f/fxO/I5/i//eiEjY4MU1nEqo+hzltPDlGWgm2+vAR K11QgUIzmTZoaO7ipyC/0EOW9XjsIGjrE7LlekgT0pKkLDMgMghQ6ppyqC+EUgr/zLA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BJZNAyxK; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BBEB606A320; Mon, 30 Nov 2026 18:44:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BJZNAyxK Received: by smtp.kernel.org (Postfix) with ESMTPSA id 558EA1F0089B; Mon, 30 Nov 2026 18:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796064255; bh=sqj3eQfAA3m0ePJIk0exues+vQHtegSACV+JFd2p0Hk=; h=Date:From:To:Cc:Subject; b=BJZNAyxK9yTa9SKiLGV0aozM9nR6uBUEfHgUxu372aGmvZn0bptqlDZbA+zow4Z7x u9FLVYotvo7UugTnSa0sC03lHa0v4715IfVqXxgzDN3ZpnivNUWtETqpRRgwZpZ4zv wZdQM67mOTfTQ/aWhNBgY7hiZTIAomQuH/x0QSgBO+ePFCWSctuY3tdY5G7mH3Fd8u dvRM8mnPN8AFGo4XxD+4NnJVEQyZQVqtzkElVwMTs6o+kWOGwf7EsdURMyRCgtZZLe zb1V6jLSynyz+8A8NbwwbOFHIDpu0ATOqVhKf6mujSu1uitGk3RYQzbRNK8IrirNMw DEuQjkXLM9d1A== Date: Mon, 30 Nov 2026 18:44:10 +0000 From: Mark Brown To: Srini Kandagatla Cc: Anandu Krishnan E , Arnd Bergmann , Greg KH , Greg Kroah-Hartman , Jianping Li , Linux Kernel Mailing List , Linux Next Mailing List , Srinivas Kandagatla , Vinayak Katoch Subject: linux-next: manual merge of the fastrpc tree with the char-misc.current tree Message-ID: X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Tb0+kA2+KBD9z8D6" Content-Disposition: inline --Tb0+kA2+KBD9z8D6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, Today's linux-next merge of the fastrpc tree got a conflict in: drivers/misc/fastrpc.c between commits: 85f055e32e9fd ("misc: fastrpc: fix NULL rpdev dereference when session al= loc fails") 3679721130657 ("misc: fastrpc: fix init ordering race in rpmsg probe") e8ac43ce9e5e4 ("misc: fastrpc: remove dead context drain in fastrpc_user_= free()") 5cb8f2410bee3 ("misc: fastrpc: drop the DSP-response reference on channel= removal") 28b1f55cba430 ("misc: fastrpc: fix context leak and hang on signal-interr= upted invoke") f116b7202308e ("misc: fastrpc: avoid duplicate DMA mappings in fastrpc_cr= eate_maps()") =66rom the char-misc.current tree and commits: 2b22e32663861 ("misc: fastrpc: fix NULL rpdev dereference when session al= loc fails") 1bf78aac760fd ("misc: fastrpc: fix init ordering race in rpmsg probe") 78455fa9f0227 ("misc: fastrpc: remove dead context drain in fastrpc_user_= free()") c9c16d1d15038 ("misc: fastrpc: drop the DSP-response reference on channel= removal") 3f645f6884b5c ("misc: fastrpc: fix context leak and hang on signal-interr= upted invoke") 81b3908cf7b9b ("misc: fastrpc: iterate CB nodes manually instead of of_pl= atform_populate") 112dc91edd51e ("misc: fastrpc: move ADSP duplicate session creation to th= e driver") f914df45c3228 ("misc: fastrpc: map ADSP remote heap into remoteproc IOMMU= domain") =66rom the fastrpc tree (it's all the cherry picking). I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. diff --cc drivers/misc/fastrpc.c index 7e33b9467b1ba,a2cf6df2651ca..0000000000000 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@@ -2761,37 -2893,52 +2919,52 @@@ static int fastrpc_rpmsg_probe(struct r data->rpdev =3D rpdev; dev_set_drvdata(&rpdev->dev, data); =20 - err =3D of_platform_populate(rdev->of_node, NULL, NULL, rdev); - switch (domain_id) { - case ADSP_DOMAIN_ID: - case MDSP_DOMAIN_ID: - case SDSP_DOMAIN_ID: - /* Unsigned PD offloading is only supported on CDSP and GDSP */ - data->unsigned_support =3D false; - err =3D fastrpc_device_register(rdev, data, secure_dsp, domain); - if (err) - goto err_notify; - break; - case CDSP_DOMAIN_ID: - case GDSP_DOMAIN_ID: - data->unsigned_support =3D true; - /* Create both device nodes so that we can allow both Signed and Unsign= ed PD */ - err =3D fastrpc_device_register(rdev, data, true, domain); - if (err) - goto err_notify; - - err =3D fastrpc_device_register(rdev, data, false, domain); - if (err) - goto err_deregister_fdev; - break; - default: - err =3D -EINVAL; - goto err_notify; - } - + err =3D fastrpc_cb_devices_create(rpdev); if (err) - goto err_free_data; - goto err_deregister_fdev; ++ goto err_release_heap; +=20 + if (data->domain_id =3D=3D ADSP_DOMAIN_ID && data->sesscount > 0) { + struct fastrpc_session_ctx *last_sess; + struct fastrpc_session_ctx *dup_sess; +=20 + spin_lock_irqsave(&data->lock, flags); + last_sess =3D &data->session[data->sesscount - 1]; + for (i =3D 0; i < FASTRPC_DUP_SESSIONS; i++) { + if (data->sesscount >=3D FASTRPC_MAX_SESSIONS) + break; + dup_sess =3D &data->session[data->sesscount++]; + memcpy(dup_sess, last_sess, sizeof(*dup_sess)); + } + spin_unlock_irqrestore(&data->lock, flags); + } =20 + switch (domain_id) { + case ADSP_DOMAIN_ID: + case MDSP_DOMAIN_ID: + case SDSP_DOMAIN_ID: + /* Unsigned PD offloading is only supported on CDSP and GDSP */ + data->unsigned_support =3D false; + err =3D fastrpc_device_register(rdev, data, secure_dsp, domain); + if (err) - goto err_depopulate; ++ goto err_destroy_cbs; + break; + case CDSP_DOMAIN_ID: + case GDSP_DOMAIN_ID: + data->unsigned_support =3D true; + /* Create both device nodes so that we can allow both Signed and Unsign= ed PD */ + err =3D fastrpc_device_register(rdev, data, true, domain); + if (err) - goto err_depopulate; ++ goto err_destroy_cbs; + + err =3D fastrpc_device_register(rdev, data, false, domain); + if (err) + goto err_deregister_fdev; + break; + default: + err =3D -EINVAL; - goto err_depopulate; ++ goto err_destroy_cbs; + } + return 0; =20 err_deregister_fdev: @@@ -2800,7 -2947,7 +2973,7 @@@ if (data->secure_fdevice) misc_deregister(&data->secure_fdevice->miscdev); =20 - err_depopulate: -err_notify: ++err_destroy_cbs: /* * A registered device node may already have been opened, so a user * can hold a cctx reference. Drop only our reference instead of @@@ -2812,7 -2959,7 +2985,9 @@@ fastrpc_notify_users(user); spin_unlock_irqrestore(&data->lock, flags); =20 - of_platform_depopulate(rdev); ++ fastrpc_cb_devices_destroy(rpdev); ++err_release_heap: + fastrpc_remote_heap_release(data, rpdev); fastrpc_channel_ctx_put(data); return err; =20 --Tb0+kA2+KBD9z8D6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmsNw/kACgkQJNaLcl1U h9DH3Af/Xcp6+suIhCtots+/QhOrGr784GAAZN/f5VqGq1W+1mZ0j/2nkIGWR2Yi qvywg0uIwQFQLRq76IaihVyA6vv23Yj3vT+8XKj2j7XVB2Qut8ISsKgBJj7+QOhz eJnWgFAjpdsT+8H5FSg/UzbFSaltefidOB23S2DfY3B5bMDNYgLTzkzPzkFsVte7 0pIP8Ksz0rX0BQsTQOaYtUDBbyP0lWpDSXRzVcDTIJahM77hGQ4QhDnGSxSRzkqV uWwFbKx1pnPaVzadhnGo3iSXwpHU2RdGsQjyha4MBF/6CLnVS3cLaVvs/q4ccrD2 dH6buQ0eo43pyMuPtfthIG6lE9S18w== =hfVq -----END PGP SIGNATURE----- --Tb0+kA2+KBD9z8D6--