Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp48567rbe; Wed, 28 Feb 2024 11:37:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX66P7p/7arIouu/5klQI5apfzLB9hKNJZv1Uj3Tbk0csfzfGoMQwRlYJLJ2wY5TNHtjbVFNb16+B4anrwyWUZuq8rziILUsiE69mOeBg== X-Google-Smtp-Source: AGHT+IFrgTNfud2o5e5ywRjDAYR+pgigpg2Ls1BNRtg8QAyWd+HYvOsPQtJJk2ukm+1Z/5apnF5I X-Received: by 2002:a05:620a:621c:b0:787:caf2:e1b1 with SMTP id ou28-20020a05620a621c00b00787caf2e1b1mr20350qkn.51.1709149051688; Wed, 28 Feb 2024 11:37:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709149051; cv=pass; d=google.com; s=arc-20160816; b=Ugdr7DU70XgFzRBvE8BVgpEzCX1F9qOUMmX5G14QVjUCXVXpXhqeNCxBnIWR+hECNL JHrhq8zUgkUW+dpsJE5XigMMkqMc/F9jVJi2qiSnf3FIDEBPjXxtRGqqUma8eVEfLII+ 3VuBQYqcygNI4T847xxNJYDAF34n3qy6ZJFItGHyvPMgGBi2BYD9vf75R17SdWAqOW37 UmoPsRQKvum92RfRA06bGpVtTGxS6T7gagdnEIiuWN88VGFHAyvMlx5ka62Y6DFJjCAw x5j2ZUjQy6e14kpVIGejFdF3bYGf8gAv3ukTsQDmPdZtCAyTWTGFBPvK/qqBKJCT6GiS BDFw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=tvSslJ1uTqxziD1YO8G1TSlsIeDSi3Ibc9GOOsbLEF8=; fh=kDu4WSgSKQjfqS0+uR7gDD47kd+EMQAW47hbuuOMwvI=; b=Xm6R5evnHDsuvPhoUFmWzpVgI5TlI22A9SFC5aOqvDjOp7vWZxSkVGXp5eUKqhi/eS xh3Fij+DW+9O6s1WMYFIiunO53dAQjk9PTndgzDTdsZpYkx42sqMADdsDyaxrhoGsmDg k9YEW/8VNajKDzHHM2KH4LnRWzmXlpyhsufJHkX5My+s6BitBIzJvZCkz9SLoFReEGvp csQvf7k28R08NZUMK1EKNBcjSsOHcZXuXu4Os/S5viSAalR2BN7AIOp7xOw8hV6+NB7M a+69vaZwo+SkzXUh3JD0/JGUt/VyLMgfhFvVyOTjkhHAzdxZhEJLqNl8RioAy7oHLuZP ezZg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PoovqNOP; 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-85613-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85613-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y17-20020a05620a44d100b0078726baaca4si224590qkp.617.2024.02.28.11.37.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 11:37:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85613-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PoovqNOP; 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-85613-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85613-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5DD761C23246 for ; Wed, 28 Feb 2024 19:37:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 387B815DBC5; Wed, 28 Feb 2024 19:37:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PoovqNOP" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 B90B574413; Wed, 28 Feb 2024 19:37:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709149040; cv=none; b=mhftdAfUsdtNvMIn7oLohMqmGLBbEZx5j8S+gKuRZtUGidYPFmPQTYG3afhGygOjr6ZjgtlDT1BHRA2HSGGQ4w7gga0MoaCjISxxYylw/xaJq20dYw/QgCWwAP1SLQc9gFlhqR5XQ9bD5EP8NJoSWeHrQNb8z2IQtj2aCtCWnxs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709149040; c=relaxed/simple; bh=qRN8tgRWPtXi3u4gmjpERHUYkozuPU04HqhOdsqu3zY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oeOGV4wdQec6oEBtheOBqcuWGJZRpBDkMei+prcaB0o/XbMQo2VjJf06LW7su2NMRV4LDQ9RKg04YJhX43J1IobraM9jVYw3izWkpR8fI7KmfQlnzJRJS0+gEzK5Ur5TCaUI2BjYZYcY3vwTP7caQr0eKSU9r/kYmHmXJNX+apA= 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=PoovqNOP; arc=none smtp.client-ip=198.175.65.21 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=1709149039; x=1740685039; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qRN8tgRWPtXi3u4gmjpERHUYkozuPU04HqhOdsqu3zY=; b=PoovqNOPh83g5hELR3CeUjXf9+EJV8xWLMvLCZddLeNFIzIqXaSDSz1d pP2At7L9ONjDTHF/w4YFXwph/Cm8K/h0IHySiEQ4pRbg/BBVfA6CFCjzE SPWY9AkowbuK9cZxRnAjrkA3lFuMHR+jod9NwOpIqCYIJWeh4ZFIDCA+q ykF9L2MXCX5ZulMnXNKJOM3lx4xcJnFBIcS5p3REbd2sFSNeVoEXQJjGb VHS7Sh7KR1cNQpOPe2OpDiY31LevW6sIcG/t/HEe5+/wyS2Uwq5ReS1UP 2Lqe6SyRbRRt1NJv74Ax6656jts8PaFDpLLtCoYI1c5ZwWgJ6CYrDVEfZ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="3495445" X-IronPort-AV: E=Sophos;i="6.06,191,1705392000"; d="scan'208";a="3495445" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 11:37:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,191,1705392000"; d="scan'208";a="7485363" Received: from agluck-desk3.sc.intel.com ([172.25.222.105]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 11:37:17 -0800 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Peter Newman , Jonathan Corbet , Shuah Khan , x86@kernel.org Cc: Shaopeng Tan , James Morse , Jamie Iles , Babu Moger , Randy Dunlap , Drew Fustini , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v4 0/2] x86/resctrl: Pass domain to target CPU Date: Wed, 28 Feb 2024 11:36:52 -0800 Message-ID: <20240228112952.8090-tony.luck@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240228112215.8044-tony.luck@intel.com> References: <20240228112215.8044-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When a function is called via IPI, it isn't possible for assertions in source code to check that the right locks are held when those locks were obtained by the sender of the IPI. Restructure some code to avoid the need for the check. Patch 1 has the actual fix Patch 2 is just some code cleanups Changes since V3: https://lore.kernel.org/all/20240222185039.72201-1-tony.luck@intel.com/ Reinette: 1) Improve commit comments in both patches by changing to imperative. 2) Move initialzation of "m.res" in domain_setup_ctrlval() from patch 1 to patch 2 Tony Luck (2): x86/resctrl: Pass domain to target CPU x86/resctrl: Simplify call convention for MSR update functions arch/x86/kernel/cpu/resctrl/internal.h | 5 ++- arch/x86/kernel/cpu/resctrl/core.c | 55 +++++++++-------------- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 42 +++++------------ arch/x86/kernel/cpu/resctrl/rdtgroup.c | 14 ++---- 4 files changed, 38 insertions(+), 78 deletions(-) base-commit: c0d848fcb09d80a5f48b99f85e448185125ef59f -- 2.43.0