From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Lezcano Subject: Re: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option Date: Tue, 3 Nov 2015 09:40:02 +0100 Message-ID: <563872E2.10001@linaro.org> References: <1446469011-22710-1-git-send-email-daniel.lezcano@linaro.org> <1446469011-22710-20-git-send-email-daniel.lezcano@linaro.org> <56380040.3080600@samsung.com> <563806E7.6010105@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; Format="flowed" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <563806E7.6010105@samsung.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Krzysztof Kozlowski , tglx@linutronix.de Cc: "moderated list:ARM/SAMSUNG EXYNO..." , Russell King , arnd@arndb.de, linux-kernel@vger.kernel.org, Kukjin Kim , john.stultz@linaro.org, "moderated list:ARM SUB-ARCHITECT..." List-Id: linux-samsung-soc@vger.kernel.org T24gMTEvMDMvMjAxNSAwMTo1OSBBTSwgS3J6eXN6dG9mIEtvemxvd3NraSB3cm90ZToKPiBPbiAw My4xMS4yMDE1IDA5OjMwLCBLcnp5c3p0b2YgS296bG93c2tpIHdyb3RlOgo+PiBPbiAwMi4xMS4y MDE1IDIxOjU2LCBEYW5pZWwgTGV6Y2FubyB3cm90ZToKPj4+IExldCB0aGUgcGxhdGZvcm0ncyBL Y29uZmlnIHRvIHNlbGVjdCB0aGUgY2xvY2sgaW5zdGVhZCBvZiBoYXZpbmcgYSByZXZlcnNlCj4+ PiBkZXBlbmRlbmN5IGZyb20gdGhlIGRyaXZlciB0byB0aGUgcGxhdGZvcm0gb3B0aW9ucy4KPj4K Pj4gU2VsZWN0aW5nIHVzZXItdmlzaWJsZSBzeW1ib2xzIGlzIHJhdGhlciBkaXNjb3VyYWdlZCBz byB3aHkgbm90Cj4+I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: daniel.lezcano@linaro.org (Daniel Lezcano) Date: Tue, 3 Nov 2015 09:40:02 +0100 Subject: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option In-Reply-To: <563806E7.6010105@samsung.com> References: <1446469011-22710-1-git-send-email-daniel.lezcano@linaro.org> <1446469011-22710-20-git-send-email-daniel.lezcano@linaro.org> <56380040.3080600@samsung.com> <563806E7.6010105@samsung.com> Message-ID: <563872E2.10001@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 11/03/2015 01:59 AM, Krzysztof Kozlowski wrote: > On 03.11.2015 09:30, Krzysztof Kozlowski wrote: >> On 02.11.2015 21:56, Daniel Lezcano wrote: >>> Let the platform's Kconfig to select the clock instead of having a reverse >>> dependency from the driver to the platform options. >> >> Selecting user-visible symbols is rather discouraged so why not >> something like this: >> >> - def_bool y if ARCH_EXYNOS >> - depends on !ARM64 >> + bool "Exynos multi core timer driver" >> + depends on ARCH_EXYNOS || (COMPILE_TEST && ARM) > > Nope, that was wrong as we loose auto-select on Exynos. Instead: > - def_bool y if ARCH_EXYNOS > - depends on !ARM64 > + bool "Exynos multi core timer driver" if ARM > + depends on ARCH_EXYNOS || COMPILE_TEST > + default y if ARCH_EXYNOS > > This way we avoid select (which is a reverse dependency for the driver), > have it auto-selectable and compile tested on arm. I think you misunderstood the patch I sent. It does two things: 1. Follow the thumb of rule of the current Kconfig format - The timer driver is selected by the platform (exynos in this case) - User can't select the driver in the menuconfig - There is no dependency on the platform except for compilation test 2. Add the COMPILE_TEST - User can select the driver for compilation testing. This is for allyesconfig when doing compilation test coverage (exynos timer could be compiled on other platform). As the delay code is not portable, we have to restrict the compilation on the ARM platform, this is why there is the dependency on ARM. I am currently looking at splitting the delay code in order to prevent this restriction on this driver and some others drivers. >>> Add the COMPILE_TEST option for the compilation test coverage. Due to the >>> non portable 'delay' code, this driver is only compilable on ARM. >>> >>> Signed-off-by: Daniel Lezcano >>> --- >>> arch/arm/mach-exynos/Kconfig | 1 + >>> drivers/clocksource/Kconfig | 4 ++-- >>> 2 files changed, 3 insertions(+), 2 deletions(-) >>> >>> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig >>> index 3a10f1a..ff10539 100644 >>> --- a/arch/arm/mach-exynos/Kconfig >>> +++ b/arch/arm/mach-exynos/Kconfig >>> @@ -27,6 +27,7 @@ menuconfig ARCH_EXYNOS >>> select SRAM >>> select THERMAL >>> select MFD_SYSCON >>> + select CLKSRC_EXYNOS_MCT >>> help >>> Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5) >>> >>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig >>> index 916c36d..d829cbe 100644 >>> --- a/drivers/clocksource/Kconfig >>> +++ b/drivers/clocksource/Kconfig >>> @@ -213,8 +213,8 @@ config CLKSRC_METAG_GENERIC >>> This option enables support for the Meta per-thread timers. >>> >>> config CLKSRC_EXYNOS_MCT >>> - def_bool y if ARCH_EXYNOS >>> - depends on !ARM64 >>> + bool "Exynos multi core timer driver" if COMPILE_TEST >>> + depends on ARM >>> help >>> Support for Multi Core Timer controller on Exynos SoCs. >>> >>> >> >> > -- Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754876AbbKCIkI (ORCPT ); Tue, 3 Nov 2015 03:40:08 -0500 Received: from mail-wi0-f170.google.com ([209.85.212.170]:37713 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753339AbbKCIkF (ORCPT ); Tue, 3 Nov 2015 03:40:05 -0500 Subject: Re: [PATCH 20/22] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option To: Krzysztof Kozlowski , tglx@linutronix.de References: <1446469011-22710-1-git-send-email-daniel.lezcano@linaro.org> <1446469011-22710-20-git-send-email-daniel.lezcano@linaro.org> <56380040.3080600@samsung.com> <563806E7.6010105@samsung.com> Cc: john.stultz@linaro.org, linux-kernel@vger.kernel.org, arnd@arndb.de, Russell King , Kukjin Kim , "moderated list:ARM SUB-ARCHITECT..." , "moderated list:ARM/SAMSUNG EXYNO..." From: Daniel Lezcano Message-ID: <563872E2.10001@linaro.org> Date: Tue, 3 Nov 2015 09:40:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <563806E7.6010105@samsung.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/03/2015 01:59 AM, Krzysztof Kozlowski wrote: > On 03.11.2015 09:30, Krzysztof Kozlowski wrote: >> On 02.11.2015 21:56, Daniel Lezcano wrote: >>> Let the platform's Kconfig to select the clock instead of having a reverse >>> dependency from the driver to the platform options. >> >> Selecting user-visible symbols is rather discouraged so why not >> something like this: >> >> - def_bool y if ARCH_EXYNOS >> - depends on !ARM64 >> + bool "Exynos multi core timer driver" >> + depends on ARCH_EXYNOS || (COMPILE_TEST && ARM) > > Nope, that was wrong as we loose auto-select on Exynos. Instead: > - def_bool y if ARCH_EXYNOS > - depends on !ARM64 > + bool "Exynos multi core timer driver" if ARM > + depends on ARCH_EXYNOS || COMPILE_TEST > + default y if ARCH_EXYNOS > > This way we avoid select (which is a reverse dependency for the driver), > have it auto-selectable and compile tested on arm. I think you misunderstood the patch I sent. It does two things: 1. Follow the thumb of rule of the current Kconfig format - The timer driver is selected by the platform (exynos in this case) - User can't select the driver in the menuconfig - There is no dependency on the platform except for compilation test 2. Add the COMPILE_TEST - User can select the driver for compilation testing. This is for allyesconfig when doing compilation test coverage (exynos timer could be compiled on other platform). As the delay code is not portable, we have to restrict the compilation on the ARM platform, this is why there is the dependency on ARM. I am currently looking at splitting the delay code in order to prevent this restriction on this driver and some others drivers. >>> Add the COMPILE_TEST option for the compilation test coverage. Due to the >>> non portable 'delay' code, this driver is only compilable on ARM. >>> >>> Signed-off-by: Daniel Lezcano >>> --- >>> arch/arm/mach-exynos/Kconfig | 1 + >>> drivers/clocksource/Kconfig | 4 ++-- >>> 2 files changed, 3 insertions(+), 2 deletions(-) >>> >>> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig >>> index 3a10f1a..ff10539 100644 >>> --- a/arch/arm/mach-exynos/Kconfig >>> +++ b/arch/arm/mach-exynos/Kconfig >>> @@ -27,6 +27,7 @@ menuconfig ARCH_EXYNOS >>> select SRAM >>> select THERMAL >>> select MFD_SYSCON >>> + select CLKSRC_EXYNOS_MCT >>> help >>> Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5) >>> >>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig >>> index 916c36d..d829cbe 100644 >>> --- a/drivers/clocksource/Kconfig >>> +++ b/drivers/clocksource/Kconfig >>> @@ -213,8 +213,8 @@ config CLKSRC_METAG_GENERIC >>> This option enables support for the Meta per-thread timers. >>> >>> config CLKSRC_EXYNOS_MCT >>> - def_bool y if ARCH_EXYNOS >>> - depends on !ARM64 >>> + bool "Exynos multi core timer driver" if COMPILE_TEST >>> + depends on ARM >>> help >>> Support for Multi Core Timer controller on Exynos SoCs. >>> >>> >> >> > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog