linux-stable/drivers/char
Sunil Goutham 680efb3354 hwrng: cavium - Check health status while reading random data
This RNG device is present on Marvell OcteonTx2 silicons as well and
also provides entropy health status.

HW continuously checks health condition of entropy and reports
faults. Fault is in terms of co-processor cycles since last fault
detected. This doesn't get cleared and only updated when new fault
is detected. Also there are chances of detecting false positives.
So to detect a entropy failure SW has to check if failures are
persistent ie cycles elapsed is frequently updated by HW.

This patch adds support to detect health failures using below algo.
1. Consider any fault detected before 10ms as a false positive and ignore.
   10ms is chosen randomly, no significance.
2. Upon first failure detection make a note of cycles elapsed and when this
   error happened in realtime (cntvct).
3. Upon subsequent failure, check if this is new or a old one by comparing
   current cycles with the ones since last failure. cycles or time since
   last failure is calculated using cycles and time info captured at (2).

HEALTH_CHECK status register is not available to VF, hence had to map
PF registers. Also since cycles are in terms of co-processor cycles,
had to retrieve co-processor clock rate from RST device.

Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-11-20 15:02:07 +11:00
..
agp parisc: parisc-agp requires SBA IOMMU driver 2021-04-06 11:46:39 +02:00
hw_random hwrng: cavium - Check health status while reading random data 2021-11-20 15:02:07 +11:00
ipmi ipmi: kcs_bmc: Fix a memory leak in the error handling path of 'kcs_bmc_serio_add_device()' 2021-10-29 07:23:59 -05:00
mwave char: mware: fix returnvar.cocci warnings 2021-08-27 16:20:37 +02:00
pcmcia cm4000_cs: Use struct_group() to zero struct cm4000_dev region 2021-09-25 08:20:49 -07:00
tpm tpm_tis_spi: Add missing SPI ID 2021-10-26 05:03:34 +03:00
xilinx_hwicap
xillybus char: xillybus: fix msg_ep UAF in xillyusb_probe() 2021-10-19 09:40:18 +02:00
adi.c
apm-emulation.c
applicom.c Merge 5.12-rc6 into char-misc-next 2021-04-05 08:43:50 +02:00
applicom.h
bsr.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
ds1620.c
dsp56k.c
dtlk.c
hangcheck-timer.c
hpet.c char: hpet: Remove unused variable 'm' 2021-05-21 10:09:30 +02:00
Kconfig char: move RANDOM_TRUST_CPU & RANDOM_TRUST_BOOTLOADER into the Character devices menu 2021-08-16 19:02:19 +02:00
lp.c char: lp: remove redundant space around (inside) parenthesized expressions 2021-03-24 08:26:32 +01:00
Makefile remove the raw driver 2021-06-04 15:35:03 +02:00
mem.c /dev/mem: nowait zero/null ops 2021-09-14 10:46:19 +02:00
misc.c char: misc: increase DYNAMIC_MINORS value 2020-11-03 09:52:04 +01:00
mspec.c char: mspec: Use kvzalloc() in mspec_mmap() 2020-08-28 12:10:04 +02:00
nsc_gpio.c
nvram.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
powernv-op-panel.c powerpc/powernv: Fix fall-through warning for Clang 2021-07-13 19:21:41 -05:00
ppdev.c
ps3flash.c powerpc/ps3: make system bus's remove and shutdown callbacks return void 2020-12-04 01:01:22 +11:00
random.c random: remove dead code left over from blocking pool 2021-04-02 18:28:12 +11:00
scx200_gpio.c
sonypi.c
tb0219.c
tlclk.c
toshiba.c module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ttyprintk.c tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
uv_mmtimer.c
virtio_console.c virtio_console: validate max_nr_ports before trying to use it 2021-11-01 05:26:48 -04:00