Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp680620pxu; Thu, 7 Jan 2021 15:41:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxwMw4arZDUv378tdPYcgIIOCOHueslY5XjXahb/N/nN6rX5Ip89irgxjm9gTpnkvm6n/OC X-Received: by 2002:a50:8a90:: with SMTP id j16mr3252100edj.334.1610062905859; Thu, 07 Jan 2021 15:41:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610062905; cv=none; d=google.com; s=arc-20160816; b=h/US+o+mYLDD/ucDmQVUYjEpo+kcgHsvS0UIyb97eKMcphcGyf4wRcCqtWuzw91d/h jMS13CvK+Xv56jQnK81qQLblKyzNiWNecG2A9Tcb6XpDMT28mxQ2PLMrUv94leUeNN2Q zYc7XQsm24zccKpXKa2QaheJmKx0/Dw5DqIVJcmOY3AINYQSq3a+Kf5KHsB9lvdfhcRk J9gNVcKdHkC7xUFK239eW1MRzvawR7Lrk64rEsdGUUcIF5Fua9iLTmvW04vKl6vJ7s80 ZxJ+G1+Je5nV+vq/nx4gxP5TAPrv2BVXB/EBzLPhK2N3KQOlSk+QwmPMIbrXl5Uw4CDT Vwfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0PbwMAhaf7zYgeSJNc56/R//P4KF28jTgU+oG6bYl9o=; b=iwAIHm7G3KYT3gtiTXQeBxw9i9ZQ9SKfkDla321IR6dQ1O/7hmPzUdCA2XkPy46/bo 3chVGu9S3tnH5t6Q9P41EbHAET8AbCdfS9cYerjD5pz1EOWD18BIYs2GvKUDK4TcsoWe iZMaQj06L2HYGj3Z9ETUcu8JHfZuEVR9UVFJjx/2BTUFpf7OhmMMwoFx3eGmjTtZyv0U kfVuywsBdbTZsKpj+x2lpFOrBIcqnzIE/QkwMseRzt4w8dfPyHISKmnVxS2vEZsb2hf3 uw547TJaOhPm642KD8DDSXzYpUr04Rca/U9JiKGarMFyvlOVzCxWu8CWi+28JjjZ8bGl qF/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NCbqSQ5X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si2936782ejn.694.2021.01.07.15.41.21; Thu, 07 Jan 2021 15:41:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NCbqSQ5X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728691AbhAGXj6 (ORCPT + 99 others); Thu, 7 Jan 2021 18:39:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725944AbhAGXj6 (ORCPT ); Thu, 7 Jan 2021 18:39:58 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AD59C0612F4 for ; Thu, 7 Jan 2021 15:38:37 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id m5so5108895pjv.5 for ; Thu, 07 Jan 2021 15:38:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0PbwMAhaf7zYgeSJNc56/R//P4KF28jTgU+oG6bYl9o=; b=NCbqSQ5XemDXeAYSxFYbFi8RebRj4qT5AX7wz8rrBJxYKnDNxe8IIia2yXrQa7SPp6 is7HHzsQS+H0ipDlkdxCJx2rDxnbppONaVdD++huO2Jk/QRK1UUuii4VFcNASw/iWgvc OTImY+79/46nFz/M447xTPJGPUJUJv5zKuqYtxdOdYMO3SKM65r28EuIVaMB6WKktj63 WlsAVIg+f7oPPT/oD7yZ9UmtCzzk0Y2HJ9gARnxZ2Gf86aj1TB5HIM+GWF7Y6egnptbd keDYsUl37JayHxTJJ2qbQTTBpv+ktWKnIYsUkl54FRSy7kUR9S9Nyrd8TjIVBgZNyB+/ 8Ujw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0PbwMAhaf7zYgeSJNc56/R//P4KF28jTgU+oG6bYl9o=; b=ARFJSIOeEMKhGsB7aJZ5AJBhwVKKQqGSvGUXS1UjcbfRuSQ+sPJ66oR43IulrQAUGL o00WhikPuZ4vmXLYHC7q677RE1BOMhE8uANwfmBJXqJKoHpTODzbGfyPK2xKG3J1KPSn YR2XHKAtt7BO3h4itnyRkb0GzxvrBj4fx3mJaLLkMNPG/1Q5nB3vPzI78tfaffJmA/8y 77i2p9SzpiV1JkNZyL35zgryKtgKcmHXK8/AtGrNUD2LWB6r6rSARD4Knq2Rq34X2s1Z i8t/wv7K0oHq2/J21VDBCinCljbwn7nJxsLG0jQdg/yPxAj7bRp/xxYvj65ig94qoZ03 2FkQ== X-Gm-Message-State: AOAM533OBlLVR5Dh7Rrr815mtOI9F3C5Shme/trOV8THm5Z4CpxfOiSA pveGN7p1BhuDpWbvJRgSRJ2k6Q== X-Received: by 2002:a17:902:ea89:b029:da:539e:9bb with SMTP id x9-20020a170902ea89b02900da539e09bbmr1159249plb.52.1610062716648; Thu, 07 Jan 2021 15:38:36 -0800 (PST) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id z3sm6607141pfb.157.2021.01.07.15.38.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 15:38:36 -0800 (PST) Date: Thu, 7 Jan 2021 16:38:34 -0700 From: Mathieu Poirier To: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, leo.yan@linaro.org, mike.leach@linaro.org, anshuman.khandual@arm.com Subject: Re: [PATCH v6 03/26] coresight: Introduce device access abstraction Message-ID: <20210107233834.GC43045@xps15> References: <20210107123859.674252-1-suzuki.poulose@arm.com> <20210107123859.674252-4-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210107123859.674252-4-suzuki.poulose@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 07, 2021 at 12:38:36PM +0000, Suzuki K Poulose wrote: > We are about to introduce support for sysreg access to ETMv4.4+ > component. Since there are generic routines that access the > registers (e.g, CS_LOCK/UNLOCK , claim/disclaim operations, timeout) > and in order to preserve the logic of these operations at a > single place we introduce an abstraction layer for the accesses > to a given device. > > Cc: Mike Leach > Reviewed-by: Mathieu Poirier > Signed-off-by: Suzuki K Poulose > --- > Change since v3 > - Dropped csa argument to read()/write(). > - Addressed comments on spacing and adding labels for the #if #else #endifs. > (Mathieu) > --- > drivers/hwtracing/coresight/coresight-catu.c | 1 + > drivers/hwtracing/coresight/coresight-core.c | 43 ++++ > .../hwtracing/coresight/coresight-cti-core.c | 1 + > drivers/hwtracing/coresight/coresight-etb10.c | 1 + > .../coresight/coresight-etm3x-core.c | 1 + > .../coresight/coresight-etm4x-core.c | 1 + > .../hwtracing/coresight/coresight-funnel.c | 1 + > .../coresight/coresight-replicator.c | 1 + > drivers/hwtracing/coresight/coresight-stm.c | 1 + > .../hwtracing/coresight/coresight-tmc-core.c | 1 + > drivers/hwtracing/coresight/coresight-tpiu.c | 1 + > include/linux/coresight.h | 198 +++++++++++++++++- > 12 files changed, 248 insertions(+), 3 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c > index a61313f320bd..867c932c7b26 100644 > --- a/drivers/hwtracing/coresight/coresight-catu.c > +++ b/drivers/hwtracing/coresight/coresight-catu.c > @@ -551,6 +551,7 @@ static int catu_probe(struct amba_device *adev, const struct amba_id *id) > dev->platform_data = pdata; > > drvdata->base = base; > + catu_desc.access = CSDEV_ACCESS_IOMEM(base); > catu_desc.pdata = pdata; > catu_desc.dev = dev; > catu_desc.groups = catu_groups; > diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c > index 4ba801dffcb7..a38af8f0831b 100644 > --- a/drivers/hwtracing/coresight/coresight-core.c > +++ b/drivers/hwtracing/coresight/coresight-core.c > @@ -1458,6 +1458,48 @@ int coresight_timeout(void __iomem *addr, u32 offset, int position, int value) > } > EXPORT_SYMBOL_GPL(coresight_timeout); > > +u32 coresight_relaxed_read32(struct coresight_device *csdev, u32 offset) > +{ > + return csdev_access_relaxed_read32(&csdev->access, offset); > +} > + > +u32 coresight_read32(struct coresight_device *csdev, u32 offset) > +{ > + return csdev_access_read32(&csdev->access, offset); > +} > + > +void coresight_relaxed_write32(struct coresight_device *csdev, > + u32 val, u32 offset) > +{ > + csdev_access_relaxed_write32(&csdev->access, val, offset); > +} > + > +void coresight_write32(struct coresight_device *csdev, u32 val, u32 offset) > +{ > + csdev_access_write32(&csdev->access, val, offset); > +} > + > +u64 coresight_relaxed_read64(struct coresight_device *csdev, u32 offset) > +{ > + return csdev_access_relaxed_read64(&csdev->access, offset); > +} > + > +u64 coresight_read64(struct coresight_device *csdev, u32 offset) > +{ > + return csdev_access_read64(&csdev->access, offset); > +} > + > +void coresight_relaxed_write64(struct coresight_device *csdev, > + u64 val, u32 offset) > +{ > + csdev_access_relaxed_write64(&csdev->access, val, offset); > +} > + > +void coresight_write64(struct coresight_device *csdev, u64 val, u32 offset) > +{ > + csdev_access_write64(&csdev->access, val, offset); > +} > + > /* > * coresight_release_platform_data: Release references to the devices connected > * to the output port of this device. > @@ -1522,6 +1564,7 @@ struct coresight_device *coresight_register(struct coresight_desc *desc) > csdev->type = desc->type; > csdev->subtype = desc->subtype; > csdev->ops = desc->ops; > + csdev->access = desc->access; > csdev->orphan = false; > > csdev->dev.type = &coresight_dev_type[desc->type]; > diff --git a/drivers/hwtracing/coresight/coresight-cti-core.c b/drivers/hwtracing/coresight/coresight-cti-core.c > index 61dbc1afd8da..b38a8db5f252 100644 > --- a/drivers/hwtracing/coresight/coresight-cti-core.c > +++ b/drivers/hwtracing/coresight/coresight-cti-core.c > @@ -870,6 +870,7 @@ static int cti_probe(struct amba_device *adev, const struct amba_id *id) > return PTR_ERR(base); > > drvdata->base = base; > + cti_desc.access = CSDEV_ACCESS_IOMEM(base); > > dev_set_drvdata(dev, drvdata); > > diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c > index 0cf6f0b947b6..cc742561a986 100644 > --- a/drivers/hwtracing/coresight/coresight-etb10.c > +++ b/drivers/hwtracing/coresight/coresight-etb10.c > @@ -757,6 +757,7 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id) > return PTR_ERR(base); > > drvdata->base = base; > + desc.access = CSDEV_ACCESS_IOMEM(base); > > spin_lock_init(&drvdata->spinlock); > > diff --git a/drivers/hwtracing/coresight/coresight-etm3x-core.c b/drivers/hwtracing/coresight/coresight-etm3x-core.c > index 5bf5a5a4ce6d..3b7837cbe376 100644 > --- a/drivers/hwtracing/coresight/coresight-etm3x-core.c > +++ b/drivers/hwtracing/coresight/coresight-etm3x-core.c > @@ -839,6 +839,7 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id) > return PTR_ERR(base); > > drvdata->base = base; > + desc.access = CSDEV_ACCESS_IOMEM(base); > > spin_lock_init(&drvdata->spinlock); > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c > index cce65fc0c9aa..ebd41bb7ce1c 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c > +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c > @@ -1626,6 +1626,7 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id) > return PTR_ERR(base); > > drvdata->base = base; > + desc.access = CSDEV_ACCESS_IOMEM(base); > > spin_lock_init(&drvdata->spinlock); > > diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c > index 071c723227db..8f7c40d7d8d6 100644 > --- a/drivers/hwtracing/coresight/coresight-funnel.c > +++ b/drivers/hwtracing/coresight/coresight-funnel.c > @@ -242,6 +242,7 @@ static int funnel_probe(struct device *dev, struct resource *res) > } > drvdata->base = base; > desc.groups = coresight_funnel_groups; > + desc.access = CSDEV_ACCESS_IOMEM(base); > } > > dev_set_drvdata(dev, drvdata); > diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c > index 7e2a2b7f503f..205756fab729 100644 > --- a/drivers/hwtracing/coresight/coresight-replicator.c > +++ b/drivers/hwtracing/coresight/coresight-replicator.c > @@ -254,6 +254,7 @@ static int replicator_probe(struct device *dev, struct resource *res) > } > drvdata->base = base; > desc.groups = replicator_groups; > + desc.access = CSDEV_ACCESS_IOMEM(base); > } > > if (fwnode_property_present(dev_fwnode(dev), > diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c > index 99791773f682..41d9a922c2d4 100644 > --- a/drivers/hwtracing/coresight/coresight-stm.c > +++ b/drivers/hwtracing/coresight/coresight-stm.c > @@ -884,6 +884,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id) > if (IS_ERR(base)) > return PTR_ERR(base); > drvdata->base = base; > + desc.access = CSDEV_ACCESS_IOMEM(base); > > ret = stm_get_stimulus_area(dev, &ch_res); > if (ret) > diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c > index 8169dff5a9f6..e61b75be66b6 100644 > --- a/drivers/hwtracing/coresight/coresight-tmc-core.c > +++ b/drivers/hwtracing/coresight/coresight-tmc-core.c > @@ -456,6 +456,7 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id) > } > > drvdata->base = base; > + desc.access = CSDEV_ACCESS_IOMEM(base); > > spin_lock_init(&drvdata->spinlock); > > diff --git a/drivers/hwtracing/coresight/coresight-tpiu.c b/drivers/hwtracing/coresight/coresight-tpiu.c > index d5dfee9ee556..6ca396799883 100644 > --- a/drivers/hwtracing/coresight/coresight-tpiu.c > +++ b/drivers/hwtracing/coresight/coresight-tpiu.c > @@ -149,6 +149,7 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id) > return PTR_ERR(base); > > drvdata->base = base; > + desc.access = CSDEV_ACCESS_IOMEM(base); > > /* Disable tpiu to support older devices */ > tpiu_disable_hw(drvdata); > diff --git a/include/linux/coresight.h b/include/linux/coresight.h > index 7d3c87e5b97c..d3aa328639cd 100644 > --- a/include/linux/coresight.h > +++ b/include/linux/coresight.h > @@ -7,6 +7,7 @@ > #define _LINUX_CORESIGHT_H > > #include > +#include > #include > #include > > @@ -114,6 +115,36 @@ struct coresight_platform_data { > struct coresight_connection *conns; > }; > > +/** > + * struct csdev_access - Abstraction of a CoreSight device access. > + * > + * @io_mem : True if the device has memory mapped I/O > + * @base : When io_mem == true, base address of the component > + * @read : Read from the given "offset" of the given instance. > + * @write : Write "val" to the given "offset". > + */ > +struct csdev_access { > + bool io_mem; > + union { > + void __iomem *base; > + struct { > + u64 (*read)(u32 offset, > + bool relaxed, > + bool _64bit); > + void (*write)(u64 val, > + u32 offset, > + bool relaxed, > + bool _64bit); Stacking > + }; > + }; > +}; > + > +#define CSDEV_ACCESS_IOMEM(_addr) \ > + ((struct csdev_access) { \ > + .io_mem = true, \ > + .base = (_addr), \ > + }) > + > /** > * struct coresight_desc - description of a component required from drivers > * @type: as defined by @coresight_dev_type. > @@ -125,6 +156,7 @@ struct coresight_platform_data { > * @groups: operations specific to this component. These will end up > * in the component's sysfs sub-directory. > * @name: name for the coresight device, also shown under sysfs. > + * @access: Describe access to the device > */ > struct coresight_desc { > enum coresight_dev_type type; > @@ -134,6 +166,7 @@ struct coresight_desc { > struct device *dev; > const struct attribute_group **groups; > const char *name; > + struct csdev_access access; > }; > > /** > @@ -173,7 +206,8 @@ struct coresight_sysfs_link { > * @type: as defined by @coresight_dev_type. > * @subtype: as defined by @coresight_dev_subtype. > * @ops: generic operations for this component, as defined > - by @coresight_ops. > + * by @coresight_ops. > + * @access: Device i/o access abstraction for this device. > * @dev: The device entity associated to this component. > * @refcnt: keep track of what is in use. > * @orphan: true if the component has connections that haven't been linked. > @@ -195,6 +229,7 @@ struct coresight_device { > enum coresight_dev_type type; > union coresight_dev_subtype subtype; > const struct coresight_ops *ops; > + struct csdev_access access; > struct device dev; > atomic_t *refcnt; > bool orphan; > @@ -326,6 +361,104 @@ struct coresight_ops { > }; > > #if IS_ENABLED(CONFIG_CORESIGHT) > + > +static inline u32 csdev_access_relaxed_read32(struct csdev_access *csa, > + u32 offset) > +{ > + if (likely(csa->io_mem)) > + return readl_relaxed(csa->base + offset); > + > + return csa->read(offset, true, false); > +} > + > +static inline u32 csdev_access_read32(struct csdev_access *csa, u32 offset) > +{ > + if (likely(csa->io_mem)) > + return readl(csa->base + offset); > + > + return csa->read(offset, false, false); > +} > + > +static inline void csdev_access_relaxed_write32(struct csdev_access *csa, > + u32 val, u32 offset) > +{ > + if (likely(csa->io_mem)) > + writel_relaxed(val, csa->base + offset); > + else > + csa->write(val, offset, true, false); > +} > + > +static inline void csdev_access_write32(struct csdev_access *csa, u32 val, u32 offset) > +{ > + if (likely(csa->io_mem)) > + writel(val, csa->base + offset); > + else > + csa->write(val, offset, false, false); > +} > + > +#ifdef CONFIG_64BIT > + > +static inline u64 csdev_access_relaxed_read64(struct csdev_access *csa, > + u32 offset) > +{ > + if (likely(csa->io_mem)) > + return readq_relaxed(csa->base + offset); > + > + return csa->read(offset, true, true); > +} > + > +static inline u64 csdev_access_read64(struct csdev_access *csa, u32 offset) > +{ > + if (likely(csa->io_mem)) > + return readq(csa->base + offset); > + > + return csa->read(offset, false, true); > +} > + > +static inline void csdev_access_relaxed_write64(struct csdev_access *csa, > + u64 val, u32 offset) > +{ > + if (likely(csa->io_mem)) > + writeq_relaxed(val, csa->base + offset); > + else > + csa->write(val, offset, true, true); > +} > + > +static inline void csdev_access_write64(struct csdev_access *csa, u64 val, u32 offset) > +{ > + if (likely(csa->io_mem)) > + writeq(val, csa->base + offset); > + else > + csa->write(val, offset, false, true); > +} > + > +#else /* !CONFIG_64BIT */ > + > +static inline u64 csdev_access_relaxed_read64(struct csdev_access *csa, > + u32 offset) Indentation > +{ > + WARN_ON(1); > + return 0; > +} > + > +static inline u64 csdev_access_read64(struct csdev_access *csa, u32 offset) > +{ > + WARN_ON(1); > + return 0; > +} > + > +static inline void csdev_access_relaxed_write64(struct csdev_access *csa, > + u64 val, u32 offset) > +{ > + WARN_ON(1); > +} > + > +static inline void csdev_access_write64(struct csdev_access *csa, u64 val, u32 offset) > +{ > + WARN_ON(1); > +} > +#endif /* CONFIG_64BIT */ > + > extern struct coresight_device * > coresight_register(struct coresight_desc *desc); > extern void coresight_unregister(struct coresight_device *csdev); > @@ -343,6 +476,20 @@ extern char *coresight_alloc_device_name(struct coresight_dev_list *devs, > struct device *dev); > > extern bool coresight_loses_context_with_cpu(struct device *dev); > + > +u32 coresight_relaxed_read32(struct coresight_device *csdev, u32 offset); > +u32 coresight_read32(struct coresight_device *csdev, u32 offset); > +void coresight_write32(struct coresight_device *csdev, u32 val, u32 offset); > +void coresight_relaxed_write32(struct coresight_device *csdev, > + u32 val, > + u32 offset); Stacking > +u64 coresight_relaxed_read64(struct coresight_device *csdev, u32 offset); > +u64 coresight_read64(struct coresight_device *csdev, u32 offset); > +void coresight_relaxed_write64(struct coresight_device *csdev, > + u64 val, u32 offset); > +void coresight_write64(struct coresight_device *csdev, u64 val, u32 offset); > + > + > #else > static inline struct coresight_device * > coresight_register(struct coresight_desc *desc) { return NULL; } > @@ -369,10 +516,55 @@ static inline bool coresight_loses_context_with_cpu(struct device *dev) > { > return false; > } > -#endif > + > +static inline u32 coresight_relaxed_read32(struct coresight_device *csdev, u32 offset) > +{ > + WARN_ON_ONCE(1); > + return 0; > +} > + > +static inline u32 coresight_read32(struct coresight_device *csdev, u32 offset) > +{ > + WARN_ON_ONCE(1); > + return 0; > +} > + > +static inline void coresight_write32(struct coresight_device *csdev, u32 val, u32 offset) > +{ > +} > + > +static inline void coresight_relaxed_write32(struct coresight_device *csdev, > + u32 val, u32 offset) > +{ > +} > + > +static inline u64 coresight_relaxed_read64(struct coresight_device *csdev, > + u32 offset) > +{ > + WARN_ON_ONCE(1); > + return 0; > +} > + > +static inline u64 coresight_read64(struct coresight_device *csdev, u32 offset) > +{ > + WARN_ON_ONCE(1); > + return 0; > +} > + > +static inline void coresight_relaxed_write64(struct coresight_device *csdev, > + u64 val, > + u32 offset) Stacking I did the changes while applying to my tree - please address if you end up re-spinning. > +{ > +} > + > +static inline void coresight_write64(struct coresight_device *csdev, u64 val, u32 offset) > +{ > +} > + > +#endif /* IS_ENABLED(CONFIG_CORESIGHT) */ > > extern int coresight_get_cpu(struct device *dev); > > struct coresight_platform_data *coresight_get_platform_data(struct device *dev); > > -#endif > +#endif /* _LINUX_COREISGHT_H */ > -- > 2.24.1 >