linux/arch/mips
Jason A. Donenfeld 1c99c6a7c3 mips: use fallback for random_get_entropy() instead of just c0 random
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>
2022-05-13 23:59:23 +02:00
..
alchemy mips: alchemy: remove historic comment on gpio build constraints 2021-12-16 15:48:32 +01:00
ar7 mips: ar7: convert to CONFIG_COMMON_CLK 2021-06-08 17:00:09 +02:00
ath25 MIPS: ath25: Constify static irq_domain_ops 2022-02-22 09:39:03 +01:00
ath79 MIPS: Remove redundant definitions of device_tree_init() 2022-03-14 15:09:02 +01:00
bcm47xx MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2 2022-01-09 15:41:50 +01:00
bcm63xx linux-watchdog 5.17-rc1 tag 2022-01-17 08:07:57 +02:00
bmips MIPS: bmips: Remove obsolete DMA mapping support 2022-01-11 11:55:41 +01:00
boot Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
cavium-octeon MIPS: OCTEON: Constify static irq_domain_ops 2022-02-22 09:38:50 +01:00
cobalt MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
configs - added support for QCN550x (ath79) 2022-03-25 09:35:19 -07:00
crypto MIPS: crypto: Fix CRC32 code 2022-04-01 10:19:03 +02:00
dec DEC: Limit PMAX memory probing to R3k systems 2022-03-07 13:10:44 +01:00
fw MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
generic MIPS: new Kconfig option ZBOOT_LOAD_ADDRESS 2022-01-02 14:17:30 +01:00
include mips: use fallback for random_get_entropy() instead of just c0 random 2022-05-13 23:59:23 +02:00
ingenic MIPS: Kconfig: ingenic: Ensure MACH_INGENIC_GENERIC selects all SoCs 2021-06-01 11:44:47 +02:00
jazz MIPS/jazzdma: return error code from jazz_dma_map_sg() 2021-08-09 17:13:05 +02:00
kernel MIPS: Fix CP0 counter erratum detection for R4k CPUs 2022-04-29 15:52:00 +02:00
kvm ARM: 2022-02-05 09:55:59 -08:00
lantiq MIPS: lantiq: check the return value of kzalloc() 2022-03-30 20:25:48 +02:00
lib MIPS: Only use current_stack_pointer on GCC 2022-03-14 15:02:53 +01:00
loongson2ef MIPS: Loongson{2ef,64}: Wrap -mno-branch-likely with cc-option 2022-02-07 18:30:12 +01:00
loongson32 MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
loongson64 MIPS: Fix build error for loongson64 and sgi-ip27 2022-03-24 09:45:15 +01:00
math-emu
mm MIPS: Sanitise Cavium switch cases in TLB handler synthesizers 2022-03-07 13:11:03 +01:00
mti-malta MIPS: Remove redundant definitions of device_tree_init() 2022-03-14 15:09:02 +01:00
n64 mips: Add N64 machine type 2021-01-22 11:40:00 +01:00
net Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-10 15:56:13 -08:00
pci pci-v5.18-changes 2022-03-25 13:02:05 -07:00
pic32 MIPS: Remove redundant definitions of device_tree_init() 2022-03-14 15:09:02 +01:00
power
ralink Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
rb532 MIPS: rb532: move GPIOD definition into C-files 2022-03-30 20:26:26 +02:00
sgi-ip22 mips: sgi-ip22: add a check for the return of kzalloc() 2022-03-30 20:25:11 +02:00
sgi-ip27 MIPS: Fix build error for loongson64 and sgi-ip27 2022-03-24 09:45:15 +01:00
sgi-ip30 memblock: rename memblock_free to memblock_phys_free 2021-11-06 13:30:41 -07:00
sgi-ip32 MIPS: Allow modules to set board_be_handler 2021-11-09 16:07:26 +01:00
sibyte MIPS: sibyte: Add missing __user annotations in sb_tbprof.c 2022-02-22 09:36:04 +01:00
sni MIPS: sni: Fix the build 2021-10-18 18:09:54 +02:00
tools
txx9 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
vdso mips: Enable KCSAN 2022-02-07 18:31:57 +01:00
vr41xx MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kbuild.platforms MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
Kconfig MIPS: Fix build error for loongson64 and sgi-ip27 2022-03-24 09:45:15 +01:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile mips: Always permit to build u-boot images 2022-03-07 13:11:20 +01:00
Makefile.postlink