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: <555E5B5C.9050807@imgtec.com>
Date:	Thu, 21 May 2015 19:25:32 -0300
From:	Ezequiel Garcia <ezequiel.garcia@...tec.com>
To:	Andrew Bresticker <abrestic@...omium.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linux-MIPS <linux-mips@...ux-mips.org>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	James Hartley <james.hartley@...tec.com>,
	James Hogan <james.hogan@...tec.com>,
	"Thomas Gleixner" <tglx@...utronix.de>,
	Damien Horsley <Damien.Horsley@...tec.com>,
	Govindraj Raja <Govindraj.Raja@...tec.com>
Subject: Re: [PATCH 3/7] clocksource: mips-gic: Split clocksource and clockevent
 initialization



On 05/21/2015 07:24 PM, Andrew Bresticker wrote:
> On Thu, May 21, 2015 at 2:37 PM, Ezequiel Garcia
> <ezequiel.garcia@...tec.com> wrote:
>> This is preparation work for the introduction of clockevent frequency
>> update with a clock notifier. This is only possible when the device
>> is passed a clk struct, so let's split the legacy and devicetree
>> initialization.
>>
>> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@...tec.com>
>> ---
>>  drivers/clocksource/mips-gic-timer.c | 13 ++++++++-----
>>  1 file changed, 8 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c
>> index c4352f0..22a4daf 100644
>> --- a/drivers/clocksource/mips-gic-timer.c
>> +++ b/drivers/clocksource/mips-gic-timer.c
>> @@ -142,11 +142,6 @@ static void __init __gic_clocksource_init(void)
>>         ret = clocksource_register_hz(&gic_clocksource, gic_frequency);
>>         if (ret < 0)
>>                 pr_warn("GIC: Unable to register clocksource\n");
>> -
>> -       gic_clockevent_init();
>> -
>> -       /* And finally start the counter */
>> -       gic_start_count();
>>  }
> 
> Instead of duplicating this bit in both the OF and non-OF paths, maybe
> it would be better to do the notifier registration in
> gic_clockevent_init(), either by passing around the struct clk or
> making it a global?
> 

Yeah, I had something like that first, but somehow it looked ugly to have:

  gic_clockevent_init(IS_ERR(clk) ? NULL : clk);

Don't have a strong opinion though.
-- 
Ezequiel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ