Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
6.4.y: Rebase prjc against 6.4.8 rtmutex changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tk-Glitch authored and hurrhnn committed Aug 6, 2023
1 parent db55689 commit 6c09e21
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions linux-tkg-patches/6.4/0009-prjc_v6.4-r0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -559,23 +559,26 @@ diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 728f434de2bb..0e1082a4e878 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -337,21 +337,25 @@ static __always_inline void
waiter_update_prio(struct rt_mutex_waiter *waiter, struct task_struct *task)
{
waiter->prio = __waiter_prio(task);
- waiter->deadline = task->dl.deadline;
+ waiter->deadline = __tsk_deadline(task);
@@ -343,7 +343,7 @@ waiter_update_prio(struct rt_mutex_waite
lockdep_assert(RB_EMPTY_NODE(&waiter->tree.entry));

waiter->tree.prio = __waiter_prio(task);
- waiter->tree.deadline = task->dl.deadline;
+ waiter->tree.deadline = __tsk_deadline(task);
}

/*
* Only use with rt_mutex_waiter_{less,equal}()
@@ -364,16 +364,20 @@ waiter_clone_prio(struct rt_mutex_waiter
* Only use with rt_waiter_node_{less,equal}()
*/
#define task_to_waiter_node(p) \
- &(struct rt_waiter_node){ .prio = __waiter_prio(p), .deadline = (p)->dl.deadline }
+ &(struct rt_waiter_node){ .prio = __waiter_prio(p), .deadline = __tsk_deadline(p) }
#define task_to_waiter(p) \
- &(struct rt_mutex_waiter){ .prio = __waiter_prio(p), .deadline = (p)->dl.deadline }
+ &(struct rt_mutex_waiter){ .prio = __waiter_prio(p), .deadline = __tsk_deadline(p) }
&(struct rt_mutex_waiter){ .tree = *task_to_waiter_node(p) }

static __always_inline int rt_mutex_waiter_less(struct rt_mutex_waiter *left,
struct rt_mutex_waiter *right)
static __always_inline int rt_waiter_node_less(struct rt_waiter_node *left,
struct rt_waiter_node *right)
{
+#ifdef CONFIG_SCHED_PDS
+ return (left->deadline < right->deadline);
Expand All @@ -587,7 +590,7 @@ index 728f434de2bb..0e1082a4e878 100644
/*
* If both waiters have dl_prio(), we check the deadlines of the
* associated tasks.
@@ -360,16 +364,22 @@ static __always_inline int rt_mutex_waiter_less(struct rt_mutex_waiter *left,
@@ -382,16 +386,22 @@ static __always_inline int rt_waiter_nod
*/
if (dl_prio(left->prio))
return dl_time_before(left->deadline, right->deadline);
Expand All @@ -597,8 +600,8 @@ index 728f434de2bb..0e1082a4e878 100644
+#endif
}

static __always_inline int rt_mutex_waiter_equal(struct rt_mutex_waiter *left,
struct rt_mutex_waiter *right)
static __always_inline int rt_waiter_node_equal(struct rt_waiter_node *left,
struct rt_waiter_node *right)
{
+#ifdef CONFIG_SCHED_PDS
+ return (left->deadline == right->deadline);
Expand All @@ -610,7 +613,7 @@ index 728f434de2bb..0e1082a4e878 100644
/*
* If both waiters have dl_prio(), we check the deadlines of the
* associated tasks.
@@ -378,8 +388,10 @@ static __always_inline int rt_mutex_waiter_equal(struct rt_mutex_waiter *left,
@@ -400,8 +410,10 @@ static __always_inline int rt_waiter_nod
*/
if (dl_prio(left->prio))
return left->deadline == right->deadline;
Expand Down

0 comments on commit 6c09e21

Please sign in to comment.