From patchwork Fri Nov 13 18:44:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 56541 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1214216lbb; Fri, 13 Nov 2015 10:48:22 -0800 (PST) X-Received: by 10.67.4.38 with SMTP id cb6mr34268837pad.34.1447440502478; Fri, 13 Nov 2015 10:48:22 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ax2si28911615pbd.123.2015.11.13.10.48.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Nov 2015 10:48:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com 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 1ZxJN6-0006Vn-8O; Fri, 13 Nov 2015 18:46:52 +0000 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZxJMp-0006FN-QY for linux-arm-kernel@lists.infradead.org; Fri, 13 Nov 2015 18:46:36 +0000 Received: by pacej9 with SMTP id ej9so992277pac.2 for ; Fri, 13 Nov 2015 10:46:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fHYjZIlO6VUoEJqvxyS72iEpoKFpML7J2OVzvB9y9JA=; b=UaUWryi2XshCv/0zcCZ6GuBtfPemXGouVKyaKTx/GM4kDfOISqsKNB34ckJK33wb6n KWGpjg/Q4m2/AczRQZnrbuQWcD7xBtvxC6NHFh9H7K344MEbja0WFYzFalSjREXOHau3 4Z5cIrMS/Sn/XrLL4DjyI6ZgX/dTN3jLCShVtnQLyscKMXCU05Q0B0Mw0DhSEt4R8JEX 8xpTdzmHpAa/6BinpVIZC9zE2C+ctEMOvUVYiI+6zyhzoTlblq1fNQ49XzRfiIWlewfh JYtVYhX39uMnr8PVRkEXQOXW3yNfjqOsJHGnIzjUaO0XcYFTEvT7m6+VUwbSd/hQDmFE 169A== 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=fHYjZIlO6VUoEJqvxyS72iEpoKFpML7J2OVzvB9y9JA=; b=CmkX6oIHkf81/YLHSq4ZCvHw7WXQQdgLpcuU8ZOgWgpp5OJAMBcexrqo9bijoM5IGw bUIa+eiM/sMpTRR2jX8Q+D6ay3UaQD0LghttofMVue8wNWVLPpuyxWeyfYQyp0dOsxVq L5VQeoyi0l4IQVdipgdOniyZBg5BCyqp9/zPFE8FWkxiNU6A54RYozWDYes6g2OX9Zr1 fztrhpRIphaYGijH2DnbQzf+JfnbLReu/K7lnSkBblEy+TUOq+0B0RzLa8ut3hk+DbL/ oIrJNU+L9DtwMfnjD+Wv/TmDlKXiij1LVZhBL7RFoXQTuzlzVeEpqgmyS9+Ii8UqQOBL yViA== X-Gm-Message-State: ALoCoQkTQ4ZcROkPgj5sAvAsw0HPcf/rUot6K7rsWfpb6s/nGXT5Hc+t4ODJnVFr7PhhrZt5BQBo X-Received: by 10.66.146.130 with SMTP id tc2mr33681261pab.26.1447440375257; Fri, 13 Nov 2015 10:46:15 -0800 (PST) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [184.64.168.246]) by smtp.gmail.com with ESMTPSA id xi7sm21737967pbc.56.2015.11.13.10.46.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Nov 2015 10:46:14 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org, a.p.zijlstra@chello.nl, alexander.shishkin@linux.intel.com, acme@kernel.org, mingo@redhat.com, corbet@lwn.net, nicolas.pitre@linaro.org Subject: [PATCH V4 01/26] coresight: etm3x: moving etm_readl/writel to header file Date: Fri, 13 Nov 2015 11:44:52 -0700 Message-Id: <1447440317-1977-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447440317-1977-1-git-send-email-mathieu.poirier@linaro.org> References: <1447440317-1977-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151113_104635_998053_02A35273 X-CRM114-Status: GOOD ( 11.98 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c03:0:0:0:234 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: al.grant@arm.com, mathieu.poirier@linaro.org, pawel.moll@arm.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, fainelli@broadcom.com, adrian.hunter@intel.com, tor@ti.com, mike.leach@arm.com, zhang.chunyan@linaro.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Moving functions etm_readl/writel to file "coresight-etm.h" so that the main ETM3x driver can be split in more than one file. Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm.h | 29 +++++++++++++++++++++++++++ drivers/hwtracing/coresight/coresight-etm3x.c | 29 --------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/hwtracing/coresight/coresight-etm.h b/drivers/hwtracing/coresight/coresight-etm.h index b4481eb29304..34f7db881fa7 100644 --- a/drivers/hwtracing/coresight/coresight-etm.h +++ b/drivers/hwtracing/coresight/coresight-etm.h @@ -251,4 +251,33 @@ enum etm_addr_type { ETM_ADDR_TYPE_START, ETM_ADDR_TYPE_STOP, }; + +static inline void etm_writel(struct etm_drvdata *drvdata, + u32 val, u32 off) +{ + if (drvdata->use_cp14) { + if (etm_writel_cp14(off, val)) { + dev_err(drvdata->dev, + "invalid CP14 access to ETM reg: %#x", off); + } + } else { + writel_relaxed(val, drvdata->base + off); + } +} + +static inline unsigned int etm_readl(struct etm_drvdata *drvdata, u32 off) +{ + u32 val; + + if (drvdata->use_cp14) { + if (etm_readl_cp14(off, &val)) { + dev_err(drvdata->dev, + "invalid CP14 access to ETM reg: %#x", off); + } + } else { + val = readl_relaxed(drvdata->base + off); + } + + return val; +} #endif diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c index d630b7ece735..c1dc095c3fb0 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -42,35 +42,6 @@ module_param_named(boot_enable, boot_enable, int, S_IRUGO); static int etm_count; static struct etm_drvdata *etmdrvdata[NR_CPUS]; -static inline void etm_writel(struct etm_drvdata *drvdata, - u32 val, u32 off) -{ - if (drvdata->use_cp14) { - if (etm_writel_cp14(off, val)) { - dev_err(drvdata->dev, - "invalid CP14 access to ETM reg: %#x", off); - } - } else { - writel_relaxed(val, drvdata->base + off); - } -} - -static inline unsigned int etm_readl(struct etm_drvdata *drvdata, u32 off) -{ - u32 val; - - if (drvdata->use_cp14) { - if (etm_readl_cp14(off, &val)) { - dev_err(drvdata->dev, - "invalid CP14 access to ETM reg: %#x", off); - } - } else { - val = readl_relaxed(drvdata->base + off); - } - - return val; -} - /* * Memory mapped writes to clear os lock are not supported on some processors * and OS lock must be unlocked before any memory mapped access on such