From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752010AbdF0Gl3 (ORCPT ); Tue, 27 Jun 2017 02:41:29 -0400 Received: from mail-by2nam01on0082.outbound.protection.outlook.com ([104.47.34.82]:19136 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751510AbdF0GlU (ORCPT ); Tue, 27 Jun 2017 02:41:20 -0400 Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=amd.com; From: Suravee Suthikulpanit To: x86@kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: bp@alien8.de, bp@suse.de, leo.duran@amd.com, yazen.ghannam@amd.com, Suravee Suthikulpanit Subject: [PATCH 1/2] x86/CPU/AMD: Present package as die instead of socket Date: Tue, 27 Jun 2017 01:40:52 -0500 Message-Id: <1498545653-6755-2-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498545653-6755-1-git-send-email-suravee.suthikulpanit@amd.com> References: <1498545653-6755-1-git-send-email-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: DM5PR12CA0063.namprd12.prod.outlook.com (10.175.83.153) To CY4PR12MB1733.namprd12.prod.outlook.com (10.175.62.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c9865fa8-0a8c-4e29-70e2-08d4bd278388 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506067)(300135500095);SRVR:CY4PR12MB1733; X-Microsoft-Exchange-Diagnostics: 1;CY4PR12M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DCeIfILPJqhb8vIoLDFVPgRe6uEwHSmggHSHgBHSdenk/MBPksluw+r6SQSAYAUQE2ZpZSrLpzGL7Jeab0nPTaGUfXOU75TNiqG6+8OWdMF8JtcDdUgxHOwmp0DoS9m4YSu/RumHdGdIAPOCFF9CL0Wl7/vfev39dTRc/br48wkpm39hJlj40fuoHijvf4q3sRdX3gcwSfG2EW006Bv14elq0HqbudOwv8TFyTf9sSn69fRd3hLGiu7XxdZWZtiL2X93BmEi+n1TPUGf4l/yIi7i6p25bFOaFfnCEelvYNhU43Xa+Tv6qZrZwI5ivQovre+Y4sRROEiNwQhoQBtbQYRMCVYSPmUk2HTa5o= X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1733;20:xrVobn14+gRLHgZbILe42k7a+x7OxPW0hmzut/fSwOLH7dY4V0yTRwrEODLRWWiIWYm02VDueaV1AyVvl4MyUJYMyQqzMppJaP32U3fL2VzvXpoUrErzqRDSEQhJXXUodtmMejAOH+eYm72GbdmX063hatHMyWIAGkYl9j+5DZ3ma++ooPOWzVtqSIs7qtsSIBH5r7kRRNaftOaAyzqAAJD9ayFVUpYi2YtTC1fgLZ9Id7f3ahwc01bf3ZgLq75Bh9w4VlIm+kZe2BluCgY7wwU10r614u4vOvjBkc7S2/kiO92TCtU/A0VRfPoN5dW/bDKhXLYjt34x/HLE2/dhZku6OUgKiVGex6kfPHlWQHFvBgkItgrMKY9lrHYSyAgDPcwUWCn4XFRaND6OZQTGfTddCtzgGrAKbzAw6IBGMBFBt4KLCQ7aBnBPXBbrPc97aNR6+WumbcBfwjw8gSLyT/85DiVEXagP8mmlZ1xi2reLWHxy8zJl5Mk7U1YXM0sq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(9452136761055)(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123558100)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR12MB1733;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR12MB1733; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR12MB1733;4:zKKRAhwwq8dWsqcZJqDfJyA0JXUL1FsZH8J8p4macF?= =?us-ascii?Q?s+DIF+CpyQ175VB99z9LhoVQcx4Za+IO58XgfefQhJt8fRnAwxOkCPKCKtV0?= =?us-ascii?Q?mgzL5lLoBnnsmZD4CggtdWOjMN/VwByc2pgFc8M7s4JinifeXazzXoXUMB/k?= =?us-ascii?Q?KmsQAwqeOHW3JfWaHB1FmzH1CAKCy4GNe0CEpmwYmcc9W5M19G3DdcPXxXGb?= =?us-ascii?Q?piGTGwwwJ2Xe0+aboy2NROj6hhvXBN8zQsr+3h2JFVM9ourZ+4if8B/3G6tb?= =?us-ascii?Q?TaR72VMg+9+H39vl+Si7BWG1i9zaM/qIPGmJsiV//7s+llWlKs9v7wvf/RS6?= =?us-ascii?Q?htJYdESGHHzMrri2Nr/dTZMdIyG1FgkWueD4xGxI0wo+9QaamLHAEZk0zXnu?= =?us-ascii?Q?rGJRpKMCBOPnO5CzwMA/DtB5YZ1gtMIcsIcRnFkLs9DNcoKP/CVETUctDoG/?= =?us-ascii?Q?sJ0lxoECjIwZiao37SfQIRfV1G9u0Xh1JEmoAAXYVPGjR/eMkoGPuM9zqkSo?= =?us-ascii?Q?kMWqC6J4BrgfXmNHW0wL2mz3BSg0nNQdmGeEBaOwxWzH/gdYpCKxMsKD283W?= =?us-ascii?Q?+2aDoH0ltuqxS1MD5MypHqBo1Gm0yQjjaTZ+lAJ8fhjT+/Kn44Yih/B5G6q6?= =?us-ascii?Q?b5wTVm84Cx+pUG51NCifdNaomQv9vPg5g6It0YBAXVBqNt4SFMNuEwrX8O6W?= =?us-ascii?Q?Xpc5ZG5exL7PGfeGPIm3hH+CX1jIQzWzMo+0vhupN2DQaXxcQYOvO3fBJmdW?= =?us-ascii?Q?Um/TPiGO6Mc+4MziZksBwuwNT7LrDL6TY5bJwRUYqDHfq+lniMuGq89WpXpH?= =?us-ascii?Q?QIabOHpk3f7xJvVQCEJonYZshLllH1UB+VEHt6zUWl512BI5pjeDMTRE8wFm?= =?us-ascii?Q?Z92Fp3HrAdALAw0xrBmb43bXCvJbr0hoDAAKiteXqQe1b0nj89Z0Ff7eCp6H?= =?us-ascii?Q?Hb83kCIcEu0S/wbVbn2zBlcD7DkaoOPzuXuCjlOOWZevAOD8/qoyedcxakkl?= =?us-ascii?Q?O2v2qwgHyXteIHLb5qqBAhSN3SfCP7NMVTjiVHshhhy3iJ6+URk273hZf+54?= =?us-ascii?Q?e+1B6NVd1WeEJvxbafOcCW4+kvIPp5jZTouhn9Aswq62lW7fgu6mQFubtJFV?= =?us-ascii?Q?oL8DuaejJLnkASHDxOgmdkp6CO/tZ7QfC6J9S4VoiQAEuV000bEdKFeiGiFY?= =?us-ascii?Q?G3Ps8Kwkg4bnH/LKEGHCw6w9eDxA5h7KY7OMEMx4oh3CeDUprqqMTdSoBg9Q?= =?us-ascii?Q?HSBEGsbmD81rcfK2VD7sIH2bI+HHH+xdAdClOy?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(39410400002)(39450400003)(39840400002)(39860400002)(39400400002)(39850400002)(50466002)(5660300001)(38730400002)(6486002)(25786009)(478600001)(6666003)(2950100002)(53936002)(2906002)(4326008)(86362001)(110136004)(6116002)(305945005)(36756003)(3846002)(50986999)(66066001)(48376002)(47776003)(5003940100001)(189998001)(72206003)(7736002)(8676002)(33646002)(50226002)(76176999)(42186005)(81166006)(53416004);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1733;H:ssuthiku-ubuntu-b2.amd.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR12MB1733;23:/YB6c2J6PDyASV9klkLMAiRU+7UmNCygEm88W2l8p?= =?us-ascii?Q?h1XDOdD41cWDpqDd6JPLDd3JL1ITpQI7JihLhvkRxiQd0Ae3XzFi5x9Siv2E?= =?us-ascii?Q?oJnyM2X9djj7luQhRjX+kJNnU6TkSuSl5hqxg7LXuG5g4JhVvtVaS60TJlQi?= =?us-ascii?Q?jzbeoybi9BI3XFTm+LPiGl7o/McHmNfWe/14Cf2YSJc0WvdvG6lfllSbQAzF?= =?us-ascii?Q?CFPmKdT+VZF0tUs9vVehna06pQBtM2qWYPQFw6RCW3gGa97Igh4Z1ohLqXvF?= =?us-ascii?Q?+uuDHfgPcA18T8aSxkIijfrwdRRMENZAYjwNSZ2MtI7PzoY0odAFPIso+U4i?= =?us-ascii?Q?V0wnnQlNVGYKBB5z3qnPsvCVEQu+RxwikvqvCFLpKg403jRzsNSnFvBrGDIZ?= =?us-ascii?Q?EoEBh6ALci0E2hze397mwW7N1BK2KWcQLrN+/Az2TmjhDMT5s1unRlZtuYf2?= =?us-ascii?Q?dYIwFE2IzR0qAnvBr7oV+z4Rn7qpFRroQLp3dLZM2JXIktBTIy8M54g8VAug?= =?us-ascii?Q?VhSNZq8quFFiWjcjsDj5v4JKBQ7lMvJD3+pe/prnRtyeLeqtIrhjHEbYNNtj?= =?us-ascii?Q?iMD/6BuvNIBq1SZH2M9eFoM7kpzFbj7pO4RNGmxkPPRygVLGOXAjAf2+Ni0e?= =?us-ascii?Q?DkZO8SM3f5HG1yyS4FQn/l7ZgiR46nRgwVdSGv4UKVo4hZehWMiBVVquyf7f?= =?us-ascii?Q?2nUjtfK4u5SdDOwiW7lAbeG/LHt1uG0U6tNWm1+ElrVuS1LSqHZo20j89wSj?= =?us-ascii?Q?jChjHs5Rmrc4gSridv0VN15sn1Qe7gvPRu+rNzHPD8FyCmzlEqDBq299GaYO?= =?us-ascii?Q?FvmOgYkp9393xvg8SdSBTbuqsH2cELVWCtaousTGSu/vhyQ56GeD6kH+gOM4?= =?us-ascii?Q?l178XGSFFvgoOxndz+9OmGcdHvtsZ8bWGlCLtx92KkEd4P3UiwbXOMTSGwxM?= =?us-ascii?Q?8342Q/zkIhmEinAOfbZvYDJpum91Enct+AHdndMiEEP9538960Tf1USSvJ/R?= =?us-ascii?Q?E4vWfxV4y65qPoE77TJu8/Ed8LpUaJLVVI0HGTtIOAioQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR12MB1733;6:yXMNuf6CkwnGHCWY32aGGCmhOshPS5f7n7ljiW2r2n?= =?us-ascii?Q?AvU97bQPrQ8SXkvIdXo+Wh2ifHfxrWPstxymqZNpAvKhYYHZiT+Y/dKYyduM?= =?us-ascii?Q?mmaq8OosXmB0xl0W9oA3USNbe7il67srxENwXC64FvuXoklFde1AsnTAhpt1?= =?us-ascii?Q?BduK77ebd26PvhYJid7XUxXXBZv8+He6O0Q0XcNFCppgJXVBAzh8qxMmCBLq?= =?us-ascii?Q?yjKyUZid5Jkhi8gOy3S5hgDlbB92ZMhak9KUUOhMNdcqBYHpj/WuIg6ObZhH?= =?us-ascii?Q?sIScx3L8K1j3ljdH7JAr1tfQxcwK5qLLFthbnlHnQU5HRggnpikygIuk9N9H?= =?us-ascii?Q?8RH9y1WuwDDa4YSPdYm6+2qri+/sVLIL+2jWmJSury2uJm6sVeEkRlVGlRH/?= =?us-ascii?Q?Bv+BqVt2SmGP/J+r7uTPgtre9lZIBgCr6MsfkdSJ0uanZQk0K/X5k1mR/xGc?= =?us-ascii?Q?Cq+GrcbwX+1bshwCc3QqaUSGmyTB1hjRyy5C8yEBR2ow6yMkq72pxIouiveH?= =?us-ascii?Q?C2littLe+1OZxxvCQZ5bkodlNZM/eP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Y4PR12MB1733;20:EzTZYafX4WTZwTTlXd3yVZ65jgEZI0lRLC4/rrGRQ7C7tkrnwZhB99gM//mmbWXXhBs2XQUWavSQS8VPgWZwRcI5Coafjp0HXDaNAhhFaoY7yD1kO0nu0zCB9yHTMW6DLKN8ynKDEnWpyEjdz9E0IUcscxcwEEBvnvBouWPeOJWTUqIV0+BCPKMwV1L+HaA5nUq0dtAlHAQ5HcghabQFhL0vaqMcoDY/cZkpFxBRCcXb+xBVvgbJpHPw0cAXFquG X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 06:41:16.9930 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1733 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to the Documentation/x86/topology.txt, AMD nomenclature for package is NUMA node (or die). However, this is not the case on AMD family17h multi-die processor platforms, which can have up to 4 dies per socket as shown in the following system topology. Die (Dx) View : ---------------------------- C0 | T0 T1 | || | T0 T1 | C4 --------| || |-------- C1 | T0 T1 | L3 || L3 | T0 T1 | C5 --------| || |-------- C2 | T0 T1 | #0 || #1 | T0 T1 | C6 --------| || |-------- C3 | T0 T1 | || | T0 T1 | C7 ---------------------------- System View (with 2 socket) : -------------------- | -------------|------ | | | | ------------ ------------ | D1 -- D0 | | D7 -- D6 | | | \/ | | | | \/ | | SOCKET0 | | /\ | | | | /\ | | SOCKET1 | D2 -- D3 | | D4 -- D5 | ------------ ------------ | | | | ------|------------| | -------------------- Current logic interpretes package as socket (i.e. phys_proc_id is socket id), which results in setting x86_has_numa_in_package, and omits the DIE schedule domain. However, NUMA schedule domains are derived from SRAT/SLIT, which assumes NUMA node is a die, and build NUMA schedule domains on top of NUMA nodes. This results in incomplete schedule domains as following: domain 0: SMT domain 1: MC /* core complex w/ shared L3*/ ---- Missing DIE level domain ---- domain 2: NUMA /* socket */ domain 3: NUMA /* platform */ Presenting package-as-die does not set x86_has_numa_in_package. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Leo Duran Signed-off-by: Yazen Ghannam Cc: # v4.10+ --- arch/x86/kernel/cpu/amd.c | 189 +++++++++++++++++++++++++++------------------- 1 file changed, 112 insertions(+), 77 deletions(-) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index bb5abe8..2f5869c 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -1,3 +1,5 @@ +#define pr_fmt(fmt) "x86/AMD: " fmt + #include #include #include @@ -32,6 +34,12 @@ static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum); */ static u32 nodes_per_socket = 1; +/* + * l3_num_threads_sharing: Stores the number of threads sharing L3 cache. + * Refer to CPUID_Fn8000001D_EAX_x03 [Cache Properties (L3)] NumSharingCache. + */ +static u32 l3_num_threads_sharing; + static inline int rdmsrl_amd_safe(unsigned msr, unsigned long long *p) { u32 gprs[8] = { 0 }; @@ -296,96 +304,122 @@ static int nearby_node(int apicid) } #endif +#ifdef CONFIG_SMP + /* - * Fixup core topology information for - * (1) AMD multi-node processors + * Per Documentation/x86/topology.c, the kernel works with + * {packages, cores, threads}, and we will map: + * + * thread = core in compute-unit (CMT), or thread in core (SMT) + * core = compute-unit (CMT), or core (SMT) + * package = node (die) + * + * Discover topology based on available information from CPUID first, + * and only derive them as needed. + * + * (1) phys_proc_id is die ID in AMD multi-die processors. * Assumption: Number of cores in each internal node is the same. - * (2) AMD processors supporting compute units + * (2) cpu_core_id is derived from either CPUID topology extension + * or initial APIC_ID. + * (3) cpu_llc_id is either L3 or per-node */ -#ifdef CONFIG_SMP static void amd_get_topology(struct cpuinfo_x86 *c) { - u8 node_id; int cpu = smp_processor_id(); - /* get information required for multi-node processors */ if (boot_cpu_has(X86_FEATURE_TOPOEXT)) { u32 eax, ebx, ecx, edx; cpuid(0x8000001e, &eax, &ebx, &ecx, &edx); - node_id = ecx & 0xff; + c->phys_proc_id = ecx & 0xff; smp_num_siblings = ((ebx >> 8) & 0xff) + 1; - if (c->x86 == 0x15) - c->cu_id = ebx & 0xff; - - if (c->x86 >= 0x17) { - c->cpu_core_id = ebx & 0xff; - - if (smp_num_siblings > 1) - c->x86_max_cores /= smp_num_siblings; - } + /* Adjustment to get core per die */ + c->x86_max_cores /= smp_num_siblings; /* - * We may have multiple LLCs if L3 caches exist, so check if we - * have an L3 cache by looking at the L3 cache CPUID leaf. + * For family15h/16h, this is ComputeUnitId per socket + * For family17h, this is CoreId per socket */ + c->cpu_core_id = (ebx & 0xff); + if (cpuid_edx(0x80000006)) { - if (c->x86 == 0x17) { + cpuid_count(0x8000001d, 3, &eax, &ebx, &ecx, &edx); + l3_num_threads_sharing = ((eax >> 14) & 0xfff) + 1; + } + + if (c->x86 == 0x17) { + /* + * In family 17h, the CPUID_Fn8000001E_EBX[7:0] (CoreId) + * is non-contiguous in down-coring and non-SMT cases. + * This logic fixes up the cpu_core_id to be contiguous + * for cores within the die. + */ + u32 tmp = c->cpu_core_id; + u32 die_offset, ccx_offset, cpu_offset; + + if (smp_num_siblings == 1) { /* - * LLC is at the core complex level. - * Core complex id is ApicId[3]. + * For SMT-disabled case, the CoreId bit-encoding is + * [7:4] : die + * [3] : ccx + * [2:0] : core */ - per_cpu(cpu_llc_id, cpu) = c->apicid >> 3; + die_offset = ((tmp >> 4) & 0xf) * c->x86_max_cores; + ccx_offset = ((tmp >> 3) & 1) * l3_num_threads_sharing; + cpu_offset = tmp & 7; } else { - /* LLC is at the node level. */ - per_cpu(cpu_llc_id, cpu) = node_id; + /* + * For SMT-enabled case, the CoreId bit-encoding is + * [7:3] : die + * [2] : ccx + * [1:0] : core + */ + die_offset = ((tmp >> 3) & 0x1f) * c->x86_max_cores; + ccx_offset = ((tmp >> 2) & 1) * l3_num_threads_sharing / smp_num_siblings; + cpu_offset = tmp & 3; } + c->cpu_core_id = die_offset + ccx_offset + cpu_offset; + pr_debug("Fixup CoreId:%#x to cpu_core_id:%#x\n", tmp, c->cpu_core_id); } - } else if (cpu_has(c, X86_FEATURE_NODEID_MSR)) { - u64 value; + } else { + if (cpu_has(c, X86_FEATURE_NODEID_MSR)) { + u64 value; - rdmsrl(MSR_FAM10H_NODE_ID, value); - node_id = value & 7; - - per_cpu(cpu_llc_id, cpu) = node_id; - } else - return; - - /* fixup multi-node processor information */ - if (nodes_per_socket > 1) { - u32 cus_per_node; - - set_cpu_cap(c, X86_FEATURE_AMD_DCM); - cus_per_node = c->x86_max_cores / nodes_per_socket; + /* Use MSR provided node ID */ + rdmsrl(MSR_FAM10H_NODE_ID, value); + c->phys_proc_id = value & 7; + } else { + /* + * On older AMD dual core setup the lower + * bits of the APIC id distinguish the cores. + * Assumes number of cores is a power of two. + */ + c->phys_proc_id = c->initial_apicid >> c->x86_coreid_bits; + } - /* core id has to be in the [0 .. cores_per_node - 1] range */ - c->cpu_core_id %= cus_per_node; + /* Get core id from APIC */ + c->cpu_core_id = c->initial_apicid & ((1 << c->x86_coreid_bits) - 1); } -} -#endif -/* - * On a AMD dual core setup the lower bits of the APIC id distinguish the cores. - * Assumes number of cores is a power of two. - */ -static void amd_detect_cmp(struct cpuinfo_x86 *c) -{ -#ifdef CONFIG_SMP - unsigned bits; - int cpu = smp_processor_id(); + /* core id has to be in the [0 .. cores_per_die - 1] range */ + c->cpu_core_id %= c->x86_max_cores; - bits = c->x86_coreid_bits; - /* Low order bits define the core id (index of core in socket) */ - c->cpu_core_id = c->initial_apicid & ((1 << bits)-1); - /* Convert the initial APIC ID into the socket ID */ - c->phys_proc_id = c->initial_apicid >> bits; - /* use socket ID also for last level cache */ + /* Default LLC is at the die level. */ per_cpu(cpu_llc_id, cpu) = c->phys_proc_id; - amd_get_topology(c); -#endif + + /* + * We may have multiple LLCs if L3 caches exist, so check if we + * have an L3 cache by looking at the L3 cache CPUID leaf. + * For family17h, LLC is at the core complex level. + * Core complex id is ApicId[3]. + */ + if (cpuid_edx(0x80000006) && c->x86 == 0x17) + per_cpu(cpu_llc_id, cpu) = c->apicid >> 3; + } +#endif u16 amd_get_nb_id(int cpu) { @@ -412,7 +446,7 @@ static void srat_detect_node(struct cpuinfo_x86 *c) node = numa_cpu_node(cpu); if (node == NUMA_NO_NODE) - node = per_cpu(cpu_llc_id, cpu); + node = c->phys_proc_id; /* * On multi-fabric platform (e.g. Numascale NumaChip) a @@ -457,26 +491,23 @@ static void srat_detect_node(struct cpuinfo_x86 *c) static void early_init_amd_mc(struct cpuinfo_x86 *c) { #ifdef CONFIG_SMP - unsigned bits, ecx; + u32 threads_per_socket; /* Multi core CPU? */ if (c->extended_cpuid_level < 0x80000008) return; - ecx = cpuid_ecx(0x80000008); - - c->x86_max_cores = (ecx & 0xff) + 1; - - /* CPU telling us the core id bits shift? */ - bits = (ecx >> 12) & 0xF; - - /* Otherwise recompute */ - if (bits == 0) { - while ((1 << bits) < c->x86_max_cores) - bits++; - } + /* Threads per socket */ + threads_per_socket = (cpuid_ecx(0x80000008) & 0xff) + 1; + /* Thread per die */ + c->x86_max_cores = threads_per_socket / nodes_per_socket; - c->x86_coreid_bits = bits; + /* + * This is per socket, and should only be used to decode APIC ID, + * which is needed on older systems where X86_FEATURE_TOPOEXT + * is not supported. + */ + c->x86_coreid_bits = get_count_order(threads_per_socket); #endif } @@ -765,11 +796,15 @@ static void init_amd(struct cpuinfo_x86 *c) cpu_detect_cache_sizes(c); - /* Multi core CPU? */ +#ifdef CONFIG_SMP if (c->extended_cpuid_level >= 0x80000008) { - amd_detect_cmp(c); + amd_get_topology(c); srat_detect_node(c); } +#endif + /* Multi-die? */ + if (nodes_per_socket > 1) + set_cpu_cap(c, X86_FEATURE_AMD_DCM); #ifdef CONFIG_X86_32 detect_ht(c); -- 2.7.4