[linux-yocto] [PATCH 09/35] Checking in EDAC support for AXM55xx preempt_rt

Bruce Ashfield bruce.ashfield at windriver.com
Sun Nov 16 20:40:14 PST 2014


On 2014-11-13, 12:19 PM, Daniel Dragomir wrote:
> From: SangeethaRao <sangeetha.rao at lsi.com>
>

Again, the short log isn't correct here.

> Signed-off-by: SangeethaRao <sangeetha.rao at lsi.com>
> ---
>   drivers/edac/axxia_edac.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/edac/axxia_edac.c b/drivers/edac/axxia_edac.c
> index ee62e3e..1facb09 100644
> --- a/drivers/edac/axxia_edac.c
> +++ b/drivers/edac/axxia_edac.c
> @@ -69,7 +69,7 @@ void log_cpumerrsr(void *edac)
>   		/* increment correctable error counts */
>   		for (i = 0; i < count0+count1; i++) {
>   			edac_device_handle_ce(edac_dev, 0,
> -				smp_processor_id(), edac_dev->ctl_name);
> +				raw_smp_processor_id(), edac_dev->ctl_name);

Considering that this is part of a single series, these will be applied
to all branches, including non-preempt-rt. So preempt-rt shouldn't be
mentioned in the log.

Also, the comment for raw_smp_processor_id() in the code is:

  * NOTE: raw_smp_processor_id() is for internal use only
  * (smp_processor_id() is the preferred variant), but in rare
  * instances it might also be used to turn off false positives
  * (i.e. smp_processor_id() use that the debugging code reports but
  * which use for some reason is legal). Don't use this to hack around
  * the warning message, as your code might not work under PREEMPT.

How do you respond to that ? This really needs to be an internal usage
and not working around another locking issue.

How/why exactly is this conversion needed?

Bruce

>   		}
>
>   		/* Clear the valid bit */
> @@ -113,7 +113,7 @@ void log_l2merrsr(void *edac)
>   		/* increment correctable error counts */
>   		for (i = 0; i < count0+count1; i++) {
>   			edac_device_handle_ce(edac_dev, 0,
> -				smp_processor_id()/CORES_PER_CLUSTER,
> +				raw_smp_processor_id()/CORES_PER_CLUSTER,
>   				edac_dev->ctl_name);
>   		}
>
> @@ -141,7 +141,7 @@ static void lsi_l2_error_check(struct edac_device_ctl_info *edac_dev)
>
>   	for (i = 0; i < nr_cluster_ids; i++) {
>   		/* No need to run on local cluster. */
> -		if (i == (smp_processor_id() / CORES_PER_CLUSTER))
> +		if (i == (raw_smp_processor_id() / CORES_PER_CLUSTER))
>   			continue;
>   		/*
>   		 * Have some core in each cluster execute this,
>



More information about the linux-yocto mailing list