From patchwork Mon Sep 23 23:17:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 20546 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f197.google.com (mail-ye0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D23DF246ED for ; Mon, 23 Sep 2013 23:18:14 +0000 (UTC) Received: by mail-ye0-f197.google.com with SMTP id q5sf3755393yen.0 for ; Mon, 23 Sep 2013 16:18:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe :content-transfer-encoding; bh=3vwJ8xdB8N7AhoPIBfstGxZwZ0SLiV026jpRUznNIMU=; b=BBpGXDRiwHWR3fE607AnTgf5ZLGS3GWudenIx412bLafL0IgMvRdMapN/cnFLPS7WO bYIF7JK+Jw7mqL7CExwaTXWHVPxir9dtfApxS28+xRCRxvejxEGxZENyxVYMGvi5zar/ UgKnGzrDMUm3h0TbZgl4xxAXeA9O35V1eCEjWkuoTSCUnPC/X7w54RL62q9TLejNX3YB OXbKaZ6QZTkCKT6vJqIRw1Ivtc58gOC1JANFLS1YA1UIIRYRCWQcAIrNdC9+C3y3IZwM tGIzRPJtfUMbduHYKYSfRaEai7fV9cD4yWBREiyFyJETH6U+J6fAv/FVYHeHMp07Fcew QASg== X-Gm-Message-State: ALoCoQlqQ/abpIQUHds+92w3q9F3Buq4Hsf8BsbTJtws92N+kOy7kT7RxK8b/0ePea92lTr57adn X-Received: by 10.236.20.114 with SMTP id o78mr5139221yho.8.1379978294684; Mon, 23 Sep 2013 16:18:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.38.130 with SMTP id g2ls1327419qek.99.gmail; Mon, 23 Sep 2013 16:18:14 -0700 (PDT) X-Received: by 10.58.187.47 with SMTP id fp15mr3990731vec.22.1379978294500; Mon, 23 Sep 2013 16:18:14 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id j6si7561284vet.55.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Sep 2013 16:18:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id jw12so3077010veb.9 for ; Mon, 23 Sep 2013 16:18:14 -0700 (PDT) X-Received: by 10.58.55.138 with SMTP id s10mr1180042vep.45.1379978294415; Mon, 23 Sep 2013 16:18:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp208753vcz; Mon, 23 Sep 2013 16:18:14 -0700 (PDT) X-Received: by 10.52.116.145 with SMTP id jw17mr974529vdb.54.1379978283494; Mon, 23 Sep 2013 16:18:03 -0700 (PDT) Received: from relais.videotron.ca (relais.videotron.ca. [24.201.245.36]) by mx.google.com with ESMTP id k4si13385945qas.62.1969.12.31.16.00.00; Mon, 23 Sep 2013 16:18:03 -0700 (PDT) Received-SPF: neutral (google.com: 24.201.245.36 is neither permitted nor denied by best guess record for domain of nicolas.pitre@linaro.org) client-ip=24.201.245.36; Received: from yoda.home ([70.83.209.44]) by VL-VM-MR005.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0MTL002RLQ21FO40@VL-VM-MR005.ip.videotron.ca> for patches@linaro.org; Mon, 23 Sep 2013 19:18:02 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id EF4B92DA0668; Mon, 23 Sep 2013 19:18:01 -0400 (EDT) From: Nicolas Pitre To: linux-arm-kernel@lists.infradead.org Cc: dave.martin@arm.com, linaro-kernel@lists.linaro.org, patches@linaro.org Subject: [PATCH 12/13] ARM: bL_switcher/trace: Add kernel trace trigger interface Date: Mon, 23 Sep 2013 19:17:55 -0400 Message-id: <1379978276-31241-13-git-send-email-nicolas.pitre@linaro.org> X-Mailer: git-send-email 1.8.4.98.gb022869 In-reply-to: <1379978276-31241-1-git-send-email-nicolas.pitre@linaro.org> References: <1379978276-31241-1-git-send-email-nicolas.pitre@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nicolas.pitre@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Content-transfer-encoding: 7BIT From: Dave Martin This patch exports a bL_switcher_trace_trigger() function to provide a means for drivers using the trace events to get the current status when starting a trace session. Calling this function is equivalent to pinging the trace_trigger file in sysfs. Signed-off-by: Dave Martin --- arch/arm/common/bL_switcher.c | 3 ++- arch/arm/include/asm/bL_switcher.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c index f0dc025077..f4878a3604 100644 --- a/arch/arm/common/bL_switcher.c +++ b/arch/arm/common/bL_switcher.c @@ -537,7 +537,7 @@ static void bL_switcher_trace_trigger_cpu(void *__always_unused info) trace_cpu_migrate_current(get_ns(), read_mpidr()); } -static int bL_switcher_trace_trigger(void) +int bL_switcher_trace_trigger(void) { int ret; @@ -550,6 +550,7 @@ static int bL_switcher_trace_trigger(void) return ret; } +EXPORT_SYMBOL_GPL(bL_switcher_trace_trigger); static int bL_switcher_enable(void) { diff --git a/arch/arm/include/asm/bL_switcher.h b/arch/arm/include/asm/bL_switcher.h index 7d1cce8b8a..8ada5a885c 100644 --- a/arch/arm/include/asm/bL_switcher.h +++ b/arch/arm/include/asm/bL_switcher.h @@ -54,6 +54,8 @@ int bL_switcher_unregister_notifier(struct notifier_block *nb); bool bL_switcher_get_enabled(void); void bL_switcher_put_enabled(void); +int bL_switcher_trace_trigger(void); + #else static inline int bL_switcher_register_notifier(struct notifier_block *nb) { @@ -67,6 +69,7 @@ static inline int bL_switcher_unregister_notifier(struct notifier_block *nb) static inline bool bL_switcher_get_enabled(void) { return false; } static inline void bL_switcher_put_enabled(void) { } +static inline int bL_switcher_trace_trigger(void) { return 0; } #endif /* CONFIG_BL_SWITCHER */ #endif