From patchwork Mon Feb 20 13:33:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shishkin X-Patchwork-Id: 94224 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1327389qgi; Mon, 20 Feb 2017 05:40:29 -0800 (PST) X-Received: by 10.84.225.146 with SMTP id u18mr32176234plj.157.1487598029257; Mon, 20 Feb 2017 05:40:29 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si361636plv.301.2017.02.20.05.40.28; Mon, 20 Feb 2017 05:40:29 -0800 (PST) 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 S1753539AbdBTNk1 (ORCPT + 25 others); Mon, 20 Feb 2017 08:40:27 -0500 Received: from mga11.intel.com ([192.55.52.93]:38220 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753503AbdBTNkZ (ORCPT ); Mon, 20 Feb 2017 08:40:25 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2017 05:40:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,186,1484035200"; d="scan'208";a="1113169074" Received: from um.fi.intel.com (HELO localhost) ([10.237.72.212]) by fmsmga001.fm.intel.com with ESMTP; 20 Feb 2017 05:40:21 -0800 From: Alexander Shishkin To: Peter Zijlstra , Ingo Molnar Cc: linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, Arnaldo Carvalho de Melo , Will Deacon , Peter Zijlstra , Alexander Shishkin Subject: [PATCH 1/4] perf: Export AUX buffer helpers to modules Date: Mon, 20 Feb 2017 15:33:49 +0200 Message-Id: <20170220133352.17995-2-alexander.shishkin@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170220133352.17995-1-alexander.shishkin@linux.intel.com> References: <20170220133352.17995-1-alexander.shishkin@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will Deacon Perf PMU drivers using AUX buffers cannot be built as modules unless the AUX helpers are exported. This patch exports perf_aux_output_{begin,end,skip} and perf_get_aux to modules. Cc: Peter Zijlstra Signed-off-by: Will Deacon Signed-off-by: Alexander Shishkin --- kernel/events/ring_buffer.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.11.0 diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c index 257fa460b8..6415807169 100644 --- a/kernel/events/ring_buffer.c +++ b/kernel/events/ring_buffer.c @@ -397,6 +397,7 @@ void *perf_aux_output_begin(struct perf_output_handle *handle, return NULL; } +EXPORT_SYMBOL_GPL(perf_aux_output_begin); /* * Commit the data written by hardware into the ring buffer by adjusting @@ -458,6 +459,7 @@ void perf_aux_output_end(struct perf_output_handle *handle, unsigned long size, rb_free_aux(rb); ring_buffer_put(rb); } +EXPORT_SYMBOL_GPL(perf_aux_output_end); /* * Skip over a given number of bytes in the AUX buffer, due to, for example, @@ -486,6 +488,7 @@ int perf_aux_output_skip(struct perf_output_handle *handle, unsigned long size) return 0; } +EXPORT_SYMBOL_GPL(perf_aux_output_skip); void *perf_get_aux(struct perf_output_handle *handle) { @@ -495,6 +498,7 @@ void *perf_get_aux(struct perf_output_handle *handle) return handle->rb->aux_priv; } +EXPORT_SYMBOL_GPL(perf_get_aux); #define PERF_AUX_GFP (GFP_KERNEL | __GFP_ZERO | __GFP_NOWARN | __GFP_NORETRY)