From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B864C432C0 for ; Fri, 22 Nov 2019 11:23:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EEF5020672 for ; Fri, 22 Nov 2019 11:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574421828; bh=NNy9gPCO4JUqhtpquihz7LUYZZvWXZ2gaAYc6Wye+qw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=e6EqIe+mxk7RsfwqizfDwOrvKgswmWLgSEkMAxcYIBruXD+Pz95M1R0Ug3aq2WvU5 9L4Z4nh6SOolku3Eq7H7C2j8NkNuWjcEM7fynDKCFTq41LZuyTJCIQ/e39kA37zbsR A5C9SXxtS/5U8cY7kc0UkbkAqdt93Vi3wlCk9NlI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728899AbfKVKkd (ORCPT ); Fri, 22 Nov 2019 05:40:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:44496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728169AbfKVKkd (ORCPT ); Fri, 22 Nov 2019 05:40:33 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 101D720718; Fri, 22 Nov 2019 10:40:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574419232; bh=NNy9gPCO4JUqhtpquihz7LUYZZvWXZ2gaAYc6Wye+qw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ucu3LWK9x7xdISVKD74L0jxOQZ+C8XJhBL0x5JfGYxCf7CZFAjKQZUoPU8G57ykW6 DXi6fx+agHtdv0dQii4HvGj8p94RHuJw4AU466OZamDkJRzfVFE78xDJSnCIvSg4Nt skjlu7eYp2ztLoM9Wedl43ZpWo8JG+X1kz/BxmCw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rob Herring , Sasha Levin Subject: [PATCH 4.9 042/222] of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC Date: Fri, 22 Nov 2019 11:26:22 +0100 Message-Id: <20191122100850.205667085@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100830.874290814@linuxfoundation.org> References: <20191122100830.874290814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rob Herring [ Upstream commit f6707fd6241e483f6fea2caae82d876e422bb11a ] Cache nodes under the cpu node(s) is PowerMac specific according to the comment above, so make the code enforce that. Signed-off-by: Rob Herring Signed-off-by: Sasha Levin --- drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index f366af135d5b7..c66cdc4307fd7 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -2281,7 +2281,7 @@ struct device_node *of_find_next_cache_node(const struct device_node *np) /* OF on pmac has nodes instead of properties named "l2-cache" * beneath CPU nodes. */ - if (!strcmp(np->type, "cpu")) + if (IS_ENABLED(CONFIG_PPC_PMAC) && !strcmp(np->type, "cpu")) for_each_child_of_node(np, child) if (!strcmp(child->type, "cache")) return child; -- 2.20.1