[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200508154045.GA22247@alpha.franken.de>
Date: Fri, 8 May 2020 17:40:46 +0200
From: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To: Sergey.Semin@...kalelectronics.ru
Cc: Serge Semin <fancer.lancer@...il.com>,
Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
Paul Burton <paulburton@...nel.org>,
Ralf Baechle <ralf@...ux-mips.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>,
Rob Herring <robh+dt@...nel.org>, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org,
afzal mohammed <afzal.mohd.ma@...il.com>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 19/20] mips: cevt-r4k: Update the r4k-clockevent
frequency in sync with CPU
On Wed, May 06, 2020 at 08:42:37PM +0300, Sergey.Semin@...kalelectronics.ru wrote:
> diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c
> index 17a9cbb8b3df..f5b72fb7d5ee 100644
> --- a/arch/mips/kernel/cevt-r4k.c
> +++ b/arch/mips/kernel/cevt-r4k.c
> @@ -8,6 +8,7 @@
> */
> #include <linux/clockchips.h>
> #include <linux/interrupt.h>
> +#include <linux/cpufreq.h>
> #include <linux/percpu.h>
> #include <linux/smp.h>
> #include <linux/irq.h>
> @@ -250,6 +251,49 @@ unsigned int __weak get_c0_compare_int(void)
> return MIPS_CPU_IRQ_BASE + cp0_compare_irq;
> }
>
> +#ifdef CONFIG_CPU_FREQ
> +
> +static unsigned long mips_ref_freq;
> +
> +static int cpufreq_callback(struct notifier_block *nb,
> + unsigned long val, void *data)
please prefix function names with r4k_ to make them different from
the other ones you implemented in kernel/time.c. I know they are
static, but keeping different names makes looking at crashes easier.
> + struct cpufreq_freqs *freq = data;
> + struct clock_event_device *cd;
> + unsigned long rate;
> + int cpu;
> +
> + if (!mips_ref_freq)
> + mips_ref_freq = freq->old;
isn't this the same as mips_hpt_frequency ?
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
Powered by blists - more mailing lists