From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A109C433E0 for ; Fri, 8 Jan 2021 15:37:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 07D8C23888 for ; Fri, 8 Jan 2021 15:37:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727798AbhAHPhE (ORCPT ); Fri, 8 Jan 2021 10:37:04 -0500 Received: from mx0a-002e3701.pphosted.com ([148.163.147.86]:61598 "EHLO mx0a-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726795AbhAHPhD (ORCPT ); Fri, 8 Jan 2021 10:37:03 -0500 Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 108FRfxD003851; Fri, 8 Jan 2021 15:35:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pps0720; bh=KeswbfIT/kAyOIzhlAD1GOt95NV7ccflCkWsbyfIScM=; b=JnleBx1wCICjK+8tDZNqsM1v7RXFsqCoMJsKaFhPM3vT1olIVwwtztx7EI5Taqxxo9Q7 L/2LDo6xVGhP3otWkKWNWQjiBCmG7OPs8AIQ/zUJrCd4xomSxkateIbvDP0x+hAugGGH UdB8uiNN+GxRE372RTOHLtRNJhY90dfE8owVvqP8vIIuMvZrp7Py1yByoym2BlqvFSbL HMlw7r+PVELAw4TMB8qYyVgfcGANRU+WgrsQWw3/OMW7peC6FHXII5j11nqTJjdA9aab ey6z3DdKTVePnDvO8VDYCrw/q6kCWxYIxewvhVTSUAF9zv0HjO5Ie+eVt01RyKaxKycg Rw== Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0a-002e3701.pphosted.com with ESMTP id 35xmtyt80s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Jan 2021 15:35:55 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2352.austin.hpe.com (Postfix) with ESMTP id 04CDA63; Fri, 8 Jan 2021 15:35:51 +0000 (UTC) Received: from stormcage.eag.rdlabs.hpecorp.net (stormcage.eag.rdlabs.hpecorp.net [128.162.236.70]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 43D7D37; Fri, 8 Jan 2021 15:35:50 +0000 (UTC) Received: by stormcage.eag.rdlabs.hpecorp.net (Postfix, from userid 200934) id BDBC964B800; Fri, 8 Jan 2021 09:35:49 -0600 (CST) From: Steve Wahl To: Steve Wahl , rja_direct@groups.int.hpe.com, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Thomas Gleixner , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org Cc: "Liang, Kan" Subject: [PATCH 0/2] perf/x86/intel/uncore: Derive die id from NUMA info with more than 8 nodes Date: Fri, 8 Jan 2021 09:35:47 -0600 Message-Id: <20210108153549.108989-1-steve.wahl@hpe.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2021-01-08_07:2021-01-07,2021-01-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 mlxscore=0 malwarescore=0 suspectscore=0 adultscore=0 clxscore=1015 impostorscore=0 mlxlogscore=703 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101080089 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For Intel uncore, the registers being used to identify the die don't contain enough bits to uniquely identify more than 8 dies. On systems with more than 8 dies, this results in error messages of the form "skx_uncore: probe of XXXX:XX:XX.X failed with error -22", and some perf counters showing up as "". On such systems, use NUMA information to determine die id. Continue to use the register information with 8 or fewer numa nodes to cover cases like NUMA not being enabled. The first patch moves translation from physical to logical die id earlier in the code, and stores only the logical id. The logical id is the only one that is really used. Without this change the second patch would have to store both physical and logical id, which was much more complicated. The second patch adds the alternative of deriving the logical die id from the NUMA information when there are more than 8 nodes. Steve Wahl (2): perf/x86/intel/uncore: Store the logical die id instead of the physical die id. perf/x86/intel/uncore: With > 8 nodes, get pci bus die id from NUMA info arch/x86/events/intel/uncore.c | 58 +++++--------- arch/x86/events/intel/uncore.h | 5 +- arch/x86/events/intel/uncore_snb.c | 2 +- arch/x86/events/intel/uncore_snbep.c | 114 ++++++++++++++++++--------- 4 files changed, 99 insertions(+), 80 deletions(-) -- 2.26.2