lx_emul: add 'wake_q_add_safe' implementation

Enable 'wake_q_add_safe' for 6.6 based Linux versions and remove it from
generated_dummies.c of affected drivers.

issue #5264
This commit is contained in:
Sebastian Sumpf 2024-08-26 16:27:14 +02:00 committed by Christian Helmuth
parent 61e2c630b1
commit 1446da8aec
23 changed files with 13 additions and 184 deletions

View File

@ -640,12 +640,3 @@ void update_group_capacity(struct sched_domain * sd,int cpu)
#include <linux/uuid.h>
const u8 uuid_index[16] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}

View File

@ -558,12 +558,3 @@ void update_group_capacity(struct sched_domain * sd,int cpu)
#include <linux/uuid.h>
const u8 uuid_index[16] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}

View File

@ -687,12 +687,3 @@ int usb_update_wireless_status_attr(struct usb_interface * intf)
#include <linux/uuid.h>
const u8 uuid_index[16] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}

View File

@ -540,14 +540,6 @@ const u8 uuid_index[16] = {};
atomic_long_t vm_node_stat[NR_VM_NODE_STAT_ITEMS] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/rcupdate_wait.h>
void wakeme_after_rcu(struct rcu_head * head)

View File

@ -642,12 +642,3 @@ int usb_update_wireless_status_attr(struct usb_interface * intf)
#include <linux/uuid.h>
const u8 uuid_index[16] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}

View File

@ -559,12 +559,3 @@ int usb_update_wireless_status_attr(struct usb_interface * intf)
#include <linux/uuid.h>
const u8 uuid_index[16] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}

View File

@ -522,12 +522,3 @@ int usb_update_wireless_status_attr(struct usb_interface * intf)
#include <linux/uuid.h>
const u8 uuid_index[16] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}

View File

@ -1063,14 +1063,6 @@ int usb_update_wireless_status_attr(struct usb_interface * intf)
const u8 uuid_index[16] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/filter.h>
int xdp_do_generic_redirect(struct net_device * dev,struct sk_buff * skb,struct xdp_buff * xdp,struct bpf_prog * xdp_prog)

View File

@ -811,14 +811,6 @@ const u8 uuid_index[16] = {};
atomic_long_t vm_node_stat[NR_VM_NODE_STAT_ITEMS] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/rcupdate_wait.h>
void wakeme_after_rcu(struct rcu_head * head)

View File

@ -947,14 +947,6 @@ int usb_update_wireless_status_attr(struct usb_interface * intf)
const u8 uuid_index[16] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/filter.h>
int xdp_do_generic_redirect(struct net_device * dev,struct sk_buff * skb,struct xdp_buff * xdp,struct bpf_prog * xdp_prog)

View File

@ -874,14 +874,6 @@ int usb_update_wireless_status_attr(struct usb_interface * intf)
const u8 uuid_index[16] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/filter.h>
int xdp_do_generic_redirect(struct net_device * dev,struct sk_buff * skb,struct xdp_buff * xdp,struct bpf_prog * xdp_prog)

View File

@ -840,14 +840,6 @@ int usb_update_wireless_status_attr(struct usb_interface * intf)
const u8 uuid_index[16] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/filter.h>
int xdp_do_generic_redirect(struct net_device * dev,struct sk_buff * skb,struct xdp_buff * xdp,struct bpf_prog * xdp_prog)

View File

@ -260,6 +260,19 @@ void wake_q_add(struct wake_q_head *head, struct task_struct *task)
}
/*
* CAUTION: This check is not an actual requirement. It should be removed when
* all other *_linux have been updated to 6.6 or when this function has been
* removed from their respective generated_dummies.c
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,0)
void wake_q_add_safe(struct wake_q_head *head, struct task_struct *task)
{
if (!__wake_q_add(head, task))
put_task_struct(task);
}
#endif
void wake_up_q(struct wake_q_head *head)
{
struct wake_q_node *node = head->first;

View File

@ -839,14 +839,6 @@ void __init wait_for_init_devices_probe(void)
}
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/sched.h>
void __sched yield(void)

View File

@ -666,14 +666,6 @@ void __init wait_for_init_devices_probe(void)
}
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/sched.h>
void __sched yield(void)

View File

@ -842,14 +842,6 @@ void __init wait_for_init_devices_probe(void)
}
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/sched.h>
void __sched yield(void)

View File

@ -786,14 +786,6 @@ void __init wait_for_init_devices_probe(void)
}
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/sched.h>
void __sched yield(void)

View File

@ -791,14 +791,6 @@ void __init wait_for_init_devices_probe(void)
}
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/sched.h>
void __sched yield(void)

View File

@ -2108,12 +2108,3 @@ void vunmap(const void * addr)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}

View File

@ -988,14 +988,6 @@ void update_group_capacity(struct sched_domain * sd,int cpu)
}
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/filter.h>
int xdp_do_generic_redirect(struct net_device * dev,struct sk_buff * skb,struct xdp_buff * xdp,struct bpf_prog * xdp_prog)

View File

@ -991,14 +991,6 @@ void update_group_capacity(struct sched_domain * sd,int cpu)
}
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/filter.h>
int xdp_do_generic_redirect(struct net_device * dev,struct sk_buff * skb,struct xdp_buff * xdp,struct bpf_prog * xdp_prog)

View File

@ -622,12 +622,3 @@ void update_group_capacity(struct sched_domain * sd,int cpu)
#include <linux/uuid.h>
const u8 uuid_index[16] = {};
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}

View File

@ -1272,14 +1272,6 @@ struct page * vmalloc_to_page(const void * vmalloc_addr)
}
#include <linux/sched/wake_q.h>
void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/filter.h>
int xdp_do_generic_redirect(struct net_device * dev,struct sk_buff * skb,struct xdp_buff * xdp,struct bpf_prog * xdp_prog)