mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: James Clark <james.clark@arm.com>, coresight@lists.linaro.org
Cc: Mike Leach <mike.leach@linaro.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH 8/8] coresight: Remove unused stubs
Date: Tue, 9 Jan 2024 10:38:36 +0000	[thread overview]
Message-ID: <01c15dbe-57d3-4aa1-9d68-81a01ec2a3a7@arm.com> (raw)
In-Reply-To: <20231212155407.1429121-9-james.clark@arm.com>

Hi James

On 12/12/2023 15:54, James Clark wrote:
> These are a bit annoying to keep up to date when the function signatures
> change. But if CONFIG_CORESIGHT isn't enabled, then they're not used
> anyway so just delete them.
> 

Have you tried building an arm32 kernel with this change in ? Looks like
arch/arm/kernel/hw_breakpoint.c includes linux/coresight.h and a build 
with CONFIG_CORSIGHT=n might break the build ? So is 
drivers/accel/habanalabs/common/habanalabs.h. Now, I am not sure if they 
really need it (even if they do, we may be able to remove the dependency 
on the header file.

Suzuki

> Signed-off-by: James Clark <james.clark@arm.com>
> ---
>   include/linux/coresight.h | 79 ---------------------------------------
>   1 file changed, 79 deletions(-)
> 
> diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> index 4400d554a16b..c5be46d7f85c 100644
> --- a/include/linux/coresight.h
> +++ b/include/linux/coresight.h
> @@ -391,8 +391,6 @@ struct coresight_ops {
>   	const struct coresight_ops_helper *helper_ops;
>   };
>   
> -#if IS_ENABLED(CONFIG_CORESIGHT)
> -
>   static inline u32 csdev_access_relaxed_read32(struct csdev_access *csa,
>   					      u32 offset)
>   {
> @@ -611,83 +609,6 @@ 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; }
> -static inline void coresight_unregister(struct coresight_device *csdev) {}
> -static inline int
> -coresight_enable_sysfs(struct coresight_device *csdev) { return -ENOSYS; }
> -static inline void coresight_disable_sysfs(struct coresight_device *csdev) {}
> -
> -static inline int coresight_timeout(struct csdev_access *csa, u32 offset,
> -				    int position, int value)
> -{
> -	return 1;
> -}
> -
> -static inline int coresight_claim_device_unlocked(struct coresight_device *csdev)
> -{
> -	return -EINVAL;
> -}
> -
> -static inline int coresight_claim_device(struct coresight_device *csdev)
> -{
> -	return -EINVAL;
> -}
> -
> -static inline void coresight_disclaim_device(struct coresight_device *csdev) {}
> -static inline void coresight_disclaim_device_unlocked(struct coresight_device *csdev) {}
> -
> -static inline bool coresight_loses_context_with_cpu(struct device *dev)
> -{
> -	return false;
> -}
> -
> -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)
> -{
> -}
> -
> -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);


  reply	other threads:[~2024-01-09 10:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 15:53 [PATCH 0/8] coresight: Separate sysfs and Perf usage and some other cleanups James Clark
2023-12-12 15:53 ` [PATCH 1/8] coresight: Fix issue where a source device's helpers aren't disabled James Clark
2023-12-12 17:44   ` Suzuki K Poulose
2023-12-13 13:54     ` James Clark
2023-12-13 16:28       ` Suzuki K Poulose
2023-12-12 15:53 ` [PATCH 2/8] coresight: Make language around "activated" sinks consistent James Clark
2024-01-08 11:21   ` Suzuki K Poulose
2024-01-24 11:10     ` James Clark
2023-12-12 15:54 ` [PATCH 3/8] coresight: Remove ops callback checks James Clark
2023-12-12 15:54 ` [PATCH 4/8] coresight: Move mode to struct coresight_device James Clark
2024-01-08 11:32   ` Suzuki K Poulose
2023-12-12 15:54 ` [PATCH 5/8] coresight: Remove the 'enable' field James Clark
2024-01-08 14:42   ` Suzuki K Poulose
2024-01-19  9:59     ` James Clark
2024-01-19 10:07       ` Suzuki K Poulose
2023-12-12 15:54 ` [PATCH 6/8] coresight: Move all sysfs code to sysfs file James Clark
2024-01-09 10:22   ` Suzuki K Poulose
2023-12-12 15:54 ` [PATCH 7/8] coresight: Remove atomic type from refcnt James Clark
2023-12-12 15:54 ` [PATCH 8/8] coresight: Remove unused stubs James Clark
2024-01-09 10:38   ` Suzuki K Poulose [this message]
2024-01-09 16:48     ` James Clark
2024-01-10 14:00       ` Suzuki K Poulose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01c15dbe-57d3-4aa1-9d68-81a01ec2a3a7@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=coresight@lists.linaro.org \
    --cc=james.clark@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mike.leach@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®