Skip to contentSkip to conversation

cpumask change causes sparc build bustage

DISCUSSION Applied David Miller 4 participants 7 messages Jan 11, 2009 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

drivers/pci/probe.c: In function 'pci_bus_show_cpuaffinity':
drivers/pci/probe.c:56: error: implicit declaration of function 'cpumask_of_pcibus' drivers/pci/probe.c:56: warning: assignment makes pointer from integer without a cast

Almost certainly caused by:

commit 588235bb53f2c215f0d4b08fd30b461fedc3338e

Author: Mike Travis <[email protected]>
Date:   Sun Jan 4 05:18:02 2009 -0800

cpumask: update pci_bus_show_cpuaffinity to use new cpumask API

Impact: use new cpumask API to reduce stack usage

Replace the local cpumask_t variable with a pointer to the const cpumask that needs to be printed.

I'm surprised linux-next builds didn't catch this.

#1 lore raw

Hi Dave,

Quoted 2 lines · On Sun, 11 Jan 2009 00:31:03 -0800 (PST) David Miller <[email protected]>…

I'm surprised linux-next builds didn't catch this.

So am I. http://kisskb.ellerman.id.au/kisskb/compiler/5/ shows my latest builds of both linux-next and Linus' tree are OK for defconfig and allnoconfig (allmodconfig fails for a different reason).

What is different about the failing config (compiler)? Are there other configs it would be sensible to build test?

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
author maintainer
#2 lore raw

From: Stephen Rothwell <[email protected]>
Date: Sun, 11 Jan 2009 20:50:08 +1100

Quoted 10 lines · On Sun, 11 Jan 2009 00:31:03 -0800 (PST) David Miller <[email protected]>…
Quoted 2 lines

I'm surprised linux-next builds didn't catch this.

So am I. http://kisskb.ellerman.id.au/kisskb/compiler/5/ shows my latest builds of both linux-next and Linus' tree are OK for defconfig and allnoconfig (allmodconfig fails for a different reason).

What is different about the failing config (compiler)? Are there other configs it would be sensible to build test?

Maybe you don't have NUMA enabled in the test build configs. I hit it during an allmodconfig.

Anyways this fixes it, someone please apply:

sparc64: Fix cpumask related build failure.

arch/sparc/include/asm/topology_64.h +4 -0
index b8a65b6..5bc0b8f 100644
@@ -47,6 +47,10 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
 	(pcibus_to_node(bus) = -1 ? \
 	 CPU_MASK_ALL : \
 	 node_to_cpumask(pcibus_to_node(bus)))
+#define cpumask_of_pcibus(bus)	\
+	(pcibus_to_node(bus) = -1 ? \
+	 CPU_MASK_ALL_PTR : \
+	 cpumask_of_node(pcibus_to_node(bus)))
 
 #define SD_NODE_INIT (struct sched_domain) {		\
 	.min_interval		= 8,			\
Applied
#3 lore raw
Quoted 14 lines · David Miller

From: Stephen Rothwell <[email protected]>
Date: Sun, 11 Jan 2009 20:50:08 +1100

Quoted 10 lines · On Sun, 11 Jan 2009 00:31:03 -0800 (PST) David Miller <[email protected]>…
Quoted 2 lines

I'm surprised linux-next builds didn't catch this.

So am I. http://kisskb.ellerman.id.au/kisskb/compiler/5/ shows my latest builds of both linux-next and Linus' tree are OK for defconfig and allnoconfig (allmodconfig fails for a different reason).

What is different about the failing config (compiler)? Are there other configs it would be sensible to build test?

Quoted 8 lines

Maybe you don't have NUMA enabled in the test build configs. I hit it during an allmodconfig.

Anyways this fixes it, someone please apply:

sparc64: Fix cpumask related build failure.

applied it to tip/core/urgent and will send it to Linus later today. Thanks David!

Ingo

#4 lore raw
In reply to David Miller
Quoted 26 lines · David Miller

From: Stephen Rothwell <[email protected]>
Date: Sun, 11 Jan 2009 20:50:08 +1100

Quoted 8 lines · On Sun, 11 Jan 2009 00:31:03 -0800 (PST) David Miller <[email protected]>…
Quoted 1 line

I'm surprised linux-next builds didn't catch this.

So am I. http://kisskb.ellerman.id.au/kisskb/compiler/5/ shows my latest builds of both linux-next and Linus' tree are OK for defconfig and allnoconfig (allmodconfig fails for a different reason).

What is different about the failing config (compiler)? Are there other configs it would be sensible to build test?

Maybe you don't have NUMA enabled in the test build configs. I hit it during an allmodconfig.

Anyways this fixes it, someone please apply:

sparc64: Fix cpumask related build failure.

arch/sparc/include/asm/topology_64.h +0 -0
index b8a65b6..5bc0b8f 100644

arch/sparc/include/asm/topology_64.h static inline int pcibus_to_node(struct pci_bus *pbus) · line 56

Quoted 10 lines
arch/sparc/include/asm/topology_64.h +4 -0
@@ -47,6 +47,10 @@ static inline int pcibus_to_node(struct pci_bus *pbus)
 	(pcibus_to_node(bus) = -1 ? \
 	 CPU_MASK_ALL : \
 	 node_to_cpumask(pcibus_to_node(bus)))
+#define cpumask_of_pcibus(bus)	\
+	(pcibus_to_node(bus) = -1 ? \
+	 CPU_MASK_ALL_PTR : \
+	 cpumask_of_node(pcibus_to_node(bus)))
 
 #define SD_NODE_INIT (struct sched_domain) {		\
 	.min_interval		= 8,			\

Ouch. Sorry you had to find this. I thought Rusty had pushed all the arch changes required for cpumask_of_pcibus() quite some time ago.

Thanks for fixing it. In actuality though, it should return cpu_mask_all instead of CPU_MASK_ALL_PTR but that's a small nit.

Thanks,
Mike

author maintainer
#5 lore raw

From: Mike Travis <[email protected]>
Date: Sun, 11 Jan 2009 08:49:46 -0800

Quoted 2 lines

Thanks for fixing it. In actuality though, it should return cpu_mask_all instead of CPU_MASK_ALL_PTR but that's a small nit.

CPU_MASK_ALL_PTR is defined to &cpu_mask_all, that's why I used it, to be consistent with the other macro using CPU_MASK_ALL right above it.

#6 lore raw
Quoted 8 lines · David Miller

From: Mike Travis <[email protected]>
Date: Sun, 11 Jan 2009 08:49:46 -0800

Quoted 2 lines

Thanks for fixing it. In actuality though, it should return cpu_mask_all instead of CPU_MASK_ALL_PTR but that's a small nit.

CPU_MASK_ALL_PTR is defined to &cpu_mask_all, that's why I used it, to be consistent with the other macro using CPU_MASK_ALL right above it.

It's not a big deal. CPU_MASK_ALL_PTR is one of those "bandaids" to keep current code working until it's all been cleansed of the old cpumask_t functions. Rusty's so-called "big hammer" patch.

Thanks,
Mike