From patchwork Wed Jan 4 20:13:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liang, Kan" X-Patchwork-Id: 39080 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5335150wrt; Wed, 4 Jan 2023 12:15:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXtm6nO/WKlKc9RPHyFXXK+V9E4eaI7SYf+om+gmOYRgThiWphsMakYjqN5g3x1TaxyYzzD6 X-Received: by 2002:a17:90b:796:b0:219:5f68:586e with SMTP id l22-20020a17090b079600b002195f68586emr50617236pjz.18.1672863342713; Wed, 04 Jan 2023 12:15:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672863342; cv=none; d=google.com; s=arc-20160816; b=fwfYsHgkCu4lVPb+upnzs68AetXDPRg29Z6Fpl5jK5TcFpvTCaW56YbD8OlueBEuYI MGAPYZO+Zc2j/fdoz8ylDrdgejaak6heFrdQK8CBF0W4ZPdDAySaRwmVR1vXSNYYH+Y+ IVkr0jpOUFDCoN59D/5PHfz1/QeyupjW5qasVQYCpMYl0kJuC2BPFfgQW0LRWadxmItw EUZdxwP/MmyCyAfEKXBPYL0j2PA5Q91qSDPTY1HlKJk1pVIpqB/hvWgXYVKQmVWGxpMp YpoQY8kgYk+xobs3yg3NK5LBaEXSk9E3MjCPj5s8ZxpaInO7XZHeA1avb34GNmaIcD1/ jfPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vlUfBXclKbvEYrepnyEvvIa+Ufze1VLoMptGwUqeUDI=; b=qaz0uoVspB/Jry6lRMwtbOfsUsh00V4T0EnL/n2ErRIAjI+sgKRyrQgWmadmfhGFMJ q2hP/ihj3RdJTeb5RoS0m/3cpDlCBVywNuUcuZRzJepIk/e5cfnO0MwFZVS/KCiIs6T5 MG80UQnCVRc+wFRmnO+bjRgvdBbcuYZhgS1I3Ufjp8FmhqDWLqxPHC64tWcvRMhNCv69 AYRa2IP83aVRCSsrG6pA9b10BfH9Z4MWplg/ZsvnIKOjIt3sT3VGOQwZo1KcK79BoKlS ibm/Upx1MY/m920juUr7seD1pRmZ2oFQMPuwD5mWAaEomMmvLUSenyo+Of7/ydjngE+Y n2zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NtkPnD6+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 144-20020a630096000000b004a08210f49fsi14909693pga.329.2023.01.04.12.15.29; Wed, 04 Jan 2023 12:15:42 -0800 (PST) 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; dkim=pass header.i=@intel.com header.s=Intel header.b=NtkPnD6+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240083AbjADUOZ (ORCPT + 99 others); Wed, 4 Jan 2023 15:14:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239277AbjADUOL (ORCPT ); Wed, 4 Jan 2023 15:14:11 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E51D21B9FB for ; Wed, 4 Jan 2023 12:14:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672863249; x=1704399249; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7qAgriB4wHb+jHdCXvImsH0VxmeivK2v66/ujQm0auE=; b=NtkPnD6+P4Dql5BizSDZ9Y4PnTlsLS3h8onSPO8ngTL509Vp81d2V/Jv nTHaW6tlklSyI3vqKXD79qSf3mnAnBLLkG/YPxk8BxE1xVKxA7DTIsAwF Y73xO4tJo75weszET/I+SvHyyC9odyjieCXGXMEms0gQglmjvZi4TepJt GdvN7Tf6cIZdwrM9fIF73keEARGC84HPD7B/5UPu6KKKk73OrVKJ2Z5dM e+XUNTiB7M0Cou1Vk47dvRAfKG2zjezTKsySxRqcke4PIJXfeVMrfneKy sdTPu0owA754Xi56v9h5pxeS+4hKSYMixU5GLRnujH856B0z6lLWEPHzq g==; X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="322105461" X-IronPort-AV: E=Sophos;i="5.96,300,1665471600"; d="scan'208";a="322105461" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2023 12:14:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="779324003" X-IronPort-AV: E=Sophos;i="5.96,300,1665471600"; d="scan'208";a="779324003" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by orsmga004.jf.intel.com with ESMTP; 04 Jan 2023 12:14:09 -0800 From: kan.liang@linux.intel.com To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, linux-kernel@vger.kernel.org Cc: ak@linux.intel.com, eranian@google.com, irogers@google.com, Kan Liang Subject: [PATCH V2 4/9] x86/cpufeatures: Add Architectural PerfMon Extension bit Date: Wed, 4 Jan 2023 12:13:44 -0800 Message-Id: <20230104201349.1451191-4-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230104201349.1451191-1-kan.liang@linux.intel.com> References: <20230104201349.1451191-1-kan.liang@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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?1754124352422242111?= X-GMAIL-MSGID: =?utf-8?q?1754124352422242111?= From: Kan Liang CPUID.(EAX=07H, ECX=1):EAX[8] indicates whether the Architectural PerfMon Extension leaf (CPUID leaf 23) is supported. The "X86_FEATURE_..., word 12" is already mirrored from CPUID "0x00000007:1 (EAX)". Add X86_FEATURE_ARCH_PERFMON_EXT under the "word 12" section. The new Architectural PerfMon Extension leaf (CPUID leaf 23) will be supported in the perf_events subsystem later. The feature will not appear in /proc/cpuinfo. Signed-off-by: Kan Liang --- Change since V1 - Rebase on top of 6.2-rc1 arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 61012476d66e..b64555b68a14 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -312,6 +312,7 @@ #define X86_FEATURE_AVX_VNNI (12*32+ 4) /* AVX VNNI instructions */ #define X86_FEATURE_AVX512_BF16 (12*32+ 5) /* AVX512 BFLOAT16 instructions */ #define X86_FEATURE_CMPCCXADD (12*32+ 7) /* "" CMPccXADD instructions */ +#define X86_FEATURE_ARCH_PERFMON_EXT (12*32+ 8) /* "" Intel Architectural PerfMon Extension */ #define X86_FEATURE_AMX_FP16 (12*32+21) /* "" AMX fp16 Support */ #define X86_FEATURE_AVX_IFMA (12*32+23) /* "" Support for VPMADD52[H,L]UQ */