From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 05F7D3815D5 for ; Thu, 29 Jan 2026 10:34:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769682852; cv=none; b=FaeiBazt88E08Nvp0Yo5z88xLWhIZwZ8VszorFSGChZzMVpTiHfXxvSTLjiIQQJ2ITvEQ6kv8nrS2+4F9PlkagBllczNNAhMsEXpsrK+NmN5xLfsWaB2UHpndrTC8GL1iuMX9kizQmD1dfjxuRRWV1vE/vR547XQLv1CCSwVCFU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769682852; c=relaxed/simple; bh=ngzCtsoZ64cDlyW2eq854e1785f6FHbKXqd4OfjDl20=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UEpmk6FQeECKDV73qFW1sCIDgfvlngNDYpmYMw4024gCli34PIlxRR7Is04kvkz9Q9Bp8d+C39KtkYi16AwG1Gjyd1tJi7q2GBWttg6QWigaN1d14tVfyjESVleETx6mcHLBm+VCfytVHuCxSXMJXkej6N4Z1+1SYffAneKV/8k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=WsdHiQUF; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=G5OOXGND; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="WsdHiQUF"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="G5OOXGND" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60TAP2ex3900829 for ; Thu, 29 Jan 2026 10:34:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= KO0htA/d0y/mirbvcIIa1OvhBQKN8BLF6fxwYd3a6es=; b=WsdHiQUFxYouqU2U oJjAvlJG69g8TxV9l3RHbNM/0ysIu5+Zhlb/Q29pp5fFMRF9T56mL8SZ2zTCgu3B M4RQSPQTbHHgpm0/5qSzyklV7AvGHv7EpTbgvpTNdqUFIzigLGlJscZ4JVzYHDI/ +n6hLR2u94G7U9sEBDDibbYE9c9z5xuyS1UabLf4WaRZoul0Kydj57YqGJ/MBueW VEgBJ8sQAgLM68nnu1xZ2CrmKeWwBtu3mt3M0WYmFFc+HojAylH/KVZLJ1jIpLbm EM6VAkoSSFD0nNuImO/ZRmGou3QVkduPTD2DoVrBo7DwYJ0fblzKcy0hjAj2wSSa uOKGeA== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c05se80xb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 29 Jan 2026 10:34:09 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-29f1f79d6afso9539315ad.0 for ; Thu, 29 Jan 2026 02:34:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769682849; x=1770287649; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KO0htA/d0y/mirbvcIIa1OvhBQKN8BLF6fxwYd3a6es=; b=G5OOXGNDI0CKxCg/WFXFLFMUJqVei1jb/ElrWFyRdmC6oaAIWGB+zg9U7K0EOVEo+1 NFJA57//n/Y/ky3Ce6pkQjcrw4okJy6e6G3UTUelBgWaY8EJwbRCsVAYTm1urkh8P+Uw xVv8He9amWD+XGkT8IfS5XeRyrwXgrltT1qoZr17wBfKJHa8PPl+AXyL/NX2Rn+9uH+V iaWlYP0Y8q19/hRSFkpXI1b8LeWF3G/VwPjZgalJUDVcxTYzefF0YbcHRWYkcetjXUU0 hBxow/XqjAglW2KmdhogVKK4IwxEDeuaqYnwaMS2SMi3o7ymjxzFWuueWJDI/zExgXzs OXzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769682849; x=1770287649; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KO0htA/d0y/mirbvcIIa1OvhBQKN8BLF6fxwYd3a6es=; b=dU2WU57jJpEtUQRNrlD300dOnzKY7kA+wCse+jhOomqaQ/Hd27DzOlXI+VAwQFvK4k 1kJlmVPHMbWlJju8WR7ARQ/iFhOLp/+02j3KRo58T6nI4W0TW/Pj3gYn6tEPP/PEWg/p 8rNNb0H3twhRT26lVZxmaX/M+mLH/jS6ZPzIwUfpimYWp4xBnK8NT2PPNqKZnlIYJiz9 /QoXg+9LCOfax2ZcNYZBJRQwQI7r8p1NJU3te+t7xH5uSRD6y0MDpJ2//QavTIZYae44 fDah2nP2AvpPfKTKKL1YyDI1CssDrWjGP0MrECyLAyGS9bMpqsAGtAawV8fhqwC+++1t 3pgA== X-Forwarded-Encrypted: i=1; AJvYcCVFsslYpIVeFjt9hpvEsqoXzw4G8cLzPo4neOD9D2bA6rZ1rwtYLgzxKkwSAhhurLh1eROleSlU0jZ2csA=@vger.kernel.org X-Gm-Message-State: AOJu0YyT8Z/7RAoRikZ9YUiIyemx6Hk5eFPz2bz6GWEeAaJ/gojsHUGS XyjR858v8Q5skoJv7WYOebOq/CYDKm5deNCrOeaxD3qLX4uDQPItQ0aO4BCiMnBCJt2z/NPrtex dcmiH7MBRFRc7i/pl/qMus+M+aR6XPwgUkAVhDwe9ddMOTYUtXHR88J4HVCrzBae0uoM= X-Gm-Gg: AZuq6aLsB6/fVsTbaKKtkYkUyLQ7dEDYqVlmKCbGxA1szgDptWGUXTspifDOtY+c/MZ K3tgLyprzs90FDvgGLITG+83GUVSkvvtPaaDaaDyZ4YwE/Y6Pv7Zs+YEmjCaSCLqXnR3gdOw6xO 4u6ZLZQoNoB6cFhxzob7JqR47PYJNOI3/Zi344g8mxGDckBRwCUzvD5zOxHRms/37y72TgaYqCm m7OiEV/zAdoFtiqi2R9DsKK1UQU4hYM7ZEVqIQIrJTw9IW602gImlfh1DZJ6k3SgB7PiMd/M8No nu/O8MUJ6/miYjt1s/Nx0aWYay5tFZJ3DGU7bP2/vU9Kmyr0/EJVLQcU33JIzzCf0KA0ajdQc58 pn9Khpv/nF16vxwRa1bOhRTooUM13jdOGXCZTSg== X-Received: by 2002:a17:903:90f:b0:2a7:80ac:85b2 with SMTP id d9443c01a7336-2a870d6420bmr79468085ad.16.1769682848549; Thu, 29 Jan 2026 02:34:08 -0800 (PST) X-Received: by 2002:a17:903:90f:b0:2a7:80ac:85b2 with SMTP id d9443c01a7336-2a870d6420bmr79467935ad.16.1769682847956; Thu, 29 Jan 2026 02:34:07 -0800 (PST) Received: from [10.206.99.28] ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a88b4c3d2bsm48016715ad.53.2026.01.29.02.34.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jan 2026 02:34:07 -0800 (PST) Message-ID: <932b5879-8e35-4ead-b0b5-fdb5945dde8a@oss.qualcomm.com> Date: Thu, 29 Jan 2026 16:04:03 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 4/4] misc: fastrpc: Add polling mode support for fastRPC driver To: Dmitry Baryshkov Cc: srini@kernel.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, konrad.dybcio@oss.qualcomm.com References: <20251230062831.1195116-1-ekansh.gupta@oss.qualcomm.com> <20251230062831.1195116-5-ekansh.gupta@oss.qualcomm.com> Content-Language: en-US From: Ekansh Gupta In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: Z9xfXKiEBQ_zwpPDdJCb3hZnPpKgtU__ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI5MDA2OSBTYWx0ZWRfX2KCngYwqF64O yxV+OYGrn3OGVv/n1yzqktbW6AAeBs01Yx3+MswKXL9eCW29DPrB9b78iNI+t7QJcg6cmUvZ5zq jviPSTBxwkmNYr6jTVAq29lAddSj+hb1dvuFWU1SbQGeYuCp3GAFrfjmtkkoO9MnepE4fsXQz2h OtUuc8ycABQmyZbhXL10YNOwXE5Hvz0YD2QLEG5ER9paia6mXRZYZ9nfTjjyaSm7Ere9hfJplBq jLUOIjtvPAJ536SpgqznEgEo1ljklFtWivaNMhxYlIk33yZDlNiOsy7EWyq00qmdG2xvj6WxlRs YpZIgy6p0MrR5T6rmss6FDknh696dKe+PgOu7UT5IyKHJuym3TCxuDs1e12AJQR9aPFMG8uYHWP IOSKbRAiBUDPLz0kXOc5/scupZpRw7VGxoVPb5Gz0lq/bZKiFpYxyMKwxTAjC6fNxEGrmzdW7a7 xAjB3SiNnM55N/Ctahg== X-Authority-Analysis: v=2.4 cv=RIu+3oi+ c=1 sm=1 tr=0 ts=697b37a1 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=5DFYxTXXmBTTg87Ck3YA:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 X-Proofpoint-GUID: Z9xfXKiEBQ_zwpPDdJCb3hZnPpKgtU__ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-29_02,2026-01-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 clxscore=1015 adultscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601290069 On 1/6/2026 8:29 AM, Dmitry Baryshkov wrote: > On Tue, Dec 30, 2025 at 11:58:31AM +0530, Ekansh Gupta wrote: >> For any remote call to DSP, after sending an invocation message, >> fastRPC driver waits for glink response and during this time the >> CPU can go into low power modes. This adds latency to overall fastrpc >> call as CPU wakeup and scheduling latencies are included. Add polling >> mode support with which fastRPC driver will poll continuously on a >> memory after sending a message to remote subsystem which will eliminate >> CPU wakeup and scheduling latencies and reduce fastRPC overhead. Poll >> mode can be enabled by user by using FASTRPC_IOCTL_SET_OPTION ioctl >> request with FASTRPC_POLL_MODE request id. >> >> Signed-off-by: Ekansh Gupta >> --- >> drivers/misc/fastrpc.c | 139 ++++++++++++++++++++++++++++++++++-- >> include/uapi/misc/fastrpc.h | 9 +++ >> 2 files changed, 141 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c >> index 222ff15e04bd..d95d31d27b82 100644 >> --- a/drivers/misc/fastrpc.c >> +++ b/drivers/misc/fastrpc.c >> @@ -22,6 +22,8 @@ >> #include >> #include >> #include >> +#include >> +#include >> #include >> >> #define ADSP_DOMAIN_ID (0) >> @@ -38,6 +40,7 @@ >> #define FASTRPC_CTX_MAX (256) >> #define FASTRPC_INIT_HANDLE 1 >> #define FASTRPC_DSP_UTILITIES_HANDLE 2 >> +#define FASTRPC_MAX_STATIC_HANDLE (20) >> #define FASTRPC_CTXID_MASK GENMASK(15, 8) >> #define INIT_FILELEN_MAX (2 * 1024 * 1024) >> #define INIT_FILE_NAMELEN_MAX (128) >> @@ -106,6 +109,12 @@ >> >> #define miscdev_to_fdevice(d) container_of(d, struct fastrpc_device, miscdev) >> >> +/* Poll response number from remote processor for call completion */ >> +#define FASTRPC_POLL_RESPONSE (0xdecaf) >> + >> +/* Polling mode timeout limit */ >> +#define FASTRPC_POLL_MAX_TIMEOUT_US (10000) >> + >> struct fastrpc_phy_page { >> u64 addr; /* physical address */ >> u64 size; /* size of contiguous region */ >> @@ -236,8 +245,14 @@ struct fastrpc_invoke_ctx { >> u32 sc; >> u64 *fdlist; >> u32 *crc; >> + /* Poll memory that DSP updates */ >> + u32 *poll; >> u64 ctxid; >> u64 msg_sz; >> + /* work done status flag */ >> + bool is_work_done; >> + /* process updates poll memory instead of glink response */ >> + bool is_polled; >> struct kref refcount; >> struct list_head node; /* list of ctxs */ >> struct completion work; >> @@ -301,6 +316,8 @@ struct fastrpc_user { >> int client_id; >> int pd; >> bool is_secure_dev; >> + /* Flags poll mode state */ >> + bool poll_mode; >> /* Lock for lists */ >> spinlock_t lock; >> /* lock for allocations */ >> @@ -894,7 +911,8 @@ static int fastrpc_get_meta_size(struct fastrpc_invoke_ctx *ctx) >> sizeof(struct fastrpc_invoke_buf) + >> sizeof(struct fastrpc_phy_page)) * ctx->nscalars + >> sizeof(u64) * FASTRPC_MAX_FDLIST + >> - sizeof(u32) * FASTRPC_MAX_CRCLIST; >> + sizeof(u32) * FASTRPC_MAX_CRCLIST + >> + sizeof(u32); >> >> return size; >> } >> @@ -990,6 +1008,7 @@ static int fastrpc_get_args(u32 kernel, struct fastrpc_invoke_ctx *ctx) >> list = fastrpc_invoke_buf_start(rpra, ctx->nscalars); >> pages = fastrpc_phy_page_start(list, ctx->nscalars); >> ctx->fdlist = (u64 *)(pages + ctx->nscalars); >> + ctx->poll = (u32 *)(ctx->fdlist + FASTRPC_MAX_FDLIST + FASTRPC_MAX_CRCLIST); > This doesn't seem to match the calculation few lines ago. fdlist is a > pointer. On 64-bit systems ctx->poll will point to (uintptr_t)ctx->fdlist + > sizeof(u64) * FASTRPC_MAX_FDLIST + (sizeof u64) * FASTRPC_MAX_CRCLIST, > while in fastrpc_get_meta_size it was ... + sizeof(u32) * > FASTRPC_MAX_CRCLIST. > > Am I missing something? I should be: (uintptr_t)ctx->fdlist + sizeof(u64) * FASTRPC_MAX_FDLIST + (sizeof u32) * FASTRPC_MAX_CRCLIST based on the fastrpc_get_meta_size calculation, I'll correct this calculation. > >> args = (uintptr_t)ctx->buf->virt + metalen; >> rlen = pkt_size - metalen; >> ctx->rpra = rpra; >> @@ -1158,6 +1177,75 @@ static int fastrpc_invoke_send(struct fastrpc_session_ctx *sctx, >> >> } >> >> +static inline u32 fastrpc_poll_op(void *p) >> +{ >> + struct fastrpc_invoke_ctx *ctx = p; >> + >> + dma_rmb(); >> + return READ_ONCE(*ctx->poll); >> +} >> + >> +static int poll_for_remote_response(struct fastrpc_invoke_ctx *ctx) >> +{ >> + u32 val; >> + int ret; >> + >> + /* >> + * Poll until DSP writes FASTRPC_POLL_RESPONSE into *ctx->poll >> + * or until another path marks the work done. >> + */ >> + ret = read_poll_timeout_atomic(fastrpc_poll_op, val, >> + (val == FASTRPC_POLL_RESPONSE) || >> + ctx->is_work_done, 1, >> + FASTRPC_POLL_MAX_TIMEOUT_US, false, ctx); >> + >> + if (!ret && val == FASTRPC_POLL_RESPONSE) { >> + ctx->is_work_done = true; >> + ctx->retval = 0; >> + } >> + >> + if (ret == -ETIMEDOUT) >> + ret = -EIO; >> + >> + return ret; >> +} >> + >> +static inline int fastrpc_wait_for_response(struct fastrpc_invoke_ctx *ctx, >> + u32 kernel) >> +{ >> + int err = 0; >> + >> + if (kernel) { >> + if (!wait_for_completion_timeout(&ctx->work, 10 * HZ)) >> + err = -ETIMEDOUT; >> + } else { >> + err = wait_for_completion_interruptible(&ctx->work); >> + } >> + >> + return err; >> +} >> + >> +static int fastrpc_wait_for_completion(struct fastrpc_invoke_ctx *ctx, >> + u32 kernel) >> +{ >> + int err; >> + >> + do { >> + if (ctx->is_polled) { >> + err = poll_for_remote_response(ctx); >> + /* If polling timed out, move to normal response mode */ >> + if (err) >> + ctx->is_polled = false; >> + } else { >> + err = fastrpc_wait_for_response(ctx, kernel); >> + if (err) >> + return err; >> + } >> + } while (!ctx->is_work_done); >> + >> + return err; >> +} >> + >> static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel, >> u32 handle, u32 sc, >> struct fastrpc_invoke_args *args) >> @@ -1193,16 +1281,25 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel, >> if (err) >> goto bail; >> >> - if (kernel) { >> - if (!wait_for_completion_timeout(&ctx->work, 10 * HZ)) >> - err = -ETIMEDOUT; >> - } else { >> - err = wait_for_completion_interruptible(&ctx->work); >> - } >> + /* >> + * Set message context as polled if the call is for a user PD >> + * dynamic module and user has enabled poll mode. >> + */ >> + if (handle > FASTRPC_MAX_STATIC_HANDLE && fl->pd == USER_PD && >> + fl->poll_mode) >> + ctx->is_polled = true; >> + >> + err = fastrpc_wait_for_completion(ctx, kernel); >> >> if (err) >> goto bail; >> >> + if (!ctx->is_work_done) { >> + err = -ETIMEDOUT; >> + dev_dbg(fl->sctx->dev, "Invalid workdone state for handle 0x%x, sc 0x%x\n", >> + handle, sc); >> + goto bail; >> + } >> /* make sure that all memory writes by DSP are seen by CPU */ >> dma_rmb(); >> /* populate all the output buffers with results */ >> @@ -1780,6 +1877,30 @@ static int fastrpc_get_info_from_kernel(struct fastrpc_ioctl_capability *cap, >> return 0; >> } >> >> +static int fastrpc_set_option(struct fastrpc_user *fl, char __user *argp) >> +{ >> + struct fastrpc_ioctl_set_option opt = {0}; >> + int i; >> + >> + if (copy_from_user(&opt, argp, sizeof(opt))) >> + return -EFAULT; >> + >> + for (i = 0; i < ARRAY_SIZE(opt.reserved); i++) { >> + if (opt.reserved[i] != 0) >> + return -EINVAL; >> + } >> + >> + if (opt.req != FASTRPC_POLL_MODE) >> + return -EINVAL; >> + >> + if (opt.value) >> + fl->poll_mode = true; >> + else >> + fl->poll_mode = false; > Is poll_mode supported on MSM8916? No, but it will fallback to rpmsg_callback in case polling is enabled from kernel but not enabled from DSP. > >> + >> + return 0; >> +} >> + >> static int fastrpc_get_dsp_info(struct fastrpc_user *fl, char __user *argp) >> { >> struct fastrpc_ioctl_capability cap = {0}; >> @@ -2134,6 +2255,9 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int cmd, >> case FASTRPC_IOCTL_MEM_UNMAP: >> err = fastrpc_req_mem_unmap(fl, argp); >> break; >> + case FASTRPC_IOCTL_SET_OPTION: >> + err = fastrpc_set_option(fl, argp); >> + break; >> case FASTRPC_IOCTL_GET_DSP_INFO: >> err = fastrpc_get_dsp_info(fl, argp); >> break; >> @@ -2465,6 +2589,7 @@ static int fastrpc_rpmsg_callback(struct rpmsg_device *rpdev, void *data, >> >> ctx->retval = rsp->retval; >> complete(&ctx->work); >> + ctx->is_work_done = true; >> >> /* >> * The DMA buffer associated with the context cannot be freed in >> diff --git a/include/uapi/misc/fastrpc.h b/include/uapi/misc/fastrpc.h >> index c6e2925f47e6..3207c42fb318 100644 >> --- a/include/uapi/misc/fastrpc.h >> +++ b/include/uapi/misc/fastrpc.h >> @@ -16,6 +16,7 @@ >> #define FASTRPC_IOCTL_INIT_CREATE_STATIC _IOWR('R', 9, struct fastrpc_init_create_static) >> #define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map) >> #define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap) >> +#define FASTRPC_IOCTL_SET_OPTION _IOWR('R', 12, struct fastrpc_ioctl_set_option) >> #define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability) >> >> /** >> @@ -66,6 +67,8 @@ enum fastrpc_proc_attr { >> >> /* Fastrpc attribute for memory protection of buffers */ >> #define FASTRPC_ATTR_SECUREMAP (1) >> +/* Set option request ID to enable poll mode */ >> +#define FASTRPC_POLL_MODE (1) > Is it related to FASTRPC_ATTR_SECUREMAP? Why is it a part of the same > visual block? I'll create a separation here. > >> >> struct fastrpc_invoke_args { >> __u64 ptr; >> @@ -133,6 +136,12 @@ struct fastrpc_mem_unmap { >> __s32 reserved[5]; >> }; >> >> +struct fastrpc_ioctl_set_option { >> + __u32 req; /* request id */ >> + __u32 value; /* value */ >> + __s32 reserved[6]; > What are you reserving it for? In case there are any more options that we want to control from here. As it's more of a generic set_option request. > >> +}; >> + >> struct fastrpc_ioctl_capability { >> __u32 unused; /* deprecated, ignored by the kernel */ >> __u32 attribute_id; >> -- >> 2.34.1 >>