From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-200.mta0.migadu.com [91.218.175.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D1822D47F4 for ; Fri, 21 Aug 2026 04:16:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787285808; cv=none; b=DJJuCI5PQ1XFrLvQ76kVoVhllJO755UqR5znOyWLH4x+UcBb5dElNf+3LoABOtdIq6UR8LSPzhNT9waMTnPYMfpOxuLKWmGDon2QI/y/ndTVjQ+4l1vt3SF5dhJ3X/RCTO44VvoW9QE3N1iVEuGr/y9Q03+M+vq36nHffoJx9lk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787285808; c=relaxed/simple; bh=B7bBILzNXKlHPxytJUiGU9YIfeJErpP5uZl6CAsm9dE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Mol0ux6PigCzXbiv/G+zBW7dYqUoItkGDRLvl2L9i8wVcTyQOEtUvSbfhlPAkEZSbePQyCPHRbfvJ8Va3C2QTlmsV0u112YHnu8Q3SCGTuv/VJxIqcFAN9x5YZ+5433CQ4hh1ksX5rEtb//XZ2DIGfmlJIY+jqyfIHT8ng9QLjY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=LJCYGrGo; arc=none smtp.client-ip=91.218.175.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="LJCYGrGo" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=B7bBILzNXKlHPxytJUiGU9YIfeJErpP5uZl6CAsm9dE=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787285802; v=1; x=1787890602; b=LJCYGrGoGTAO6Nq8p3s+olphdcerMkSW5HGcQSwPSkH51A7PDcTaVQ8vIc/MurAF2hhnBAlH +kolPQl7aj6P3auBY78xOPkLofWsDGdzWtlCIyHtOCM3dtZ/QStza6U0+3Z6Pqm4v10ktdamrya L2+hYPuM4MivfEwVLZHtTdaY= X-Envelope-To: linux-kernel@vger.kernel.org Received: from three-body (240e:398:90:76f0:8593:bbdd:a871:96c2) by smtp.migadu.com with ESMTPS id 799cf221c6ec557d; Fri, 21 Aug 2026 04:16:42 +0000 X-Mizu-Trace-ID: 799cf221c6ec557d X-Migadu-Flow: FLOW_OUT Date: Sat, 22 Aug 2026 12:16:23 +0800 From: Chen Yu To: Reinette Chatre Cc: Chen Yu , tony.luck@intel.com, tglx@kernel.org, bp@alien8.de, mingo@redhat.com, dave.hansen@linux.intel.com, hpa@zytor.com, fenghuay@nvidia.com, babu.moger@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 1/9] x86/topology: Export topo_lookup_cpuid() for resctrl use Message-ID: References: <064a044f-e0c3-4328-b019-61872b08c03d@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <064a044f-e0c3-4328-b019-61872b08c03d@intel.com> Hi Reinette, On Wed, Aug 19, 2026 at 03:55:36PM -0700, Reinette Chatre wrote: > Hi Chenyu, > > On 7/25/26 2:22 AM, Chen Yu wrote: > > Enhanced RDT (ERDT) enumerates its monitoring and control resources > > Please use at least 80 characters per line. The checkpatch warnings about 75 > characters can be ignored. For context, please see > https://lore.kernel.org/lkml/20250916105447.GCaMlB976WLxHHeNMD@fat_crate.local/ > > Please check entire series. > Got it, will check and fix them accordingly. > > through ACPI tables that identify each CPU by its x2APIC ID. To > > associate this firmware-provided data with the kernel's per-CPU > > structures, ERDT must translate those x2APIC IDs into logical CPU > > numbers. > > > > topo_lookup_cpuid() already performs this translation, but it is > > static to topology.c and therefore not reachable from resctrl. > > > > Export topo_lookup_cpuid() and add its declaration to asm/apic.h so > > To support this change you could add a motivation why this particular > header file was chosen. For example, > "add its declaration to asm/apic.h" -> "add its declaration to asm/apic.h > that already exposes the inverse mapping" > OK, will adjust it. > > that ERDT can resolve x2APIC IDs from ACPI tables to logical CPU > > numbers. > > > > No functional change intended. > > > > Signed-off-by: Chen Yu > > Tested-by: Hongyu Ning > > --- > > | Reviewed-by: Reinette Chatre > Thanks! Chenyu > Reinette