From patchwork Tue Aug 15 15:27:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Singh Tomar X-Patchwork-Id: 13353919 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 94687C04FDF for ; Tue, 15 Aug 2023 15:28:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NmT0hMgUgj/9Paqgv9ByAvKRxifEUnAVSceupIETW3E=; b=aePXM3ovzfHDzi OlPN+X572MmztkB5ndNu5CyVaQje60CPZTpKMnu+IFjvhvJMSFwy+MbSJ+W87TsFMbTXpjP+OrMVc RgINT+B5RcxEOpgIH/GqRhqsS0DZiwO642GckcbMYITkbFNpg7VvGNsb6bEW00E/jbAFpy3ADHpds H2JFfadRMxhPGtCtkgQcAJPFN6yLCMduNIvBXdzPmn4YlBRyI+kRK3ukLF8nWUovGSapzG9nj+jcb 7H+xpu/qABGC8GBl1yhwA+jwNNLOOYBHj/pmZRMAsrH2hFN5StlqhVhDZQeZQVNP+vkU8dhlgKyK1 GkaiGgzNjc0UoOC6b6vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVvxs-001rD2-0M; Tue, 15 Aug 2023 15:28:12 +0000 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVvxh-001r9C-20 for linux-arm-kernel@lists.infradead.org; Tue, 15 Aug 2023 15:28:05 +0000 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37FAXQ1G003906; Tue, 15 Aug 2023 08:27:52 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=DETGQIxwT57vHR/twWLuXydvnHEcnwHAYSDGPy/HrsA=; b=PtN6IRRYyJXjS8V8V9d5ML98DddlqH04g/4SWGITiftWMJtxVm2ioR08mNlfROPU9Cgr T2G76CgFcflESllHcx4qt4aYiLZNBe3KOGqnZUetG8/DXyCq8PmKMtL/6BAqC2hU/Gw+ Y6me/aGNT96tCcNHj9++Jli5QVAj1EuXx73ksuVQjGcsgN6WOatGRv5TFs7JmP+TrcVo aYSr/3oI1HjQ6sF4XlY/mrzRHD5Rgm85ydoIrM8JThrnT/RPNZbMZDQsE91URqU3oRFy Tdnxa1RjBvd/ozPcpR5b6FHjEZCgW5fGW+urMB2WJgzCpIVevUqzMafrvOiAXfaaJ3ME kw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3se9kjajup-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 15 Aug 2023 08:27:52 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 15 Aug 2023 08:27:49 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 15 Aug 2023 08:27:49 -0700 Received: from localhost.localdomain (unknown [10.28.36.167]) by maili.marvell.com (Postfix) with ESMTP id DE0043F704D; Tue, 15 Aug 2023 08:27:46 -0700 (PDT) From: Amit Singh Tomar To: , CC: , , , , , , Amit Singh Tomar Subject: [RFC 03/12] arm_mpam: resctrl: Define new schemata format for priority partition Date: Tue, 15 Aug 2023 20:57:03 +0530 Message-ID: <20230815152712.1760046-4-amitsinght@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230815152712.1760046-1-amitsinght@marvell.com> References: <20230815152712.1760046-1-amitsinght@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: F1CvY0tOobqxZ8jV9wcP6oHBXQH31a6J X-Proofpoint-ORIG-GUID: F1CvY0tOobqxZ8jV9wcP6oHBXQH31a6J X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-15_16,2023-08-15_02,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230815_082801_788420_AF4A58A3 X-CRM114-Status: GOOD ( 15.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org At the moment, "schemata" file contains information about cache portion bitmap (CPBM), and memory bandwidth allocation (MBA) in the following format. MB:0=0100 L3:0=ffff Lets' update the "schemata" file to accommodate information about priority partition control that indicates downstream priority value. For instance: L3:0=ffff,f CPBM is separated from downstream priority value using delimiter ",". Signed-off-by: Amit Singh Tomar --- drivers/platform/mpam/mpam_resctrl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/platform/mpam/mpam_resctrl.c b/drivers/platform/mpam/mpam_resctrl.c index 09618d9ceb1d..1081ceac41a8 100644 --- a/drivers/platform/mpam/mpam_resctrl.c +++ b/drivers/platform/mpam/mpam_resctrl.c @@ -711,7 +711,11 @@ static int mpam_resctrl_resource_init(struct mpam_resctrl_res *res) r->cache.min_cbm_bits = 1; /* TODO: kill these properties off as they are derivatives */ - r->format_str = "%d=%0*x"; + if (mpam_has_feature(mpam_feat_dspri_part, &class->props)) + r->format_str = "%d=%0*x,%0*x"; + else + r->format_str = "%d=%0*x"; + r->fflags = RFTYPE_RES_CACHE; r->default_ctrl = BIT_MASK(class->props.cpbm_wd) - 1; r->data_width = (class->props.cpbm_wd + 3) / 4;