diff --git a/repos/dde_linux/src/include/lx_emul/shadow/linux/pgtable.h b/repos/dde_linux/src/include/lx_emul/shadow/linux/pgtable.h index 3dd1b149d5..c4a32cd84b 100644 --- a/repos/dde_linux/src/include/lx_emul/shadow/linux/pgtable.h +++ b/repos/dde_linux/src/include/lx_emul/shadow/linux/pgtable.h @@ -30,4 +30,6 @@ pte_t pte_swp_clear_soft_dirty(pte_t pte); pte_t ptep_get(pte_t *ptep); +static inline int is_zero_pfn(unsigned long pfn) { return 0; } + #endif /* __LINUX_PGTABLE_H */ diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/sched/core.c b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/sched/core.c index 9a5098e890..888c2eddad 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/sched/core.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/sched/core.c @@ -21,12 +21,26 @@ #include #include #include +#include #include #include #include <../kernel/sched/sched.h> + +/* + * Type changes between kernel versions + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,14,1) +typedef unsigned long nr_iowait_cpu_return_t; +typedef long wait_task_inactive_match_state_t; +#else +typedef unsigned int nr_iowait_cpu_return_t; +typedef unsigned int wait_task_inactive_match_state_t; +#endif + + void set_user_nice(struct task_struct * p, long nice) { p->static_prio = NICE_TO_PRIO(nice); @@ -118,7 +132,7 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void) } -unsigned long nr_iowait_cpu(int cpu) +nr_iowait_cpu_return_t nr_iowait_cpu(int cpu) { return 0; } @@ -143,7 +157,8 @@ int sched_setscheduler_nocheck(struct task_struct * p, int policy, } -unsigned long wait_task_inactive(struct task_struct * p,long match_state) +unsigned long wait_task_inactive(struct task_struct * p, + wait_task_inactive_match_state_t match_state) { struct rq *rq = task_rq(p);