Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755376AbdGXJX7 (ORCPT ); Mon, 24 Jul 2017 05:23:59 -0400 Received: from mail-sn1nam02on0075.outbound.protection.outlook.com ([104.47.36.75]:60855 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753363AbdGXJXJ (ORCPT ); Mon, 24 Jul 2017 05:23:09 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Suravee.Suthikulpanit@amd.com; From: Suravee Suthikulpanit To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, bp@suse.de, peterz@infradead.org, Yazen.Ghannam@amd.com, Suravee Suthikulpanit Subject: [PATCH v4 2/2] x86/amd: Fixup cpu_core_id for family17h downcore configuration Date: Mon, 24 Jul 2017 04:22:45 -0500 Message-Id: <1500888165-2345-3-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500888165-2345-1-git-send-email-suravee.suthikulpanit@amd.com> References: <1500888165-2345-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: CO1PR15CA0049.namprd15.prod.outlook.com (10.175.176.17) To CY4PR12MB1735.namprd12.prod.outlook.com (10.175.62.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b2a79687-afa3-4fc9-7e34-08d4d2759650 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR12MB1735; X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1735;3:fIuBCVu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lxk2FH/MaAOPtbcDPtQZzix+q+txb54zMs2NLlHc/DwYbvo8oyv+PSJWmPGYR26MaC6VcxUAlLmjTMvWsW03E9J48pReZwqbbHcnw5mIPfhWE47/wA9Cfiy7CHCOAN5v/rA9vwlAm4ZOMUn5WefKNg9nRLRgAb6D59RlDZ9ojhxaQfupmETKuCzGOFHHsD8DkcNse+ULJ8GYMCaX+uytuWmrPwBS3g0YCQL+jM/AafGOcXx5LhueF7Xucw6m6q2jeSUOzbq8ZNodPa647SPKGPYgHOQsU9ktNUiDdQJVbCpVYeGlTl8jyKOd7Wc8bOoBRdL/3kCv5Tsw8MHzqTpKNpz6ze/zSc= X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1735;20:7GfpFsLVvguNvArq/Pp/6/M+QlU+eNMwd/nmOh4PnaPp7QJPmzarWn2eGbsnaJYk8vXi+De7xqZn3wbYJwE61qusF+7Y1qpkHF4DIGRi96uRXtGAK5m3hn0YN8ZkBz+o8m9lVGL5IdDqz6oPj96hyE5fbJZe0B5KiIDi9if6voNf504qzLIN+IHTTutN6nOBE4X3WFder23bx4HBv0mJ07GGWPT9Rx5dprHtFsmaVAyedVVii1SBGSCtNL5j3uhR01toyuU5vOufxPhQBzvnsA2rFA++A2gzuAK4gUqjH4R+K+axPXwn2NnLVk1kztFgMSfah8Zv3SgLiUhsjgytYxZOQq2TEUzkCMZ0/NTupWGcLWKp2Mi5KyGsFNIJIVbuak6m5mnLHT21uBeXW3VFBhSEJ6+YL+Tz374PFSjeTeib5uM+U/VWVYE/FHMMiO2+qyUNdIa1PqXOeeX3qz+1lDMsCBQ3rWtFhLXYD0/xy2uYVBPBh6aDLS8FfbALrPpJ X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123562025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR12MB1735;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR12MB1735; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR12MB1735;4:VaY21h91adB+ImCfrMxDTyV+OYPKLzgu4PZR/J7Gft?= =?us-ascii?Q?9qsnOFY+q0J4PPSQS4GfZ/0Z7Cn0TKewTEZ4kXslPGNddsefAgc63hS77APw?= =?us-ascii?Q?YJdluVX0G6PaoftKbWRxhwceqFTXGUZFVWzJsjmFRswybSFYA2H/be8viE8n?= =?us-ascii?Q?ptmf43P+OqZbjbmD6nBYroYwEsjA4N6qNDZslU45/nX8iYnG9QUiFchYR38m?= =?us-ascii?Q?26XIDbP0a3sQUmPHnBMMSseM7JWx+8OKCImIJCNDsunIn7UjKW1+dRrvdbe9?= =?us-ascii?Q?ec1QCaDhNQ2GvZulnaRp1ZbIR7e35xHwkWtUNWp+w9v/oRggbJZTVdACynb/?= =?us-ascii?Q?ER+hTNRstmi7Z+OsSpA+V9aPdFxhgtl9Qq+b8CFxNAz9DzcwKrAY3AZGROry?= =?us-ascii?Q?wPwFVghDtX17P6j0g7DtLNn1UW5R0QsOlRib2Vgz0gD9D7PMhhLMAfLgVhID?= =?us-ascii?Q?MGrcv01kwblTakuNOhH8Cf0h5A6weAhS3SGu4KWptKx+PajkJISaQWlc4Ipk?= =?us-ascii?Q?c1qKlgDJOXEoheq9/+/D/AyAuMvg3eCbNyKIxYaYyq3mFJAR1/MqB9+bwPto?= =?us-ascii?Q?MAQtS9fhrE2KRvASSgY0GIdREa90h3f0CiKEE6dtHlYll3hhJNOTheYpp3nv?= =?us-ascii?Q?4vNzXvG83KBAjXfwlBy+3NYGH7r8U50agIIMOPRC4q34yTCbd0s7PqhnOIix?= =?us-ascii?Q?wYUxSbDNeVZGOtZJFYoEmH0Dlizwi9w7wnytcbx7QLB5IZUh+PFBAlXz286+?= =?us-ascii?Q?NKB69J5FsO0TZOxWyKFbo3odrvTRuHH7MzMuXH9SjYSZRmS7jb3FI4OOE1w6?= =?us-ascii?Q?BdSI+yop50D/TY58jIViAGAZm4ZL42bD6ZYeaaMe8YhKlhQxw/jakjo24Gj5?= =?us-ascii?Q?O3Kfc5lrR0YQawUbrptZ4aV1bN8Cfk86ttCkVSAvU0iz3ExX387wA7K1RqDT?= =?us-ascii?Q?J6NsZMCiAUSqBEnDx2+FiWUM3jyPGSN93bhnXP2Hg3KWI73nUVN0TfbPSnT6?= =?us-ascii?Q?PwCe2bCBn0rmh1zG54tknLg0TeYPiC1dzwzRZXl6dvTxalQe8pUzwMeZV6/X?= =?us-ascii?Q?pT6NaFJfV/TBoke14m3sBecxrUzkcZQWnUnqxeUqSG2Hae2+DhkqSYATSA7p?= =?us-ascii?Q?UBbKLzO9iJ6jTRkYK3h61qqi2LmF94tww3zoxKmHNTlbr4oj5YWDTtjP9AY+?= =?us-ascii?Q?4f5Xmd5JLoISCFMqYc3qM3RcNkWtsdDo7k?= X-Forefront-PRVS: 0378F1E47A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(7370300001)(4630300001)(6009001)(39860400002)(39410400002)(39400400002)(39850400002)(39450400003)(39840400002)(189002)(199003)(53416004)(50466002)(6486002)(81166006)(81156014)(42186005)(7736002)(105586002)(6116002)(97736004)(8676002)(53936002)(50226002)(33646002)(48376002)(3846002)(106356001)(86362001)(5003940100001)(38730400002)(110136004)(6666003)(305945005)(2950100002)(7350300001)(66066001)(68736007)(72206003)(4326008)(478600001)(101416001)(50986999)(5660300001)(36756003)(47776003)(76176999)(189998001)(25786009)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1735;H:ssuthiku-ubuntu-b2.amd.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR12MB1735;23:M/f1XHrETqz6fUHo0uxr9VlXyZ8QKvXg31K4HZwNQ?= =?us-ascii?Q?wWa4PvdGSGzleNpcvg6rM7YT5bQfu24+nRr8pu0q9UBImSJpzUQTTMLHV8J8?= =?us-ascii?Q?/ouBPDIWRK3YkgBjjMb0RtWXO7e8QxOg8OdrmYPtwMDNd1LREwv3r5ZK0k4y?= =?us-ascii?Q?yupIn8Jv5UcF9tqPak65g3T5Lvc7vqp4Q0Z7YOHWTK/i5G6d7mRUAXw96Kkg?= =?us-ascii?Q?M2VB8hqgXDbnuLMCx5JJCIEO2yjIWEAaED+T0OXnJk+dKlu3PHpdKRIfMYUB?= =?us-ascii?Q?9ADjYHkQZj48mipzsh1zKkRGjur4EKP3oRUowNEICm6PNP+jBo9upD8blFAo?= =?us-ascii?Q?mMKBLgPZC4Uqwe3YtOs7CPuw+PSHdyx4cFOoXGQuY81J7rSbz4BJbej2yxqD?= =?us-ascii?Q?Uin8MW6qxKAFSGfTRbjHSsH7nqvvwKGyAuSvSCz4dOYX5aUTXio2XCZIZHAJ?= =?us-ascii?Q?UietoUnAx/0uo0bTRXXbiSGcnIJPyu6KX/fJ67652ewc9sq5O+Y83ZE0zkb+?= =?us-ascii?Q?THbv2Ce8zjhjCXbasS96Windk4l0McuOr6baw26uahjskH4z6ko8DRPJEL3+?= =?us-ascii?Q?Dsi4dNQ//PS6s2h1vQuaYu1nN3c4TVW4gurUk+rsFpVROtc7XvK410wGZwf/?= =?us-ascii?Q?w5dDDrXoQGBbl7QVowond/kDLsP6qbxr8WPA7T5UqXQMGg1U4nk8fKPsASIG?= =?us-ascii?Q?1Rl3c8HsMkwZr7NMGPan16/bxYif1hMhS5h/cacg/7R7bL6T7D7h7fuSKWe2?= =?us-ascii?Q?2B/K3dsKKaNwAanqhSpwU2UeTZUepIYev6ojwphRXkI4rcuJ6mRhKw8gimGi?= =?us-ascii?Q?ASX3EJ0cOvIrm4akC1N38lukpwKnFgWV1Vpklk8178pjaOOd5BAkQ1wd74H0?= =?us-ascii?Q?abCpt90oS8qUTsFa8kvXNbCESqUtXVbCenoCAqde0DwENwBHQdkF9BZiIdwP?= =?us-ascii?Q?YHmnMe8VVD2fEtmkBIWmoQW3hywy2inM418E7MDWCrG/i+JUQGRbXGzxwant?= =?us-ascii?Q?pt1khZ9ojx5gQquK8hV/sOVar67L88cBnrtfSXifJz1p7VX9sKMRt8eR1Ukc?= =?us-ascii?Q?flvxmZavbtdn41oCUzo8U75bGzxBJHawKltpmzU/MTR5DjRIDH2P3846Y7PK?= =?us-ascii?Q?x9NB4x9uFcnuJ9BiicI3NF480RX2lsQW3aSwYkhM+qXNiLhgOlE/iimbsE4c?= =?us-ascii?Q?yC/8fg2XpHyin7wi82i8PuscAGJ5Wrd13BFdaogdku/PO180IsACwA0jibsz?= =?us-ascii?Q?w5zJOm9QITKzVBUDzw=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR12MB1735;6:HnOc+l9Y36FfjA1xaRB6y2sYKkISDS2PFmX4Pp8OOl?= =?us-ascii?Q?J5H8aN+/WPXquwume8QCoYzzmXNzPfc39w6z5L5F+B8zImNn5fu/KSfufajV?= =?us-ascii?Q?xqorJOqd12ofSfvmcs2i+nOuLt5CXZKH0laaChz0sVeX/dG3SSuOD2zlkWSM?= =?us-ascii?Q?gByFPe5fCpQBOW5JjBDpcYdgkUPJAAitKb0zBFTh47moaer6xyedOgR6+P1R?= =?us-ascii?Q?DuDqgemqs3+NjzbxFTczce6Mn3XpPmt0B4N0Q68LbV5/wgsYtRvOjS+kR0cc?= =?us-ascii?Q?zQkAjqcjdSVwKkLQqXcEc0sRDb9yX/hL+qBAEX95bNWBKXYia30mmlqCqNRu?= =?us-ascii?Q?YveBldqBfRGvCE4bjyJpX9vIvXtU0fmVeJ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GEGdck4v685hwps6NgFMIMbvrJHNWD6f0GsDBz1LtH8AiZX/vmERHo6xnfV7dKpbRwTGaIV8kWTVoA1i5muUn2dxRkAmJ6bDVonTU9qbUq+v0kItfb2OhzuZ7IPDpBtfLaweHC1YHkgI3WAmwIoFWTeGItneqxl1F1wfHRMDCwkfiXJLGp0hahCPZISMLitVTQ6yO8= X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1735;20:OyXgJVA4inWCwYmIeKiB5G/tbH0ugtVqKx3VNLdhkVDjESdWTJ9lI4PKFzptlLElx5Q9UdURn6aiGbMYzFQJ2D/r0NcCkZ+2jxUuXp8fPNgf9JRbgmWSpKk1wRk2GxL/zzTQ/TBCXsbeu7BRbgHo160sQkxK3WFZX9yg/fko5AQsopLfe9SwxgckCxNlCmQDu9HFLhEsDze4LxUfWyrrIdYajFB1VIgWTVCxnMOQfoOJR9BgaA5ieAllNF9JjjUB X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2017 09:23:03.0321 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1735 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3158 Lines: 112 For family17h, current cpu_core_id is directly taken from the value CPUID_Fn8000001E_EBX[7:0] (CoreId), which is the physical ID of the core within a die. However, on system with downcore configuration (where not all physical cores within a die are available), this could result in the case where cpu_core_id > (cores_per_node - 1). Fix up the cpu_core_id by breaking down the bitfields of CoreId, and calculate relative ID using available topology information. Signed-off-by: Suravee Suthikulpanit --- arch/x86/kernel/cpu/amd.c | 74 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index a2a52b5..b5ea28f 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -305,37 +305,71 @@ static void __get_topoext(struct cpuinfo_x86 *c, int cpu) { u32 eax, ebx, ecx, edx; u8 node_id; + u16 l3_nshared = 0; + + if (cpuid_edx(0x80000006)) { + cpuid_count(0x8000001d, 3, &eax, &ebx, &ecx, &edx); + l3_nshared = ((eax >> 14) & 0xfff) + 1; + } cpuid(0x8000001e, &eax, &ebx, &ecx, &edx); node_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; - } + switch (c->x86) { + case 0x17: { + u32 tmp, ccx_offset, cpu_offset; - /* - * 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. - */ - if (cpuid_edx(0x80000006)) { - if (c->x86 == 0x17) { + /* + * In family 17h, the CPUID_Fn8000001E_EBX[7:0] (CoreId) + * is non-contiguous in downcore and non-SMT cases. + * Fixup the cpu_core_id to be contiguous for cores within + * the die. + */ + tmp = ebx & 0xff; + if (smp_num_siblings == 1) { /* - * LLC is at the core complex level. - * Core complex id is ApicId[3]. + * CoreId bit-encoding for SMT-disabled + * [7:4] : die + * [3] : ccx + * [2:0] : core */ - per_cpu(cpu_llc_id, cpu) = c->apicid >> 3; + ccx_offset = ((tmp >> 3) & 1) * l3_nshared; + cpu_offset = tmp & 7; } else { - /* LLC is at the node level. */ - per_cpu(cpu_llc_id, cpu) = node_id; + /* + * CoreId bit-encoding for SMT-enabled + * [7:3] : die + * [2] : ccx + * [1:0] : core + */ + ccx_offset = ((tmp >> 2) & 1) * l3_nshared / + smp_num_siblings; + cpu_offset = tmp & 3; + c->x86_max_cores /= smp_num_siblings; + } + c->cpu_core_id = ccx_offset + cpu_offset; + + /* + * Family17h L3 cache (LLC) is at Core Complex (CCX). + * There could be multiple CCXs in a node. + * CCX ID is ApicId[3]. + */ + per_cpu(cpu_llc_id, cpu) = c->apicid >> 3; + + pr_debug("Fixup coreid:%#x to cpu_core_id:%#x\n", + tmp, c->cpu_core_id); + break; + } + case 0x15: + c->cu_id = ebx & 0xff; + /* Follow through */ + default: + /* LLC is default to L3, which generally per-node */ + if (l3_nshared > 0) + per_cpu(cpu_llc_id, cpu) = node_id; } } -- 2.7.4