[PATCH v17 02/10] coresight: Move CS_LOCK/CS_UNLOCK to linux/coresight.h

Suzuki K Poulose suzuki.poulose at arm.com
Fri Nov 13 02:25:55 PST 2026


On 13/11/2026 02:49, Songwei Chai wrote:
> CORESIGHT_LAR and the CS_LOCK()/CS_UNLOCK() helpers implement the
> generic ARM CoreSight Software Lock Access Register sequence, which
> is also present on non-CoreSight-labelled components that follow the
> same architecture (e.g. the Qualcomm TGU). Keeping them private to
> coresight-priv.h forces such drivers to duplicate the exact same
> definitions instead of reusing them.
> 
> Move CORESIGHT_LAR, CS_LOCK() and CS_UNLOCK() into the public
> include/linux/coresight.h so they can be shared outside of
> drivers/hwtracing/coresight/ as well.
> 
> Suggested-by: Suzuki K Poulose <suzuki.poulose at arm.com>
> Signed-off-by: Songwei Chai <songwei.chai at oss.qualcomm.com>
> ---
>   drivers/hwtracing/coresight/coresight-priv.h | 19 -------------------
>   include/linux/coresight.h                    | 19 +++++++++++++++++++
>   2 files changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h
> index dddac946659f..0d3f6229b282 100644
> --- a/drivers/hwtracing/coresight/coresight-priv.h
> +++ b/drivers/hwtracing/coresight/coresight-priv.h
> @@ -23,7 +23,6 @@ extern const struct device_type coresight_dev_type[];
>   #define CORESIGHT_ITCTRL	0xf00
>   #define CORESIGHT_CLAIMSET	0xfa0
>   #define CORESIGHT_CLAIMCLR	0xfa4
> -#define CORESIGHT_LAR		0xfb0
>   #define CORESIGHT_LSR		0xfb4
>   #define CORESIGHT_DEVARCH	0xfbc
>   #define CORESIGHT_AUTHSTATUS	0xfb8

Move all of these register defs above to linux/coresight.h. We can keep
them in a central place, in linux/coresight.h and drop patch 3

Suzuki





More information about the linux-arm-kernel mailing list