From: Rusty Russell <rusty@rustcorp.com.au>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
"Greg Kroah-Hartman" <gregkh@suse.de>,
Yinghai Lu <yinghai@kernel.org>, Tejun Heo <tj@kernel.org>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [crash] BUG: unable to handle kernel NULL pointer dereference at (null), last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/local_cpus
Date: Thu, 24 Sep 2009 17:48:44 +0930 [thread overview]
Message-ID: <200909241748.45629.rusty@rustcorp.com.au> (raw)
In-Reply-To: <alpine.LFD.2.01.0909180755530.4950@localhost.localdomain>
On Sat, 19 Sep 2009 01:08:02 am Linus Torvalds wrote:
> [ Side note: looking closer, I think our headers are buggy, and I _know_
> they are confusing. The above inline declaration of cpumask_of_node()
> seems to be then later overridden in <asm-generic/topology.h> by a
> #define!
>
> And if I read that right, that will also override the debugging
> versions that we declared if CONFIG_DEBUG_PER_CPU_MAPS is on. Ingo?
> Rusty? Am I missing something?
What a tangle.
The CONFIG_DEBUG_PER_CPU_MAPS only overrides cpumask_of_node in the NUMA case
(otherwise, it leaves it alone).
And asm-generic/topology.h only defines cpumask_of_node in the !NUMA case.
But there's still redundancy. Ingo...
Subject: x86: remove redundant non-NUMA topology functions
arch/x86/include/asm/topology.h declares inline fns cpu_to_node
and cpumask_of_node for !NUMA, even though they are then declared as macros
by asm-generic/topology.h, which is #included just below.
The macros (which are the same) end up being used; these functions are
just confusing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
arch/x86/include/asm/topology.h | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -165,21 +165,11 @@ static inline int numa_node_id(void)
return 0;
}
-static inline int cpu_to_node(int cpu)
-{
- return 0;
-}
-
static inline int early_cpu_to_node(int cpu)
{
return 0;
}
-static inline const struct cpumask *cpumask_of_node(int node)
-{
- return cpu_online_mask;
-}
-
static inline void setup_node_to_cpumask_map(void) { }
#endif
next prev parent reply other threads:[~2009-09-24 8:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-15 20:21 [git pull] first round of PCI updates for 2.6.32 Jesse Barnes
2009-09-16 14:55 ` Linus Torvalds
2009-09-16 15:20 ` Stephen Rothwell
2009-09-17 17:30 ` Ingo Molnar
2009-09-17 17:36 ` Jesse Barnes
2009-09-17 17:59 ` Ingo Molnar
2009-09-17 18:46 ` Jesse Barnes
2009-09-18 7:59 ` [crash] BUG: unable to handle kernel NULL pointer dereference at (null), last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/local_cpus Ingo Molnar
2009-09-18 9:37 ` David Rientjes
2009-09-18 15:38 ` Linus Torvalds
2009-09-18 15:44 ` Jesse Barnes
2009-09-24 8:18 ` Rusty Russell [this message]
2009-09-24 12:18 ` [tip:x86/urgent] x86: Remove redundant non-NUMA topology functions tip-bot for Rusty Russell
2009-09-18 16:24 ` [crash] BUG: unable to handle kernel NULL pointer dereference at (null), last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/local_cpus Yinghai Lu
2009-09-18 16:34 ` Jesse Barnes
2009-09-18 16:51 ` Linus Torvalds
2009-09-18 17:10 ` Jesse Barnes
2009-09-18 15:27 ` [git pull] first round of PCI updates for 2.6.32 Jesse Barnes
2009-09-18 15:52 ` Ingo Molnar
2009-09-18 16:17 ` Jesse Barnes
2009-09-17 17:45 ` Yinghai Lu
2009-09-17 18:31 ` Ingo Molnar
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=200909241748.45629.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--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