From: Coywolf Qi Hunt <coywolf@gmail.com>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
James.Bottomley@hansenpartnership.com, paulus@samba.org,
davem@davemloft.net, lethal@linux-sh.org, davidm@hpl.hp.com,
schwidefsky@de.ibm.com, takata@inux-m32r.org, ak@suse.de,
rth@twiddle.net, matthew@wil.cx
Subject: [patch] fix sparc64 cpu_idle()
Date: Thu, 30 Dec 2004 03:07:59 +0800 [thread overview]
Message-ID: <2cd57c9004122911073dea0d2c@mail.gmail.com> (raw)
In-Reply-To: <20041227160848.GC771@holomorphy.com>
On Mon, 27 Dec 2004 08:08:48 -0800, William Lee Irwin III
<wli@holomorphy.com> wrote:
> On Mon, Dec 27, 2004 at 07:10:38PM +0300, Oleg Nesterov wrote:
> > cpu_idle() declared/defined in
> > init/main.c: void cpu_idle(void)
> > i386/kernel/process.c void cpu_idle(void)
> > i386/kernel/smpboot.c: int cpu_idle(void)
> > i386/mach-voyager/voyager_smp.c: int cpu_idle(void)
> > ppc/kernel/idle.c: int cpu_idle(void)
> > ppc/kernel/smp.c: int cpu_idle(void *unused)
> > ppc64/kernel/idle.c: int cpu_idle(void)
> > ppc64/kernel/smp.c: int cpu_idle(void *unused)
> > sparc/kernel/process.c: int cpu_idle(void)
> > sparc64/kernel/process.c: int cpu_idle(void)
> > sh/kernel/process.c: void cpu_idle(void *unused)
> > sh/kernel/smp.c: int cpu_idle(void *unused)
> > ia64/kernel/smpboot.c: int cpu_idle(void)
> > ia64/kernel/process.c: void cpu_idle(void *unused)
>
> It's remarkable that several arches are internally inconsistent. Anyway,
> this will likely be a shoo-in, as it removes more code than it adds. The
> mess surrounding cpu_idle() has been aggravating for some time.
It's not flexible to enforce 'void cpu_idle(void)' all over. What If
someday someone would want cpu_idle() to return value for some arch.
Currently sparch64's UP cpu_idel() returns -EPERM. This is paranoia.
Signed-off-by: Coywolf Qi Hunt <coywolf@gmail.com>
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/
next prev parent reply other threads:[~2004-12-29 19:08 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 ` Coywolf Qi Hunt [this message]
2004-12-29 19:52 ` [patch] fix sparc64 cpu_idle() Coywolf Qi Hunt
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=2cd57c9004122911073dea0d2c@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@inux-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.