From: Srinivas Kandagatla <srini@kernel.org>
To: Mark Brown <broonie@kernel.org>, Srini Kandagatla <srini@kernel.org>
Cc: Anandu Krishnan E <anandu.e@oss.qualcomm.com>,
Arnd Bergmann <arnd@arndb.de>, Greg KH <greg@kroah.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jianping Li <jianping.li@oss.qualcomm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>,
Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
Subject: Re: linux-next: manual merge of the fastrpc tree with the char-misc.current tree
Date: Mon, 30 Nov 2026 22:47:53 +0000 [thread overview]
Message-ID: <5d6da2fa-a191-45c2-84a7-5083a1a04082@kernel.org> (raw)
In-Reply-To: <aw3D-vYVK98WuFGi@sirena.org.uk>
On 11/30/26 6:44 PM, Mark Brown wrote:
> Hi all,
>
> Today's linux-next merge of the fastrpc tree got a conflict in:
Thanks Mark,
I will drop the patches from my tree now that these ended up in Greg's Tree.
--srini
>
> drivers/misc/fastrpc.c
>
> between commits:
>
> 85f055e32e9fd ("misc: fastrpc: fix NULL rpdev dereference when session alloc 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-interrupted invoke")
> f116b7202308e ("misc: fastrpc: avoid duplicate DMA mappings in fastrpc_create_maps()")
>
> from the char-misc.current tree and commits:
>
> 2b22e32663861 ("misc: fastrpc: fix NULL rpdev dereference when session alloc 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-interrupted invoke")
> 81b3908cf7b9b ("misc: fastrpc: iterate CB nodes manually instead of of_platform_populate")
> 112dc91edd51e ("misc: fastrpc: move ADSP duplicate session creation to the driver")
> f914df45c3228 ("misc: fastrpc: map ADSP remote heap into remoteproc IOMMU domain")
>
> from 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 = rpdev;
> dev_set_drvdata(&rpdev->dev, data);
>
> - err = 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 = false;
> - err = 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 = true;
> - /* Create both device nodes so that we can allow both Signed and Unsigned PD */
> - err = fastrpc_device_register(rdev, data, true, domain);
> - if (err)
> - goto err_notify;
> -
> - err = fastrpc_device_register(rdev, data, false, domain);
> - if (err)
> - goto err_deregister_fdev;
> - break;
> - default:
> - err = -EINVAL;
> - goto err_notify;
> - }
> -
> + err = fastrpc_cb_devices_create(rpdev);
> if (err)
> - goto err_free_data;
> - goto err_deregister_fdev;
> ++ goto err_release_heap;
> +
> + if (data->domain_id == ADSP_DOMAIN_ID && data->sesscount > 0) {
> + struct fastrpc_session_ctx *last_sess;
> + struct fastrpc_session_ctx *dup_sess;
> +
> + spin_lock_irqsave(&data->lock, flags);
> + last_sess = &data->session[data->sesscount - 1];
> + for (i = 0; i < FASTRPC_DUP_SESSIONS; i++) {
> + if (data->sesscount >= FASTRPC_MAX_SESSIONS)
> + break;
> + dup_sess = &data->session[data->sesscount++];
> + memcpy(dup_sess, last_sess, sizeof(*dup_sess));
> + }
> + spin_unlock_irqrestore(&data->lock, flags);
> + }
>
> + 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 = false;
> + err = 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 = true;
> + /* Create both device nodes so that we can allow both Signed and Unsigned PD */
> + err = fastrpc_device_register(rdev, data, true, domain);
> + if (err)
> - goto err_depopulate;
> ++ goto err_destroy_cbs;
> +
> + err = fastrpc_device_register(rdev, data, false, domain);
> + if (err)
> + goto err_deregister_fdev;
> + break;
> + default:
> + err = -EINVAL;
> - goto err_depopulate;
> ++ goto err_destroy_cbs;
> + }
> +
> return 0;
>
> err_deregister_fdev:
> @@@ -2800,7 -2947,7 +2973,7 @@@
> if (data->secure_fdevice)
> misc_deregister(&data->secure_fdevice->miscdev);
>
> - 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);
>
> - 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;
>
prev parent reply other threads:[~2026-11-30 22:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 18:44 Mark Brown
2026-11-30 22:47 ` Srinivas Kandagatla [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d6da2fa-a191-45c2-84a7-5083a1a04082@kernel.org \
--to=srini@kernel.org \
--cc=anandu.e@oss.qualcomm.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=greg@kroah.com \
--cc=gregkh@linuxfoundation.org \
--cc=jianping.li@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=srinivas.kandagatla@oss.qualcomm.com \
--cc=vinayak.katoch@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®