Received: by 10.213.65.68 with SMTP id h4csp357676imn; Fri, 23 Mar 2018 06:14:00 -0700 (PDT) X-Google-Smtp-Source: AG47ELt6h8GaVrjrhJOIBwCFMnUv2vP+dAgca357RJHWJv4wmvIgJZucT3f7y64uzRa4Geh1/Fys X-Received: by 2002:a17:902:680c:: with SMTP id h12-v6mr30340512plk.46.1521810840911; Fri, 23 Mar 2018 06:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521810840; cv=none; d=google.com; s=arc-20160816; b=fl3VyzFg8g0N4BTjUGllQpwCBJdos1q3ta8VKA3qjENiI/02vhKWCwRKOK7N15FFLo Y6LCRbclqs0G1aWVtAjycSVciMzH+YVuNLdtkLl0aJ9xMIPxxsEDJVXbRbhZdEnSlNYA svAMqj3qCDDSIzQmFhpiSbKe9gdvUSZ/KMOP5xdUIQXofp258cOZjrQCeKvI93M4oAqS vBc0lZsP4/7PR7Ty2eSUjF+q2KXSrAhXyLl14RP5YYfqAmk696ALUE+O8fQSk+aak57J FCKbPCktZ8ZQVSCS5AY/TvGRirwwB0hctuCpbUS66s61hGWRD2P0oMSpV04x/OPPODyN 7j8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=WkbV9QcedYWaikSAQwCdsfnLrdQvAEtL/fhm7f09ERU=; b=e5gCTf5mzVnN7iGbetaywy157nKKg5cLRfMBkk0+IFYvCKmkhBdAb8oBba3ZC7+N9E XV8wYZozXiMiGvjjouKfXwDQbYcUxnH+Ys4ZCoaynn5EWA5XMPEdiyopT7IeLPPyM6mG NFqemrxdLhD8eZGFmvCKZcb0L7SAOqHw9U5DkpzlgUfU6bJ7e3nYD7UNcMT/u4N01JVT jsEqiyPPTw9uFCl7+oqoKSZHCiZmT1o2uJHH07A0/+p5yYV90xHlJAT4spoDqcXYbsxz e9eOdoCrrHe99j6mFqUdVwbwX2G5w2+VeARBfJ9zIQlD56VZCMlO1QTWeW0KtPMaotpJ IhLg== 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 t81si6716906pfg.273.2018.03.23.06.13.46; Fri, 23 Mar 2018 06:14:00 -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 S1752252AbeCWNMo (ORCPT + 99 others); Fri, 23 Mar 2018 09:12:44 -0400 Received: from mga05.intel.com ([192.55.52.43]:57827 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751938AbeCWNMn (ORCPT ); Fri, 23 Mar 2018 09:12:43 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Mar 2018 06:12:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,350,1517904000"; d="scan'208";a="37536720" Received: from otc-brkl-02.jf.intel.com ([10.54.39.28]) by orsmga003.jf.intel.com with ESMTP; 23 Mar 2018 06:12:42 -0700 From: Kan Liang To: peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: eranian@google.com, osk@google.com, mark@voidzero.net, ak@linux.intel.com Subject: [RESEND PATCH 1/2] perf/x86/intel/uncore: Revert "Remove SBOX support for Broadwell server" Date: Fri, 23 Mar 2018 09:11:29 -0400 Message-Id: <1521810690-2576-1-git-send-email-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.4.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephane Eranian This reverts commit 3b94a891667c ("perf/x86/intel/uncore: Remove SBOX support for Broadwell server") Rvert because we have a workaround for Broadwell-EP servers without SBOX (subsequent patch). Note that BDX-DE does not have a SBOX. Signed-off-by: Stephane Eranian Reviewed-by: Kan Liang --- Here is the original patch set. https://lkml.org/lkml/2016/11/15/611 Only rebase with lastest code. 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 22ec65b..47c6910 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; } -- 2.4.11