lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Apr 2016 11:15:48 +0100
From:	Robin Murphy <robin.murphy@....com>
To:	Grygorii Strashko <grygorii.strashko@...com>,
	Liviu Dudau <liviu.dudau@....com>
Cc:	kernel@...inux.com, Tony Lindgren <tony@...mide.com>,
	Sekhar Nori <nsekhar@...com>,
	Masahiro Yamada <yamada.masahiro@...ionext.com>,
	Wei Xu <xuwei5@...ilicon.com>,
	Jesper Nilsson <jesper.nilsson@...s.com>,
	Florian Fainelli <f.fainelli@...il.com>,
	Russell King <linux@....linux.org.uk>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Michal Simek <michal.simek@...inx.com>,
	linux-arm-kernel@...s.com, linux-rockchip@...ts.infradead.org,
	bcm-kernel-feedback-list@...adcom.com,
	Arnd Bergmann <arnd@...db.de>,
	Mike Looijmans <mike.looijmans@...ic.nl>,
	Lars Persson <lars.persson@...s.com>,
	linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Maxime Coquelin <maxime.coquelin@...com>,
	Srinivas Kandagatla <srinivas.kandagatla@...il.com>,
	linux-kernel@...r.kernel.org, Sascha Hauer <kernel@...gutronix.de>,
	Sudeep Holla <sudeep.holla@....com>,
	Olof Johansson <olof@...om.net>, Jun Nie <jun.nie@...aro.org>,
	Shawn Guo <shawnguo@...nel.org>
Subject: Re: [PATCH v1] ARM: clocksource: make ARM_GLOBAL_TIMER selectable

On 26/04/16 20:35, Grygorii Strashko wrote:
> On 04/26/2016 07:02 PM, Liviu Dudau wrote:
>> On Tue, Apr 26, 2016 at 06:28:52PM +0300, Grygorii Strashko wrote:
>>
>> Hi Grygorii,
>>
>> First time I'm seeing this patch, so I have a few questions, mostly
>> related to the commit message:
>
> Hm. You are in cc for RFC.
> Sry, forgot to add link [1].
>
>>
>>> This patch intended to fix following cases:
>>> - SoC-A has ARM GT, defines DT node for ARM GT and selects
>>> ARM_GLOBAL_TIMER statically in Kconfig file. SoC-B has ARM GT and
>>> defines DT node for ARM GT, but do not selects ARM_GLOBAL_TIMER
>>> statically in Kconfig file. In case of multiplatform build ARM GT will
>>> be implicitly enabled for SoC-B.
>>
>> Well, SoC-B has the GT *and* the DT node, so what is the problem with
>> enabling it for SoC-B? If there are reasons not to use the Global Timer
>> on SoC-B, surely a better option would be to mark it in DT with status = "disabled";
>
> This was rejected [2]. DT describes HW and if it is functional the status = "disabled"
> is not good choice.
> ARM GT can't be used as clocksource/sched_clock/clockevent when CPUFreq or
> CPUIdle are enabled :(, and this is Linux specific functionality and
> not HW description.

It sounds to me like the cleanest option might then be to address it 
within the Linux-specific driver itself. How feasible would it be for 
the GT driver to detect at runtime whether CPUfreq/idle will be used and 
simply refuse to register as a clocksource if so? (I guess there are 
probably horrible initialisation order issues, at least...)

Robin.

>>
>>>
>>> - There is no way to disable ARM GT without modifying Kconfig file,
>>> once ARM_GLOBAL_TIMER is selected statically in Kconfig file.
>>
>> What about disabling the DT node?
>>
>> Not sure I properly understand the problem you are trying to solve here.
>
> I'd like to have way to enable/disable ARM GT without modifying Kernel sources
> (Kconfig specifically) which is now impossible.
>
>>
>>>
>>> Hence, fix above case by defining both HAVE_ARM_GLOBAL_TIMER and
>>> ARM_GLOBAL_TIMER as recommended by 'Adding common features and make
>>> the usage configurable' section in kconfig-language.txt. All places in
>>> ARM folder where ARM_GLOBAL_TIMER was used now replaced on
>>> HAVE_ARM_GLOBAL_TIMER.
>>
>> I'm OK with the way you have changed ARM_GLOBAL_TIMER from a sticky config
>> option to a selectable one, but I would like more details on the problem
>> this was causing you.
>>
>
> The same HW (board) could be used with PM features enabled (power saving)
> and disabled (-RT). Without this change it will require to have
> and maintain two branches, but with it - just separate defconfig.
>
> [1] http://lists.infradead.org/pipermail/linux-rockchip/2016-February/007159.html
> [2] http://www.spinics.net/lists/devicetree/msg102918.html
>
>>
>>>
>>> Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
>>> Cc: Florian Fainelli <f.fainelli@...il.com>
>>> Cc: Russell King <linux@....linux.org.uk>
>>> Cc: Wei Xu <xuwei5@...ilicon.com>
>>> Cc: Shawn Guo <shawnguo@...nel.org>
>>> Cc: Sascha Hauer <kernel@...gutronix.de>
>>> Cc: Srinivas Kandagatla <srinivas.kandagatla@...il.com>
>>> Cc: Maxime Coquelin <maxime.coquelin@...com>
>>> Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>
>>> Cc: Liviu Dudau <liviu.dudau@....com>
>>> Cc: Sudeep Holla <sudeep.holla@....com>
>>> Cc: Jun Nie <jun.nie@...aro.org>
>>> Cc: Michal Simek <michal.simek@...inx.com>
>>> Cc: Jesper Nilsson <jesper.nilsson@...s.com>
>>> Cc: Lars Persson <lars.persson@...s.com>
>>> Cc: Mike Looijmans <mike.looijmans@...ic.nl>
>>> Acked-by: Sören Brinkmann <soren.brinkmann@...inx.com>
>>> Acked-by: Moritz Fischer <moritz.fischer@...us.com>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@...com>
>>> ---
>>> Changes is v1:
>>> - updated mach-artpec
>>> - rebased on top of tip: timers/core
>>>     commit: 86d3473 time: Introduce do_sys_settimeofday64()
>>>
>>>    arch/arm/mach-artpec/Kconfig   | 2 +-
>>>    arch/arm/mach-bcm/Kconfig      | 4 ++--
>>>    arch/arm/mach-hisi/Kconfig     | 2 +-
>>>    arch/arm/mach-imx/Kconfig      | 2 +-
>>>    arch/arm/mach-rockchip/Kconfig | 2 +-
>>>    arch/arm/mach-sti/Kconfig      | 2 +-
>>>    arch/arm/mach-uniphier/Kconfig | 2 +-
>>>    arch/arm/mach-vexpress/Kconfig | 2 +-
>>>    arch/arm/mach-zx/Kconfig       | 2 +-
>>>    arch/arm/mach-zynq/Kconfig     | 2 +-
>>>    drivers/clocksource/Kconfig    | 7 ++++++-
>>>    11 files changed, 17 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-artpec/Kconfig b/arch/arm/mach-artpec/Kconfig
>>> index 6cbe5a2..6cbca77 100644
>>> --- a/arch/arm/mach-artpec/Kconfig
>>> +++ b/arch/arm/mach-artpec/Kconfig
>>> @@ -9,7 +9,7 @@ config MACH_ARTPEC6
>>>    	depends on ARCH_MULTI_V7
>>>    	select ARM_AMBA
>>>    	select ARM_GIC
>>> -	select ARM_GLOBAL_TIMER
>
> [...]
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ