Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8798084rwb; Thu, 24 Nov 2022 04:33:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf4l3mz0ryJ6lgrC9ZPESKjLUeGb1lAFWx2zfm05oj6pWB/8n3fGxSPb6F9uT9oqbOaSsvIH X-Received: by 2002:a62:f211:0:b0:574:7931:98a2 with SMTP id m17-20020a62f211000000b00574793198a2mr4673129pfh.17.1669293218185; Thu, 24 Nov 2022 04:33:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669293218; cv=none; d=google.com; s=arc-20160816; b=nZm79hEKij2JJImT2wm1on2JR//rSnHosGhaJYB3LBqCxfzjQfuM56N7WNIHMxwKnG 0E6oSUDwyTrtoKMCcn2BTqyyT48yUrZxn0BWgf51Ac2x5DMSIzZOS3S5I6Wkq7RbEyJY MhqNDh+hVIBvECpyf/YchIAMedyuj7R597Xhkz3KmRTA06fL0CKn3vz60IjvW7eMwPCg AXIYq4aqMIo9e9DycztmJcQaSZ3sR1g8LeTzorGb266V8U7GdCgZbJ0ZCxY6+Z44KLxo QUE7uoHmpMRlGuA5BHPMo2Eazw9XKRgXnCNYbtgPJcSn1Nc5LL/RbQiHR8MtumNIRr75 2dwQ== 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=D0Csns0uJcI6Lq/y/XzVMD70M11AN2aKFnW+liiXq24=; b=BhZwZH3nKcYJN2R2EwGUlwDvGSBLc6bWSnIyaCccWRnNRsD9Lg2HDvtjZpeQADmQ+G M4BbCh21Uqnj75KDLQVacy53wXC9iV/jinHpbCpjb7JDTY7Ob4tXDTip09oGWUfZubGv aQj3rVs0rXfmL+mDjCcHuUJCsYNgyucmWNuhML0nL38/2Dzs2e4Zd9q9KOkuOdSoqZVE rZEcarW1M7DJZPQWpAfErf6ySb4Y6Dn6uWqggUFXd8PEmaMtLVFKUleTaqW06FwfECU9 eK0pGlTFsqhLojHdOSCv7GGndUtqfo4W0KtyukSfZy6odtklmOP2eFXgDMe+YbaTNPtc 5PVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yK3YHTJ7; dkim=neutral (no key) header.i=@linutronix.de header.b=Ranwb3UY; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170903028700b0018685257c0csi976664plr.121.2022.11.24.04.33.16; Thu, 24 Nov 2022 04:33:38 -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=yK3YHTJ7; dkim=neutral (no key) header.i=@linutronix.de header.b=Ranwb3UY; 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 S229542AbiKXMDp (ORCPT + 86 others); Thu, 24 Nov 2022 07:03:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230286AbiKXMDL (ORCPT ); Thu, 24 Nov 2022 07:03:11 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C870D5DBBE; Thu, 24 Nov 2022 04:03:02 -0800 (PST) Date: Thu, 24 Nov 2022 12:03:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669291381; 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=D0Csns0uJcI6Lq/y/XzVMD70M11AN2aKFnW+liiXq24=; b=yK3YHTJ7RZpthjk/aVQPMazd86AcFzU5mnsAiVBml1Gx2lCtpA7wpUMgZE3Uhtu8H9e1Dk Kixbem7AxrpGOYEb+UzQrWbdz3Qonz6WxX99sWbS0yzXXDY/ahvinvzAYfJBWACqRtFYTf RrRzkXTxgd6EJMuLTkQ+vstMKN4VIzpgaCpTR19RON9bjIi7OBdq0vvNBaKXYO4I7Q+gGR vO7i1wPJVCnSLxcMzFRg1WGuLw/r/MFV7cdwPBJuRkNEy0gFSLy/ouNyR/Sv/bmM2nRgs5 QOosBoUYeVx7LFe8Tepv9unYQPb2oFVAn7fV/0NI1/yLyEjsS7a0AQoCtMZmQA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669291381; 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=D0Csns0uJcI6Lq/y/XzVMD70M11AN2aKFnW+liiXq24=; b=Ranwb3UYxFKVnOrj6pXa+K8FJw4MZnxzxr7SqpfO+GFhbge1G0b7L81T4xebJtI9BaMBKf v1siHVL8eillt1Cw== 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: Introduce UPI topology type Cc: Alexander Antonov , "Peter Zijlstra (Intel)" , Kan Liang , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221117122833.3103580-3-alexander.antonov@linux.intel.com> References: <20221117122833.3103580-3-alexander.antonov@linux.intel.com> MIME-Version: 1.0 Message-ID: <166929138025.4906.5421690673614116457.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 The following commit has been merged into the perf/core branch of tip: Commit-ID: cee4eebd9158d9eb3f8c1708c297b219e8ea861f Gitweb: https://git.kernel.org/tip/cee4eebd9158d9eb3f8c1708c297b219e8ea861f Author: Alexander Antonov AuthorDate: Thu, 17 Nov 2022 12:28:24 Committer: Peter Zijlstra CommitterDate: Thu, 24 Nov 2022 11:09:20 +01:00 perf/x86/intel/uncore: Introduce UPI topology type This patch introduces new 'uncore_upi_topology' topology type to support UPI topology discovery. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20221117122833.3103580-3-alexander.antonov@linux.intel.com --- arch/x86/events/intel/uncore.h | 7 +++++++ arch/x86/events/intel/uncore_snbep.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/x86/events/intel/uncore.h b/arch/x86/events/intel/uncore.h index 917cff1..ef14149 100644 --- a/arch/x86/events/intel/uncore.h +++ b/arch/x86/events/intel/uncore.h @@ -183,11 +183,18 @@ struct uncore_iio_topology { int segment; }; +struct uncore_upi_topology { + int die_to; + int pmu_idx_to; + int enabled; +}; + struct intel_uncore_topology { int pmu_idx; union { void *untyped; struct uncore_iio_topology *iio; + struct uncore_upi_topology *upi; }; }; diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index 469ff88..d3323f1 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c @@ -3774,11 +3774,13 @@ static int die_to_cpu(int die) enum { IIO_TOPOLOGY_TYPE, + UPI_TOPOLOGY_TYPE, TOPOLOGY_MAX }; static const size_t topology_size[TOPOLOGY_MAX] = { - sizeof(*((struct intel_uncore_topology *)NULL)->iio) + sizeof(*((struct intel_uncore_topology *)NULL)->iio), + sizeof(*((struct intel_uncore_topology *)NULL)->upi) }; static int pmu_alloc_topology(struct intel_uncore_type *type, int topology_type)