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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F270C433FE for ; Thu, 17 Nov 2022 12:29:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240008AbiKQM3u (ORCPT ); Thu, 17 Nov 2022 07:29:50 -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 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