Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp791544imd; Thu, 1 Nov 2018 05:47:02 -0700 (PDT) X-Google-Smtp-Source: AJdET5c3ZlboL1tTPaYi7p+ZoBLv8OyrdujYmCGVhBtrbIewpBUkSKOlKOuZ7eBqH3x4LvGH1ZhU X-Received: by 2002:a63:de05:: with SMTP id f5-v6mr6964769pgg.292.1541076422038; Thu, 01 Nov 2018 05:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541076422; cv=none; d=google.com; s=arc-20160816; b=cVt87E1DMtDnM11t/I19Q5xzNE3nGlRLwttgLzU1bgcwwdHdwHn2G9ZMWTns7aC6/Q G92h66X8miI2etkU3K03EE5LB9E4iYwh7HAXYgDQP/9/mFY5Vx1/kMbbHFm1kCBffR90 Qrap/incX3rWKZeSKHmB0Ek5GRQMLhV3R+NfhJyQoXmSrd3xHAT3kXpeLKlKd1ZEwDDs AQ2snmxgJVROiVar+9UQRnPcnnkBRnJz9u4bxK95k2n0c/HNceLFpj68YZSvcY0GF3h/ 5C6hVY9UJtumLzZLuceexmVqSKGtaVfdRIf3eUVZwdLlv/ln+3NWY9al2DA3UQLzepbc /KFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=h8T47b5XVCRlDscN1+vTd3FKbVRtSjeCHHTDSyHbxT8=; b=vszjAm6NrRN3iDwH071pEilHJ5AEV/Zcl6xSjdS3C4k7IduDi3T4DdqIdhXre5jbyg 9IZ8Ly7HXYrfR2YcW73j2hksR0QyTmZrpIBT+BhlUQDnkPCj5OXUMbiiQFOI+nHL3UiL jGMeCqDpF9GKpr+kwNY77RWXAJ2TKkK++BBwlRyviE0NqsabROT1YxLH/A8PrMhDZa1O Fyh5TQLm9RZ3dFl0tSPyNhBjoGYYSUjoUYNYJJg1gPWsonTzDfJfoWU1pnDetM0h+mlc q3ZFTM1eFFdvlbMnstUsXIAYibmx6A6US+6eFxXsly++N0I+twy5e475/NviprMoL15S bO2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@xenosoft.de header.s=strato-dkim-0002 header.b=aSBKFXTh; 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 r22-v6si35191526pfr.18.2018.11.01.05.46.44; Thu, 01 Nov 2018 05:47:02 -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; dkim=fail header.i=@xenosoft.de header.s=strato-dkim-0002 header.b=aSBKFXTh; 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 S1728181AbeKAVs6 (ORCPT + 99 others); Thu, 1 Nov 2018 17:48:58 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.22]:27813 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727644AbeKAVs5 (ORCPT ); Thu, 1 Nov 2018 17:48:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1541076363; s=strato-dkim-0002; d=xenosoft.de; h=In-Reply-To:Date:Message-ID:From:References:Cc:To:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=h8T47b5XVCRlDscN1+vTd3FKbVRtSjeCHHTDSyHbxT8=; b=aSBKFXThF0eECY8b2lmE0gs5ERbWkVDK1XhOeAT1nCOy7hU77d/9ks+Z9CeQ3ZK/Cd Jggy7KC2g6/yNCtpisZSFMWrWPshvgp8EWnVy1EiQIohVsaWdmlzgLThbLh6zUrVWw2Q w/cAnCVRCStySWIXKdnzWm7uMRjt0D5SiQzNOpkJaZQ/yojy+qVRMOMFYZodcnmo6xY+ CzLbgO8chgGWnaay9TN1J3EgVhA3pDRSkcRZ+Mw0Vo/KtI71ST+UwGFxXpQ2dkKfp0eW H5AzbRreRK+SSHKA7iiPbDrCGR1Z5qUh2eQIs6hiYhs30JqiACaWP8AS2Zrs6WQ6G4cg khOg== X-RZG-AUTH: ":L2QefEenb+UdBJSdRCXu93KJ1bmSGnhMdmOod1DhGM4l4Hio94KKxRySfLxnHfJ+Dkjp5G5MdirQj0WG7CkK3TmjrJUcWHjjnEOaMwSIQqdV" X-RZG-CLASS-ID: mo00 Received: from [IPv6:2a02:8109:a400:162c:5c96:3539:c69c:189] by smtp.strato.de (RZmta 44.3 AUTH) with ESMTPSA id Z0624cuA1CjmNcK (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 1 Nov 2018 13:45:48 +0100 (CET) Subject: Re: [PATCH] of: Fix cpu node iterator to not ignore disabled cpu nodes To: Michael Ellerman , Rob Herring Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Frank Rowand References: <20181031144226.26747-1-robh@kernel.org> <87o9b9dphd.fsf@concordia.ellerman.id.au> From: Christian Zigotzky Message-ID: <1055f6ae-a25b-117a-e9e4-44dd4f978803@xenosoft.de> Date: Thu, 1 Nov 2018 13:45:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <87o9b9dphd.fsf@concordia.ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: de-DE Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01 November 2018 at 12:08PM, Michael Ellerman wrote: > 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 Hi All, Many thanks for your help! This patch fixes my P5020 board (dual core) and my virtual QEMU ppce500 machine (quad core). Have a nice day! Cheers, Christian