From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932640AbbHYTSN (ORCPT ); Tue, 25 Aug 2015 15:18:13 -0400 Received: from www.linutronix.de ([62.245.132.108]:52266 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbbHYTSK (ORCPT ); Tue, 25 Aug 2015 15:18:10 -0400 Date: Tue, 25 Aug 2015 21:17:37 +0200 (CEST) From: Thomas Gleixner To: Fu Wei cc: Suravee Suthikulpanit , Hanjun Guo , Linaro ACPI Mailman List , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, LKML , linux-doc@vger.kernel.org, Wei Fu , G Gregory , Al Stone , Arnd Bergmann , Guenter Roeck , Vipul Gandhi , Wim Van Sebroeck , Jon Masters , Leo Duran , Jonathan Corbet , Mark Rutland , Catalin Marinas , Will Deacon , Rafael Wysocki , dyoung@redhat.com, panand@redhat.com, Daniel Lezcano Subject: Re: [PATCH v7 8/8] clocksource: simplify ACPI code in arm_arch_timer.c In-Reply-To: Message-ID: References: <=fu.wei@linaro.org> <1440435683-7343-1-git-send-email-fu.wei@linaro.org> <1440435683-7343-9-git-send-email-fu.wei@linaro.org> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 Aug 2015, Fu Wei wrote: > >> /* Initialize per-processor generic timer */ > >> -static int __init arch_timer_acpi_init(struct acpi_table_header *table) > >> +void __init arch_timer_acpi_init(void) > >> { > > > > And how is that supposed to work when we have next generation CPUs > > which implement a different timer? You break multisystem kernels that > > way. > > yes, you are right, If there is a next generation CPUs which > implement a different timer, (maybe) this driver can not work. > we may need a new timer driver. > > But, > (1) for now, aarch64 core always has the arch timer(this timer is > part of aarch64 architecture). > and the existing code make ARM64 kernel "select ARM_ARCH_TIMER " > (2) GTDT is designed for generic timer, so in this call " > arch_timer_acpi_init" we parse the gtdt info. > (3) once we have a ARM64 CPUs which implement a different timer, we > may need to select a right timer in the config stage. > and this timer may not be described in GTDT. So we can implement > another arch_timer_acpi_init by that time in new timer driver.. > if the new time still uses GTDT(or new version GTDT), we may need to > update gtdt.c for new timer by that time. That's simply wrong. You want to build kernels which run on both cpus and the selection of the timer happens at runtime depending on the ACPI info. We do the same thing with device tree. > but before we really have this new timer, I think this code is OK to use. I don't think so, but I leave this decision to the ARM64 maintainers. Thanks, tglx