From patchwork Tue Apr 22 13:35:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 28818 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 73E5C203AC for ; Tue, 22 Apr 2014 13:35:28 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j7sf20996312qaq.6 for ; Tue, 22 Apr 2014 06:35:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:sender:from:subject:to :cc:in-reply-to:references:date:message-id:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=WjRZoe7n6lBj/9OspSe/ZhgiKfqtCFV9MA57rZK06Zg=; b=VrMlf2EkI2P+OzoJuOPLsVKv6MEI5JUJPveVSkL24DGKr8S5E9upJ/cruyaiqVeSLj M27CTdlC7O7UsnK35RFqsRkcIq1BGPOv79+CcvKk/weckHIVWLLQNO0XY6W4HuGjXuIr pYJ9mgo6Yhly2wDmqzh+66sOsugqCQV5XqVHDDuP60cLBTZbOaVNQ+3l6tRnw7jJ43Gs RrFP1D0niguEi2QnxswJXYiFn516LvHnYIeUzL7DUHgPQv3kvbuX/99cDc9D9LYh/Wgd +XziVOF1AGvvu2xI1Ihk0A52oirldcFoUqBVsXUA6jYc3z5HXZJOqSDEUs3X49AsiYtP ICUA== X-Gm-Message-State: ALoCoQlkBcuSEnBC8A0+8k4ycihVikAH2WVDIhMUj3xKK3TeTjVUDkunoEpseW0qaq6oBAGXfBEt X-Received: by 10.58.248.99 with SMTP id yl3mr24363383vec.9.1398173728167; Tue, 22 Apr 2014 06:35:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.108.72 with SMTP id i66ls82444qgf.78.gmail; Tue, 22 Apr 2014 06:35:27 -0700 (PDT) X-Received: by 10.52.128.84 with SMTP id nm20mr86980vdb.63.1398173727906; Tue, 22 Apr 2014 06:35:27 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id u1si6900531vcs.86.2014.04.22.06.35.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Apr 2014 06:35:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ik5so2671349vcb.28 for ; Tue, 22 Apr 2014 06:35:27 -0700 (PDT) X-Received: by 10.58.243.39 with SMTP id wv7mr102524vec.51.1398173727815; Tue, 22 Apr 2014 06:35:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp25197vcb; Tue, 22 Apr 2014 06:35:27 -0700 (PDT) X-Received: by 10.14.69.201 with SMTP id n49mr2351952eed.106.1398173726428; Tue, 22 Apr 2014 06:35:26 -0700 (PDT) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by mx.google.com with ESMTPS id u49si59742490eef.322.2014.04.22.06.35.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Apr 2014 06:35:26 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.53 is neither permitted nor denied by best guess record for domain of glikely@secretlab.ca) client-ip=74.125.83.53; Received: by mail-ee0-f53.google.com with SMTP id b57so4658821eek.12 for ; Tue, 22 Apr 2014 06:35:25 -0700 (PDT) X-Received: by 10.14.5.135 with SMTP id 7mr9554675eel.86.1398173725839; Tue, 22 Apr 2014 06:35:25 -0700 (PDT) Received: from trevor.secretlab.ca (host31-50-108-136.range31-50.btcentralplus.com. [31.50.108.136]) by mx.google.com with ESMTPSA id q49sm113143377eem.34.2014.04.22.06.35.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Apr 2014 06:35:24 -0700 (PDT) Sender: Grant Likely Received: by trevor.secretlab.ca (Postfix, from userid 1000) id E7A0BC40754; Tue, 22 Apr 2014 15:35:15 +0200 (CEST) From: Grant Likely Subject: Re: [PATCH 3/3] of: Handle memory@0 node on PPC32 only To: Leif Lindholm , Geert Uytterhoeven Cc: "linux-kernel@vger.kernel.org" , patches@linaro.org, "linuxppc-dev@lists.ozlabs.org" , Mark Rutland , "devicetree@vger.kernel.org" , Rob Herring , Lee Jones In-Reply-To: <20140418125924.GF5904@bivouac.eciton.net> References: <1397756521-29387-1-git-send-email-leif.lindholm@linaro.org> <1397756521-29387-4-git-send-email-leif.lindholm@linaro.org> <20140418125924.GF5904@bivouac.eciton.net> Date: Tue, 22 Apr 2014 14:35:15 +0100 Message-Id: <20140422133515.E7A0BC40754@trevor.secretlab.ca> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grant.likely@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On Fri, 18 Apr 2014 13:59:24 +0100, Leif Lindholm wrote: > Hi Geert, > > On Fri, Apr 18, 2014 at 10:04:15AM +0200, Geert Uytterhoeven wrote: > > On Thu, Apr 17, 2014 at 7:42 PM, Leif Lindholm wrote: > > > In order to deal with an firmware bug on a specific ppc32 platform > > > (longtrail), early_init_dt_scan_memory() looks for a node called > > > memory@0 on all platforms. Restrict this quirk to ppc32 kernels only. > > > > This breaks backwards compatibilty with old DTSes (at least on ARM/MIPS, > > where you added the missing property in patches 1 and 2 of the series)? > > As Rob said in response to 0/3, the MIPSs would likely not be affected, > since they embed the DT. > > > For the Longtrail, I don't care much anymore, as mine died in 2004. > > AFAIK, there have never been many users anyway. > > There are still a few mentions of it under arch/powerpc/, so I wouldn't > want to be the one to kill it off... > > How about the below v2 3/3 to address the ARM platform? The problem with this approach is that selecting one board that needs it automatically makes it active for all boards. It would need to be something more like the following: With a list of compatible properties for affected boards. g. diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 399e242e1a42..55d65b2b4c74 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -887,12 +887,10 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname, /* We are scanning "memory" nodes only */ if (type == NULL) { - /* - * The longtrail doesn't have a device_type on the - * /memory node, so look for the node called /memory@0. - */ if (depth != 1 || strcmp(uname, "memory@0") != 0) return 0; + if (!of_flat_dt_match(dt_root, memory_quirk_list)) + return 0; } else if (strcmp(type, "memory") != 0) return 0;