Received: by 10.192.165.148 with SMTP id m20csp97118imm; Fri, 20 Apr 2018 03:45:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx48vAMBUVfLf6Bv26Wglid/kwRlOX2T9EsyRDocOJCrhEyQ07+qXpPSDjcqEDjtCIEXtwAec X-Received: by 10.99.124.1 with SMTP id x1mr7548149pgc.286.1524221121019; Fri, 20 Apr 2018 03:45:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524221120; cv=none; d=google.com; s=arc-20160816; b=F642unz/FTVuW4fIwEtP0WeLZjpKc2/9B9wJKUDaPScoWP5NXJDOpyLqd26dJEyx51 fOmiotyzE4Np5kRyJrzTRCfDEYBNMW8n0nRqXeBz+68/XlGUUDEBO5sJ9jr6iLMZoEB+ aLPkQ63O15cFHuEWmUmNDeOEf40u5LASlmtKnZ3eqkLlmqmBU7Yo61mE8G3HL6BsBUa2 zcuj52K34I/xNCEKo+VwOtGMKGgnOdyz44tGbY7lmNI0/iJXCIFiITglwXR/EeGGv3bs MWy11Cds96j9vG5NEhetg3fRxJGw99kf11ugIOWcmH5bO1lJZD5fvFWxs0rM3MfzOXn9 UleQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=KH1/0JXPtsc23CE/2Q6xn1/kpDXY/rDqKqhF5e9AVkE=; b=EhO/iHaMkaDhF/RLRlL5oth7BseP10ORgl5b2Ex9BssEVytzYbeAHkk1oUTXd10CSZ 0sb1a62NbIVenP8i7aHfXUvpBsuK8NUQDUc4Y9O2d3ckBVzWUxi/Z6qp6YwH/AhxMJws G6seV06fu3ZykzA68u79Cbt4lLls8xT9viSxrTDRHpuTTPD4CZkrbXazB28LRF94Bp0P /FXvjCBCgOcgzX9BPKLHhh1WyAcpNI6wmYu+MIO1jrO9bisG2otlh7sMOClDbAsWY1wr pmhHSMFN2ij7v1RD306ox6Su3cu5RoUCzBiOt2DGNsBUnPQl5bgLRYxfbZzKIhkck7fY ttCw== ARC-Authentication-Results: i=1; mx.google.com; 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 z23-v6si5564257plo.597.2018.04.20.03.45.06; Fri, 20 Apr 2018 03:45:20 -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; 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 S1754603AbeDTKnz (ORCPT + 99 others); Fri, 20 Apr 2018 06:43:55 -0400 Received: from terminus.zytor.com ([198.137.202.136]:43869 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751964AbeDTKny (ORCPT ); Fri, 20 Apr 2018 06:43:54 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w3KAhGs42127204; Fri, 20 Apr 2018 03:43:16 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w3KAhFcm2127201; Fri, 20 Apr 2018 03:43:15 -0700 Date: Fri, 20 Apr 2018 03:43:15 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Stephane Eranian Message-ID: Cc: tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, kan.liang@intel.com, eranian@google.com, linux-kernel@vger.kernel.org, peterz@infradead.org Reply-To: peterz@infradead.org, kan.liang@intel.com, eranian@google.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, hpa@zytor.com In-Reply-To: <1521810690-2576-1-git-send-email-kan.liang@linux.intel.com> References: <1521810690-2576-1-git-send-email-kan.liang@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf/x86/intel/uncore: Revert "Remove SBOX support for Broadwell server" Git-Commit-ID: d7717587ac6deae00e0b66c0113a046be2c6fb1c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: d7717587ac6deae00e0b66c0113a046be2c6fb1c Gitweb: https://git.kernel.org/tip/d7717587ac6deae00e0b66c0113a046be2c6fb1c Author: Stephane Eranian AuthorDate: Fri, 23 Mar 2018 09:11:29 -0400 Committer: Thomas Gleixner CommitDate: Fri, 20 Apr 2018 12:41:17 +0200 perf/x86/intel/uncore: Revert "Remove SBOX support for Broadwell server" This reverts commit 3b94a891667c ("perf/x86/intel/uncore: Remove SBOX support for Broadwell server") Revert because there exists a proper workaround for Broadwell-EP servers without SBOX now. Note that BDX-DE does not have a SBOX. Signed-off-by: Stephane Eranian Signed-off-by: Thomas Gleixner Reviewed-by: Kan Liang Acked-by: Peter Zijlstra Cc: ak@linux.intel.com Cc: osk@google.com Cc: mark@voidzero.net Link: https://lkml.kernel.org/r/1521810690-2576-1-git-send-email-kan.liang@linux.intel.com --- arch/x86/events/intel/uncore_snbep.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index c98b943e58b4..5bbbbee11879 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c @@ -3028,10 +3028,27 @@ static struct intel_uncore_type bdx_uncore_cbox = { .format_group = &hswep_uncore_cbox_format_group, }; +static struct intel_uncore_type bdx_uncore_sbox = { + .name = "sbox", + .num_counters = 4, + .num_boxes = 4, + .perf_ctr_bits = 48, + .event_ctl = HSWEP_S0_MSR_PMON_CTL0, + .perf_ctr = HSWEP_S0_MSR_PMON_CTR0, + .event_mask = HSWEP_S_MSR_PMON_RAW_EVENT_MASK, + .box_ctl = HSWEP_S0_MSR_PMON_BOX_CTL, + .msr_offset = HSWEP_SBOX_MSR_OFFSET, + .ops = &hswep_uncore_sbox_msr_ops, + .format_group = &hswep_uncore_sbox_format_group, +}; + +#define BDX_MSR_UNCORE_SBOX 3 + static struct intel_uncore_type *bdx_msr_uncores[] = { &bdx_uncore_ubox, &bdx_uncore_cbox, &hswep_uncore_pcu, + &bdx_uncore_sbox, NULL, }; @@ -3047,6 +3064,10 @@ void bdx_uncore_cpu_init(void) bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores; uncore_msr_uncores = bdx_msr_uncores; + /* BDX-DE doesn't have SBOX */ + if (boot_cpu_data.x86_model == 86) + uncore_msr_uncores[BDX_MSR_UNCORE_SBOX] = NULL; + hswep_uncore_pcu.constraints = bdx_uncore_pcu_constraints; }