linux-stable/arch/mips
Serge Semin c79c643fca mips: Add udelay lpj numbers adjustment
[ Upstream commit ed26aacfb5 ]

Loops-per-jiffies is a special number which represents a number of
noop-loop cycles per CPU-scheduler quantum - jiffies. As you
understand aside from CPU-specific implementation it depends on
the CPU frequency. So when a platform has the CPU frequency fixed,
we have no problem and the current udelay interface will work
just fine. But as soon as CPU-freq driver is enabled and the cores
frequency changes, we'll end up with distorted udelay's. In order
to fix this we have to accordinly adjust the per-CPU udelay_val
(the same as the global loops_per_jiffy) number. This can be done
in the CPU-freq transition event handler. We subscribe to that event
in the MIPS arch time-inititalization method.

Co-developed-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Signed-off-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-22 09:31:07 +02:00
..
alchemy
ar7 The main MIPS changes for a pretty light v5.3 cycle, including: 2019-07-17 09:42:03 -07:00
ath25
ath79 The main MIPS changes for a pretty light v5.3 cycle, including: 2019-07-17 09:42:03 -07:00
bcm47xx MIPS: BCM47XX: Add support for Netgear R6200 V1 2019-07-25 22:10:05 -07:00
bcm63xx MIPS: bmips: mark exception vectors as char arrays 2019-10-23 21:07:28 -07:00
bmips docs: arm: convert docs to ReST and rename to *.rst 2019-07-15 09:20:24 -03:00
boot MIPS: Truncate link address into 32bit for 32bit kernel 2020-06-22 09:31:03 +02:00
cavium-octeon MIPS: OCTEON: irq: Fix potential NULL pointer dereference 2020-04-17 10:50:12 +02:00
cobalt
configs MIPS: Loongson: Build ATI Radeon GPU driver as module 2020-06-22 09:30:54 +02:00
crypto
dec
emma
fw MIPS: fw: sni: Fix out of bounds init of o32 stack 2019-10-09 12:47:28 -07:00
generic
include mips: MAAR: Use more precise address mask 2020-06-22 09:31:07 +02:00
jazz dma-mapping: explicitly wire up ->mmap and ->get_sgtable 2019-09-04 11:13:18 +02:00
jz4740 Merge branch 'ingenic-tcu-v5.4' into mips-next 2019-08-08 15:33:16 -07:00
kernel mips: Add udelay lpj numbers adjustment 2020-06-22 09:31:07 +02:00
kvm Bugfixes (arm and x86) and cleanups. 2019-08-09 15:46:29 -07:00
lantiq MIPS: lantiq: update the clock alias' for the mainline PCIe PHY driver 2019-08-24 15:13:22 +01:00
lasat
lib treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504 2019-06-19 17:09:56 +02:00
loongson32
loongson64 MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init() 2020-02-24 08:36:27 +01:00
math-emu
mm MIPS/tlbex: Fix LDDIR usage in setup_pw() for Loongson-3 2020-04-17 10:50:12 +02:00
mti-malta MIPS: malta: Drop prom_free_prom_memory 2019-08-23 14:47:13 +01:00
net bpf, mips: Limit to 33 tail calls 2020-01-12 12:21:24 +01:00
netlogic MIPS: xlp: Drop boot_mem_map 2019-08-23 14:47:21 +01:00
oprofile MIPS: OProfile: Mark expected switch fall-throughs 2019-07-30 09:40:17 -07:00
paravirt
pci MIPS: PCI: remember nasid changed by set interrupt affinity 2020-01-17 19:48:54 +01:00
pic32
pistachio
pmcs-msp71xx MIPS: pmcs-msp71xx: Remove unused addr variable 2019-10-03 15:47:17 -07:00
pnx833x
power
ralink MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected 2019-12-31 16:45:29 +01:00
rb532
sgi-ip22 MIPS: ip22: Drop addr_is_ram 2019-08-23 14:47:18 +01:00
sgi-ip27 MIPS: SGI-IP27: Fix crash, when CPUs are disabled via nr_cpus parameter 2020-01-17 19:48:55 +01:00
sgi-ip32 Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2019-07-08 21:48:15 -07:00
sibyte
sni
tools
txx9
vdso mips: Fix gettimeofday() in the vdso library 2020-01-17 19:49:04 +01:00
vr41xx
Kbuild
Kbuild.platforms
Kconfig MIPS: BPF: eBPF JIT: check for MIPS ISA compliance in Kconfig 2020-01-09 10:19:56 +01:00
Kconfig.debug
Makefile MIPS: Truncate link address into 32bit for 32bit kernel 2020-06-22 09:31:03 +02:00
Makefile.postlink MIPS: fix indentation of the 'RELOCS' message 2020-02-11 04:35:16 -08:00