Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2455450imd; Fri, 2 Nov 2018 11:42:03 -0700 (PDT) X-Google-Smtp-Source: AJdET5e+/I0GlnXm6sL6HJczM3TLy88AfFXvsjlMQMpwpAPKXqwJje1UYHetjuKN8TPJ7x7wt4dz X-Received: by 2002:a17:902:4827:: with SMTP id s36-v6mr2940247pld.226.1541184123874; Fri, 02 Nov 2018 11:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184123; cv=none; d=google.com; s=arc-20160816; b=T/2LiKz2Pz9nuBDO6Rz+sCbehlGqXsRsqtBPjFJ2PFrjGRT8uespkKNSX4i6vF0Aav 11KSz9IOYRs7X/CuxFSXAmRU0XtIptDAFrqHDW7FzIYFy184wS37P5Wq4FpOSlmCZzln 6LySemX6qBRkGZDe1M87gqP07IafWMM4oz1XiU6va3xv2KTSwoy2SOwYZ69aQ4q7S+iI su7X3Hl0LwNe30EVXAiEIt4zUk8AkfClf1Lm07HGY7/oHbB9m6GL0aR6RjHBM1LPxDXO jX5yeX6RPuFTCU87sjlLP8usvJfLO61LN/26RbHNfkU7vF7Zm/JMLkyuK2I7TtD4rW3h daDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GMHdHijqgZE2u9GF447cnCznjqvLxDd9oGey+ViOXj0=; b=HUtq9S2GdOaSK+Ksl8F760K0+Bxc7pCCXE7IbGqRN+HKCK/PIvGHLwjjBR+7dKVlUi Kn5tlYrvqHWht5e92sk6bms5iCLLo2X8W+ztUkGkr9OGj1OGubiowvwW2HGUjCq5tvmO Jx8l9i+gLrBH8vH4znt2l+hIqNOuYrFHpcInuUoQ4IANrt0zg3zB7IX5mYP9IgOUZ4lC UsePEIDMZ5vvRV1breo+WGTez20NZZ4HvVyh6CVPNKJ6+e24rcZfBUJpZ5HOLUXvM2XL /A/wJqdYEQr9qVMdWN5GIG3vwfeHMd9b4xgBm3/st96VUuBFDSwPz1SQrFrA+MmYTo8a s+zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=frN9aIaU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9-v6si34149721pgj.210.2018.11.02.11.41.49; Fri, 02 Nov 2018 11:42:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=frN9aIaU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729437AbeKCDs6 (ORCPT + 99 others); Fri, 2 Nov 2018 23:48:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:43420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728578AbeKCDs5 (ORCPT ); Fri, 2 Nov 2018 23:48:57 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 14F0420840; Fri, 2 Nov 2018 18:40:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541184045; bh=Lep98uDWwZK2VMn5PuCMSxJTJXPWn8Rme2wlwFl6BhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=frN9aIaUzuonqUhLlz/PS059GbFT6QrbPAdf3G5n6V0hXj4CJi3fW/KdadvH3nP8R SJ5nNnBnwjdEvMeDYYguDzkfPDwUMdc5YyEKv4ZMvU8kPCpbv9clZpd8npDmrA7II1 1qKOur/rdR6I6Qs+hJhHquvQZlhJpRRaaxjkS9FQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masayoshi Mizuma , "Peter Zijlstra (Intel)" , Alexander Shishkin , Arnaldo Carvalho de Melo , "H. Peter Anvin" , Jiri Olsa , Linus Torvalds , Masayoshi Mizuma , Stephane Eranian , Thomas Gleixner , Vince Weaver , Ingo Molnar , Sasha Levin Subject: [PATCH 4.18 054/150] perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded physical package ID 0 Date: Fri, 2 Nov 2018 19:33:36 +0100 Message-Id: <20181102182907.299794370@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 6265adb9726098b7f4f7ca70bc51992b25fdd9d6 ] Physical package id 0 doesn't always exist, we should use boot_cpu_data.phys_proc_id here. Signed-off-by: Masayoshi Mizuma Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masayoshi Mizuma Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/20180910144750.6782-1-msys.mizuma@gmail.com Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/events/intel/uncore_snbep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index 51d7c117e3c7..53b981dcdb42 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c @@ -3061,7 +3061,7 @@ static struct event_constraint bdx_uncore_pcu_constraints[] = { void bdx_uncore_cpu_init(void) { - int pkg = topology_phys_to_logical_pkg(0); + int pkg = topology_phys_to_logical_pkg(boot_cpu_data.phys_proc_id); if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores) bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores; -- 2.17.1