From patchwork Thu Oct 12 12:30:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 115617 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp1884370qgn; Thu, 12 Oct 2017 05:31:09 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCVx/lnV86cZKFF9PzJ+EXz2Xfez7uwe5zlFFCf01ijZapDpVHQGjKdxdoa37zmXGW/m2Ac X-Received: by 10.98.77.66 with SMTP id a63mr2089192pfb.281.1507811469474; Thu, 12 Oct 2017 05:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507811469; cv=none; d=google.com; s=arc-20160816; b=JVjNd4r59L5h3enS3nf/F3GbqE/edzMi53QhKoU+QaBf1m0U7hwg0KcB5W13S8cZV/ sxEj6VBm2GLUSamkICm51p9iO/q2m+Qzffaybg2VUDAhhwATPiLrWP6FZ7HyCw1CPCnf G8rNwzPezlNnPYWxiR8s6xGeWf/nAdmRBiV31X9r+ymP9rTP4wWWdcKh+IhSbWB5jgX1 8HcAvumTaXJ6nb1n9Kvy8rzTi9/IpBFaS5kZOsn5yrI7H8Xmr2UY59myyKstT7EHonzy UUjhrwmPBIKlyUqTowk19HWIF0pCNFBc2un1lJPBmWTrhKa/pedLVPANjZEEYGwrN1bk u4tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=VMlPHaGAJ9bAXolzEGJPMX127D3o+FGIB7SzGqghlIY=; b=hUBSTmOv8OZ3Pw3wxBcJ/RVFOzUYiXIaNBsR6z6y4/dRnTXR871LXum8QZVc/jTz1u 7b4aU0YJ6g2Mxy9nAXb0/282tRvPPf9PTEgQNJtluZOct9b60GqzE7jdz0twXcN6jVLR lsvqJwB+9jzHXaQArjRXApinZ85Rsnz0BypKMzrgrchSRqPBMFCWEuBYICljWqt2UwBB 4vafRPfSxfOVlAy+UgnB5A9KT1kWLJVFlqm8Ea/wzrasmPPj4RbSiUR5g30ALroiDb46 7F6+wGN1SztaResaFqrD4m7l2lCY9Xduk7cqotrrcg6kT+CcyJUi1CG88vEIXJWMAkgC vPIQ== 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 a27si1110789pfe.519.2017.10.12.05.31.09; Thu, 12 Oct 2017 05:31:09 -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 S1757404AbdJLMam (ORCPT + 27 others); Thu, 12 Oct 2017 08:30:42 -0400 Received: from foss.arm.com ([217.140.101.70]:45842 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756606AbdJLMah (ORCPT ); Thu, 12 Oct 2017 08:30:37 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0BEEA15BF; Thu, 12 Oct 2017 05:30:37 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D172E3F59E; Thu, 12 Oct 2017 05:30:36 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 800121AE2E1C; Thu, 12 Oct 2017 13:30:40 +0100 (BST) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Cc: marc.zyngier@arm.com, mark.rutland@arm.com, kim.phillips@arm.com, tglx@linutronix.de, peterz@infradead.org, alexander.shishkin@linux.intel.com, robh@kernel.org, suzuki.poulose@arm.com, pawel.moll@arm.com, mathieu.poirier@linaro.org, mingo@redhat.com, linux-kernel@vger.kernel.org, Will Deacon Subject: [PATCH v6 2/7] perf/core: Export AUX buffer helpers to modules Date: Thu, 12 Oct 2017 13:30:33 +0100 Message-Id: <1507811438-2267-3-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1507811438-2267-1-git-send-email-will.deacon@arm.com> References: <1507811438-2267-1-git-send-email-will.deacon@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- kernel/events/ring_buffer.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.1.4 diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c index f684d8e5fa2b..6d9bffe4d6cc 100644 --- a/kernel/events/ring_buffer.c +++ b/kernel/events/ring_buffer.c @@ -411,6 +411,7 @@ void *perf_aux_output_begin(struct perf_output_handle *handle, return NULL; } +EXPORT_SYMBOL_GPL(perf_aux_output_begin); static bool __always_inline rb_need_aux_wakeup(struct ring_buffer *rb) { @@ -480,6 +481,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, @@ -505,6 +507,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) { @@ -514,6 +517,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)