Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp692969imd; Thu, 1 Nov 2018 04:10:48 -0700 (PDT) X-Google-Smtp-Source: AJdET5c8Td1ktpsbASVO6+dN45Ov6jG8b68L7zhs97101Mgnmy+S/CouAaZmDZG3QPACycIPwKJ7 X-Received: by 2002:a62:1c0f:: with SMTP id c15-v6mr7310271pfc.14.1541070648872; Thu, 01 Nov 2018 04:10:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541070648; cv=none; d=google.com; s=arc-20160816; b=q/FGgU4TM5lrVORvQBgqQy6T6fwPLaem0owZUzmFAIYZ4da2aKimEMZKVCJyyu6Cl7 mFsuSCcDLkC4KSmnCjuwHQOlYej1RgjC4PL6lk88DX6inSuGEYfGewRRaQkijDK+dT9G Z8OQGrmmBBJonh2XrfrwMGCuB7sZiQsN79XB90IUKWH1Bs3KkfsANSSeIUhejGWi21FJ cT1Cx4Se4iEzF5NkWQqrGC7s6tCeLnQMQj91AyI+1BRhj7UcK+TsdGhaNOJ4N7n67LZX bykSsSo7S8My7YOQdvRhzLRDifvtSKQEzQMyBsZxMsMJTm3LHFGRiXPm7yOYwZ7NjaOK xyww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=jscB8YANN32DnraPJYk06YGpF1bDgwjg/wickgCPtic=; b=C0Qvd/h9wbAf+oplDZ9ra0adjdF23PE7toen6dOf1pj3cpR8vYzW0OKLEV5JkGub7+ 8RgauNG8ySejmSagFKI4FY60mjqgbMAMLBWpi0G7mDSwb44KI7AqSDU5G5MNwSRpum94 XvEtCqBpTJDmUehsm9E7IyAoQLeyUfrx+d6M3L1N+y8nNijMXWYzJv5C7qJyeeOU0q6E UFYSbRzMqXhv+wjlbSZ/cqrJbM582wxBIRbUeADAP1x0MNpkdlCXJRxRDSkBubFh4nbn jFydXjWSsmQqubavNjXVyeP+yNVwgFRqHwfb3SOfForun1bdcOdBDTEkcui1M+aZFA/b 1C/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si8560020ple.148.2018.11.01.04.10.33; Thu, 01 Nov 2018 04:10:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727979AbeKAULS (ORCPT + 99 others); Thu, 1 Nov 2018 16:11:18 -0400 Received: from ozlabs.org ([203.11.71.1]:58931 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbeKAULS (ORCPT ); Thu, 1 Nov 2018 16:11:18 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42m2Wg2yDmzB4N0; Thu, 1 Nov 2018 22:08:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Rob Herring Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Zigotzky , Frank Rowand Subject: Re: [PATCH] of: Fix cpu node iterator to not ignore disabled cpu nodes In-Reply-To: <20181031144226.26747-1-robh@kernel.org> References: <20181031144226.26747-1-robh@kernel.org> Date: Thu, 01 Nov 2018 22:08:46 +1100 Message-ID: <87o9b9dphd.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rob Herring 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 > Cc: Christian Zigotzky > Cc: Frank Rowand > Signed-off-by: Rob Herring > --- > drivers/of/base.c | 2 -- > 1 file changed, 2 deletions(-) This fixes my machine, thanks. Tested-by: Michael Ellerman It was actually originally reported to me by Christian, so also: Reported-by: Christian Zigotzky 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