• Afzal Mohammed's avatar
    [CPUFREQ] update lpj only if frequency has changed · d08de0c1
    Afzal Mohammed authored
    During scaling up of cpu frequency, loops_per_jiffy
    is updated upon invoking PRECHANGE notifier.
    If setting to new frequency fails in cpufreq driver,
    lpj is left at incorrect value.
    
    Hence update lpj only if cpu frequency is changed,
    i.e. upon invoking POSTCHANGE notifier.
    
    Penalty would be that during time period between
    changing cpu frequency & invocation of POSTCHANGE
    notifier, udelay(x) may not gurantee minimal delay
    of 'x' us for frequency scaling up operation.
    
    Perhaps a better solution would be to define
    CPUFREQ_ABORTCHANGE & handle accordingly, but then
    it would be more intrusive (using ABORTCHANGE may
    help drivers also; if any has registered notifier
    and expect POST for a PRECHANGE, their needs can
    be taken care using ABORT)
    Signed-off-by: default avatarAfzal Mohammed <afzal@ti.com>
    Signed-off-by: default avatarDave Jones <davej@redhat.com>
    d08de0c1
cpufreq.c 48.2 KB