From: Tejun Heo <tj@kernel.org>
To: Yinghai Lu <yinghai@kernel.org>, Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org
Subject: [PATCH] x86,percpu: fix inverted NUMA test in setup_pcpu_remap()
Date: Wed, 01 Apr 2009 15:06:33 +0900 [thread overview]
Message-ID: <49D30469.8020006@kernel.org> (raw)
In-Reply-To: <86802c440903312256r6ddbaa22o5c23cf85d83a6662@mail.gmail.com>
setup_percpu_remap() is for NUMA machines yet it bailed out with
-EINVAL if pcpu_need_numa(). Fix the inverted condition.
This problem was reported by David Miller and verified by Yinhai Lu.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: David Miller <davem@davemloft.net>
Reported-by: Yinghai Lu <yinghai@kernel.org>
---
Oops, thanks for spotting it. I don't have a numa machine so the
condition was never tested on actual machines. :-)
arch/x86/kernel/setup_percpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index 400331b..876b127 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -162,7 +162,7 @@ static ssize_t __init setup_pcpu_remap(size_t static_size)
* If large page isn't supported, there's no benefit in doing
* this. Also, on non-NUMA, embedding is better.
*/
- if (!cpu_has_pse || pcpu_need_numa())
+ if (!cpu_has_pse || !pcpu_need_numa())
return -EINVAL;
last = NULL;
next prev parent reply other threads:[~2009-04-01 6:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-01 5:31 Inverted NUMA test in setup_pcpu_remap()? David Miller
2009-04-01 5:56 ` Yinghai Lu
2009-04-01 6:06 ` Tejun Heo [this message]
2009-04-01 7:27 ` [PATCH] x86: remove duplicated code with pcpu_need_numa() Yinghai Lu
2009-04-01 7:33 ` Tejun Heo
2009-04-01 8:04 ` David Miller
2009-04-02 4:09 ` [tip:x86/urgent] " Yinghai Lu
2009-04-02 4:09 ` [tip:x86/urgent] x86,percpu: fix inverted NUMA test in setup_pcpu_remap() Tejun Heo
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=49D30469.8020006@kernel.org \
--to=tj@kernel.org \
--cc=davem@davemloft.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=yinghai@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox