All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: adeos-main <adeos-main@gna.org>
Cc: Philippe Gerum <rpm@xenomai.org>
Subject: [Adeos-main] [PATCH] cleanup legacy sched hacks
Date: Sun, 13 May 2007 12:18:46 +0200	[thread overview]
Message-ID: <4646E606.8050505@domain.hid> (raw)

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]

I don't think we need those two legacy hacks anymore as we killed
preempt_disable/enable calls over non-root domain. I converted them
into context checks and got no warnings so far.

---
 kernel/sched.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

Index: linux-2.6.20/kernel/sched.c
===================================================================
--- linux-2.6.20.orig/kernel/sched.c
+++ linux-2.6.20/kernel/sched.c
@@ -3422,10 +3422,8 @@ asmlinkage void __sched schedule(void)
 	long *switch_count;
 	struct rq *rq;
 
-#ifdef CONFIG_IPIPE
-	if (unlikely(!ipipe_root_domain_p))
-		return;
-#endif /* CONFIG_IPIPE */
+	ipipe_check_context(ipipe_root_domain);
+
 	/*
 	 * Test if we are atomic.  Since do_exit() needs to call into
 	 * schedule() atomically, we ignore that path for now.
@@ -3600,11 +3598,8 @@ asmlinkage void __sched preempt_schedule
 	struct task_struct *task = current;
 	int saved_lock_depth;
 #endif
-#ifdef CONFIG_IPIPE
-	/* Do not reschedule over non-Linux domains. */
-	if (unlikely(!ipipe_root_domain_p))
-		return;
-#endif /* CONFIG_IPIPE */
+	ipipe_check_context(ipipe_root_domain);
+
 	/*
 	 * If there is a non-zero preempt_count or interrupts are disabled,
 	 * we do not want to preempt the current task.  Just return..


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

             reply	other threads:[~2007-05-13 10:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-13 10:18 Jan Kiszka [this message]
2007-05-13 13:02 ` [Adeos-main] [PATCH] cleanup legacy sched hacks Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4646E606.8050505@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=adeos-main@gna.org \
    --cc=rpm@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.