lx_emul: allow non-SMP kernel configurations

Fix genodelabs/genode#4963
This commit is contained in:
Stefan Kalkowski 2023-07-12 15:47:15 +02:00 committed by Norman Feske
parent 2f6864a487
commit 175ec07c06
5 changed files with 13 additions and 0 deletions

View File

@ -16,6 +16,9 @@
*/
#include <linux/spinlock.h>
#ifdef CONFIG_SMP
#include <linux/rwlock_api_smp.h>
#include <asm/spinlock.h>
@ -212,3 +215,5 @@ void __lockfunc _raw_write_unlock_irqrestore(rwlock_t *lock, unsigned long flags
local_irq_restore(flags);
}
#endif
#endif /* CONFIG_SMP */

View File

@ -15,4 +15,6 @@
#include <../kernel/sched/sched.h>
#include <linux/sched/nohz.h>
#ifdef CONFIG_SMP
void nohz_balance_enter_idle(int cpu) { }
#endif

View File

@ -13,6 +13,8 @@
#include <linux/cpumask.h>
#if (NR_CPUS != 1)
unsigned int nr_cpu_ids = 1;
#endif
unsigned long irq_err_count = 0;

View File

@ -13,7 +13,9 @@
#include <linux/stop_machine.h>
#ifdef CONFIG_SMP
int stop_machine(cpu_stop_fn_t fn,void * data,const struct cpumask * cpus)
{
return (*fn)(data);
}
#endif

View File

@ -15,4 +15,6 @@
#include <linux/vmstat.h>
#ifdef CONFIG_SMP
void quiet_vmstat(void) { }
#endif