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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 10 Feb 2023 10:08:03 +0000
From:   Walter Chang (張維哲) 
        <Walter.Chang@...iatek.com>
To:     "tglx@...utronix.de" <tglx@...utronix.de>,
        "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
        "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
        "krzysztof.kozlowski@...aro.org" <krzysztof.kozlowski@...aro.org>,
        "angelogioacchino.delregno@...labora.com" 
        <angelogioacchino.delregno@...labora.com>,
        "jstultz@...gle.com" <jstultz@...gle.com>,
        "macro@...am.me.uk" <macro@...am.me.uk>
CC:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        wsd_upstream <wsd_upstream@...iatek.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Stanley Chu (朱原陞) 
        <stanley.chu@...iatek.com>,
        Freddy Hsin (辛恒豐) 
        <Freddy.Hsin@...iatek.com>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        Chun-Hung Wu (巫駿宏) 
        <Chun-hung.Wu@...iatek.com>
Subject: Re: [PATCH 1/3] time/sched_clock: Export sched_clock_register()

On Wed, 2023-02-08 at 20:41 +0100, Matthias Brugger wrote:
> 
> On 08/02/2023 15:24, Krzysztof Kozlowski wrote:
> > On 08/02/2023 10:48, walter.chang@...iatek.com wrote:
> > > From: Chun-Hung Wu <chun-hung.wu@...iatek.com>
> > > 
> > > clocksource driver may use sched_clock_register()
> > > to resigter itself as a sched_clock source.
> > > Export it to support building such driver
> > > as module, like timer-mediatek.c
> > > 
> > > Signed-off-by: Chun-Hung Wu <chun-hung.wu@...iatek.com>
> > > ---
> > >   kernel/time/sched_clock.c | 4 ++--
> > >   1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/kernel/time/sched_clock.c
> > > b/kernel/time/sched_clock.c
> > > index 8464c5acc913..8e49e87d1221 100644
> > > --- a/kernel/time/sched_clock.c
> > > +++ b/kernel/time/sched_clock.c
> > > @@ -150,8 +150,7 @@ static enum hrtimer_restart
> > > sched_clock_poll(struct hrtimer *hrt)
> > >   	return HRTIMER_RESTART;
> > >   }
> > >   
> > > -void __init
> > > -sched_clock_register(u64 (*read)(void), int bits, unsigned long
> > > rate)
> > > +void sched_clock_register(u64 (*read)(void), int bits, unsigned
> > > long rate)
> > 
> > Is there a non-init caller?
> > 
> > >   {
> > >   	u64 res, wrap, new_mask, new_epoch, cyc, ns;
> > >   	u32 new_mult, new_shift;
> > > @@ -223,6 +222,7 @@ sched_clock_register(u64 (*read)(void), int
> > > bits, unsigned long rate)
> > >   
> > >   	pr_debug("Registered %pS as sched_clock source\n",
> > > read);
> > >   }
> > > +EXPORT_SYMBOL_GPL(sched_clock_register);
> > 
> > Where is the module using it?
> > 
> > You need to bring users of these two changes, not just prepare
> > something
> > for your out of tree patches.
> > 
> 
> I'd propose to add at least one driver that will need these changes,
> to make it 
> clear why you need that.
> 
> Regards,
> Matthias

I have uploaded another patch to make timer-mediatek.c driver become
loadable module.


https://lore.kernel.org/lkml/20230210100058.19861-1-walter.chang@mediatek.com/T/#u

This driver registers an always-on timer as tick_broadcast_device 
on MediaTek SoCs. If the system does not load this module, system 
would also boot normally since Arm Generic Timer will take over 
this part.

Thanks,
Walter Chang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ