lkml.org 
[lkml]   [2022]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[RFC PATCH 03/47] mm: asi: Switch to unrestricted address space when entering scheduler
From
To keep things simpler, we run the scheduler only in the full
unrestricted address space for the time being.

Signed-off-by: Junaid Shahid <junaids@google.com>


---
kernel/sched/core.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 77563109c0ea..44ea197c16ea 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -19,6 +19,7 @@

#include <asm/switch_to.h>
#include <asm/tlb.h>
+#include <asm/asi.h>

#include "../workqueue_internal.h"
#include "../../fs/io-wq.h"
@@ -6141,6 +6142,10 @@ static void __sched notrace __schedule(unsigned int sched_mode)
rq = cpu_rq(cpu);
prev = rq->curr;

+ /* This could possibly be delayed to just before the context switch. */
+ VM_WARN_ON(!asi_is_target_unrestricted());
+ asi_exit();
+
schedule_debug(prev, !!sched_mode);

if (sched_feat(HRTICK) || sched_feat(HRTICK_DL))
--
2.35.1.473.g83b2b277ed-goog
\
 
 \ /
  Last update: 2022-02-23 06:24    [W:0.770 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site