From patchwork Tue May 3 17:33:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 67079 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp719165qge; Tue, 3 May 2016 10:35:18 -0700 (PDT) X-Received: by 10.67.3.200 with SMTP id by8mr5258187pad.13.1462296917332; Tue, 03 May 2016 10:35:17 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si243457paw.142.2016.05.03.10.35.16; Tue, 03 May 2016 10:35:17 -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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964992AbcECRev (ORCPT + 29 others); Tue, 3 May 2016 13:34:51 -0400 Received: from mail-ig0-f182.google.com ([209.85.213.182]:35326 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964956AbcECRes (ORCPT ); Tue, 3 May 2016 13:34:48 -0400 Received: by mail-ig0-f182.google.com with SMTP id bi2so123082566igb.0 for ; Tue, 03 May 2016 10:34:48 -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=m39obVOT8xkfDd3+d4ykg6uWtbvv+huGWJgZbyYMSB0=; b=BMkiq88b5a84/ShEorpM9ZkHHX8UPhVp67AS6fFTzmeQvMSvESgir5FNODpqAfT2mA NQWUCnRlzCNW+DX6nbC4AQxii/rQeAcWkGKlA0RRNCe/WVP+U9py98tnB7ZaAwB2CBPM DheJ8TaOIz7IIltncChzLDaeTGs4oFndQrOLg= 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=m39obVOT8xkfDd3+d4ykg6uWtbvv+huGWJgZbyYMSB0=; b=afL0C6PTVUbjOBktYCvZ3c1vLhAcJhnuxBdOmBlt79Z253/8oX5mSVWWlNoda6NfSE j48A5n3CD6A5rkC4ty2li2fi90qrV/QCBl/cmgNMs5KAJSHFmcU518XMsmZe/BTgbULg +uc1OpPyO3iy6wQUvfYsZlMCyoeaipLAL4qvn34GdbUMBSO3khxOoEsiyKEiTek2vUgD bMciSS0Y21VtbzSLAT0XuDrtW3SeeeLlWqeXefhAk5SJBmhZWtSIXEXU/s3Mwd/YgxuE IB2MQOqjYBZaXaaVw302LwArocVZ6W1YQQZyYiJfxV2AvLHTQu9L9YZjsOwC6Ps3WU5E DRzw== X-Gm-Message-State: AOPr4FXp34G5oSN69W/dv9eeb1rAHZYFf1YVDLcAm1btdPEh3NwyejcZu7ul70ba5+1kCFvv X-Received: by 10.50.225.165 with SMTP id rl5mr4752706igc.63.1462296887768; Tue, 03 May 2016 10:34:47 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id k33sm103957iod.44.2016.05.03.10.34.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 May 2016 10:34:46 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 24/27] coresight: moving struct cs_buffers to header file Date: Tue, 3 May 2016 11:33:58 -0600 Message-Id: <1462296841-12327-25-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1462296841-12327-1-git-send-email-mathieu.poirier@linaro.org> References: <1462296841-12327-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.5.0 diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c index b0d402dbfeae..92f942321e1e 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 {