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: 66475 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp839075qge; Fri, 22 Apr 2016 10:15:04 -0700 (PDT) X-Received: by 10.98.36.26 with SMTP id r26mr29771457pfj.99.1461345301703; Fri, 22 Apr 2016 10:15:01 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dy1si8584706pab.117.2016.04.22.10.15.01; Fri, 22 Apr 2016 10:15:01 -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 S932526AbcDVROt (ORCPT + 29 others); Fri, 22 Apr 2016 13:14:49 -0400 Received: from mail-ig0-f182.google.com ([209.85.213.182]:35670 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932496AbcDVROp (ORCPT ); Fri, 22 Apr 2016 13:14:45 -0400 Received: by mail-ig0-f182.google.com with SMTP id bi2so19187906igb.0 for ; Fri, 22 Apr 2016 10:14:44 -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=grooww1jnbd8MKNNorCux0HXb3YPKDi6Pe7MG7Joq3WR7noRrxGwEVW/Ts4RYLD88X VaC3I5SwTJcqIRyj5fqeXJb+75SVPIEvN0+H1fKslIjKymnwvVyLzSkNYizfeiAgQHSh UQHITw2d1QTzDiK0Ro18F7zE1CpuU5C2x93JNHZR+9575RwTdTKPgpiFcmybltNs6RHg n9IqhEKzHsdT0FQaqWiPLbPD+dSfHSel/NQLlvMsoyOACls02j/kCzt7cYBXi+3vmUPM tLiNGUv9sIq45AWJxn5yI74dKBVI9OyCM8fNWCinLsn8dQzx7YFgKhrxK7Dk9/Abvtjq EjAA== X-Gm-Message-State: AOPr4FVc7d7IxniGDO94BVzskyOrugEDLT0bsEBOAG2M6CSOXop7az6Vh9N5T8rGlrne0MfM 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 Cc: linux-kernel@vger.kernel.org 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> 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 --- 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 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 {