From patchwork Mon Aug 29 17:36:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 74922 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1744472qga; Mon, 29 Aug 2016 10:37:12 -0700 (PDT) X-Received: by 10.98.152.6 with SMTP id q6mr34610718pfd.86.1472492232612; Mon, 29 Aug 2016 10:37:12 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x87si40084618pfa.79.2016.08.29.10.37.12; Mon, 29 Aug 2016 10:37:12 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751592AbcH2RhL (ORCPT + 7 others); Mon, 29 Aug 2016 13:37:11 -0400 Received: from mail.kernel.org ([198.145.29.136]:33634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378AbcH2RhK (ORCPT ); Mon, 29 Aug 2016 13:37:10 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DCD84201EF; Mon, 29 Aug 2016 17:37:08 +0000 (UTC) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3D3C820212; Mon, 29 Aug 2016 17:37:06 +0000 (UTC) Received: by mail-lf0-f49.google.com with SMTP id g62so105892951lfe.3; Mon, 29 Aug 2016 10:37:06 -0700 (PDT) X-Gm-Message-State: AE9vXwMJfu/xo56P3yw07WYilNzuNxICAG/CfJZv8n8Xys6BE/Y0YDIsm1W4M1KHZKYZAs9QLP7Pbv1HSiPQPw== X-Received: by 10.25.16.88 with SMTP id f85mr5270524lfi.21.1472492223771; Mon, 29 Aug 2016 10:37:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.162.2 with HTTP; Mon, 29 Aug 2016 10:36:41 -0700 (PDT) In-Reply-To: <20160816150056.GD18731@ak-desktop.emea.nsn-net.net> References: <20160816150056.GD18731@ak-desktop.emea.nsn-net.net> From: Rob Herring Date: Mon, 29 Aug 2016 12:36:41 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [BISECTED REGRESSION] v4.8-rc: DT/OCTEON driver probing broken To: Aaro Koskinen Cc: Kefeng Wang , "devicetree@vger.kernel.org" , Linux-MIPS , Ralf Baechle , David Daney , "linux-kernel@vger.kernel.org" , Thorsten Leemhuis X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, Aug 16, 2016 at 10:00 AM, Aaro Koskinen wrote: > Hi, > > Commit 44a7185c2ae6 ("of/platform: Add common method to populate default > bus") added new arch_initcall of_platform_default_populate_init() that > will be called before device_initcall octeon_publish_devices(). Now the > of_platform_bus_probe() called in octeon_publish_devices() is apparently > doing nothing: > > [ 52.331353] calling octeon_publish_devices+0x0/0x14 @ 1 > [ 52.331358] OF: of_platform_bus_probe() > [ 52.331362] OF: starting at: / > [ 52.331378] OF: of_platform_bus_create() - skipping /soc@0, already populated > [ 52.331394] initcall octeon_publish_devices+0x0/0x14 returned 0 after 29 usecs > > This also means that USB etc. won't get probed. > > Any ideas what would be the proper fix for this? Changing > octeon_publish_devices() to arch_initcall seems to work but that may be > a bit hackish... Also, there might be also other MIPS boards affected > (arch/mips/netlogic/xlp/dt.c, arch/mips/mti-malta/malta-dt.c). Can you try reverting this hunk. I don't think it should be needed and it is preventing /soc@0 children from being probed. If things still don't work, then it should purely be a probe ordering problem. I have some better fixes in mind, but not for 4.8. So if this doesn't work, then the same fix as PPC is fine. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 16e8daf..c559ef8 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -363,6 +363,12 @@ static int of_platform_bus_create(struct device_node *bus, return 0; } + if (of_node_check_flag(bus, OF_POPULATED_BUS)) { + pr_debug("%s() - skipping %s, already populated\n", + __func__, bus->full_name); + return 0; + } + auxdata = of_dev_lookup(lookup, bus); if (auxdata) { bus_id = auxdata->name;