Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp38642rdg; Tue, 10 Oct 2023 03:43:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE9plhNFmEysjcshpJghTlEpQ0WX+tte508QswYd9vEmJrG6lL8E04/oYeGH347/rI1rX63 X-Received: by 2002:a17:90a:9318:b0:274:8951:b5ed with SMTP id p24-20020a17090a931800b002748951b5edmr23128134pjo.20.1696934612508; Tue, 10 Oct 2023 03:43:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696934612; cv=none; d=google.com; s=arc-20160816; b=TN/dYg0UZse3axBZrj8UiEQ0Acai6FZ5NWdTzI+cKOGk1P+XmWKqXri3XggqmTBk6F L79hEvGe/iM5DQFhS2bSPjCcNqi8WohBsDHm5/R5ewskbrOwP15Ojh2ZfuxN0EXoUT0Y k8WiEtFpaP40C6RBPDkBbCVGg2RQmoluIwleDSmq5cxOcOEiBjOQeELXjxO/PJ/nFiim bmXg5VgOw4JPvIrjnxQdgByKUqj2jx9eooAlZmLNkJrCs6vsdOwEEFVI0dQaFhkAROg1 6z2vUGWdjXdxecyWK4zOkUmAe7tqfDBWDduOuEdgBY2/RDWx9/andc7JDuUv9l8Twm+Z nvhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rSkjffFfw6sHApS2HmnBmFGPPrPaMPVaZtCcaiz81pA=; fh=/xaEWW9ZHpZ646oyGDk2W8f0ad1BtXK5S5oK3tS3Fj4=; b=v8+3IgQaKX6h9LJcC9YNY7JVHhv80qxUGto+5M8zToJU2gf94C1d4K1Bj3TlXodPve 7x6F+ibQddX12hOz3tb7ET850+kJ5DGVpjETmay7SwToJKgpBgwRdszii8NumwmLk+M3 IvtrmqVuyPUoHvy/Y73OrikHHAEyYrLbu+VrYQuS1Lda9sMx6ei4sX/k0oVrszgoKX/w dHKnBYa68zxi4a0dgJM1CQ1ILVMHN9QuXMwT11i8bbkIW7PAeMk3ejhMKOvELJQYbVmf BHO6/CxDt1Tl7nFp3Qwbj9APgDvC1TW35CPHmzbmYifxA1QWTYdU2ENmkzopu7tElbnG VK1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="AM/Pffom"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id lb11-20020a17090b4a4b00b002777b6d0cabsi14246989pjb.89.2023.10.10.03.43.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 03:43:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="AM/Pffom"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 4FF1E8025755; Tue, 10 Oct 2023 03:43:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231244AbjJJKnM (ORCPT + 99 others); Tue, 10 Oct 2023 06:43:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231240AbjJJKnL (ORCPT ); Tue, 10 Oct 2023 06:43:11 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 489A8A4 for ; Tue, 10 Oct 2023 03:43:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696934589; x=1728470589; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PzXN/sS0NMujOIRqn/ajw0DgmYIySzqCKOtbj0b+dAQ=; b=AM/PffomZQeLInhYsopHQPhCDatfztVRtsa6hK5IE6aYJVIatBKbY13+ DUYtZHBUsc/etswP9nuDrz1dKMBcFSFVir1OzP9DclknDeSIVJdjexFfB Vtk8myqB2lmN11psV/YrfnpP7MWdbUkLjpCYEaBISAzR5N/7bZcKy5mpP R08dPm/wRFS8x5W3CYGWfX/pRPhAiJ/xaefwMZVWtFwqhzmqXdriYbEXD 1Wus77ZECJA5uqZsoCaOBSwQbE8xn6uN05xItfQH+lpIteLu6wXZbKIy1 u5Kgf+pVX8bC34V7xjZ1K9n5IL14zcr1EMlI03uP6l1c0Cryykm0RbyHS w==; X-IronPort-AV: E=McAfee;i="6600,9927,10858"; a="374703481" X-IronPort-AV: E=Sophos;i="6.03,212,1694761200"; d="scan'208";a="374703481" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 03:43:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10858"; a="747032982" X-IronPort-AV: E=Sophos;i="6.03,212,1694761200"; d="scan'208";a="747032982" Received: from asalaman-mobl.ger.corp.intel.com (HELO wieczorr-mobl1.intel.com) ([10.213.16.145]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 03:43:02 -0700 From: Maciej Wieczor-Retman To: Fenghua Yu , Reinette Chatre , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: ilpo.jarvinen@linux.intel.com, Peter Newman , Babu Moger , linux-kernel@vger.kernel.org Subject: [PATCH v5 1/4] x86/resctrl: Rename arch_has_sparse_bitmaps Date: Tue, 10 Oct 2023 12:42:36 +0200 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,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 howler.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 (howler.vger.email [0.0.0.0]); Tue, 10 Oct 2023 03:43:26 -0700 (PDT) X-Spam-Level: ** 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 Tested-by: Peter Newman Reviewed-by: Ilpo Järvinen Reviewed-by: Peter Newman Reviewed-by: Reinette Chatre Reviewed-by: Babu Moger --- Changelog v5: - Add Babu's reviewed-by tag. - Remove part of the patch message that refrences a later patch. Changelog v4: - Add Ilpo's reviewed-by tag. - Add Reinette's reviewed-by tag. Changelog v3: - Add Peter's tested-by and reviewed-by tags. - Make this patch first in the series. (Reinette) - Change the patch message. (Reinette) - Drop rmid_busy_llc comment name change. (Reinette) Changelog v2: - Create this patch. 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 030d3b409768..c09e4fdded3c 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 b44c487727d4..ab45012288bb 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 8334eeacfec5..66942d7fba7f 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; }; -- 2.42.0