Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753563AbdH2NNH (ORCPT ); Tue, 29 Aug 2017 09:13:07 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35893 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752648AbdH2NNF (ORCPT ); Tue, 29 Aug 2017 09:13:05 -0400 From: Jan Glauber To: Mark Rutland , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Suzuki K Poulose , Borislav Petkov , David Daney , Jan Glauber Subject: [RFC PATCH v9 0/7] Cavium ARM64 uncore PMU support Date: Tue, 29 Aug 2017 15:12:31 +0200 Message-Id: <20170829131238.4988-1-jglauber@cavium.com> X-Mailer: git-send-email 2.9.0.rc0.21.g7777322 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2585 Lines: 62 I'm posting this as RFC following this discussion: https://marc.info/?l=linux-arm-kernel&m=150099526923838&w=2 I've implemented the wrapper for the PCI devices and put it under drivers/soc/cavium which I found more appropriate than drivers/misc. I was not able to find a way to build the EDAC driver and the PMU driver with all combinations (builtin and module) so I limited the build options to module only. The problem is that the select from EDAC or PMU sets the wrappers build type to whatever EDAC or PMU choose. But all parts must be either built-in or modules, having the wrapper builtin and calling into module code will not work. If there is a better solution please let me know. The PMU code is the same as in v8. Add support for various PMU counters found on the Cavium ThunderX and OcteonTx SoC. The PMU driver provides common "uncore" functions to avoid code duplication and support adding more device PMUs (like L2 cache) in the future. Changes to v8: - Wrapper for PCI devices Jan Glauber (7): edac: thunderx: Remove suspend/resume support edac,soc: thunderx: Add wrapper for EDAC LMC PCI device edac,soc: thunderx: Add wrapper for EDAC OCX PCI device perf: export perf_event_update_userpage() perf: cavium: Support memory controller PMU counters perf: cavium: Support transmit-link PMU counters perf: cavium: Add Documentation Documentation/perf/cavium-pmu.txt | 75 +++++ drivers/edac/Kconfig | 3 + drivers/edac/thunderx_edac.c | 92 +----- drivers/perf/Kconfig | 15 + drivers/perf/Makefile | 1 + drivers/perf/cavium_pmu.c | 680 ++++++++++++++++++++++++++++++++++++++ drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/cavium/Kconfig | 14 + drivers/soc/cavium/Makefile | 2 + drivers/soc/cavium/cavium_lmc.c | 53 +++ drivers/soc/cavium/cavium_ocx.c | 49 +++ include/linux/cpuhotplug.h | 1 + include/linux/soc/cavium/lmc.h | 12 + include/linux/soc/cavium/ocx.h | 12 + kernel/events/core.c | 1 + 16 files changed, 933 insertions(+), 79 deletions(-) create mode 100644 Documentation/perf/cavium-pmu.txt create mode 100644 drivers/perf/cavium_pmu.c create mode 100644 drivers/soc/cavium/Kconfig create mode 100644 drivers/soc/cavium/Makefile create mode 100644 drivers/soc/cavium/cavium_lmc.c create mode 100644 drivers/soc/cavium/cavium_ocx.c create mode 100644 include/linux/soc/cavium/lmc.h create mode 100644 include/linux/soc/cavium/ocx.h -- 2.9.0.rc0.21.g7777322