Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3840280rdh; Fri, 29 Sep 2023 04:09:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGy6X200hFqvs2AYbHJYeVLZUef0iW4YecStMbrUrCnri4OmwMudbIHSuXEKx4OtuepxkZs X-Received: by 2002:a05:6a00:d69:b0:690:41a1:9b6a with SMTP id n41-20020a056a000d6900b0069041a19b6amr3110103pfv.5.1695985775006; Fri, 29 Sep 2023 04:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695985774; cv=none; d=google.com; s=arc-20160816; b=lvbCzuLXOp/MEKw/xSC6SlPkU0tUOddE6tCKmCOOtycgs5N36JUxUHHJ6uWRg4jqOG B4D72U7vZRo/17g0L2Ur4MKqMLohJgno7/g7OEDqoNh6pu119G/fWLqvYUYoD0b6zSR6 Jzvl5hCwbs/1qmLAD954v0izDYlzcLvz+BpRmYmbuQI1pDSX1Y/n9ZFYVpgdzAFceiKa i4UVZaV/NIPpWHtDDkvkQLA/lSW0RBDpS8HBBD/2BN/AfyiUSD57rIapNVqmC2JwpzMO wvY0g6lCWIt/95wrfbBcWTUnhKwZLQzCx5YW7hXbiqA00I7M52fkXQCBM6GBz5FrxzJs JbaQ== 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=UoERYZYMPvS5AAdW4uOekGgVe3eg5ef580p8JC+WPhc=; fh=K7BLUOueAP1xQ5VQKmWbJlQeJFsX2bnYHK9BvjV3p1o=; b=hY8JppIkqUv9Wv51hHuElJXwuRYU31t2RuvJjh8EB2LTnVSdT0OTh9S1ZjNce70GBD yWJ6n3gtG89kLgBI/wSc0AUCh+fhkmt36lci1UG1Y9g7rtXbpKZO/tq6wzrPg9XAhiw0 i+3DoWAOmeg76l1aJf8I3To7TzEVleFWp8Qj6B8ICyVpZskohMATWD8GBB+I+C1970PG AvGlLqc1XyrmYPB3DJByz2vL4eqV0uG6oHtRZjq6BW5jQxvajMFVxOvnuTrdlhNGImmi ypO6b3I7Dl3/K36qQwNIJzCeKXQg2sFl9qo9bP/jLoXI4PYSXV4TvzJ/CC5+Dvmavbyl mbsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hnthjzKP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id t64-20020a638143000000b005859e8c7c2dsi1514487pgd.639.2023.09.29.04.09.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 04:09:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hnthjzKP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 EE85480CBDDC; Fri, 29 Sep 2023 02:02:53 -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 S232833AbjI2JCp (ORCPT + 99 others); Fri, 29 Sep 2023 05:02:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232803AbjI2JCo (ORCPT ); Fri, 29 Sep 2023 05:02:44 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EC7994 for ; Fri, 29 Sep 2023 02:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695978162; x=1727514162; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xhEnnOBdYFKbxRFux0L4fZTBc+TSGjAD2+5HWacxQ1s=; b=hnthjzKPazU3WYlsqmjDotpwdoV8ypXmhiP7k39NVsf9NJuX4UvZYgim Oe58FPFcGv7PTxtQwnFbTirnyUX+p2iqR3nHAZu7xK59NzuHOOa47hmkx zC1paRZvGSYdT4i/vjFXjR2fV0p8tWmyD0gxe4AunvCsbwEnMcwCGhwA1 3qdPSxcWkdS6zy4sShAEd7UkQUQ8NmTO4SfKQYgAcGFXvshRdtN3YgrqM uPyQlfYqMKm0IakN/N4i8or0Y6SbTYEGGome5HFY8PbKbp89fUr1ASUql V3iwvI9ba56k/xkZDNXVSAPxUUdL5MTwRSTIToAojJCL3WyvZbOOZwF46 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="385078516" X-IronPort-AV: E=Sophos;i="6.03,186,1694761200"; d="scan'208";a="385078516" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2023 02:02:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="749904485" X-IronPort-AV: E=Sophos;i="6.03,186,1694761200"; d="scan'208";a="749904485" Received: from tzebrows-mobl.ger.corp.intel.com (HELO wieczorr-mobl1.intel.com) ([10.213.26.85]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2023 02:02:36 -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: Peter Newman , linux-kernel@vger.kernel.org Subject: [PATCH v3 1/4] x86/resctrl: Rename arch_has_sparse_bitmaps Date: Fri, 29 Sep 2023 11:02:15 +0200 Message-ID: <81216b7633a6838ea72ca6d4471be233b980e4f9.1695977733.git.maciej.wieczor-retman@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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]); Fri, 29 Sep 2023 02:02:54 -0700 (PDT) A later patch exposes the value of arch_has_sparse_bitmaps to user space via the existing term of a bitmask. Rename arch_has_sparse_bitmaps to arch_has_sparse_bitmasks to ensure consistent terminology throughout resctrl. Suggested-by: Reinette Chatre Reviewed-by: Peter Newman Tested-by: Peter Newman Signed-off-by: Maciej Wieczor-Retman --- 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