From patchwork Tue Aug 31 12:07:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: thermal-bot for Julien Panis X-Patchwork-Id: 504968 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D74F8C432BE for ; Tue, 31 Aug 2021 12:11:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BBB5661027 for ; Tue, 31 Aug 2021 12:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233928AbhHaMMO (ORCPT ); Tue, 31 Aug 2021 08:12:14 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:58282 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239908AbhHaMIp (ORCPT ); Tue, 31 Aug 2021 08:08:45 -0400 Date: Tue, 31 Aug 2021 12:07:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1630411665; 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=qDigqgPV8yJfOxz472ODUDU1mq4m8aPF67p9mgA9Oyg=; b=MZUuZ9Trl8jabv91dQY0FB1SJ/cHxQ2tAl6NUdaCUYGWghS7gpjTytDHo/L4XmIF9MxEyY VenoFG+QmVh4y5WQxeGpInyEiX6KuQbrVVp2a0QWZlPMwA29tvNaVQqa8RdGdFMKgapBVN rW8Qoj4o55ckv+ahlAOQzi7Vh559VrBLBsw69BiFW0IYVA9yfmpxvJaNWM0zdHroGbz5AS akr88RKf1T4rV4UvlO76LKVzqhbXqrKjJ2BbuIA4uUHJ+prsTPRBJzmhvRFgfCz4fDgHXR hJBK+k3LexgIQKGB4s2Huo2nfwxLzVHlGRlASaapqvj/CK0H/bl5LqOu1VaErQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1630411665; 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=qDigqgPV8yJfOxz472ODUDU1mq4m8aPF67p9mgA9Oyg=; b=/5AZ/nCINPCGgx/JDw+crPfF4mYhZ08RHL/gfejNSolnDu/rfKgFSpTx9Hhlg+Bwqc6D9n blW2LosaK4vxPUAg== From: "tip-bot2 for Kan Liang" 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: Fix invalid unit check Cc: Kan Liang , "Peter Zijlstra (Intel)" , Andi Kleen , stable@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <1629991963-102621-3-git-send-email-kan.liang@linux.intel.com> References: <1629991963-102621-3-git-send-email-kan.liang@linux.intel.com> MIME-Version: 1.0 Message-ID: <163041166497.25758.760980443983936282.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: e2bb9fab08cbcc7922050c7eb0bd650807abfa4e Gitweb: https://git.kernel.org/tip/e2bb9fab08cbcc7922050c7eb0bd650807abfa4e Author: Kan Liang AuthorDate: Thu, 26 Aug 2021 08:32:38 -07:00 Committer: Peter Zijlstra CommitterDate: Tue, 31 Aug 2021 13:59:35 +02:00 perf/x86/intel/uncore: Fix invalid unit check The uncore unit with the type ID 0 and the unit ID 0 is missed. The table3 of the uncore unit maybe 0. The uncore_discovery_invalid_unit() mistakenly treated it as an invalid value. Remove the !unit.table3 check. Fixes: edae1f06c2cd ("perf/x86/intel/uncore: Parse uncore discovery tables") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1629991963-102621-3-git-send-email-kan.liang@linux.intel.com --- arch/x86/events/intel/uncore_discovery.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/events/intel/uncore_discovery.h b/arch/x86/events/intel/uncore_discovery.h index 7280c8a..6d73561 100644 --- a/arch/x86/events/intel/uncore_discovery.h +++ b/arch/x86/events/intel/uncore_discovery.h @@ -30,7 +30,7 @@ #define uncore_discovery_invalid_unit(unit) \ - (!unit.table1 || !unit.ctl || !unit.table3 || \ + (!unit.table1 || !unit.ctl || \ unit.table1 == -1ULL || unit.ctl == -1ULL || \ unit.table3 == -1ULL)