Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp458875lqh; Fri, 31 May 2024 06:46:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+g8z7lDpq7ycEWvsdlYVyW9qxkMGvkd1ekecNzh+Fhlp/dVa5JGcQTFWM+H5a219NDd3aMD9h0uo9WHmNdYi41qUECEDP8f0ad5/REw== X-Google-Smtp-Source: AGHT+IHR1cyJGjT/yz1/GWJsFJsnI8jOpiFvIFWoNtI6BlpWViNc015ixciCdA3eyHt+sc0Y9iQC X-Received: by 2002:a05:6214:5882:b0:6a9:ec6c:7640 with SMTP id 6a1803df08f44-6aecd6f0972mr16742616d6.48.1717163172555; Fri, 31 May 2024 06:46:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717163172; cv=pass; d=google.com; s=arc-20160816; b=QqdBVz3Hek1+gNIrzbfFe2Y90bNNEHweJdhWISTXUDkZIqNEBIy9wuN2Jd7RgSbdtR atx8iOxIWCswQAwOwb5LXCxeMd8tANNHkecyhrDFXLOAyMo9GyfJxZl2miBxWvjlxRfD KybcjfKUSlSeEB0Qe3Jw+z5v7R3JdUrME+e167iaIzxSxZBGbAZALUNO7tMqDsXiiX04 aJ2SJZEDrBofmwimHdPp15kRzrzB76oYP1ufD4byWdmKZSqN0NV9idAbn/8/+bmO2ja4 PA2zLiVGuFl+llgWfam6LahhJdpikJ9D7QdcMApkPhv+tjkxCs26BxZQW5I1u2wahXz+ fJgA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:date:from :dkim-signature; bh=uX27j1pDs7QZct2sapkeNGH7TvzvvsUxTvG2dNRZp2U=; fh=sKpUyvMpiD/nKnmDFLwOu1QFyeKtl4K0bxaBro/J49M=; b=cRp5NNdKSdtFGrd1f62uIgVIq0ic8w7sPo2VNSY0ryHAuZC5BkRZb3hhVTquTWFyfE Ohg6aycbbzgkRa05OSGmzjhlZvp/Hpad/81waOFtpIgdL5TC2yvZRJEZBUiiaGzEyF49 tkZ1FPyyAadptL0dp4NsRr5T5rhiv1Kg3u/hlcJmLXovvYxbMUx8EssC+0kSekGpHb4t 5tXTOxxIu+aZK9qWgZEhgaDPKIwYNgpjGuwVooVgVyr93/cGGW/kW3J5hBP5xnM8Ulc6 uQUV7tugsOLxjO3s7SMw0Cd+KCzsy+uq2FD9n0h+8l0abd1IuqogALe4TC2K4SZ8BSk+ QHwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aSFGw6fv; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-196906-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196906-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 6a1803df08f44-6ae4b401a2asi20571426d6.217.2024.05.31.06.46.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 06:46:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196906-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=aSFGw6fv; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-196906-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196906-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 4A8211C23F3F for ; Fri, 31 May 2024 13:46:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D5F815B96D; Fri, 31 May 2024 13:45:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="aSFGw6fv" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 3461A7440B; Fri, 31 May 2024 13:45:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717163150; cv=none; b=Ty4+FRfwXHiM4QdPv7JqK2bgvx28NG5kOyS0GKunRnpT1W+3itP4XxG/DRo/GShrycqClOlTdLKhKgvV1jYiiYr2bsyQSyx+mss1LFtuIVF0M86w09UP+XKMVWbjpOT95B+eY15Zc+TjOfaXN3ANgFbcdzOGAb/VbBAiCsZE0SQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717163150; c=relaxed/simple; bh=9gZJXbrNp53XH1tm/tfVN47+bsrWNqX6VZfq28fc84g=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=GfMrQJ46t7MzbLR2rAq3Cx3E1ViINs2Sbg56PUc6hISCMDu8j2aAbKtwuPOzFYEMoywQC4NgYGtv9drN1cz+ZPVm54qU3icziAJcXKa9aMCQDHRF+FZ+boo3PUthnNiKctUS7c3kmUozXWXVo7AMmGJ16y62qR2gw/hHXb2NXjI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=aSFGw6fv; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717163149; x=1748699149; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=9gZJXbrNp53XH1tm/tfVN47+bsrWNqX6VZfq28fc84g=; b=aSFGw6fvgXKcJ+sQkDaLPZsT0Z0RMiNI4Jy8Oa8bwUBnl5h9ag2W/Qg6 CCDKTiV8yehkTfgvnww86tj7QeOOVacs9F346Ux7/oNMyFLf2TNHP9vk4 H/uxqBvz7cYnu9CTqqIcw/G+n8l7be1PRedd7LFm+tGoMk1Da6ulKXVfK QGLXqW/FBckBezoC4JyhJHe7hOFW6iGD1LTlPjLwTKmr3bzTe/Ul2/IiZ BGgE3V5SKJTdaE/ujT47dMhDA51SPT+QewxhdeCXod2PKqG/7YwscYQ6M vue3l/ZTVLPvKoLw5tk9CSTlH2QuAIu6EEpFp96LxLaX/SeOgjaWUUfH3 g==; X-CSE-ConnectionGUID: sw/bAfg8TH2AJJywbllXuw== X-CSE-MsgGUID: S0GtkbglTUy54LniU+9jag== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="31236754" X-IronPort-AV: E=Sophos;i="6.08,204,1712646000"; d="scan'208";a="31236754" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 06:45:48 -0700 X-CSE-ConnectionGUID: KpfUPfexT76CRNRR1nJMsQ== X-CSE-MsgGUID: X8UH6gdKTKikusRUfBslYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,204,1712646000"; d="scan'208";a="41088309" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.247.152]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 06:45:46 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Fri, 31 May 2024 16:45:42 +0300 (EEST) To: Tero Kristo cc: srinivas.pandruvada@linux.intel.com, Hans de Goede , platform-driver-x86@vger.kernel.org, LKML , Andy Shevchenko Subject: Re: [PATCH v2 3/6] platform/x86/intel: TPMI domain id and CPU mapping In-Reply-To: <20240528073457.497816-1-tero.kristo@linux.intel.com> Message-ID: References: <8646d7dbeb507ce28b6ddca1222ee3c9892d61cc.camel@linux.intel.com> <20240528073457.497816-1-tero.kristo@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-1178766688-1717163142=:8458" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1178766688-1717163142=:8458 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 28 May 2024, Tero Kristo wrote: > From: Srinivas Pandruvada >=20 > Each TPMI power domain includes a group of CPUs. Several power > management settings in this case applicable to a group of CPUs. > There can be several power domains in a CPU package. So, provide > interfaces for: > - Get power domain id for a Linux CPU > - Get mask of Linux CPUs in a power domain >=20 > Hardware Punit uses different CPU numbering, which is not based on > APIC (Advanced Programmable Interrupt Controller) CPU numbering. > The Linux CPU numbering is based on APIC CPU numbering. Some PM features > like Intel Speed Select, the CPU core mask provided by the hardware is > based on the Punit CPU numbering. To use the core mask, this mask > needs to be converted to a Linux CPUs mask. So, provide interfaces for: > - Convert to a Linux CPU number from a Punit CPU number > - Convert to a Punit CPU number from a Linux CPU number >=20 > On each CPU online, MSR 0x54 is used to read the mapping and stores in > a per cpu array. Create a hash for faster searching of a Linux CPU number > from a Punit CPU number. >=20 > Signed-off-by: Srinivas Pandruvada > [tero.kristo: minor updates] > Reviewed-by: Andy Shevchenko > Reviewed-by: Ilpo J=C3=A4rvinen > Signed-off-by: Tero Kristo > --- > v2: > * changed to use X86_MATCH_VFM() instead of X86_MATCH_INTEL_FAM6_MODEL(= ) I've applied this v2 + the other patches from v1 series now to review-ilpo= =20 branch. For the record, I removed "All rights reserved." lines from the patches=20 while applying. I asking first (privately) a permission from Tero whether= =20 it's okay with him I remove those lines. --=20 i. --8323328-1178766688-1717163142=:8458--