From patchwork Thu Nov 24 12:02:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 25490 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3356491wrr; Thu, 24 Nov 2022 04:09:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf7BLaTQMpHql8sI95f2ciyuSpCGM3+LPpqNJO8jd1s7evTuXoG8zRBbco3N7i8Volkiu3Hv X-Received: by 2002:aa7:dbca:0:b0:458:3f65:4e42 with SMTP id v10-20020aa7dbca000000b004583f654e42mr30099262edt.39.1669291745028; Thu, 24 Nov 2022 04:09:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669291745; cv=none; d=google.com; s=arc-20160816; b=wiTM8V8AAOCMy46YtIi/CL6SqlWRWeK4Y0oTIkon6K8/GzrYviavoEH/Z3qm792PBN 7EEUPPd8ROLP/47KiBHCnuriL3wdPmj4V8xqs0YeMaZMMvraz5ytXU1pOSrKXP3DGMtf j6AwoO2+V2HXNwQ5CF1/Dgh1KAKNQoo4wy/5y8AGf8Wu7pEZdVtp8/ETNoB+KymlfQWw LyL6Jqg7eNvGbJ3x64tZWHUyL9x+bxL6aFmxibUwID0oXP1wvHTdzoDkh7KsDJpJsCLm cZDhgb3r2QM1P0WZ1ykTK7O0SWhptSMSAL+W/U05jTlrcScgMlIil1Ke5SO1GRIgY5r+ sboQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=/AsHyRa5ka7wg31SysBBkGMgGHhK5IkhmY95gZ89H8c=; b=z3A04EtDn8zst7EpWx+rQ4Wcl2F9hS1wyo2Rvsjuzazu1g/CH0NdLwlgzuZbyPRIoy x1/Y1w8Iyu4DAdgqEV3e9X0ES+NzYVqTnRjnOxpm+R0BPO8AwwKc+qfHxVTJjQghfSUw iH+F3W+tvWwvJo4Gwvm+R82pumfOqO2r1xR3PlQSK9a8ulqgaoGWz9C7fvd+7D5lJdML zYrL7DNAlAFWSxwICkqt48ATFQ4HA9CQlWpcBJ5C8fkGC/F6gIhBfuGTgRMnK0uS7fcA plinjW3sE5PA92RQWYi6G0i9122pS+vOOpSOT5igE03t0VH4AO1n6/qqiLbTKOTjl9Dn znDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=FnhF8fYS; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw24-20020a1709066a1800b007baa6e2275asi813340ejc.236.2022.11.24.04.08.40; Thu, 24 Nov 2022 04:09:05 -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=@linutronix.de header.s=2020 header.b=FnhF8fYS; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229863AbiKXMD3 (ORCPT + 99 others); Thu, 24 Nov 2022 07:03:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230249AbiKXMDB (ORCPT ); Thu, 24 Nov 2022 07:03:01 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB42B5B58D; Thu, 24 Nov 2022 04:03:00 -0800 (PST) Date: Thu, 24 Nov 2022 12:02:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669291379; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/AsHyRa5ka7wg31SysBBkGMgGHhK5IkhmY95gZ89H8c=; b=FnhF8fYSEg0FmHHyZ1xdJZMCbsHVQRmlP94LQhV1PTQR+diBw/TNlmREjGe3PROOiEYFmA eerSAUEgNjJo+CY9pWSFlU1lv79BhRqm44m4Ki0aCdafk4OfUxhlDre1i5BtQoWcNj3Lci SDVaUnSgYC36jpOp17ChMtzlr0n9gO9T4c5UIzxzK4XZiFlLJFIou30CWUMFKZ0fYcAy1O emO1trW41v8Rq34RFov8GHxuzSYNOtbY/wsmtbemsebG8brvzXt5MDTCBjki0Dy9U9VvNU uXXSNTYVIEFy+7EzDWfsnOhkAFeXOHNRhMTB/7dikx8lXCYJrhqwY0Z5PmAeEw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669291379; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/AsHyRa5ka7wg31SysBBkGMgGHhK5IkhmY95gZ89H8c=; b=Gs80L+aAa3I4UEvnE7/gSBUpDmo+t8BQqXX006M2H9dPBzhGBxPhEDYoOODFFDq1m9zCMq AgkxFDZlRXw51sAA== From: "tip-bot2 for Alexander Antonov" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf/x86/intel/uncore: Disable I/O stacks to PMU mapping on ICX-D Cc: Alexander Antonov , "Peter Zijlstra (Intel)" , Kan Liang , stable@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221117122833.3103580-5-alexander.antonov@linux.intel.com> References: <20221117122833.3103580-5-alexander.antonov@linux.intel.com> MIME-Version: 1.0 Message-ID: <166929137806.4906.7484681468845511217.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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?1749746613266425190?= X-GMAIL-MSGID: =?utf-8?q?1750379260769831220?= The following commit has been merged into the perf/core branch of tip: Commit-ID: efe062705d149b20a15498cb999a9edbb8241e6f Gitweb: https://git.kernel.org/tip/efe062705d149b20a15498cb999a9edbb8241e6f Author: Alexander Antonov AuthorDate: Thu, 17 Nov 2022 12:28:26 Committer: Peter Zijlstra CommitterDate: Thu, 24 Nov 2022 11:09:21 +01:00 perf/x86/intel/uncore: Disable I/O stacks to PMU mapping on ICX-D Current implementation of I/O stacks to PMU mapping doesn't support ICX-D. Detect ICX-D system to disable mapping. Fixes: 10337e95e04c ("perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on ICX") Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221117122833.3103580-5-alexander.antonov@linux.intel.com --- arch/x86/events/intel/uncore.h | 1 + arch/x86/events/intel/uncore_snbep.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/arch/x86/events/intel/uncore.h b/arch/x86/events/intel/uncore.h index ef14149..fac3612 100644 --- a/arch/x86/events/intel/uncore.h +++ b/arch/x86/events/intel/uncore.h @@ -2,6 +2,7 @@ #include #include #include +#include #include #include diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index 0d06b56..e14b963 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c @@ -5226,6 +5226,11 @@ static int icx_iio_get_topology(struct intel_uncore_type *type) static int icx_iio_set_mapping(struct intel_uncore_type *type) { + /* Detect ICX-D system. This case is not supported */ + if (boot_cpu_data.x86_model == INTEL_FAM6_ICELAKE_D) { + pmu_clear_mapping_attr(type->attr_update, &icx_iio_mapping_group); + return -EPERM; + } return pmu_iio_set_mapping(type, &icx_iio_mapping_group); }