All of lore.kernel.org
 help / color / mirror / Atom feed
From: Coywolf Qi Hunt <coywolf@gmail.com>
To: akpm@osdl.org
Cc: Oleg Nesterov <oleg@tv-sign.ru>,
	linux-kernel@vger.kernel.org,
	James.Bottomley@hansenpartnership.com, paulus@samba.org,
	davem@davemloft.net, lethal@linux-sh.org, davidm@hpl.hp.com,
	schwidefsky@de.ibm.com, takata@linux-m32r.org, ak@suse.de,
	rth@twiddle.net, matthew@wil.cx, wli@holomorphy.com
Subject: Re: [patch] fix sparc64 cpu_idle()
Date: Thu, 30 Dec 2004 03:52:30 +0800	[thread overview]
Message-ID: <2cd57c9004122911523fe7a71b@mail.gmail.com> (raw)
In-Reply-To: <2cd57c9004122911073dea0d2c@mail.gmail.com>

Currently sparc and sparc64's UP cpu_idel() checks current pid. This
is paranoia.
 
Signed-off-by: Coywolf Qi Hunt <coywolf@gmail.com>

 sparc/kernel/process.c   |   10 +---------
 sparc64/kernel/process.c |    6 +-----
 2 files changed, 2 insertions(+), 14 deletions(-)

diff -Nurp 2.6.10/arch/sparc/kernel/process.c
2.6.10-cy/arch/sparc/kernel/process.c
--- 2.6.10/arch/sparc/kernel/process.c	2004-12-29 01:27:57.000000000 +0800
+++ 2.6.10-cy/arch/sparc/kernel/process.c	2004-12-30 03:41:53.000000000 +0800
@@ -81,13 +81,8 @@ void default_idle(void)
 /*
  * the idle loop on a Sparc... ;)
  */
-int cpu_idle(void)
+void cpu_idle(void)
 {
-	int ret = -EPERM;
-
-	if (current->pid != 0)
-		goto out;
-
 	/* endless idle loop with no priority at all */
 	for (;;) {
 		if (ARCH_SUN4C_SUN4) {
@@ -128,9 +123,6 @@ int cpu_idle(void)
 		schedule();
 		check_pgt_cache();
 	}
-	ret = 0;
-out:
-	return ret;
 }
 
 #else
diff -Nurp 2.6.10/arch/sparc64/kernel/process.c
2.6.10-cy/arch/sparc64/kernel/process.c
--- 2.6.10/arch/sparc64/kernel/process.c	2004-12-30 02:52:40.000000000 +0800
+++ 2.6.10-cy/arch/sparc64/kernel/process.c	2004-12-30 02:57:40.000000000 +0800
@@ -60,11 +60,8 @@ void default_idle(void)
 /*
  * the idle loop on a Sparc... ;)
  */
-int cpu_idle(void)
+void cpu_idle(void)
 {
-	if (current->pid != 0)
-		return -EPERM;
-
 	/* endless idle loop with no priority at all */
 	for (;;) {
 		/* If current->work.need_resched is zero we should really
@@ -80,7 +77,6 @@ int cpu_idle(void)
 		schedule();
 		check_pgt_cache();
 	}
-	return 0;
 }
 
 #else



-- 
Coywolf Qi Hunt
Homepage http://sosdg.org/~coywolf/

  reply	other threads:[~2004-12-29 19:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-27 16:10 [PATCH] fix conflicting cpu_idle() declarations Oleg Nesterov
2004-12-27 16:08 ` William Lee Irwin III
2004-12-29 19:07   ` [patch] fix sparc64 cpu_idle() Coywolf Qi Hunt
2004-12-29 19:52     ` Coywolf Qi Hunt [this message]
2004-12-29 22:56       ` Mitchell Blank Jr
2004-12-30 16:31     ` Oleg Nesterov
2004-12-28  2:55 ` [PATCH] fix conflicting cpu_idle() declarations Hirokazu Takata
2004-12-28  3:09   ` William Lee Irwin III
2004-12-28  3:48 ` James Bottomley

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=2cd57c9004122911523fe7a71b@mail.gmail.com \
    --to=coywolf@gmail.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=davidm@hpl.hp.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=oleg@tv-sign.ru \
    --cc=paulus@samba.org \
    --cc=rth@twiddle.net \
    --cc=schwidefsky@de.ibm.com \
    --cc=takata@linux-m32r.org \
    --cc=wli@holomorphy.com \
    /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.