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: <CAAfSe-t9k1j_-XObnEhL93q3oZJs0bq3=7czrXfBO0ja=ndYTw@mail.gmail.com>
Date:   Fri, 20 Aug 2021 15:45:22 +0800
From:   Chunyan Zhang <zhang.lyra@...il.com>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Saravana Kannan <saravanak@...gle.com>,
        Baolin Wang <baolin.wang7@...il.com>,
        Orson Zhai <orsonzhai@...il.com>,
        Chunyan Zhang <chunyan.zhang@...soc.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/3] drivers/clocksource/timer-of: Remove __init markings

On Fri, 13 Aug 2021 at 21:34, Daniel Lezcano <daniel.lezcano@...aro.org> wrote:
>
> On 15/07/2021 08:54, Chunyan Zhang wrote:
> > From: Saravana Kannan <saravanak@...gle.com>
> >
> > This allows timer drivers to be compiled as modules.
>
> Why ?
>
> These changes will create a precedence with the timers being loaded as
> modules. A longer description is important.
>
> Also, loading the timers may be fine but unloading them is not supported
> AFAICT from the time framework. That should be described also and the
> code should make sure the unloading will be never supported in any
> module conversion.

Ok, I will change to use builtin_platform_driver() to replace
module_platform_driver(), that can make sure to support loading only.
And will add a description for that in the next version patch-2.

Thanks,
Chunyan

>
> > Signed-off-by: Saravana Kannan <saravanak@...gle.com>
> > Signed-off-by: Chunyan Zhang <chunyan.zhang@...soc.com>
> > ---
> >  drivers/clocksource/timer-of.c | 17 +++++++++--------
> >  drivers/clocksource/timer-of.h |  4 ++--
> >  2 files changed, 11 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
> > index 529cc6a51cdb..7f108978fd51 100644
> > --- a/drivers/clocksource/timer-of.c
> > +++ b/drivers/clocksource/timer-of.c
> > @@ -19,7 +19,7 @@
> >   *
> >   * Free the irq resource
> >   */
> > -static __init void timer_of_irq_exit(struct of_timer_irq *of_irq)
> > +static void timer_of_irq_exit(struct of_timer_irq *of_irq)
> >  {
> >       struct timer_of *to = container_of(of_irq, struct timer_of, of_irq);
> >
> > @@ -47,7 +47,7 @@ static __init void timer_of_irq_exit(struct of_timer_irq *of_irq)
> >   *
> >   * Returns 0 on success, < 0 otherwise
> >   */
> > -static __init int timer_of_irq_init(struct device_node *np,
> > +static int timer_of_irq_init(struct device_node *np,
> >                                   struct of_timer_irq *of_irq)
> >  {
> >       int ret;
> > @@ -91,7 +91,7 @@ static __init int timer_of_irq_init(struct device_node *np,
> >   *
> >   * Disables and releases the refcount on the clk
> >   */
> > -static __init void timer_of_clk_exit(struct of_timer_clk *of_clk)
> > +static void timer_of_clk_exit(struct of_timer_clk *of_clk)
> >  {
> >       of_clk->rate = 0;
> >       clk_disable_unprepare(of_clk->clk);
> > @@ -107,7 +107,7 @@ static __init void timer_of_clk_exit(struct of_timer_clk *of_clk)
> >   *
> >   * Returns 0 on success, < 0 otherwise
> >   */
> > -static __init int timer_of_clk_init(struct device_node *np,
> > +static int timer_of_clk_init(struct device_node *np,
> >                                   struct of_timer_clk *of_clk)
> >  {
> >       int ret;
> > @@ -146,12 +146,12 @@ static __init int timer_of_clk_init(struct device_node *np,
> >       goto out;
> >  }
> >
> > -static __init void timer_of_base_exit(struct of_timer_base *of_base)
> > +static void timer_of_base_exit(struct of_timer_base *of_base)
> >  {
> >       iounmap(of_base->base);
> >  }
> >
> > -static __init int timer_of_base_init(struct device_node *np,
> > +static int timer_of_base_init(struct device_node *np,
> >                                    struct of_timer_base *of_base)
> >  {
> >       of_base->base = of_base->name ?
> > @@ -165,7 +165,7 @@ static __init int timer_of_base_init(struct device_node *np,
> >       return 0;
> >  }
> >
> > -int __init timer_of_init(struct device_node *np, struct timer_of *to)
> > +int timer_of_init(struct device_node *np, struct timer_of *to)
> >  {
> >       int ret = -EINVAL;
> >       int flags = 0;
> > @@ -209,6 +209,7 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to)
> >               timer_of_base_exit(&to->of_base);
> >       return ret;
> >  }
> > +EXPORT_SYMBOL_GPL(timer_of_init);
> >
> >  /**
> >   * timer_of_cleanup - release timer_of resources
> > @@ -217,7 +218,7 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to)
> >   * Release the resources that has been used in timer_of_init().
> >   * This function should be called in init error cases
> >   */
> > -void __init timer_of_cleanup(struct timer_of *to)
> > +void timer_of_cleanup(struct timer_of *to)
> >  {
> >       if (to->flags & TIMER_OF_IRQ)
> >               timer_of_irq_exit(&to->of_irq);
> > diff --git a/drivers/clocksource/timer-of.h b/drivers/clocksource/timer-of.h
> > index a5478f3e8589..1b8cfac5900a 100644
> > --- a/drivers/clocksource/timer-of.h
> > +++ b/drivers/clocksource/timer-of.h
> > @@ -66,9 +66,9 @@ static inline unsigned long timer_of_period(struct timer_of *to)
> >       return to->of_clk.period;
> >  }
> >
> > -extern int __init timer_of_init(struct device_node *np,
> > +extern int timer_of_init(struct device_node *np,
> >                               struct timer_of *to);
> >
> > -extern void __init timer_of_cleanup(struct timer_of *to);
> > +extern void timer_of_cleanup(struct timer_of *to);
> >
> >  #endif
> >
>
>
> --
> <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
>
> Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ