Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1613778

Re: [PATCH v5 4/9] coresight: refactor with function of_coresight_get_cpu

From Suzuki K Poulose <Suzuki.Poulose@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 4/9] coresight: refactor with function of_coresight_get_cpu
Date 2017-03-31 11:10 +0200
Message-ID <tr0Jd-2AS-77@gated-at.bofh.it> (permalink)
References <toYBQ-4DA-3@gated-at.bofh.it> <toYBQ-4DA-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 25/03/17 18:23, Leo Yan wrote:
> This is refactor to add function of_coresight_get_cpu(), so it's used to
> retrieve CPU id for coresight component. Finally can use it as a common
> function for multiple places.
>
> Suggested-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Leo Yan <leo.yan@linaro.org>

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> -		if (found)
> -			break;
> -	}
> -	of_node_put(dn);
> -
> -	/* Affinity to CPU0 if no cpu nodes are found */
> -	pdata->cpu = found ? cpu : 0;
> +	pdata->cpu = of_coresight_get_cpu(node);
>
>  	return pdata;
>  }
> diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> index 2a5982c..bf96678 100644
> --- a/include/linux/coresight.h
> +++ b/include/linux/coresight.h
> @@ -263,9 +263,11 @@ static inline int coresight_timeout(void __iomem *addr, u32 offset,
>  #endif
>
>  #ifdef CONFIG_OF
> +extern int of_coresight_get_cpu(struct device_node *node);
>  extern struct coresight_platform_data *of_get_coresight_platform_data(
>  				struct device *dev, struct device_node *node);
>  #else
> +static inline int of_coresight_get_cpu(struct device_node *node) { return 0; }
>  static inline struct coresight_platform_data *of_get_coresight_platform_data(
>  	struct device *dev, struct device_node *node) { return NULL; }
>  #endif
>

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v5 4/9] coresight: refactor with function  of_coresight_get_cpu Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2017-03-31 11:10 +0200

csiph-web