public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Christian Zigotzky <chzigotzky@xenosoft.de>,
	Frank Rowand <frowand.list@gmail.com>
Subject: Re: [PATCH] of: Fix cpu node iterator to not ignore disabled cpu nodes
Date: Thu, 01 Nov 2018 22:08:46 +1100	[thread overview]
Message-ID: <87o9b9dphd.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20181031144226.26747-1-robh@kernel.org>

Rob Herring <robh@kernel.org> writes:

> In most cases, nodes with 'status = "disabled";' are treated as if the
> node is not present though it is a common bug to forget to check that.
> However, cpu nodes are different in that "disabled" simply means offline
> and the OS can bring the CPU core online. Commit f1f207e43b8a ("of: Add
> cpu node iterator for_each_of_cpu_node()") followed the common behavior
> of ignoring disabled cpu nodes. This breaks some powerpc systems (at
> least NXP P50XX/e5500). Fix this by dropping the status check.
>
> Fixes: 651d44f9679c ("of: use for_each_of_cpu_node iterator")
> Fixes: f1f207e43b8a ("of: Add cpu node iterator for_each_of_cpu_node()")
> Reported-by: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Christian Zigotzky <chzigotzky@xenosoft.de>
> Cc: Frank Rowand <frowand.list@gmail.com>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  drivers/of/base.c | 2 --
>  1 file changed, 2 deletions(-)

This fixes my machine, thanks.

Tested-by: Michael Ellerman <mpe@ellerman.id.au>

It was actually originally reported to me by Christian, so also:

Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>


cheers

> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index cc62da278663..e47c5ce6cd58 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -776,8 +776,6 @@ struct device_node *of_get_next_cpu_node(struct device_node *prev)
>  		if (!(of_node_name_eq(next, "cpu") ||
>  		      (next->type && !of_node_cmp(next->type, "cpu"))))
>  			continue;
> -		if (!__of_device_is_available(next))
> -			continue;
>  		if (of_node_get(next))
>  			break;
>  	}
> -- 
> 2.19.1

  parent reply	other threads:[~2018-11-01 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 14:42 [PATCH] of: Fix cpu node iterator to not ignore disabled cpu nodes Rob Herring
2018-10-31 16:40 ` Christian Zigotzky
2018-11-01 11:08 ` Michael Ellerman [this message]
2018-11-01 12:45   ` Christian Zigotzky

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=87o9b9dphd.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=chzigotzky@xenosoft.de \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.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