From patchwork Thu Mar 23 02:40:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: silviazhao X-Patchwork-Id: 7066 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2684133wrt; Wed, 22 Mar 2023 19:42:34 -0700 (PDT) X-Google-Smtp-Source: AK7set8g2VAUcBkSODx/tnb2jAzo+yDTAbYJuUplIJNL1JXH0c9XYxBw71cXaF/ATsyTSNeglTSE X-Received: by 2002:a17:902:e1c5:b0:199:2b9f:f369 with SMTP id t5-20020a170902e1c500b001992b9ff369mr4036525pla.32.1679539353793; Wed, 22 Mar 2023 19:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679539353; cv=none; d=google.com; s=arc-20160816; b=NKi3uj1F+U9Uy3BAirPdYfjO5gfp+2eWGnGNLx/iZg6xl8q9wmuS6ldGrJSXGvK90c MGu+LHOb96Xwu+0pIzB9fKXQhEZNdnAAagCfzooZWqiOzAF3QrYtVSkCQm39lmx2+t51 4Gxeofevu1gdnTgxCXvy7fTyF8LcZK34pkK+iUthDNb6mkUNrKLPEGU5cwUPfm1qKkW6 XUCYDm3YvmolmL1afbtk07ZlO0S0OJtDruoqlPwB2Ds/vdBNG58LOYX+hRE/1xU+rqxb 7CGcCwE6eapoY+K/wEhHxm2PBf+5y5MM5t+zy1rgLdDVzMgNsQ8SgcTlOkfrUaHgjoyd eVhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=fhWKlP8Boh100q6oPqFRB4fZqSrqL1jqb0V3ktyrLok=; b=mcBfGAl47M1TI3texG1rbMSYiZNsU9EPk1Ns/1BTU5/yOFBk3fykNz9Go23Nc0d3lU Nycd7a2CJ/OPQKm4M5SRpew/np3zZ/WDz0eXMQJrHgA04E6m89ltQyGW+z1g/xx+aT2t 09eWCRxXxhkNWfPYsIVOtJSiNrvPwhtzOcqaV/Na5MUAsccFZNBOj7cgBon5OcaeL7Fy eURe1CwgJmZcoFo5jtKMGOGyKeXXL6vNvw/vGR2jzD2qBMeL0rWX6ooWwusfb6poSq1V 24Ixk4T5Wj1iflkf1EiUSjkTiVhSh1HBALR+Y6ClpiterOLVZOP0OHdUBJiWFZBSmHZa Q6Jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q15-20020a17090311cf00b0019e68e3d533si18056729plh.98.2023.03.22.19.42.21; Wed, 22 Mar 2023 19:42:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230004AbjCWCkj (ORCPT + 99 others); Wed, 22 Mar 2023 22:40:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbjCWCkh (ORCPT ); Wed, 22 Mar 2023 22:40:37 -0400 Received: from mx1.zhaoxin.com (MX1.ZHAOXIN.COM [210.0.225.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97BBC4EE4 for ; Wed, 22 Mar 2023 19:40:33 -0700 (PDT) X-ASG-Debug-ID: 1679539227-086e23383d19100001-xx1T2L Received: from ZXSHMBX1.zhaoxin.com (ZXSHMBX1.zhaoxin.com [10.28.252.163]) by mx1.zhaoxin.com with ESMTP id QpwZbisuEymkhbcz (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 23 Mar 2023 10:40:27 +0800 (CST) X-Barracuda-Envelope-From: SilviaZhao-oc@zhaoxin.com X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.163 Received: from ZXBJMBX02.zhaoxin.com (10.29.252.6) by ZXSHMBX1.zhaoxin.com (10.28.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 23 Mar 2023 10:40:27 +0800 Received: from silvia-OptiPlex-3010.zhaoxin.com (10.29.8.47) by ZXBJMBX02.zhaoxin.com (10.29.252.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 23 Mar 2023 10:40:26 +0800 X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.163 From: silviazhao X-Barracuda-RBL-Trusted-Forwarder: 10.29.252.6 To: , , , , , , , , , , , , , , , CC: , , , Subject: [PATCH 0/3] Add PMC support for Zhaoxin Yongfeng architecture Date: Thu, 23 Mar 2023 10:40:23 +0800 X-ASG-Orig-Subj: [PATCH 0/3] Add PMC support for Zhaoxin Yongfeng architecture Message-ID: <20230323024026.823-1-silviazhao-oc@zhaoxin.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.29.8.47] X-ClientProxiedBy: zxbjmbx1.zhaoxin.com (10.29.252.163) To ZXBJMBX02.zhaoxin.com (10.29.252.6) X-Barracuda-Connect: ZXSHMBX1.zhaoxin.com[10.28.252.163] X-Barracuda-Start-Time: 1679539227 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://10.28.252.35:4443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at zhaoxin.com X-Barracuda-Scan-Msg-Size: 710 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0209 X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.106421 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761124657636820498?= X-GMAIL-MSGID: =?utf-8?q?1761124657636820498?= Add PMC support for Zhaoxin Yongfeng architecture. Dave Hansen suggested to use macros instead of open-coded model numbers. So create arch/x86/include/asm/zhaoxin-family.h to introduce macros for Zhaoxin family numbers. https://lkml.org/lkml/2023/3/16/841 silviazhao (3): x86/cpu/zhaoxin: Introduce macros for Zhaoxin family numbers perf/x86/zhaoxin: Replace open-coded model number with macros perf/x86/zhaoxin: Add Yongfeng support arch/x86/events/zhaoxin/core.c | 55 ++++++++++++++++++--------- arch/x86/include/asm/zhaoxin-family.h | 19 +++++++++ 2 files changed, 57 insertions(+), 17 deletions(-) create mode 100644 arch/x86/include/asm/zhaoxin-family.h