From patchwork Fri Apr 22 17:14:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 8914691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 62F389F372 for ; Fri, 22 Apr 2016 17:32:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8E5D52026F for ; Fri, 22 Apr 2016 17:32:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71257201C0 for ; Fri, 22 Apr 2016 17:32:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1atevf-0000fh-RI; Fri, 22 Apr 2016 17:31:43 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1atevc-0000F5-Qn for linux-arm-kernel@bombadil.infradead.org; Fri, 22 Apr 2016 17:31:41 +0000 Received: from mail-ig0-x231.google.com ([2607:f8b0:4001:c05::231]) by casper.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1atefb-0001Ew-01 for linux-arm-kernel@lists.infradead.org; Fri, 22 Apr 2016 17:15:07 +0000 Received: by mail-ig0-x231.google.com with SMTP id g8so22152046igr.0 for ; Fri, 22 Apr 2016 10:14:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1k+xoW3IOxYKn12QdmjCSWUhcVEPqGMb76aM3zGXfyo=; b=OTAQq4XjxTk7YpRHrzt8GdAD+JDnKurY3PEArsNCiAb6buWrchaY2MKfHIM4RASsyY Y0Nx9or9rZwAdGBnIIU1xS+pUtG9vzt89ZLof+DFHbGS3hXos2K7jI+9Pti+RckL8oUP 514qt3TSFECPxJIra5Kdsa+VdwzkU09FeMEUk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1k+xoW3IOxYKn12QdmjCSWUhcVEPqGMb76aM3zGXfyo=; b=RdLZDyVYaoz/hShIUV+e41U5RJPnZFPKF8pv95B1CgWKrSEqaEYgdPd185z2UfIitS hWyc41L0Ph1yGXrFhGvJxuA2GK8imbUpO3gHEIt6gKo2YllqGdyEkIChJSDm79D/zedP /PEqNcB4kyLZB6Dgi62I1CClrQuleZPb9byrpjp6DJXU4V78DHLloRr8ijHUxCgby5LN U/FGCoQxSVb/67NPkrPfrtbQl8Kq0P0D3dwB5tzRFj793TWp1J9tDLvdHlU3oNKFCqzI r2K7FHPC5keUIbWWjoj16TsTgPzCEqF5v4CewSOwUBpfimEstCOmfNx+uEfQArQ7iqrm 5ILQ== X-Gm-Message-State: AOPr4FXQ2exfxpBNqrIuDcVndxfRYrI9KAfSuYQVHW9a6hzdfCkkk3TCc4nlbOXbMGctWUVM X-Received: by 10.50.193.233 with SMTP id hr9mr5893977igc.8.1461345284310; Fri, 22 Apr 2016 10:14:44 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id vg8sm1975886igb.15.2016.04.22.10.14.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Apr 2016 10:14:43 -0700 (PDT) From: Mathieu Poirier To: linux-arm-kernel@lists.infradead.org, Suzuki.Poulose@arm.com Subject: [PATCH V3 15/18] coresight: moving struct cs_buffers to header file Date: Fri, 22 Apr 2016 11:14:12 -0600 Message-Id: <1461345255-11758-16-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1461345255-11758-1-git-send-email-mathieu.poirier@linaro.org> References: <1461345255-11758-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160422_181507_179246_AE2018FF X-CRM114-Status: GOOD ( 14.45 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP That way we can re-use the structure in other drivers. Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etb10.c | 20 -------------------- drivers/hwtracing/coresight/coresight-priv.h | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c index a974c39171a9..239800aa5e24 100644 --- a/drivers/hwtracing/coresight/coresight-etb10.c +++ b/drivers/hwtracing/coresight/coresight-etb10.c @@ -71,26 +71,6 @@ #define ETB_FRAME_SIZE_WORDS 4 /** - * struct cs_buffer - keep track of a recording session' specifics - * @cur: index of the current buffer - * @nr_pages: max number of pages granted to us - * @offset: offset within the current buffer - * @data_size: how much we collected in this run - * @lost: other than zero if we had a HW buffer wrap around - * @snapshot: is this run in snapshot mode - * @data_pages: a handle the ring buffer - */ -struct cs_buffers { - unsigned int cur; - unsigned int nr_pages; - unsigned long offset; - local_t data_size; - local_t lost; - bool snapshot; - void **data_pages; -}; - -/** * struct etb_drvdata - specifics associated to an ETB component * @base: memory mapped base address for this component. * @dev: the device entity associated to this component. diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h index 3b5dd95a3588..ad975c58080d 100644 --- a/drivers/hwtracing/coresight/coresight-priv.h +++ b/drivers/hwtracing/coresight/coresight-priv.h @@ -53,6 +53,26 @@ enum cs_mode { CS_MODE_PERF, }; +/** + * struct cs_buffer - keep track of a recording session' specifics + * @cur: index of the current buffer + * @nr_pages: max number of pages granted to us + * @offset: offset within the current buffer + * @data_size: how much we collected in this run + * @lost: other than zero if we had a HW buffer wrap around + * @snapshot: is this run in snapshot mode + * @data_pages: a handle the ring buffer + */ +struct cs_buffers { + unsigned int cur; + unsigned int nr_pages; + unsigned long offset; + local_t data_size; + local_t lost; + bool snapshot; + void **data_pages; +}; + static inline void CS_LOCK(void __iomem *addr) { do {