Revert "mips: Add udelay lpj numbers adjustment", since it causes the build to fail with CONFIG_CPU_FREQ=y.
This commit is contained in:
parent
e0cd5c5655
commit
7c760522ee
|
@ -1,3 +1,11 @@
|
|||
linux (4.19.131-2) UNRELEASED; urgency=medium
|
||||
|
||||
[ Aurelien Jarno ]
|
||||
* Revert "mips: Add udelay lpj numbers adjustment", since it causes the
|
||||
build to fail with CONFIG_CPU_FREQ=y.
|
||||
|
||||
-- Aurelien Jarno <aurel32@debian.org> Sat, 11 Jul 2020 12:19:13 +0200
|
||||
|
||||
linux (4.19.131-1) buster; urgency=medium
|
||||
|
||||
* New upstream stable update:
|
||||
|
|
102
debian/patches/bugfix/mips/Revert-mips-Add-udelay-lpj-numbers-adjustment.patch
vendored
Normal file
102
debian/patches/bugfix/mips/Revert-mips-Add-udelay-lpj-numbers-adjustment.patch
vendored
Normal file
|
@ -0,0 +1,102 @@
|
|||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Sat, 11 Jul 2020 12:16:51 +0200
|
||||
Subject: Revert "mips: Add udelay lpj numbers adjustment"
|
||||
Forwarded: no
|
||||
|
||||
This reverts commit 240934c2d4646fc4ba4423014f6f42ca864acecd.
|
||||
It does not even build with CONFIG_CPU_FREQ=y as the 'policy'
|
||||
member has been added in kernel 5.2.
|
||||
---
|
||||
arch/mips/kernel/time.c | 70 -----------------------------------------
|
||||
1 file changed, 70 deletions(-)
|
||||
|
||||
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
|
||||
index 1e631a484ddf..bfe02ded25d1 100644
|
||||
--- a/arch/mips/kernel/time.c
|
||||
+++ b/arch/mips/kernel/time.c
|
||||
@@ -22,82 +22,12 @@
|
||||
#include <linux/smp.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/export.h>
|
||||
-#include <linux/cpufreq.h>
|
||||
-#include <linux/delay.h>
|
||||
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/div64.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
-#ifdef CONFIG_CPU_FREQ
|
||||
-
|
||||
-static DEFINE_PER_CPU(unsigned long, pcp_lpj_ref);
|
||||
-static DEFINE_PER_CPU(unsigned long, pcp_lpj_ref_freq);
|
||||
-static unsigned long glb_lpj_ref;
|
||||
-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;
|
||||
-
|
||||
- /*
|
||||
- * Skip lpj numbers adjustment if the CPU-freq transition is safe for
|
||||
- * the loops delay. (Is this possible?)
|
||||
- */
|
||||
- if (freq->flags & CPUFREQ_CONST_LOOPS)
|
||||
- return NOTIFY_OK;
|
||||
-
|
||||
- /* Save the initial values of the lpjes for future scaling. */
|
||||
- if (!glb_lpj_ref) {
|
||||
- glb_lpj_ref = boot_cpu_data.udelay_val;
|
||||
- glb_lpj_ref_freq = freq->old;
|
||||
-
|
||||
- for_each_online_cpu(cpu) {
|
||||
- per_cpu(pcp_lpj_ref, cpu) =
|
||||
- cpu_data[cpu].udelay_val;
|
||||
- per_cpu(pcp_lpj_ref_freq, cpu) = freq->old;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Adjust global lpj variable and per-CPU udelay_val number in
|
||||
- * accordance with the new CPU frequency.
|
||||
- */
|
||||
- if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
|
||||
- (val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
|
||||
- loops_per_jiffy = cpufreq_scale(glb_lpj_ref,
|
||||
- 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;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return NOTIFY_OK;
|
||||
-}
|
||||
-
|
||||
-static struct notifier_block cpufreq_notifier = {
|
||||
- .notifier_call = cpufreq_callback,
|
||||
-};
|
||||
-
|
||||
-static int __init register_cpufreq_notifier(void)
|
||||
-{
|
||||
- return cpufreq_register_notifier(&cpufreq_notifier,
|
||||
- CPUFREQ_TRANSITION_NOTIFIER);
|
||||
-}
|
||||
-core_initcall(register_cpufreq_notifier);
|
||||
-
|
||||
-#endif /* CONFIG_CPU_FREQ */
|
||||
-
|
||||
/*
|
||||
* forward reference
|
||||
*/
|
||||
--
|
||||
2.27.0
|
||||
|
|
@ -79,6 +79,7 @@ bugfix/powerpc/powerpc-fix-mcpu-options-for-spe-only-compiler.patch
|
|||
bugfix/arm/ARM-dts-sun8i-h3-add-sy8106a-to-orange-pi-plus.patch
|
||||
bugfix/arm64/arm64-dts-allwinner-a64-Enable-A64-timer-workaround.patch
|
||||
bugfix/mips/MIPS-Loongson-Introduce-and-use-loongson_llsc_mb.patch
|
||||
bugfix/mips/Revert-mips-Add-udelay-lpj-numbers-adjustment.patch
|
||||
|
||||
# Arch features
|
||||
features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
|
||||
|
|
Loading…
Reference in New Issue