From patchwork Wed Oct 11 20:18:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 151543 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp791332vqb; Wed, 11 Oct 2023 13:19:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGz0vQdHXySvnzJ29NOxL5HEeMLOIcDXLezTJjWJ85VZplqylb+EUujALoP9m0HJlMInQVQ X-Received: by 2002:a17:90b:1496:b0:27c:f88f:11a5 with SMTP id js22-20020a17090b149600b0027cf88f11a5mr4507242pjb.2.1697055556857; Wed, 11 Oct 2023 13:19:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697055556; cv=none; d=google.com; s=arc-20160816; b=sRUrLb8dcBISRUeqkclVGdhBzP/jeA9Lyy582r3eExTL+mSSD/ig9tav0EMTw6Mt/K wGh896EE4Yz7r7ghyE/GT4FbOfsjTYK6+z0elWNAw0qb6Au4TY76amObYmOnwUtNo5Xt ElFvPGGQzMhMhsoujLDc2UvIN/CluGzlwgrZv1gbH6Ki9sXNT6Zfd1gGtYi57ohM+YWx jTFDJNk8Wc2vTMwyqPaGrHYm5UgDyAefVrpTiRXanqJ9tnRIfiZE4qh2f47YN/0jpRLi rKwekQlMYNjrgUFXEff/KKtxH7Wn0ht1iWAQ0L5+IwBLOmHdC+tNqA2U75pj4rs3UQtV HI8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=WMRlhd5/BeztItAr2sM+0O+AsVRu38np495eIUqn08Q=; fh=VhP4FUy6LIMdW0P0C1XZOQk7uFcIQfGMACe+v7k4NIA=; b=P7uhJTJAOIkdFR6DVeG4DjnGIE3+M+KHyd8LypXp3/L6AQTGiLFp1p8ef9+ibpAWCt Opa+05FYOsWUlO1NqylTZ2y/0JjWRoBYQjZNnNEjDEERPhgresBIwLqEfqurEBT+DExH vkZ0glR6TPMkcw9cnYOxSlg425fGKtzjAXwIB++bi4Hkeq6TgWl8cXXkVt8ZDObzHkQe N0wr8efEA2m56kyII9Sc1IsOPWLnV8bj+02G7XELIbuEnk3CdDE+qYmsBA5zulKV3fUj hr0JOY1fhtNat5n7/qHn1J+bzL2ks/dzEWT70pkbxRhmQzxIdtkZIhcoRe8zYjS5OCQc 2PMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=GKsMhtQq; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=oyTc6Vyj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id q15-20020a17090a68cf00b0027450695a78si557816pjj.172.2023.10.11.13.19.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 13:19:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=GKsMhtQq; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=oyTc6Vyj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A2735833E1C0; Wed, 11 Oct 2023 13:19:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376413AbjJKUSf (ORCPT + 18 others); Wed, 11 Oct 2023 16:18:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235143AbjJKUSY (ORCPT ); Wed, 11 Oct 2023 16:18:24 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F4E8BA; Wed, 11 Oct 2023 13:18:22 -0700 (PDT) Date: Wed, 11 Oct 2023 20:18:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697055501; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WMRlhd5/BeztItAr2sM+0O+AsVRu38np495eIUqn08Q=; b=GKsMhtQqntFVsqb+M4cLqPg8KXQ+PRaliC/Ovy/5gIKJJBG3HFEVgpdHEruSkc21CEvs4q hNXN/oE2FLo1Bap62VlYeqc5CDXuB5Y040GH4h4TIYv909EjA9WEvsR83+9wTVSdKJLVim 6OIRhfxYxnLNzKSRrkSuLFNLHdqpYrLSxMle55l39DouefSCAUZkTwD/oIzniMm/HJSkmm wNozLGbiWKqKnBWqKndXQEpxugA1x/YcXuSBXE5x3ve38QVSqec1oq5LXVm17q7JH8y2TG YYGbiYKUAwq3OLkLq4L7YDXsJYZ+13nbl247uFJKcAsRS2gCniK71NWNVDzrWw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697055501; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WMRlhd5/BeztItAr2sM+0O+AsVRu38np495eIUqn08Q=; b=oyTc6VyjScIWhHjUjDEvIbHmTJNr1oCLiYUmc0I/SINHn9ewa4m/37vLfzHfYYq6l8wkki 6xuBTnoqe1jdhWAw== From: "tip-bot2 for Maciej Wieczor-Retman" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cache] x86/resctrl: Rename arch_has_sparse_bitmaps Cc: Reinette Chatre , "Maciej Wieczor-Retman" , "Borislav Petkov (AMD)" , ilpo.jarvinen@linux.intel.com, Peter Newman , Babu Moger , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: =?utf-8?q?=3Ce330fcdae873ef1a831e707025a4b70fa346666e=2E1696934?= =?utf-8?q?091=2Egit=2Emaciej=2Ewieczor-retman=40intel=2Ecom=3E?= References: =?utf-8?q?=3Ce330fcdae873ef1a831e707025a4b70fa346666e=2E16969340?= =?utf-8?q?91=2Egit=2Emaciej=2Ewieczor-retman=40intel=2Ecom=3E?= MIME-Version: 1.0 Message-ID: <169705550059.3135.10557448470126798843.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 11 Oct 2023 13:19:14 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779364903575682238 X-GMAIL-MSGID: 1779491727603504701 The following commit has been merged into the x86/cache branch of tip: Commit-ID: 39c6eed1f61594f737160e498d29673edbd9eefd Gitweb: https://git.kernel.org/tip/39c6eed1f61594f737160e498d29673edbd9eefd Author: Maciej Wieczor-Retman AuthorDate: Tue, 10 Oct 2023 12:42:36 +02:00 Committer: Borislav Petkov (AMD) CommitterDate: Wed, 11 Oct 2023 19:43:43 +02:00 x86/resctrl: Rename arch_has_sparse_bitmaps Rename arch_has_sparse_bitmaps to arch_has_sparse_bitmasks to ensure consistent terminology throughout resctrl. Suggested-by: Reinette Chatre Signed-off-by: Maciej Wieczor-Retman Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Ilpo Järvinen Reviewed-by: Peter Newman Reviewed-by: Reinette Chatre Reviewed-by: Babu Moger Tested-by: Peter Newman Link: https://lore.kernel.org/r/e330fcdae873ef1a831e707025a4b70fa346666e.1696934091.git.maciej.wieczor-retman@intel.com --- arch/x86/kernel/cpu/resctrl/core.c | 4 ++-- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 4 ++-- include/linux/resctrl.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index 030d3b4..c09e4fd 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -872,7 +872,7 @@ static __init void rdt_init_res_defs_intel(void) if (r->rid == RDT_RESOURCE_L3 || r->rid == RDT_RESOURCE_L2) { - r->cache.arch_has_sparse_bitmaps = false; + r->cache.arch_has_sparse_bitmasks = false; r->cache.arch_has_per_cpu_cfg = false; r->cache.min_cbm_bits = 1; } else if (r->rid == RDT_RESOURCE_MBA) { @@ -892,7 +892,7 @@ static __init void rdt_init_res_defs_amd(void) if (r->rid == RDT_RESOURCE_L3 || r->rid == RDT_RESOURCE_L2) { - r->cache.arch_has_sparse_bitmaps = true; + r->cache.arch_has_sparse_bitmasks = true; r->cache.arch_has_per_cpu_cfg = true; r->cache.min_cbm_bits = 0; } else if (r->rid == RDT_RESOURCE_MBA) { diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c index b44c487..ab45012 100644 --- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c +++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c @@ -113,8 +113,8 @@ static bool cbm_validate(char *buf, u32 *data, struct rdt_resource *r) first_bit = find_first_bit(&val, cbm_len); zero_bit = find_next_zero_bit(&val, cbm_len, first_bit); - /* Are non-contiguous bitmaps allowed? */ - if (!r->cache.arch_has_sparse_bitmaps && + /* Are non-contiguous bitmasks allowed? */ + if (!r->cache.arch_has_sparse_bitmasks && (find_next_bit(&val, cbm_len, zero_bit) < cbm_len)) { rdt_last_cmd_printf("The mask %lx has non-consecutive 1-bits\n", val); return false; diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index 8334eea..66942d7 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -94,7 +94,7 @@ struct rdt_domain { * zero CBM. * @shareable_bits: Bitmask of shareable resource with other * executing entities - * @arch_has_sparse_bitmaps: True if a bitmap like f00f is valid. + * @arch_has_sparse_bitmasks: True if a bitmask like f00f is valid. * @arch_has_per_cpu_cfg: True if QOS_CFG register for this cache * level has CPU scope. */ @@ -102,7 +102,7 @@ struct resctrl_cache { unsigned int cbm_len; unsigned int min_cbm_bits; unsigned int shareable_bits; - bool arch_has_sparse_bitmaps; + bool arch_has_sparse_bitmasks; bool arch_has_per_cpu_cfg; };