x86,percpu: fix inverted NUMA test in setup_pcpu_remap()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, April 3, 2009 - 6:04 pm

Gitweb:     http://git.kernel.org/linus/eb12ce60c81826a99eadbc56401e08ceb37a0cc2
Commit:     eb12ce60c81826a99eadbc56401e08ceb37a0cc2
Parent:     0f8f308925ebe0480bd9831d32963ee0b885e24b
Author:     Tejun Heo <tj@kernel.org>
AuthorDate: Wed Apr 1 15:06:33 2009 +0900
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu Apr 2 06:08:05 2009 +0200

    x86,percpu: fix inverted NUMA test in setup_pcpu_remap()
    
    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.
    
    Reported-by: David Miller <davem@davemloft.net>
    Reported-by: Yinghai Lu <yinghai@kernel.org>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    LKML-Reference: <49D30469.8020006@kernel.org>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/setup_percpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
x86,percpu: fix inverted NUMA test in setup_pcpu_remap(), Linux Kernel Mailing ..., (Fri Apr 3, 6:04 pm)