From patchwork Tue Apr 26 22:10:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 8946691 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 D7D809F441 for ; Tue, 26 Apr 2016 22:15:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15A202015A for ; Tue, 26 Apr 2016 22:15:18 +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 365D7201EF for ; Tue, 26 Apr 2016 22:15:17 +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 1avBEv-00062O-Df; Tue, 26 Apr 2016 22:13:53 +0000 Received: from mail-io0-x22f.google.com ([2607:f8b0:4001:c06::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1avBCW-0002wh-7v for linux-arm-kernel@lists.infradead.org; Tue, 26 Apr 2016 22:11:25 +0000 Received: by mail-io0-x22f.google.com with SMTP id d62so29975612iof.2 for ; Tue, 26 Apr 2016 15:11:05 -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=U9OW6/45rAwj95WT9H32mEJu3az2MVccCH0mXqjCon9sIHZfvgGjAqPzfqAJFmCBlB QxbOLrg+tx61+Z4WrFQxsYRh70nN8Q06DcTg/AHZf5iifoNI5E3bCyEKbUaJjBZkA4l6 8OdalKzd80AQf92kt4mzk042RkQW0fTXGgi0c= 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=b8GbzeyGg2MVjIPnxcQvpEyk51ozyd+LAIVuS0b3+KGu6eRFRG8L1swfaZM044Nrvh WZHtWltqXm/oAikollpCtW8D6JeryLP61QbMWJmdqe0+8E5oR11DgvJjjLJowtFdDAnX jUQF57yLyQj4ieIHMX/btwV1csFTvxLonudnp2wzrQqJNuaonPtrWksgb1vC0XJTuYCA LWhw3RP12PmDWMO+a7sovAAwxLtX+tyzxyupMRacnY+9b1YFu/hIrsOo9dDk3Tl2s7iT 9L8w63tUaqg5+FNdUhXNVXcfvappdhukpixDFXFlHrhdkGYxMxUbGL7qnXZLn1y5Q0yG 4HfQ== X-Gm-Message-State: AOPr4FV2dujRx8MOSwqKElQYPFoWkDrtTTQankDXmzMNaYI4MgsUWAB+uBECvoUlNjAXXil7 X-Received: by 10.107.20.80 with SMTP id 77mr7150832iou.152.1461708664885; Tue, 26 Apr 2016 15:11:04 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id zd17sm2684818igc.8.2016.04.26.15.11.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Apr 2016 15:11:03 -0700 (PDT) From: Mathieu Poirier To: linux-arm-kernel@lists.infradead.org, Suzuki.Poulose@arm.com Subject: [PATCH V4 15/18] coresight: moving struct cs_buffers to header file Date: Tue, 26 Apr 2016 16:10:31 -0600 Message-Id: <1461708634-6327-16-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1461708634-6327-1-git-send-email-mathieu.poirier@linaro.org> References: <1461708634-6327-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160426_151124_375824_CEF1FE75 X-CRM114-Status: GOOD ( 13.25 ) 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 Reviewed-by: Suzuki K Poulose --- 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 {