mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ekansh Gupta <quic_ekangupt@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <srinivas.kandagatla@linaro.org>, <linux-arm-msm@vger.kernel.org>,
	<gregkh@linuxfoundation.org>, <quic_bkumar@quicinc.com>,
	<linux-kernel@vger.kernel.org>, <quic_chennak@quicinc.com>,
	<dri-devel@lists.freedesktop.org>, <arnd@arndb.de>
Subject: Re: [PATCH v2 5/5] misc: fastrpc: Modify context id mask to support polling mode
Date: Wed, 29 Jan 2025 11:13:05 +0530	[thread overview]
Message-ID: <08b469b8-2339-4fde-9472-fcaadbb4ed87@quicinc.com> (raw)
In-Reply-To: <im7gi5ib7wnihu3ff4a2erqctne2pm2zf3wl4qmuejz4dfhf7e@z5au6vnm5por>




On 1/29/2025 5:00 AM, Dmitry Baryshkov wrote:
> On Mon, Jan 27, 2025 at 10:12:39AM +0530, Ekansh Gupta wrote:
>> DSP needs last 4 bits of context id to be 0 for polling mode to be
>> supported as setting of last 8 is intended for async mode(not yet
>> supported on upstream driver) and setting these bits restrics
>> writing to poll memory from DSP. Modify context id mask to ensure
>> polling mode is supported.
> Shouldn't this commit come before the previous one?

Yes, I'll change the order in next series.

Thanks for reviewing the changes.

--ekansh

>
>> Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
>> ---
>>  drivers/misc/fastrpc.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
>> index 257a741af115..ef56c793c564 100644
>> --- a/drivers/misc/fastrpc.c
>> +++ b/drivers/misc/fastrpc.c
>> @@ -40,7 +40,7 @@
>>  #define FASTRPC_INIT_HANDLE	1
>>  #define FASTRPC_DSP_UTILITIES_HANDLE	2
>>  #define FASTRPC_MAX_STATIC_HANDLE (20)
>> -#define FASTRPC_CTXID_MASK (0xFF0)
>> +#define FASTRPC_CTXID_MASK (0xFF0000)
>>  #define INIT_FILELEN_MAX (2 * 1024 * 1024)
>>  #define INIT_FILE_NAMELEN_MAX (128)
>>  #define FASTRPC_DEVICE_NAME	"fastrpc"
>> @@ -524,7 +524,7 @@ static void fastrpc_context_free(struct kref *ref)
>>  		fastrpc_buf_free(ctx->buf);
>>  
>>  	spin_lock_irqsave(&cctx->lock, flags);
>> -	idr_remove(&cctx->ctx_idr, ctx->ctxid >> 4);
>> +	idr_remove(&cctx->ctx_idr, ctx->ctxid >> 16);
>>  	spin_unlock_irqrestore(&cctx->lock, flags);
>>  
>>  	kfree(ctx->maps);
>> @@ -664,7 +664,7 @@ static struct fastrpc_invoke_ctx *fastrpc_context_alloc(
>>  		spin_unlock_irqrestore(&cctx->lock, flags);
>>  		goto err_idr;
>>  	}
>> -	ctx->ctxid = ret << 4;
>> +	ctx->ctxid = ret << 16;
>>  	spin_unlock_irqrestore(&cctx->lock, flags);
>>  
>>  	kref_init(&ctx->refcount);
>> @@ -2675,7 +2675,7 @@ static int fastrpc_rpmsg_callback(struct rpmsg_device *rpdev, void *data,
>>  	if (len < sizeof(*rsp))
>>  		return -EINVAL;
>>  
>> -	ctxid = ((rsp->ctx & FASTRPC_CTXID_MASK) >> 4);
>> +	ctxid = ((rsp->ctx & FASTRPC_CTXID_MASK) >> 16);
>>  
>>  	spin_lock_irqsave(&cctx->lock, flags);
>>  	ctx = idr_find(&cctx->ctx_idr, ctxid);
>> -- 
>> 2.34.1
>>


  reply	other threads:[~2025-01-29  5:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27  4:42 [PATCH v2 0/5] misc: fastrpc: Add invokeV2 to support new features Ekansh Gupta
2025-01-27  4:42 ` [PATCH v2 1/5] misc: fastrpc: Move fdlist to invoke context structure Ekansh Gupta
2025-01-27 15:37   ` Dmitry Baryshkov
2025-01-27  4:42 ` [PATCH v2 2/5] misc: fastrpc: Introduce context params structure Ekansh Gupta
2025-01-27 15:43   ` Dmitry Baryshkov
2025-01-29  4:57     ` Ekansh Gupta
2025-01-29 10:29       ` Dmitry Baryshkov
2025-01-27  4:42 ` [PATCH v2 3/5] misc: fastrpc: Add CRC support using invokeV2 request Ekansh Gupta
2025-01-29 10:41   ` Dmitry Baryshkov
2025-01-27  4:42 ` [PATCH v2 4/5] misc: fastrpc: Add polling mode support for fastRPC driver Ekansh Gupta
2025-01-28 23:29   ` Dmitry Baryshkov
2025-01-29  5:42     ` Ekansh Gupta
2025-01-29 10:40       ` Dmitry Baryshkov
2025-03-20 13:49         ` Ekansh Gupta
2025-03-20 14:15           ` Dmitry Baryshkov
2025-03-20 15:57             ` Ekansh Gupta
2025-03-21 10:18               ` Ekansh Gupta
2025-03-21 11:17                 ` Dmitry Baryshkov
2025-03-21 13:13                   ` Ekansh Gupta
2025-01-27  4:42 ` [PATCH v2 5/5] misc: fastrpc: Modify context id mask to support polling mode Ekansh Gupta
2025-01-28 23:30   ` Dmitry Baryshkov
2025-01-29  5:43     ` Ekansh Gupta [this message]
2025-01-29 11:23       ` Dmitry Baryshkov
2025-02-10  9:05         ` Ekansh Gupta
2025-02-10 10:35           ` Dmitry Baryshkov

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=08b469b8-2339-4fde-9472-fcaadbb4ed87@quicinc.com \
    --to=quic_ekangupt@quicinc.com \
    --cc=arnd@arndb.de \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_bkumar@quicinc.com \
    --cc=quic_chennak@quicinc.com \
    --cc=srinivas.kandagatla@linaro.org \
    /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®