public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Is topology_core_siblings for use by drivers?
@ 2008-07-29  7:14 Matthew Wilcox
  2008-07-29  9:28 ` Heiko Carstens
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2008-07-29  7:14 UTC (permalink / raw)
  To: linux-ia64; +Cc: linux-kernel


allmodconfig currently dies with:

ERROR: "cpu_core_map" [drivers/net/sfc/sfc.ko] undefined!

$ grep -r cpu_core_map include/asm-ia64/
include/asm-ia64/smp.h:extern cpumask_t cpu_core_map[NR_CPUS];
include/asm-ia64/topology.h:#define topology_core_siblings(cpu) (cpu_core_map[cpu])

OK ... it's not exported to modules.  Do other architectures have this
problem?

$ grep topology_core_siblings include/asm-*/topology.h
include/asm-ia64/topology.h:#define topology_core_siblings(cpu) (cpu_core_map[cpu])
include/asm-powerpc/topology.h:#define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu))
include/asm-s390/topology.h:#define topology_core_siblings(cpu) (cpu_core_map[cpu])
include/asm-x86/topology.h:#define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu))

s390, I guess.  But they don't have PCI device drivers.

If device drivers are supposed to call this, please apply this patch:

----

Export cpu_core_map so modules can call topology_core_siblings()

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>

diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 03f1a99..6cb0927 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -138,6 +138,7 @@ cpumask_t cpu_possible_map = CPU_MASK_NONE;
 EXPORT_SYMBOL(cpu_possible_map);
 
 cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned;
+EXPORT_SYMBOL(cpu_core_map);
 DEFINE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map);
 EXPORT_PER_CPU_SYMBOL(cpu_sibling_map);
 

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Is topology_core_siblings for use by drivers?
  2008-07-29  7:14 Is topology_core_siblings for use by drivers? Matthew Wilcox
@ 2008-07-29  9:28 ` Heiko Carstens
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Carstens @ 2008-07-29  9:28 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: linux-ia64, linux-kernel

On Tue, Jul 29, 2008 at 01:14:22AM -0600, Matthew Wilcox wrote:
> 
> allmodconfig currently dies with:
> 
> ERROR: "cpu_core_map" [drivers/net/sfc/sfc.ko] undefined!
> 
> $ grep -r cpu_core_map include/asm-ia64/
> include/asm-ia64/smp.h:extern cpumask_t cpu_core_map[NR_CPUS];
> include/asm-ia64/topology.h:#define topology_core_siblings(cpu) (cpu_core_map[cpu])
> 
> OK ... it's not exported to modules.  Do other architectures have this
> problem?
> 
> $ grep topology_core_siblings include/asm-*/topology.h
> include/asm-ia64/topology.h:#define topology_core_siblings(cpu) (cpu_core_map[cpu])
> include/asm-powerpc/topology.h:#define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu))
> include/asm-s390/topology.h:#define topology_core_siblings(cpu) (cpu_core_map[cpu])
> include/asm-x86/topology.h:#define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu))
> 
> s390, I guess.  But they don't have PCI device drivers.

Yes, luckily it doesn't get compiled on s390. Btw. the for_each_online_cpu
loop where this gets used doesn't seem to be save wrt cpu hotplug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-29  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-29  7:14 Is topology_core_siblings for use by drivers? Matthew Wilcox
2008-07-29  9:28 ` Heiko Carstens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox