lkml.org 
[lkml]   [2020]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 287/717] clocksource/drivers/ingenic: Fix section mismatch
    Date
    From: Daniel Lezcano <daniel.lezcano@linaro.org>

    [ Upstream commit 5bd7cb29eceb52e4b108917786fdbf2a2c2048ef ]

    The function ingenic_tcu_get_clock() is annotated for the __init
    section but it is actually called from the online cpu callback.

    That will lead to a crash if a CPU is hotplugged after boot time.

    Remove the __init annotation for the ingenic_tcu_get_clock()
    function.

    Fixes: f19d838d08fc (clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT)
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Reviewed-by: Paul Cercueil <paul@crapouillou.net>
    Tested-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
    Link: https://lore.kernel.org/r/20201125102346.1816310-1-daniel.lezcano@linaro.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/clocksource/ingenic-timer.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/clocksource/ingenic-timer.c b/drivers/clocksource/ingenic-timer.c
    index 58fd9189fab7f..905fd6b163a81 100644
    --- a/drivers/clocksource/ingenic-timer.c
    +++ b/drivers/clocksource/ingenic-timer.c
    @@ -127,7 +127,7 @@ static irqreturn_t ingenic_tcu_cevt_cb(int irq, void *dev_id)
    return IRQ_HANDLED;
    }

    -static struct clk * __init ingenic_tcu_get_clock(struct device_node *np, int id)
    +static struct clk *ingenic_tcu_get_clock(struct device_node *np, int id)
    {
    struct of_phandle_args args;

    --
    2.27.0


    \
     
     \ /
      Last update: 2020-12-28 16:04    [W:6.593 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site