lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230815152712.1760046-4-amitsinght@marvell.com>
Date:   Tue, 15 Aug 2023 20:57:03 +0530
From:   Amit Singh Tomar <amitsinght@...vell.com>
To:     <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>
CC:     <fenghua.yu@...el.com>, <reinette.chatre@...el.com>,
        <james.morse@....com>, <gcherian@...vell.com>, <robh@...nel.org>,
        <peternewman@...gle.com>, Amit Singh Tomar <amitsinght@...vell.com>
Subject: [RFC 03/12] arm_mpam: resctrl: Define new schemata format for priority partition

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 <amitsinght@...vell.com>
---
 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;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ