kernel_optimize_test/arch/mips
Jason A. Donenfeld d5531246af mips: use fallback for random_get_entropy() instead of just c0 random
commit 1c99c6a7c3c599a68321b01b9ec243215ede5a68 upstream.

For situations in which we don't have a c0 counter register available,
we've been falling back to reading the c0 "random" register, which is
usually bounded by the amount of TLB entries and changes every other
cycle or so. This means it wraps extremely often. We can do better by
combining this fast-changing counter with a potentially slower-changing
counter from random_get_entropy_fallback() in the more significant bits.
This commit combines the two, taking into account that the changing bits
are in a different bit position depending on the CPU model. In addition,
we previously were falling back to 0 for ancient CPUs that Linux does
not support anyway; remove that dead path entirely.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Tested-by: Maciej W. Rozycki <macro@orcam.me.uk>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-30 09:33:41 +02:00
..
alchemy
ar7
ath25
ath79
bcm47xx
bcm63xx mips: bcm63xx: add support for clk_set_parent() 2022-01-27 10:54:09 +01:00
bmips MIPS: Use address-of operator on section symbols 2022-05-15 20:00:08 +02:00
boot MIPS: ingenic: correct unit node address 2022-04-13 21:01:00 +02:00
cavium-octeon MIPS: OCTEON: add put_device() after of_find_device_by_node() 2022-01-27 10:54:23 +01:00
cobalt
configs
crypto
dec mips: DEC: honor CONFIG_MIPS_FP_SUPPORT=n 2022-04-08 14:40:20 +02:00
fw
generic MIPS: generic/yamon-dt: fix uninitialized variable error 2021-11-26 10:39:15 +01:00
include mips: use fallback for random_get_entropy() instead of just c0 random 2022-05-30 09:33:41 +02:00
ingenic
jazz
kernel MIPS: Fix CP0 counter erratum detection for R4k CPUs 2022-05-12 12:25:29 +02:00
kvm
lantiq MIPS: lantiq: check the return value of kzalloc() 2022-05-25 09:17:54 +02:00
lib MIPS: Fix kernel hang under FUNCTION_GRAPH_TRACER and PREEMPT_TRACER 2021-06-16 12:01:37 +02:00
loongson2ef
loongson32
loongson64 MIPS: loongsoon64: Reserve memory below starting pfn to prevent Oops 2021-07-19 09:44:55 +02:00
math-emu
mm
mti-malta MIPS: Malta: fix alignment of the devicetree buffer 2021-09-18 13:40:16 +02:00
net bpf, mips: Validate conditional branch offsets 2021-10-06 15:55:51 +02:00
netlogic
oprofile
pci
pic32 MIPS: Use address-of operator on section symbols 2022-05-15 20:00:08 +02:00
pistachio
power
ralink MIPS: Use address-of operator on section symbols 2022-05-15 20:00:08 +02:00
rb532 MIPS: RB532: fix return value of __setup handler 2022-04-08 14:40:21 +02:00
sgi-ip22
sgi-ip27
sgi-ip30
sgi-ip32
sibyte
sni MIPS: sni: Fix the build 2021-11-26 10:39:10 +01:00
tools
txx9
vdso
vr41xx
Kbuild
Kbuild.platforms
Kconfig mips: fix Kconfig reference to PHYS_ADDR_T_64BIT 2022-01-27 10:54:07 +01:00
Kconfig.debug
Makefile mips: Fix non-POSIX regexp 2021-08-12 13:22:07 +02:00
Makefile.postlink