Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1952345rwb; Thu, 17 Nov 2022 04:40:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf6iIIsXl9LG8BzMP/9bysd3C4gcItBFf2bc4amHN8X3E+vwbfrfUlOSEclzyF9L2/fjmo1v X-Received: by 2002:a17:902:7e88:b0:17f:6e07:74ed with SMTP id z8-20020a1709027e8800b0017f6e0774edmr2584329pla.67.1668688799906; Thu, 17 Nov 2022 04:39:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668688799; cv=none; d=google.com; s=arc-20160816; b=eeS0yRHfyZigTG4YJUAnWz0y6cmjlqOBi41MPJH2bob9ljiGaQc9J5i9N5pRJMVJuo 0kQ8n4tgJ5qDRX80kTdDKEdGA38ENu67yOFaaxEAycCmfeq/DrK6RVxjrAdBydMvUI4p PlRrwhIjC4IF2TcFB2Btxh3G3s2DmpSEMQtVN338x0Jahws0noAwO/AMMxQ1RqFBLjTU WXgdOUQGnOYCJiNkPWXvwsz1GULo4zRkQaj8ovAlZIMhLGjKkqpFm8imse1qeem8Ejjq bIJm3Gx6mfDcBDzL+X97XhJQxkQEGjAMmZHZom8fV8u6H6ns6Y+wksUqOzVdSvDDRYss S9Zg== 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=/5YELmcarqqiDII9kohcjppCHAaqFu77K+25PbLnwZs=; b=CLvtJJMk7nK9WaGVoKIBw8jk3EFFJyNyXLK5cpXBmJCMqulRJML5zt3EIJn3In6H1x saWYqZNVmdyXHeS3Vl2ENidHSk70k2xZ9Y5YRcq4OlHuwAKufLMwOZ9FskV+OuBh6uAr ZgtA8w0gLg1vVKGlpbzJBaz/ZoZUgikKrbiqbeNPTrFRHxGNouljL64wcsW8yVQM3vtA WfW0yLLM0onSTlsc6+3M0nfqofzg4cWNFsJ5HaQOlXr7mmZ2bhezILDisARcdKrSCfcW DAGvKQ3sRVQqpj72fkxbmoNwrKgfWpQv+AC3DCSIAjGccNGVReDpeydb8v/BMkuxKH6x yIZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bdsTKTfm; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l13-20020a056a00140d00b0056783062eaasi911020pfu.23.2022.11.17.04.39.47; Thu, 17 Nov 2022 04:39:59 -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=bdsTKTfm; 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 S239989AbiKQM3s (ORCPT + 92 others); Thu, 17 Nov 2022 07:29:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240018AbiKQM3C (ORCPT ); Thu, 17 Nov 2022 07:29:02 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC00D725C7 for ; Thu, 17 Nov 2022 04:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668688130; x=1700224130; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FHFDzLFxzPtKeK1rQOcaRmfpaD4Wy5sTRwK3r/Iltxc=; b=bdsTKTfm0DLmegDtkuhduBybHhUXEhJmJaAhXB5Pl8jvqqJujgbo3JTO 48Sk4ZFoE+snvn0PVNmYJFRxC9MWz5t96aeJOrwC2qxX07QEsu0Wcewll fQPXFTq8Gva2E3mR1LugDazqZrovPGfGov27bqZjvmTeU4nSc/hJpJkiU F/0rEbmTe1UPIMxWeHtFPUT4TxMN+tg8s0YVqt88n1MAOq0ms8f79laZN 2CRbVMsnHCCLNFD6X307OQWQT6/vQkaREOYn7ps6p28dmtmfq4D1UEdrk vspTgj1/nslMwVLee4ieMHoEVaZT7Mqg59bCeo1ZJebJsBD9/iAigHxhq Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="296199869" X-IronPort-AV: E=Sophos;i="5.96,171,1665471600"; d="scan'208";a="296199869" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2022 04:28:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="590604554" X-IronPort-AV: E=Sophos;i="5.96,171,1665471600"; d="scan'208";a="590604554" Received: from jfdev013vml03.jf.intel.com ([10.23.26.52]) by orsmga003.jf.intel.com with ESMTP; 17 Nov 2022 04:28:46 -0800 From: alexander.antonov@linux.intel.com To: peterz@infradead.org, linux-kernel@vger.kernel.org Cc: kan.liang@linux.intel.com, alexey.v.bayduraev@linux.intel.com, alexander.antonov@linux.intel.com Subject: [PATCH 04/11] perf/x86/intel/uncore: Disable I/O stacks to PMU mapping on ICX-D Date: Thu, 17 Nov 2022 12:28:26 +0000 Message-Id: <20221117122833.3103580-5-alexander.antonov@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221117122833.3103580-1-alexander.antonov@linux.intel.com> References: <20221117122833.3103580-1-alexander.antonov@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,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 From: Alexander Antonov 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 Reviewed-by: Kan Liang Cc: stable@vger.kernel.org --- 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 ef1414957623..fac3612289f1 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 0d06b56b8a33..e14b96398377 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); } -- 2.25.1