From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Rutland Subject: Re: [PATCH 18/20] clocksource / acpi: Add macro CLOCKSOURCE_ACPI_DECLARE Date: Wed, 22 Jan 2014 11:45:37 +0000 Message-ID: <20140122114537.GA15591@e106331-lin.cambridge.arm.com> References: <1389961514-13562-1-git-send-email-hanjun.guo@linaro.org> <1389961514-13562-19-git-send-email-hanjun.guo@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:52335 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755050AbaAVLpi (ORCPT ); Wed, 22 Jan 2014 06:45:38 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Linus Walleij Cc: Hanjun Guo , "Rafael J. Wysocki" , Catalin Marinas , Will Deacon , Russell King - ARM Linux , ACPI Devel Maling List , "linux-arm-kernel@lists.infradead.org" , "grant.likely@linaro.org" , Matthew Garrett , Olof Johansson , Bjorn Helgaas , Rob Herring , Arnd Bergmann , Patch Tracking , "linux-kernel@vger.kernel.org" , linaro-kernel , "linaro-acpi@lists.linaro.org" , Charles Garcia-Tobin , Amit Daniel Kachhap On Wed, Jan 22, 2014 at 08:26:50AM +0000, Linus Walleij wrote: > On Fri, Jan 17, 2014 at 1:25 PM, Hanjun Guo wrote: > > > From: Amit Daniel Kachhap > > > > This macro does the same job as CLOCKSOURCE_OF_DECLARE. The device > > name from the ACPI timer table is matched with all the registered > > timer controllers and matching initialisation routine is invoked. > > > > Signed-off-by: Amit Daniel Kachhap > > Signed-off-by: Hanjun Guo > > Actually I have a fat patch renaming CLOCKSOURCE_OF_DECLARE() > to TIMER_OF_DECLARE() and I think this macro, if needed, should > be named TIMER_ACPI_DECLARE(). > > The reason is that "clocksource" is a Linux-internal name and this > macro pertains to the hardware name in respective system > description type. > > > +#ifdef CONFIG_ACPI > > +#define CLOCKSOURCE_ACPI_DECLARE(name, compat, fn) \ > > + static const struct acpi_device_id __clksrc_acpi_table_##name \ > > + __used __section(__clksrc_acpi_table) \ > > + = { .id = compat, \ > > + .driver_data = (kernel_ulong_t)fn } > > +#else > > +#define CLOCKSOURCE_ACPI_DECLARE(name, compat, fn) > > +#endif > > This hammers down the world to compile one binary for ACPI > and one binary for device tree. Maybe that's fine, I don't know. How does it do that? As far as I could tell CONFIG_ACPI and CONFIG_OF are not mutually exclusive, and this just means that we only build the datastructures for matching from ACPI when CONFIG_ACPI is enabled. Have I missed something? I definitely don't want to see mutually exclusive ACPI and DT support. Cheers, Mark.