Received: by 10.192.165.148 with SMTP id m20csp834901imm; Fri, 27 Apr 2018 08:14:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo8BKiLxcAi/G6o89saqZzEAw7PXxX8sMi6DbTPWwuCsX0mbVfmbK0Br8Sr+lwE3h2/n4sl X-Received: by 10.98.186.26 with SMTP id k26mr2571024pff.195.1524842097358; Fri, 27 Apr 2018 08:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524842097; cv=none; d=google.com; s=arc-20160816; b=FSGCpzMT61kHsVyLh2b3i4nFHmSGi5Em2XGePkMZfVt0YjsMMXk+BfRS7E0PrfDePx heyYS32cpx/yGBnXW1jwiOr9h2lT9J4RJrMMVUXjAtInGoPunUizcVZdSqdTK7m1xFJ6 7r0aWhb+h20tNJb85mN7/RcL2EVLRbaY9/9QO5ChAkgKXB3ONyMx8LqvVNSpjjIrJRed PCTEu6atdYXGzNXSKemABGkm6KIRuiYgb9eH7rI2HMdKX6ATwi88F7UIkq/OXKoSf3pP QoOnglrVLxJqH5Zm+Emu35DX4xrflBtdPCCyO4qGuqc4QSGaXBMDNnqWVFMqoWiKiCPH mckw== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=NjJKmtt/RSfTClXBIhNc6sUtmQufDm4UGUetKhzu67o=; b=oWPETA3drYvDiNpDHDEHEuvaZ6dZT5/9z/Mb32blKtJV5wb48k2yi8pn3dk4BWibgN OW5Y2ZKto7Hd0X6iC+Ptc1/fu5OZH4GfFor/CfjRLUu8LQ1Qt4GxoonvewWgEi23lVaT SWrrqnTOyTJDhRZUuu9bhnSTyUihiVEKO5/cjtqyXepeuecxb8NhPvnuKLVzi5QN5mIe JCLrPd8JV/XdCpRjfKgeWwURs4MCT1eo0etfC/k90UkG9bR9mk3xjpQGKedkqwBuIbSJ cW6oU+0DqSkETRajiKVArvR2+pqrg4BCbefmIu5xtrs0rdAZi1dcAGFfBWe1e7benmBz L6JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Ua8+okZF; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f90-v6si1408231plf.496.2018.04.27.08.14.43; Fri, 27 Apr 2018 08:14:57 -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=fail header.i=@gmail.com header.s=20161025 header.b=Ua8+okZF; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933824AbeD0PNi (ORCPT + 99 others); Fri, 27 Apr 2018 11:13:38 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:37290 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933679AbeD0PNV (ORCPT ); Fri, 27 Apr 2018 11:13:21 -0400 Received: by mail-qk0-f193.google.com with SMTP id d74so1638543qkg.4; Fri, 27 Apr 2018 08:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=NjJKmtt/RSfTClXBIhNc6sUtmQufDm4UGUetKhzu67o=; b=Ua8+okZF8yEvRhAqpZzbofq1WGWaZp4QjkaBI+KgMMR7Xhw/eZhdjIhimpEDYecVfT n7uTX+Hu5XKy1oQOvQ0tdsWDoEoBNULqu/JIEV/kCcvagE7aU2BOB0cqXv3rIOFryk/0 VAcZ3t3VHBjEcQNGSx1VzwLFZVRcxjb4rhVsop4ULQIZxSdYv7/niZVRXoUY2L65854l 2BAURY+JmV5y8HDoQRMVxyI0CsUnWjxo1JE+s2a5Y9HND2bTJOkNr+ZxJ3N5YYOkSBX/ i0DCpvFeWyDMa35igmkZHnK2kyS6hD2xUCLqrr1UZhgdMxXJ1fTgfDexpHohaGRQvWqJ joYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=NjJKmtt/RSfTClXBIhNc6sUtmQufDm4UGUetKhzu67o=; b=YvOuI6k7Roy0z42miq7okCjFzgzEo9sR5ZzUcO0ex5nNsn8Eo29Z8kKbRWdVlqa5Fd MyE9P3A4idemH42EgDkl5DG2q9+d6gzBosFrJklEeKPJys9D/8IM2uff9D5CWumxXmCw 0FeP2+y7fDyxiYnTeQ8yknzVNcm46eROV4EtaHvOBoTmK4nhXg1dz12S6M/e6NMnCQa+ ApN2YpPh9t1N/wsBFpAoThTKZ/QAaQQkmgpUy2OJ91D0yXSrqnmM46o8RvP00ml/yw1J rRWfmhSdiosDjjaS+mFlHPYrw8EbO/Ewoeaycwpe+25p+/BNW24Le591uQps5dLTHZw1 KLwg== X-Gm-Message-State: ALQs6tA5mxumICz4h/GJi6km7KW0OGMF2UUBrFAnIqklLKZ0tnFV9Ql6 q655SAUsIwUSJD62Uz6632xAaiJaaGebhVtkytA= X-Received: by 10.55.149.70 with SMTP id x67mr2159363qkd.202.1524842000643; Fri, 27 Apr 2018 08:13:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.3 with HTTP; Fri, 27 Apr 2018 08:13:20 -0700 (PDT) In-Reply-To: <20180426152920.21569-2-brgl@bgdev.pl> References: <20180426152920.21569-1-brgl@bgdev.pl> <20180426152920.21569-2-brgl@bgdev.pl> From: Arnd Bergmann Date: Fri, 27 Apr 2018 17:13:20 +0200 X-Google-Sender-Auth: 7TNELFCJK-y2iKHzZWzS51JwfH8 Message-ID: Subject: Re: [PATCH RFC PoC 1/2] earlydev: implement a new way to probe platform devices early To: Bartosz Golaszewski Cc: Sekhar Nori , Kevin Hilman , David Lechner , Michael Turquette , Stephen Boyd , Greg Kroah-Hartman , Rob Herring , Mark Rutland , Yoshinori Sato , Rich Felker , Frank Rowand , "Rafael J . Wysocki" , Jarkko Sakkinen , Dmitry Torokhov , Arend van Spriel , Heikki Krogerus , Michal Suchanek , Jan Kiszka , Andy Shevchenko , Marc Zyngier , Peter Rosin , Linux ARM , Linux Kernel Mailing List , DTML , Bartosz Golaszewski 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, Apr 26, 2018 at 5:29 PM, Bartosz Golaszewski wrote: > +/* > + * REVISIT: early_initcall may be still too late for some timers and critical > + * clocks. We should probably have a separate section with callbacks that can > + * be invoked at each architecture's discretion. > + */ > +#define earlydev_platform_driver(_drv) \ > + static int _drv##_register(void) \ > + { \ > + earlydev_driver_register(&(_drv)); \ > + return 0; \ > + } \ > + early_initcall(_drv##_register) > + > +#endif /* __EARLYDEV_H__ */ No full review, just one comment: this would really need to fit into the existing callbacks for clk, timer, earlycon etc that we use with OF_DECLARE. A lot of code makes assumptions about the order in which they are called, and the current early_platform infrastructure does the same thing using its "earlyprintk" and "earlytimer" classes. Arnd