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=1796078877; b=fcAdWBg+aznbtesmm+6iAi9We0LSOEPKPDmas13RLuoP7Y6b9EVlBGefnrSBITfWvzIJ 64XhmwAmYjUN3RX6BfK84WPcMlfsJJSGotdecs+NBE0O+bNsoAVxbv4tSHS32m85oYnp0 0TWuHGu9LacaVtYRWgNFgeW4AUqWUQL6fLJQ1RfIQoDISMZPhdBCFQlM4RC7wjn3nAAHQ lSbjZKA6g854fIKzG0eRfYuCKjJb2FoURTOgn/4vRLzVnmLpwBruOXEK1WitBIWAfvY0J fXWY2Wo4tN+4kjdDJDfIXGfYC4muqcCWSq/6vEOMk7cA1jMjslrZbxPy8qgL7KpAB2A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796078877; h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=5JbEjXHWlEv+r5VHu2xj2oexeTWhaD01SbUFculInfs=; b=k3PJvnVDhW5KCxYSTJFKBr+lyNI5SwFU3a+CtlUF2MkqLB42gswBsQTKO/yd+m32o3zD 1oRRe8PDPj6rGNDPdSKmHwXrX9U6BEmHLCFUjB96XnfiGCkhDO8nmrCc0XcobKzq56sF0 t2+ivSRsEoHdsksMpb3upH+hK9O658w4eNMN8c+Yy8f9WPKxrrU0kAd4XmsfLKYHsXNGT wRZgNxRpGFAZiF8Ce/L40f0Pqkb1hDNCRDkJVrVXIPhiKr2nkIGXoyStpwXCOvORuesC/ mvQ0bcgFtxEaD4T9sCGF2+WUnddxKPk2kTpfAlG+TuCT/qAVGEOxfbX2bTzFyN8uI1w== 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=cB7GFIOs; 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 A283D606A31A; Mon, 30 Nov 2026 22:47:57 +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=cB7GFIOs Received: by smtp.kernel.org (Postfix) with ESMTPSA id 519741F000C1; Mon, 30 Nov 2026 22:47:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796078877; bh=5JbEjXHWlEv+r5VHu2xj2oexeTWhaD01SbUFculInfs=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=cB7GFIOsKMY31MduMuFSH98jouxKWhgIqghcQvUUjLiGrhdbhibjIx0fF+1ZPsO9p oplXQ7XsJfReSeL9Sid8tDjRr3OalDGeZMPdRo/+aVW7Ch9duKvmsCXTOBz3cmMTSc pnUqN3Ocrkwa5zCVg0+/TG389cYqSJUtluY3R2/x77kPslhEp192L8oe7CLQEf/dA5 Oaj7bA9lTUEdUn01COyfaH3EX/R0ZhtdIfjn1C7Y+W9EAbAbCMN6f8k6KL0Ln4aDQR O8/CWu6IIjjRb7Q1g7GpJe67w3TN4Z2TDDXH3mfThFmVnCFyWwtOsZyHRQC3QUTleO TMgiSjxSOCVZg== Message-ID: <5d6da2fa-a191-45c2-84a7-5083a1a04082@kernel.org> Date: Mon, 30 Nov 2026 22:47:53 +0000 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 User-Agent: Mozilla Thunderbird Subject: Re: linux-next: manual merge of the fastrpc tree with the char-misc.current tree To: Mark Brown , 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 References: From: Srinivas Kandagatla Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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; >