From patchwork Wed Aug 29 19:04:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 145466 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1015921ljw; Wed, 29 Aug 2018 12:04:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYTifzEKIJVtSCorrtoiNRzyulDDmaZDlawAWHPAp7Sr6h3Wk+EzXUR1DKpa8yDu0tEE48E X-Received: by 2002:a17:902:f098:: with SMTP id go24mr7266291plb.183.1535569443928; Wed, 29 Aug 2018 12:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535569443; cv=none; d=google.com; s=arc-20160816; b=LYVpFbWv8qcuYc+CAKRmMYPJzjLwgINiyovqeotDbYJT+p8hIDdK87MKze2AsqZHGB 6czz0z7K4iHue8woYLHE2/P5gb0lqBDIzps8kWAi6rtVvCvN3cFUUPtfvTSZvDsPPM0k gkM/0iuwaeBBhmUweWUAKGvpUT03C+lKkcBxLfTMuORL6YoXe7A5YxlH1nx/bpMokiQ6 POySBIYQi3kqxZ9FF2hSADKTtoUWngovkYKfAy66GucquE21a0zC26Hpe/wYZQQlTik+ WHrpt5VJCiROHgh74JJIRinrOLfzae000Q4hM7Ts6H3v9nPalL/UQt2ngnRlvtE668nH FEcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fHkN3TqHBib3toXib2eGl+qoStY0IuzSkewJYyGXkFs=; b=gfUuChakXqYuStGKglQvS78tnZo26uIlNrze+PKUz0osiqvQHYffhw8m3PR1W+eqNH ZeGqTTHmntYHS3lXQTeb2WrefLraiuLQLEKea7ecfoD+qCR3+TqCLo8m5KU20HUw+DoL 7vsVGybRx2FSJgJQv/oIDFxV17XexMk9cYMNtG1GSx9/f3FSw3AKbOyREfC0LcgbPtRK CBgbAshDCVupoE7jtO9ky25e8nEqtnJNOHNZZ5RZWPJ8gVzUAc8HVmK3K5bYhHPXodG7 yzY7UvLy1vmI6zcX0R3XadOatT7qUM1PlGihQjrlxGH+MawY0g2uFA+8K1WHJauV1QA4 LEVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si4318019ple.241.2018.08.29.12.04.03; Wed, 29 Aug 2018 12:04:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727590AbeH2XCR (ORCPT + 6 others); Wed, 29 Aug 2018 19:02:17 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:37130 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726633AbeH2XCR (ORCPT ); Wed, 29 Aug 2018 19:02:17 -0400 Received: by mail-oi0-f67.google.com with SMTP id p84-v6so11094351oic.4; Wed, 29 Aug 2018 12:04:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fHkN3TqHBib3toXib2eGl+qoStY0IuzSkewJYyGXkFs=; b=dspjeeq8i/7U3sYAQ9SGg1CChvx4Tb5KqFZVdl09T9bE2IVaXNJvEqZy9/cbh9lGBi tcfJHRnsSwomfXz+nRAyzVUyH0w2wB/ogUjqqspmqrAtmPMQGl/0NxMM5J+1g0wheuGs i3eHKO/qSWVguDFO22nJAbUccml/sWlP/NQJdSoZHGV6S4HiEQG111F6Ae71ciFx0GW6 GogkqJ69Jcms4MS2xD6NYKquxCWu4qyGlojuBMthgwVrFpTy1q/mHfPRqGX6+EwmUgOv LCqdxdLJ/4YSYFo34sw9TZvvbZXb2ZKOXmbL+ffObMY1A8InXvL8QgRd5uhS4heTrkTw hufA== X-Gm-Message-State: APzg51Cy05m1pwNhv88zf17o3izJK2aMo5z5JJtX9oGPE1kG1Mv4e+dZ ddRNE3KGgcEzSX/0vTmDTw== X-Received: by 2002:aca:c257:: with SMTP id s84-v6mr4241744oif.104.1535569442095; Wed, 29 Aug 2018 12:04:02 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id s133-v6sm6004326oie.4.2018.08.29.12.04.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Aug 2018 12:04:01 -0700 (PDT) From: Rob Herring To: Frank Rowand , devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Subject: [PATCH] of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC Date: Wed, 29 Aug 2018 14:04:00 -0500 Message-Id: <20180829190400.23146-1-robh@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/of/base.c b/drivers/of/base.c index 466e3c8582f0..cadcb470198a 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1963,7 +1963,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;