Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp709710lqh; Fri, 31 May 2024 14:07:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX+ZLjJbEoXu4Qx/gAaohIPCrMtms6oSJmL9wSXeAvlWavUFQEuRSWxiLUP1gp8eTNZtQwXg5PwBLkD+0mpTWZ28l2j3v87+O5paYzyIw== X-Google-Smtp-Source: AGHT+IENORD9IKoDP2ASUN2VGH1H2Z2WfxMyemZkwkVr8FKH0DGxYR0S4sMYp6UOWUJvXJgyYH9o X-Received: by 2002:a05:6359:4d0b:b0:183:ea4b:620 with SMTP id e5c5f4694b2df-19b490d2a21mr432612555d.28.1717189623328; Fri, 31 May 2024 14:07:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717189623; cv=pass; d=google.com; s=arc-20160816; b=QovR5JIZinli6/S0MZeF7Pcjode3gTfpfhoSROPxwEJidSe+y8EGXK4BVYAkfTOSci 7RZ5K92eVD9RnO4DblakVigehdOmsncgUDrw5c8RQqLcllNhGj0BDesvycmbSWf7Oo0O omOmBEJ6nipr8iNIbyOKYSAnoXKV/ArQwjWmYPhMUBuNTH2Oo3vgm9TzYNCksYoIvp4x LDsh07tzCehQhOogjbsyPJDnjTfGNP+xocBdOjdboWmmtQ9ZBwdpMqxt5BWAVf9zK+ef MTz2crpD/CxeSVcEq81OO2ota073v1ewx5ANQ7niVkTA1aUeuvgp3uiIaHrjWjBuPxMl Jc5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:dlp-filter:cms-type:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id :subject:cc:to:from:date:dkim-signature:dkim-filter; bh=1tNjP7sssd68InhNCGdfvXyfrkMDNeQ2G4gpmxYHLjQ=; fh=P+UL+L7NFy2mm4tP5MOIwXBovrmPP7crtJFwmw/ecDY=; b=qWf5yCV+MxqwnIseTEhDfNTVK3vrgLkg+22WRY2OnyZixBe1avz974yFvaJCVGIhb7 ELy5Ptwlh63M4QnwHO2IUzkclHNgDcqtHL/iOEON+7+F7TJNL9X4E04I72ROoxH5JCXW /qCbd+brMhRvuWyhnV1YIz3v3UZMtWGNFUc1/RQQkos3bkzuuCDYKjCWytY6oyBmAH6s 2J5IWRzkeYh77M51UrVw/nftcz/5dhhB39wC7i+YsjArTGueBRMb6hv99BO+rcgh93vG I3WfoHjZjrn9+i4HjX4CMSXJRhH9/8G8d+dsHXJMKKJfcQggiJqNDiPyrOWxzTYqQ5tl 5JnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=U7Z59UU8; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-197480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197480-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794f2f05c70si293248285a.4.2024.05.31.14.07.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 14:07:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=U7Z59UU8; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-197480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197480-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E86FD1C20EBC for ; Fri, 31 May 2024 21:07:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1EB9079949; Fri, 31 May 2024 21:06:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="U7Z59UU8" Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (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 1A19B20DD2 for ; Fri, 31 May 2024 21:06:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717189609; cv=none; b=DUTUjXUVgUvmibDCV6a00kHaKNO7kWFfS6isM9Py6j5ESxgfkbW4sP3GK8EaRC9js1Gwt2pq2J0QKU8lrB8d3q8il08CcwUZd/C6yp8as0QllWgtf7rGE2qyr6R0Xh2SM/iSjMKZPPVs/Z/3TKCqoRs63GKoyBftQxJR39h3HrQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717189609; c=relaxed/simple; bh=30ELdth7WZicC/vpAKe5PHSVhm4ww9cLgul2n4KcwnE=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:In-Reply-To: Content-Type:References; b=FHIyGy5uf8zspdq1S5kftwN12gMIk12spEMKSeKnz8U9TwGefMHZUTPlXDJ5MIm0hpNUSvhHAcwX0C1oOS32oKLFkC83pr09MKNGiFL/7aBmVLteJV49oC8jWDzlYv18/sFRBY3W8UPTVcHj70E1yuhr4w8OacSUPJGvavjSfDE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=U7Z59UU8; arc=none smtp.client-ip=203.254.224.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20240531210645epoutp0263d038fec604214673a4a5234c651add~UrtkLblD10228502285epoutp02m for ; Fri, 31 May 2024 21:06:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20240531210645epoutp0263d038fec604214673a4a5234c651add~UrtkLblD10228502285epoutp02m DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1717189605; bh=1tNjP7sssd68InhNCGdfvXyfrkMDNeQ2G4gpmxYHLjQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=U7Z59UU8tAnDij30JgyIY40B+lfJl2gWs+ldvT3OjUZSOGy48K+1eweITVszR8Fsi tlZULGOz/xBiQb7D18dpySjBhXAM2BW5xEPGytCg9/CeOjozrtWdNiRsuOD/TP1MsA +PyGiNemXvGG2TUnviCrARTVRLdVl0r+whMqUnlU= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20240531210644epcas2p28bbd8f3a12c5f0ac259d318cc77c6d42~Urtjr3xG82023520235epcas2p2o; Fri, 31 May 2024 21:06:44 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.70]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4VrbJz5nF8z4x9Pv; Fri, 31 May 2024 21:06:43 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 20.A1.09848.3EB3A566; Sat, 1 Jun 2024 06:06:43 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20240531210643epcas2p28898ec306853744e728e3cec880b29b1~UrtiN0zPm2002720027epcas2p2j; Fri, 31 May 2024 21:06:43 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240531210643epsmtrp12df85af8968fd0dace703310a5b43d1a~UrtiNQbaM2169121691epsmtrp1w; Fri, 31 May 2024 21:06:43 +0000 (GMT) X-AuditID: b6c32a45-447fe70000002678-38-665a3be3a4e9 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 71.37.18846.2EB3A566; Sat, 1 Jun 2024 06:06:42 +0900 (KST) Received: from localhost (unknown [10.229.54.230]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240531210642epsmtip1779b289e9d7f12eddbce420a4ac9f8c8~UrtiAsoMU1427614276epsmtip1f; Fri, 31 May 2024 21:06:42 +0000 (GMT) Date: Sat, 1 Jun 2024 05:55:23 +0900 From: Minwoo Im To: Bart Van Assche Cc: "James E . J . Bottomley" , "Martin K . Petersen" , Alim Akhtar , Avri Altman , gost.dev@samsung.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jeuk Kim , Minwoo Im Subject: Re: [PATCH 1/3] ufs: mcq: Add ufshcd_mcq_queue_cfg_addr helper Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-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n8Punvna28R5Ji3b ejReYIaWlcAR5vyw/Ad7ugNnVJwS3Goz/Ubph8b4V74PZ8c0Z27KzONz/iUT/rGIzfEo58FH as0W6Tz++ZdPftO9lrs590qEXqxNTWnI3wvcuttmqPRwXtfU6Ei8d46vs58579C+ufFlTRsP myuxFGckGmoxFxUnAgDwLYJ68QIAAA== X-CMS-MailID: 20240531210643epcas2p28898ec306853744e728e3cec880b29b1 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----He.yNZkzpBak.xuDKC9auljxNssTvAfbOgKyc16DCg-DQrdx=_28df6_" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240531104947epcas2p1cd477921c1cd307d84f9ffc25b2c08a8 References: <20240531103821.1583934-1-minwoo.im@samsung.com> <20240531103821.1583934-2-minwoo.im@samsung.com> ------He.yNZkzpBak.xuDKC9auljxNssTvAfbOgKyc16DCg-DQrdx=_28df6_ Content-Type: text/plain; charset="utf-8" Content-Disposition: inline On 24-05-31 13:15:11, Bart Van Assche wrote: > On 5/31/24 03:38, Minwoo Im wrote: > > This helper returns an offset address of MCQ queue configuration > > registers. This is a prep patch for the following patch. > > > > Signed-off-by: Minwoo Im > > --- > > drivers/ufs/core/ufs-mcq.c | 14 ++++++++++++++ > > include/ufs/ufshcd.h | 1 + > > 2 files changed, 15 insertions(+) > > > > diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c > > index 52210c4c20dc..46faa54aea94 100644 > > --- a/drivers/ufs/core/ufs-mcq.c > > +++ b/drivers/ufs/core/ufs-mcq.c > > @@ -18,6 +18,7 @@ > > #include > > #define MAX_QUEUE_SUP GENMASK(7, 0) > > +#define QCFGPTR GENMASK(23, 16) > > #define UFS_MCQ_MIN_RW_QUEUES 2 > > #define UFS_MCQ_MIN_READ_QUEUES 0 > > #define UFS_MCQ_MIN_POLL_QUEUES 0 > > @@ -116,6 +117,19 @@ struct ufs_hw_queue *ufshcd_mcq_req_to_hwq(struct ufs_hba *hba, > > return &hba->uhq[hwq]; > > } > > +/** > > + * ufshcd_mcq_queue_cfg_addr - get an start address of the MCQ Queue Config > > + * Registers. > > + * @hba: per adapter instance > > + * > > + * Return: Start address of MCQ Queue Config Registers in HCI > > + */ > > +unsigned int ufshcd_mcq_queue_cfg_addr(struct ufs_hba *hba) > > +{ > > + return FIELD_GET(QCFGPTR, hba->mcq_capabilities) * 0x200; > > +} > > +EXPORT_SYMBOL_GPL(ufshcd_mcq_queue_cfg_addr); > > + > > /** > > * ufshcd_mcq_decide_queue_depth - decide the queue depth > > * @hba: per adapter instance > > diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h > > index df68fb1d4f3f..9e0581115b34 100644 > > --- a/include/ufs/ufshcd.h > > +++ b/include/ufs/ufshcd.h > > @@ -1278,6 +1278,7 @@ void ufshcd_update_evt_hist(struct ufs_hba *hba, u32 id, u32 val); > > void ufshcd_hba_stop(struct ufs_hba *hba); > > void ufshcd_schedule_eh_work(struct ufs_hba *hba); > > void ufshcd_mcq_config_mac(struct ufs_hba *hba, u32 max_active_cmds); > > +unsigned int ufshcd_mcq_queue_cfg_addr(struct ufs_hba *hba); > > u32 ufshcd_mcq_read_cqis(struct ufs_hba *hba, int i); > > void ufshcd_mcq_write_cqis(struct ufs_hba *hba, u32 val, int i); > > unsigned long ufshcd_mcq_poll_cqe_lock(struct ufs_hba *hba, > > New functions should not be introduced as a separate patch but instead should > be introduced in the first patch that adds a caller to the new function. I will squash it to the second one and udpate it in the next version. > > Thanks, > > Bart. > ------He.yNZkzpBak.xuDKC9auljxNssTvAfbOgKyc16DCg-DQrdx=_28df6_ Content-Type: text/plain; charset="utf-8" ------He.yNZkzpBak.xuDKC9auljxNssTvAfbOgKyc16DCg-DQrdx=_28df6_--