Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: Huacai Chen <chenhuacai@gmail.com>, gregkh@linuxfoundation.org
Cc: "open list:MIPS" <linux-mips@vger.kernel.org>,
	Serge Semin <Sergey.Semin@baikalelectronics.ru>,
	"Stable # 4 . 4/4 . 9/4 . 14/4 . 19" <stable@vger.kernel.org>
Subject: Re: [PATCH -stable] MIPS: Fix build for LTS kernel caused by backporting lpj adjustment
Date: Sun, 19 Jul 2020 22:51:11 +0800	[thread overview]
Message-ID: <34928e81-3675-0309-b020-0cb4b402dc5c@flygoat.com> (raw)
In-Reply-To: <CAAhV-H4wdxtLCAFOJE6wgAZdg+U5mquSZjHmAL_qsDaGtENbFg@mail.gmail.com>


在 2020/7/19 上午11:24, Huacai Chen 写道:
> Hi, Serge,
>
> Could you please have a look at this patch?


+ Gregkh

This is urgent for next stable release, please take a look.

Thanks


>
> Huacai
>
> On Thu, Jul 16, 2020 at 5:37 PM Huacai Chen <chenhc@lemote.com> wrote:
>> Commit ed26aacfb5f71eecb20a ("mips: Add udelay lpj numbers adjustment")
>> has backported to 4.4~5.4, but the "struct cpufreq_freqs" (and also the
>> cpufreq notifier machanism) of 4.4~4.19 are different from the upstream
>> kernel. These differences cause build errors, and this patch can fix the
>> build.
>>
>> Cc: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>> Cc: Stable <stable@vger.kernel.org> # 4.4/4.9/4.14/4.19
>> Signed-off-by: Huacai Chen <chenhc@lemote.com>
>> ---
>>   arch/mips/kernel/time.c | 13 ++++---------
>>   1 file changed, 4 insertions(+), 9 deletions(-)
>>
>> diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
>> index b7f7e08..b15ee12 100644
>> --- a/arch/mips/kernel/time.c
>> +++ b/arch/mips/kernel/time.c
>> @@ -40,10 +40,8 @@ static unsigned long glb_lpj_ref_freq;
>>   static int cpufreq_callback(struct notifier_block *nb,
>>                              unsigned long val, void *data)
>>   {
>> -       struct cpufreq_freqs *freq = data;
>> -       struct cpumask *cpus = freq->policy->cpus;
>> -       unsigned long lpj;
>>          int cpu;
>> +       struct cpufreq_freqs *freq = data;
>>
>>          /*
>>           * Skip lpj numbers adjustment if the CPU-freq transition is safe for
>> @@ -64,6 +62,7 @@ static int cpufreq_callback(struct notifier_block *nb,
>>                  }
>>          }
>>
>> +       cpu = freq->cpu;
>>          /*
>>           * Adjust global lpj variable and per-CPU udelay_val number in
>>           * accordance with the new CPU frequency.
>> @@ -74,12 +73,8 @@ static int cpufreq_callback(struct notifier_block *nb,
>>                                                  glb_lpj_ref_freq,
>>                                                  freq->new);
>>
>> -               for_each_cpu(cpu, cpus) {
>> -                       lpj = cpufreq_scale(per_cpu(pcp_lpj_ref, cpu),
>> -                                           per_cpu(pcp_lpj_ref_freq, cpu),
>> -                                           freq->new);
>> -                       cpu_data[cpu].udelay_val = (unsigned int)lpj;
>> -               }
>> +               cpu_data[cpu].udelay_val = cpufreq_scale(per_cpu(pcp_lpj_ref, cpu),
>> +                                          per_cpu(pcp_lpj_ref_freq, cpu), freq->new);
>>          }
>>
>>          return NOTIFY_OK;
>> --
>> 2.7.0
>>

  reply	other threads:[~2020-07-19 14:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16  9:39 [PATCH -stable] MIPS: Fix build for LTS kernel caused by backporting lpj adjustment Huacai Chen
2020-07-19  3:24 ` Huacai Chen
2020-07-19 14:51   ` Jiaxun Yang [this message]
2020-07-19 15:13     ` Greg KH
2020-07-20  1:42       ` Huacai Chen
2020-07-20  4:58         ` Jiaxun Yang
2020-07-20 20:54 ` Serge Semin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34928e81-3675-0309-b020-0cb4b402dc5c@flygoat.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=chenhuacai@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox