Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp358230ybl; Thu, 15 Aug 2019 19:05:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDOvsi/x5HVJUurn3DeLFD8nAHMqqlVciZnINZrg95I53Qa4zs9d/BHyvp6T77VVIvIdlD X-Received: by 2002:a17:902:5a46:: with SMTP id f6mr6498375plm.319.1565921148844; Thu, 15 Aug 2019 19:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565921148; cv=none; d=google.com; s=arc-20160816; b=uRo40EEqlN8F55+i4NYYwqytHqVAdnGP96StMpSjJCrVOvvq+2Qebe26K2mZijkcfi uDCycxjAkXs0gmaqXvBUp6Nt+KhwgdhpsIa56DVgCjVHCcEJvqyEBlPn74LN/bDh88gv OGbQXjogepDZCKi+O0KsK5DgoIyVpyJzT69wU66qrpSlKgt2MpSSRwxwi5SFdkiHyqbT NE3S9Zjjh30Sk+I28uMFXp0f1ZvooN5kmcTWZBGTGbWmCPcFQD4iCaAPlAJy40RXxn9K cpRh1sd96trYqw8qLxjQk/9Dwxakq2DW8dT4M/uaj97ha6Yjsir2WZtl7lW5UKnYUdDe xjXA== 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=6pfybPHYgQpVnLP31HUT6Rq04rce/4KRW2qmC2QL+zw=; b=AP/a+joWP5RYVFnglfJJVTUE9i47gmVRc3j3LnU5OMmNSqURg1CL2raFvlHg97tDHP ZvXjdppMMhoqYuAw3vpDpuW5TuUqPKROKOwUWw/ihZLf/dP/321sYYto6RLOgCUrWnDw k9wIaeA9U/FhCwViaf9EBUPp8at1v2MRkxqp008wTIlxHgBErQOTuTLcL4fyjfPsz19Q d8KQYj3tSXrMUQG23Qg/A88MCuy1lrK9Y7WYNLQBlOMMuczOd7C4NtKpcQBtvd+5wCaa efp4JKiZdf8a/PPzOOmu/cmwsvlLcWSDIa5hQ9Av5AeXXifRIVQXxHY5cgQtFfK1eLJH ZHuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ZQOEKNXR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ds20si2045692pjb.9.2019.08.15.19.05.30; Thu, 15 Aug 2019 19:05:48 -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=@google.com header.s=20161025 header.b=ZQOEKNXR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726404AbfHPCEx (ORCPT + 99 others); Thu, 15 Aug 2019 22:04:53 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:41134 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726215AbfHPCEw (ORCPT ); Thu, 15 Aug 2019 22:04:52 -0400 Received: by mail-ot1-f66.google.com with SMTP id o101so8249996ota.8 for ; Thu, 15 Aug 2019 19:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6pfybPHYgQpVnLP31HUT6Rq04rce/4KRW2qmC2QL+zw=; b=ZQOEKNXRhZo9Y4S1z9YzupCiWd8wCHyjva9WWCpYVGxSWXgmhUX/PgczqLUjfQAz8I fa5yB9DzjRrzGZ/2oE31G9bhzfR38WrRiF6yv1CtLG4oqV4c0zUOBCAc7U/ZT0O9Ilrl /15sJJC+2aovaMGtM+jpZMFcyOuX7EWX1OFr4XgXyIwDFhlDkOkgGnzv6AAlqx1D5FKw 8ycYSSoLLLjiXdz4vHgG074h6mTgN8HANJ3ARLkjJyXBsWL/vDYyRYMI8CqdeMRFUtxn XkZyTb9hNn4V284yXUPS+Lqfyu1BofbuLb0dayf+DYtzjQEjn1gnRutY3aLqKKkT0LXn 0sxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6pfybPHYgQpVnLP31HUT6Rq04rce/4KRW2qmC2QL+zw=; b=ZNJp3OXnERE0KN2DcgjtjAWhUl0rNgW+KrlxLt1kWydIn53v9VbaulZtI+g/bbaqV7 w/7m5Dx0bMjNooastUbg4QRjYg/FgfXAnXhlujfKwoPU2PJAX2GyVLm1svwUbSEn5U5/ gT2sH83OwZ1ESdqnchGexx7SF4OprLqTf3SboDLSpItvI5wktSTtcOEqYh9XS3ltwfLG cYahp56Ot6sd28Yn3lxWoIXQGPX8E0kisivYB2aDgitDFsxv/NVeSShJY5QfDPzU8CJh DkDMQ65RBprp294ZLXPRWIH22bU6jgyaZKsUXQlJIp3RqtdYtQ9HO8Zux2MtED0GjW7V N4VA== X-Gm-Message-State: APjAAAXRfn1+LcsZ9K4mMhsDF7T3w5lisiZIx1+BYfw5P4MjkMwdkg3g nWRZmRzq3dPc+4/SvTFG+HqHEPNzYTuRBKBp8Orpxw== X-Received: by 2002:a9d:6b1a:: with SMTP id g26mr5980166otp.195.1565921091613; Thu, 15 Aug 2019 19:04:51 -0700 (PDT) MIME-Version: 1.0 References: <20190806192654.138605-1-saravanak@google.com> <20190806192654.138605-2-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Thu, 15 Aug 2019 19:04:15 -0700 Message-ID: Subject: Re: [PATCH 2/2] of/platform: Disable generic device linking code for PowerPC To: Rob Herring 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 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. In any case, I'd be happy to help clean up this initcall if you can give me a direction to take it in. > Anyways, I guess this patch is fine for now. Thanks. -Saravana