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: 341337 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 58AE0140172 for ; Tue, 22 Apr 2014 23:36:03 +1000 (EST) Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 10B121400F9 for ; Tue, 22 Apr 2014 23:35:31 +1000 (EST) Received: by mail-ee0-f50.google.com with SMTP id c13so4590458eek.23 for ; Tue, 22 Apr 2014 06:35:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:subject:to:cc:in-reply-to:references :date:message-id; bh=WjRZoe7n6lBj/9OspSe/ZhgiKfqtCFV9MA57rZK06Zg=; b=cOpwPBN+A84FwqeYcv0ZPPTGws4gxBZCBVEDtvhhJllV4can7PMvN9rPdsYRbtoIRj t9D/QKtB98RGUfl6QqfLrujy66t/j1+s89zK+NSp1iGFDZLqtaV7wa8srTEnjAEcnw7w 4lZhz7tARDKuiEZIzCX8oZ06WwWqeL+tGQxnZOosQwQxvUV84ObufX+JQ+Wld0AeNo3x cYcBfhk0qdDgA7do8txAOVwau8Ijh2aDvXy3K9FP2j6+eWLUhAKdJ7nFs6zlVeMOU0cK qPRnqA0vJr2fjP94R0MMbtl541EhCGyIWDOauZH8L7fiXutIP0GX55+Oa/IJFy1Nx2Fc ziWA== X-Gm-Message-State: ALoCoQkGkbriCo/i8vFgtkNnc3OjEIcX6x0U1vwH7BEm8qmo7JK1D5gBiFUqfr3rhYbzdh0dbCcg 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) 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 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> Cc: Mark Rutland , "devicetree@vger.kernel.org" , patches@linaro.org, Lee Jones , "linux-kernel@vger.kernel.org" , Rob Herring , "linuxppc-dev@lists.ozlabs.org" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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;