From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 B51F84457AC for ; Wed, 29 Jul 2026 09:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785318248; cv=none; b=guznKOEUrH39jYXv/Y6UKjIeK5oByqWTMZ3BGXMqNA1YDfZPA4Ayu7oxHW00BKL/+y5gKdQwCgGmo7acZ0pCNnfvTVvLVW9jYgrIkMALAhJ69OmIaKDu/8IJVtIFS2ui38uszQW3fpLd2fcPl3Pa84nnMgg7z8qzFzit3q+PJN0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785318248; c=relaxed/simple; bh=YasGEwES629pFDjgfd1bbMhASOEs0ZImj0walimtLnc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XxLG0Sa3FRqtzaxFWRGBtOi6MetjJsuwzBgZoRm2CL2hhV3SJR9h61pdqEbJIsnrcMo/IqnpLdWwLGa/YlfmHJv1YbPHOUawKQ8oCC89dPK9Z8u1PoD4ORDez6gWSBX48xye5BTIRvdYrCDAXxN9dDz1IpCX2wvVrSn+MhQmqVE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=N8ZuFrw/; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N8ZuFrw/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93C8F1F00A3D; Wed, 29 Jul 2026 09:44:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785318247; bh=l4e1hIBlYIefy+CdXvycxSRmoTY2EotKTR+r2IwSzH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=N8ZuFrw/oI0rwGytM5Dj1ghuQKwuELnWO3YaaaAmPl/G2TgPAGd6520y/98YMTBSs QndswBJx6wK1HrxGYL1FBf/MHKk2P7TxufwxHbK3h55/WIM/EV8bunpkAIbbqVQA4c pHZXQsX1gJGJ4pY8WujcKRDu/zRY+UX5I0lH5UBoIDpjB/vNoqIGsGimc3ElSL0Z0j j4jikDyQrqgeDlHvMdb0UUo1LtNS+dIPAy46awK+vttZqwI/wdHixiM15GWK/zBPD7 NCy9oN33/6iaCw/y0SZhjPStxublbv6dHs/aAnl0eu01M4UGpR+Z7xYGByiXJlghjm P5a1wXHGtNFSA== From: srini@kernel.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Ekansh Gupta , Dmitry Baryshkov , Srinivas Kandagatla Subject: [PATCH 06/10] misc: fastrpc: Expand context ID mask for DSP polling mode support Date: Wed, 29 Jul 2026 10:43:48 +0100 Message-ID: <20260729094352.111065-7-srini@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260729094352.111065-1-srini@kernel.org> References: <20260729094352.111065-1-srini@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Ekansh Gupta Current FastRPC context uses a 12-bit mask: [ID(8 bits)][PD type(4 bits)] = GENMASK(11, 4) This works for normal calls but fails for DSP polling mode. Polling mode expects a 16-bit layout: [15:8] = context ID (8 bits) [7:5] = reserved [4] = async mode bit [3:0] = PD type (4 bits) If async bit (bit 4) is set, DSP disables polling. With current mask, odd IDs can set this bit, causing DSP to skip poll updates. Update FASTRPC_CTXID_MASK to GENMASK(15, 8) so IDs occupy upper byte and lower byte is left for DSP flags and PD type. Reserved bits remain unused. This change is compatible with polling mode and does not break non-polling behavior. Bit layout: [15:8] = CCCCCCCC (context ID) [7:5] = xxx (reserved) [4] = A (async mode) [3:0] = PPPP (PD type) Reviewed-by: Dmitry Baryshkov Signed-off-by: Ekansh Gupta Signed-off-by: Srinivas Kandagatla --- drivers/misc/fastrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 9d8dcd836a75..d42b3e9e2a07 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -39,7 +39,7 @@ #define FASTRPC_CTX_MAX (256) #define FASTRPC_INIT_HANDLE 1 #define FASTRPC_DSP_UTILITIES_HANDLE 2 -#define FASTRPC_CTXID_MASK GENMASK(11, 4) +#define FASTRPC_CTXID_MASK GENMASK(15, 8) #define INIT_FILELEN_MAX (2 * 1024 * 1024) #define INIT_FILE_NAMELEN_MAX (128) #define FASTRPC_DEVICE_NAME "fastrpc" -- 2.53.0