lx_emul: implement __get_random_u32_below

The implementation was already part of the Zynq's sd_card driver and
since other ARM drivers need it as well, promote it to the common
shadow library.

Issue genodelabs/genode-allwinner#21.
This commit is contained in:
Josef Söntgen
2023-05-31 16:26:03 +02:00
committed by Norman Feske
parent 7109b80bbd
commit c888fcbdd9
6 changed files with 27 additions and 52 deletions

View File

@ -422,14 +422,6 @@ void pci_disable_msi(struct pci_dev *dev)
}
#include <linux/random.h>
u32 __get_random_u32_below(u32 ceil)
{
lx_emul_trace_and_stop(__func__);
}
#include <asm/smp.h>
DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_sibling_map);

View File

@ -85,14 +85,6 @@ int __printk_ratelimit(const char * func)
}
#include <linux/prandom.h>
u32 prandom_u32(void)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/pci.h>
void pci_disable_device(struct pci_dev * dev)
@ -101,14 +93,6 @@ void pci_disable_device(struct pci_dev * dev)
}
#include <linux/random.h>
u32 __get_random_u32_below(u32 ceil)
{
lx_emul_trace_and_stop(__func__);
}
#include <asm/smp.h>
DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_sibling_map);

View File

@ -386,14 +386,6 @@ void ieee80211_free_led_names(struct ieee80211_local * local)
pteval_t __default_kernel_pte_mask __read_mostly = ~0;
#include <linux/random.h>
u32 __get_random_u32_below(u32 ceil)
{
lx_emul_trace_and_stop(__func__);
}
u16 get_random_u16(void)
{
lx_emul_trace_and_stop(__func__);