Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp678437lqh; Fri, 31 May 2024 12:57:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUeEVccNdxWJAgp2c4bGSdERnri3X7GB1OSFhLYi8gWGwyRo1Gn68eEUU3JUahkIzBQbLrhEaWH+L42mrasjufb/k4NPIMtgRYEf2Sr3w== X-Google-Smtp-Source: AGHT+IHOT2vCVWHgOc2GyZoWSUU5oCCf2mpzPZdJxQvjPaDVK2wWAV9PKcRzMFm7sDpaDqUUmIht X-Received: by 2002:a17:906:3888:b0:a67:9c49:7d58 with SMTP id a640c23a62f3a-a6818c46d4dmr258907666b.11.1717185463095; Fri, 31 May 2024 12:57:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717185463; cv=pass; d=google.com; s=arc-20160816; b=J7rdtx1puDMKxK97p0U7VzSr7/FL7f9kfND+Jp4/bUFxbcq1O/K/PY+99dHQb0k+gs d/INunCkUFUC75dAfZBIfBeVwpp7dBK2y4+B56kK7rnewYbd3lASOltYezqeHxmfpdHB qneWtg2CrptXUSGxB8gIBUJ3+D6pte184p+BG7BqvKgv+YYdZ9tyPhur9hk+6eqoRitK UTGsgFDlmlHULJXNMTpQEsxBEjMUzWVEOiTELbIEp2teT8m65saj+A6rJb4KdQTQVX1H QYwYOYcXWTRswXcYGaybhxz5/uHerRAAgYbn9Dkcd2l7U1aNCwOVc3ZmSF3No1eNEmg/ C+fQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=N6lKmZ28b55MlP2b7pZjsto91nZUrgmacfuqW7m8gfY=; fh=AgZH9hThf7iIjfvD+TZxXscuAfjnRLd+km2oMb6hQHg=; b=yarRy8s5CQuVLCsKkTzp3zne3RL3C4YBtbBoIesTPli0liodY5QCO+9rInRrflsO4F +Q4QNR+sUsZI2SmHVVHao1ro+mYKo29F68rDPl/cvhG6xzmP3fnzPSbU5RAv96TCXATG g9nc26xr7SK18ct/exVcuor63BkzJiIIFXMZZ20VQl5uFKnZ4F+lM1gSKq9337FQMFyx y+drOcVq2/fjdKfpGSFloQY+SESErSwOO4CvK7EyO5sH/Pxx9LIQNLgEHNC2viem4y5x e+Fc5S2ar3a6ipPmuyJTT9OZ+7wVJBS30YElHTEMsavfOyYms4O2Tp2d18LLkAlaZ/so 4+uQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=imrUFFMW; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-197410-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a67e6f02cfdsi124788466b.149.2024.05.31.12.57.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 12:57:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197410-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=imrUFFMW; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-197410-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9F07F1F250E3 for ; Fri, 31 May 2024 19:57:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75F4517D341; Fri, 31 May 2024 19:57:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="imrUFFMW" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3ED95380 for ; Fri, 31 May 2024 19:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717185454; cv=none; b=BLEdDMn/QIHcuRH71OnuJIeblXH2S4U1FTJjjj8iNoGnYQTRPk2XIpyEQtAkKccxcteDra6I4kVbrkcAykvHLEqXSe+B29TNZoaEhf2cwj+XNub87K8NbC62J3yKshDMrc6dIX3rOjPRiT4zktGA0zSHA7hxOeDQVtQ47QpDUKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717185454; c=relaxed/simple; bh=/lOtInnt6prvkKlLm8woy26AEwqxaaGOlQ+2tGdoA84=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=n7CaUbXVZPAhQ78h3+eXatY1fLXUyWXC2rfTKuqfZP+dyPFMcoa48wafoMCNLrsb2Ap7MuRBIWkPZmPjQJUsZ+TTM8KNV35uDkqENMAIPFESdKDWFfvmhbHXg6fqATOLSEVC05Rfay6RBM/XjToYD8zSdUi20CkSKAZOoEgYl3E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=imrUFFMW; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717185453; x=1748721453; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/lOtInnt6prvkKlLm8woy26AEwqxaaGOlQ+2tGdoA84=; b=imrUFFMWr/Y3ipD2QcmrXrdICiOhdBc+7zKe25y4dnyISfhFP+rwArfD 2CBLtNvjhWOfJRH/5w02UKfmE3jTF6/ViCePeihTxiQTPGWMMat1Ml8Wz 6GxUVU2RaUtOr8EGF0njx+hal4aC1k7WjhSjDkEe1QrV6CwH801RM2Fi6 w909Ty+KEQ6EKd57afFc5VK7bWeP0muNP6dDIyGYevvAgSBT5Zhy3KodM LDPZsrfTD1zYekK1Nr2xIr+RQBOsP/vsjndeSqqs8o36Wco52jwNcVnxj czZXetYFofArHbFo0H+06H65Yf5jnDqg3IV55Zvncu1/p82K/kSLXWhWo Q==; X-CSE-ConnectionGUID: kFBGK9PbTma3GhdNjHUViA== X-CSE-MsgGUID: qpHpCoI6TwKZtw3nzz2SEA== X-IronPort-AV: E=McAfee;i="6600,9927,11089"; a="13501127" X-IronPort-AV: E=Sophos;i="6.08,205,1712646000"; d="scan'208";a="13501127" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 12:57:32 -0700 X-CSE-ConnectionGUID: 9CQNwWH2SSebzbLyMWYUOw== X-CSE-MsgGUID: 3hwgAf8STv+CgTeLHf44Dw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,205,1712646000"; d="scan'208";a="59438867" Received: from agluck-desk3.sc.intel.com ([172.25.222.70]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 12:57:32 -0700 From: Tony Luck To: Greg Kroah-Hartman , Andrew Morton , Thomas Gleixner , Borislav Petkov Cc: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin , linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH 0/3] Add and use get_cpu_cacheinfo_level() Date: Fri, 31 May 2024 12:57:17 -0700 Message-ID: <20240531195720.232561-1-tony.luck@intel.com> X-Mailer: git-send-email 2.45.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit [get_maintainer.pl is vague about who owns to I've scattershooted some of the folks that committed changes for this file] This helper function came up in discussion of the resctrl patches for Sub-NUMA Cluster (SNC) support. Reinette pointed out[1] that there are already two places where it would clean things up by avoiding open coding. The SNC patches will add two additional call sites. So rather than have this jammed up as part of the SNC series, I'm posting it as a simple standalone cleanup. Signed-off-by: Tony Luck [1] https://lore.kernel.org/all/050c64b3-20b3-4db6-b782-f5124ebaab31@intel.com/ Tony Luck (3): cacheinfo: Add function to get cacheinfo for a given (cpu, cachelevel) x86/resctrl: Replace open code cacheinfo search in pseudo_lock_region_init() x86/resctrl: Replace open code cacheinfo search in rdtgroup_cbm_to_size() include/linux/cacheinfo.h | 21 ++++++++++++++++----- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 17 ++++++----------- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 14 +++++--------- 3 files changed, 27 insertions(+), 25 deletions(-) base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 -- 2.45.0