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]
Message-ID: <20210617214748.GC25403@willie-the-truck>
Date:   Thu, 17 Jun 2021 22:47:48 +0100
From:   Will Deacon <will@...nel.org>
To:     Chanwoo Choi <cw00.choi@...sung.com>
Cc:     Daniel Lezcano <daniel.lezcano@...aro.org>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 1/2] clocksource/drivers/exynos_mct: Prioritise Arm arch
 timer on arm64

On Thu, Jun 17, 2021 at 09:58:35AM +0900, Chanwoo Choi wrote:
> On 6/17/21 12:25 AM, Daniel Lezcano wrote:
> > On 10/06/2021 03:03, Chanwoo Choi wrote:
> >> On 6/9/21 12:43 AM, Will Deacon wrote:
> >>> diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
> >>> index fabad79baafc..804d3e01c8f4 100644
> >>> --- a/drivers/clocksource/exynos_mct.c
> >>> +++ b/drivers/clocksource/exynos_mct.c
> >>> @@ -51,6 +51,15 @@
> >>>  
> >>>  #define TICK_BASE_CNT	1
> >>>  
> >>> +#ifdef CONFIG_ARM
> >>> +/* Use values higher than ARM arch timer. See 6282edb72bed. */
> >>> +#define MCT_CLKSOURCE_RATING		450
> >>> +#define MCT_CLKEVENTS_RATING		500
> >>> +#else
> >>> +#define MCT_CLKSOURCE_RATING		350
> >>> +#define MCT_CLKEVENTS_RATING		350
> >>> +#endif
> >>> +
> >>>  enum {
> >>>  	MCT_INT_SPI,
> >>>  	MCT_INT_PPI
> >>> @@ -206,7 +215,7 @@ static void exynos4_frc_resume(struct clocksource *cs)
> >>>  
> >>>  static struct clocksource mct_frc = {
> >>>  	.name		= "mct-frc",
> >>> -	.rating		= 450,	/* use value higher than ARM arch timer */
> >>> +	.rating		= MCT_CLKSOURCE_RATING,
> >>>  	.read		= exynos4_frc_read,
> >>>  	.mask		= CLOCKSOURCE_MASK(32),
> >>>  	.flags		= CLOCK_SOURCE_IS_CONTINUOUS,
> >>> @@ -457,7 +466,7 @@ static int exynos4_mct_starting_cpu(unsigned int cpu)
> >>>  	evt->set_state_oneshot_stopped = set_state_shutdown;
> >>>  	evt->tick_resume = set_state_shutdown;
> >>>  	evt->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
> >>> -	evt->rating = 500;	/* use value higher than ARM arch timer */
> >>> +	evt->rating = MCT_CLKEVENTS_RATING,
> >>>  
> >>>  	exynos4_mct_write(TICK_BASE_CNT, mevt->base + MCT_L_TCNTB_OFFSET);
> >>>  
> >>>
> >>
> >> I'm not sure that exynos mct is working without problem
> >> such as the case of 6282edb72bed.
> >> As described on On ,6282edb72bed the arch timer on exynos SoC
> >> depends on Exynos MCT device. the arch timer is not able to work
> >> without Exynos MCT because of using the common module.
> > 
> > Is it possible to change the DT to have a phandle to the exynos_mct, so
> > it will be probed before the arch_arm_timer ?
> 
> I think that DT changes is not proper way to keep the order between
> exynos_mct and arch timer.

exynos4_mct_frc_start() is called unconditionally from probe via
exynos4_clocksource_init() so as long as the mct probes first, then the
arch timer should work, no? The rating shouldn't affect that.

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ