Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4197436ybl; Tue, 20 Aug 2019 08:20:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhU28mOHhNOIB1e/2Pn7Upxn0hMk75xaa8Ilc8zgfT4UW8sljg/EdgvC70CgHaPFFG9QNN X-Received: by 2002:a17:902:166:: with SMTP id 93mr29218211plb.195.1566314410957; Tue, 20 Aug 2019 08:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566314410; cv=none; d=google.com; s=arc-20160816; b=bQIaOllltEPaXjgF30zBT3coTcY4Dr9DsHEkMv1ZQNR2tV8TRbmXk6hLJhhlDLkXxQ 5TSQcDOX2LhUoJtBfgTZ3OnXc1JkZJnGTBBHurxF0z/T3pmuItNqK0JbPO4WK09THHmH xI+a66kxqFLfAvhsZJL7fWpzXGMJqg1VTlT/NKltZyQIuF5TmG2Dy/txFf6B/m1RTR7R 0+TspaX6OInrXnp2lCQrN1jIdr1fKf/cBIZlsRkJs1gw/0Tbr18455X4Qei/ngd0Ef75 OfGB2KGx1Edl/rZt1+GqmCQRAfl9OReEGxqmZ7/o6gQatDM5oOPRlxGes8AQ59CO+XaP q16w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XWC8SPo1omfeTvqiLjLgSLOqdldbFiFWQZFJHgguGGQ=; b=gveLzaBz/EO4GNDoxC0aAXpAVcCH3gkEwLy+78p7w0QIah07nXYm5gYFePucA74Kzc Euzf8LF1VJRyd5gvL47IFpp79lKRGGaYZW9nVZp+DYuv15RGEgoYYGusGUPGxo116Co9 5bj0CG6F1fB2dwnmhCfjN9bUzvdWMOqVYDWco0zE2XEVZlgupGwftmI/xdnG/QkDzQQW 3NOVm6C4nmRrVQJgsWw0AmnSyoPhu6bXlmONVdWaCYBhP+9UCv5RdiNULZZpLKCiOXce ksOnrQP20gxTitDvUyIE3Iy2kAf3isktrlXqbI00lrDSDLMydQC8S8RqRWUVR886kGDr yxiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jje+bS2Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 g3si12361645pgo.241.2019.08.20.08.19.55; Tue, 20 Aug 2019 08:20:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jje+bS2Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730319AbfHTPS4 (ORCPT + 99 others); Tue, 20 Aug 2019 11:18:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:57340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729137AbfHTPSz (ORCPT ); Tue, 20 Aug 2019 11:18:55 -0400 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 291B822DD6; Tue, 20 Aug 2019 15:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566314334; bh=4g2+aX3eD3+4CJWSIyuirqp/mSdK6BbK4d0vGYiQL8Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jje+bS2QRZhlNrEMcmQpztZthSiK/BSOgxTaupyUDC+ZiTGcIUrG5cubMWCYgal75 ffqLLHv31yuz//Q/cTmfwCSzmP9NelQ58qQ2lTRYSq617kHwBZ64w1k5UYIIHXkVef fcxY70lDBKvx0czPwITE5ZAfiSjKYpGwdLqKrSAI= Received: by mail-qt1-f182.google.com with SMTP id q4so6447804qtp.1; Tue, 20 Aug 2019 08:18:54 -0700 (PDT) X-Gm-Message-State: APjAAAV0vDJH0Zu0npL+OXoxSW00tLdAnQNbbATy7WDJT/GGdl9qzpz2 cNqI8+jsfmhn4BKBtVhrwv37iC8mDihADnDHGg== X-Received: by 2002:ac8:368a:: with SMTP id a10mr26470061qtc.143.1566314333309; Tue, 20 Aug 2019 08:18:53 -0700 (PDT) MIME-Version: 1.0 References: <20190806192654.138605-1-saravanak@google.com> <20190806192654.138605-2-saravanak@google.com> In-Reply-To: From: Rob Herring Date: Tue, 20 Aug 2019 10:18:41 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] of/platform: Disable generic device linking code for PowerPC To: Saravana Kannan Cc: Greg Kroah-Hartman , Frank Rowand , Stephen Rothwell , Android Kernel Team , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 15, 2019 at 9:04 PM Saravana Kannan wrote: > > On Wed, Aug 14, 2019 at 4:41 PM Rob Herring wrote: > > > > On Tue, Aug 6, 2019 at 4:04 PM Saravana Kannan wrote: > > > > > > On Tue, Aug 6, 2019 at 2:27 PM Rob Herring wrote: > > > > > > > > On Tue, Aug 6, 2019 at 1:27 PM Saravana Kannan wrote: > > > > > > > > > > PowerPC platforms don't use the generic of/platform code to populate the > > > > > devices from DT. > > > > > > > > Yes, they do. > > > > > > No they don't. My wording could be better, but they don't use > > > of_platform_default_populate_init() > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/of/platform.c#n511 > > > > Right, but the rest of the of/platform code is used (guess where it > > got moved here from?). > > > > > > > Therefore the generic device linking code is never used > > > > > in PowerPC. Compile it out to avoid warning about unused functions. > > > > > > > > I'd prefer this get disabled on PPC using 'if (IS_ENABLED(CONFIG_PPC)) > > > > return' rather than #ifdefs. > > > > > > I'm just moving the existing ifndef some lines above. I don't want to > > > go change existing #ifndef in this patch. Maybe that should be a > > > separate patch series that goes and fixes all such code in drivers/of/ > > > or driver/ > > > > So the initcall was originally just supposed to call > > of_platform_default_populate(), but it's grown beyond that. That could > > make things fragile as it is possible for platforms to call > > of_platform_populate() (directly or indirectly) before > > of_platform_default_populate_init(). That was supposed to work, but > > now I think it's getting more fragile. > > Can you clarify what's wrong with of_platfrom_populate() being called > before of_platform_default_populate_init()? If that's what a platform > wants to do, they can do it? I have some thoughts of my own, but I > want to hear yours. Really, I'd like to get rid of platforms doing their own calls. That's mostly an arm32 issue. Most of what's left are either platforms using auxdata which was supposed to be a transition thing or ones that set a parent device (soc_device). The former takes work to finish converting platforms to DT and I don't know what to do for the latter other than always or never set a parent device. Also, I know there's an issue on atmel where we can't remove their of_platform_populate call because it changes the probe order and breaks their pinctrl and gpio driver (I started a patch for that...). Rob