From patchwork Fri Jul 15 07:45:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fu Wei Fu X-Patchwork-Id: 72066 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp477648qga; Fri, 15 Jul 2016 00:45:13 -0700 (PDT) X-Received: by 10.66.221.134 with SMTP id qe6mr29682099pac.76.1468568713269; Fri, 15 Jul 2016 00:45:13 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e127si2740906pfa.238.2016.07.15.00.45.12; Fri, 15 Jul 2016 00:45:13 -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=@linaro.org; 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 dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752686AbcGOHpK (ORCPT + 29 others); Fri, 15 Jul 2016 03:45:10 -0400 Received: from mail-oi0-f42.google.com ([209.85.218.42]:32950 "EHLO mail-oi0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751380AbcGOHpH (ORCPT ); Fri, 15 Jul 2016 03:45:07 -0400 Received: by mail-oi0-f42.google.com with SMTP id j185so146025364oih.0 for ; Fri, 15 Jul 2016 00:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CJO4lbfAGMYoq/5Vji5ZlJfOTk2jv6aIgjZTDpu0Zf0=; b=bLhZfncvIzQ+eOCh0NCBpXXND3rmLGFMkvxSmcKVWnW3X8gwTKie1eBIQT0VNByGMj v8sMJmdbVsBJEQxNWWRisGAnZslG6BkiOMpTULGBokbvOAEHddjW3hLx4r0yKQ7paZoJ ufbVxLpFfiHb9dkDhoshZoXMEYo1V0XGv9Jkc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CJO4lbfAGMYoq/5Vji5ZlJfOTk2jv6aIgjZTDpu0Zf0=; b=UWz7qcFgDH8pJtq9SWF5aJNDcirE3m7f/A8Twc/eP17UNmBYTGe7eAAiqWZ8udvHwI ewr382Ab1katSHDkNo8nXO6HMLfvxIINAlYLR1H90iJ61Sm0vMrSGIB2pJTUQveyC67j gWH0zb/K0P/m8IDfX141Zg1XchWkYTLWzixF17m//0wt3UbeXiwpu0uL1JhVigEZISYb Fu5ZsGTSjGpSrFlKt+UxLDh3Dw38x4e9OLiofcjkLLL8XL13tsTmSr5ShfCFwQ3y9SFi /zL9lFtMMv5MZSRKHDVNVxDnP20xuAnDBQbJVkR79Py56O2bTYC2AsCsUwcNkT4f47LE K0ew== X-Gm-Message-State: ALyK8tJDbSqifO8o+ffyamQV4RAUytPRxNSPregupcVRhs9MiJGs5E2gv9I2KvHPbzwBoL3+6LmPek0aKgIKkS0n X-Received: by 10.157.9.170 with SMTP id q39mr12142553otd.88.1468568706542; Fri, 15 Jul 2016 00:45:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.212.22 with HTTP; Fri, 15 Jul 2016 00:45:05 -0700 (PDT) In-Reply-To: References: <1468432402-4872-1-git-send-email-fu.wei@linaro.org> <1468432402-4872-5-git-send-email-fu.wei@linaro.org> <20160713210857.GA9500@roeck-us.net> From: Fu Wei Date: Fri, 15 Jul 2016 15:45:05 +0800 Message-ID: Subject: Re: [PATCH v7 4/9] acpi/arm64: Add GTDT table parse driver To: "Rafael J. Wysocki" Cc: Guenter Roeck , "Rafael J. Wysocki" , Len Brown , Daniel Lezcano , Thomas Gleixner , Marc Zyngier , Lorenzo Pieralisi , Sudeep Holla , Hanjun Guo , "linux-arm-kernel@lists.infradead.org" , "linaro-acpi@lists.linaro.org" , Linux Kernel Mailing List , ACPI Devel Maling List , rruigrok@codeaurora.org, harba@codeaurora.org, Christopher Covington , Timur Tabi , G Gregory , Al Stone , Jon Masters , wei@redhat.com, Arnd Bergmann , Wim Van Sebroeck , Catalin Marinas , Will Deacon , Suravee Suthikulanit , Leo Duran , "linux-watchdog@vger.kernel.org" , David Miller , Andrew Morton , Greg Kroah-Hartman , kvalo@codeaurora.org, mchehab@kernel.org, Jiri Slaby , Christoffer Dall , Julien Grall Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rafael, On 14 July 2016 at 05:43, Rafael J. Wysocki wrote: > On Wed, Jul 13, 2016 at 11:08 PM, Guenter Roeck wrote: >> On Wed, Jul 13, 2016 at 10:30:37PM +0200, Rafael J. Wysocki wrote: >>> On Wed, Jul 13, 2016 at 7:53 PM, wrote: >>> > From: Fu Wei >>> > >>> > This patch adds support for parsing arch timer in GTDT, >>> > provides some kernel APIs to parse all the PPIs and >>> > always-on info in GTDT and export them. >>> > >>> > By this driver, we can simplify arm_arch_timer drivers, and >>> > separate the ACPI GTDT knowledge from it. >>> > >>> > Signed-off-by: Fu Wei >>> > Signed-off-by: Hanjun Guo >>> > --- >>> > drivers/acpi/Kconfig | 5 ++ >>> > drivers/acpi/Makefile | 1 + >>> > drivers/acpi/arm64/Kconfig | 15 ++++ >>> > drivers/acpi/arm64/Makefile | 1 + >>> > drivers/acpi/arm64/acpi_gtdt.c | 170 +++++++++++++++++++++++++++++++++++++++++ >>> > include/linux/acpi.h | 6 ++ >>> > 6 files changed, 198 insertions(+) >>> > >>> > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig >>> > index b7e2e77..1cdc7d2 100644 >>> > --- a/drivers/acpi/Kconfig >>> > +++ b/drivers/acpi/Kconfig >>> > @@ -521,4 +521,9 @@ config XPOWER_PMIC_OPREGION >>> > >>> > endif >>> > >>> > +if ARM64 >>> > +source "drivers/acpi/arm64/Kconfig" >>> > + >>> > +endif >>> > + >>> > endif # ACPI >>> > diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile >>> > index 251ce85..1a94ff7 100644 >>> > --- a/drivers/acpi/Makefile >>> > +++ b/drivers/acpi/Makefile >>> > @@ -99,5 +99,6 @@ obj-$(CONFIG_ACPI_EXTLOG) += acpi_extlog.o >>> > obj-$(CONFIG_PMIC_OPREGION) += pmic/intel_pmic.o >>> > obj-$(CONFIG_CRC_PMIC_OPREGION) += pmic/intel_pmic_crc.o >>> > obj-$(CONFIG_XPOWER_PMIC_OPREGION) += pmic/intel_pmic_xpower.o >>> > +obj-$(CONFIG_ARM64) += arm64/ >>> > >>> > video-objs += acpi_video.o video_detect.o >>> > diff --git a/drivers/acpi/arm64/Kconfig b/drivers/acpi/arm64/Kconfig >>> > new file mode 100644 >>> > index 0000000..ff5c253 >>> > --- /dev/null >>> > +++ b/drivers/acpi/arm64/Kconfig >>> > @@ -0,0 +1,15 @@ >>> > +# >>> > +# ACPI Configuration for ARM64 >>> > +# >>> > + >>> > +menu "The ARM64-specific ACPI Support" >>> > + >>> > +config ACPI_GTDT >>> > + bool "ACPI GTDT table Support" >>> >>> This should depend on ARM64. >>> >>> Also I wonder if it needs to be user-selectable? Wouldn't it be >>> better to enable it by default when building for ARM64 with ACPI? >>> >> It is currently selected in patch 9, in the watchdog driver's Kconfig >> entry. > > Well, it still doesn't have to be user-selectable for that. :-) Actually it is also automatically selected by [PATCH v7 6/9]: > >> Not sure if I like that; maybe the watchdog driver should depend >> on it instead ? > > If the watchdog is not the only user of it (and I don't think it is), > it would be better to arrange things this way. > There are two user: (1) arm_arch_timer(which will select CLKSRC_ACPI if ACPI, then CLKSRC_ACPI will select ACPI_GTDT if ARM64) So arm_arch_timer will automatically selecte ACPI_GTDT if ARM64 && ACPI (2) sbsa_gwdt (which will select ACPI_GTDT if ACPI in [PATCH v7 9/9]) So sbsa_gwdt will automatically selecte ACPI_GTDT if ARM64 && ACPI && ARM_ARCH_TIMER So ACPI_GTDT is automatically selected by both of two users. But like Timur said before: maybe we just "selecte ACPI_GTDT if ACPI" for ARM64, because ARM64 require GTDT if we use ACPI. > Thanks, > Rafael -- Best regards, Fu Wei Software Engineer Red Hat diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 47352d2..71d5b30 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -8,6 +8,7 @@ config CLKSRC_OF config CLKSRC_ACPI bool select CLKSRC_PROBE + select ACPI_GTDT if ARM64 config CLKSRC_PROBE bool