* 2.6.14-git1 (and -git2) build failure on AMD64
@ 2005-10-30 14:03 Martin J. Bligh
2005-10-30 14:17 ` Roland Dreier
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Martin J. Bligh @ 2005-10-30 14:03 UTC (permalink / raw)
To: linux-kernel; +Cc: Andi Kleen
CC arch/x86_64/pci/../../i386/pci/fixup.o
arch/x86_64/pci/../../i386/pci/fixup.c: In function `pci_fixup_i450nx':
arch/x86_64/pci/../../i386/pci/fixup.c:13: error: pci_fixup_i450nx causes a section type conflict
make[1]: *** [arch/x86_64/pci/../../i386/pci/fixup.o] Error 1
make: *** [arch/x86_64/pci] Error 2
Config: http://ftp.kernel.org/pub/linux/kernel/people/mbligh/config/abat/amd64
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.14-git1 (and -git2) build failure on AMD64
2005-10-30 14:03 2.6.14-git1 (and -git2) build failure on AMD64 Martin J. Bligh
@ 2005-10-30 14:17 ` Roland Dreier
2005-10-30 15:28 ` Andi Kleen
2005-10-30 15:49 ` [PATCH] x86_64: Work around " Andi Kleen
2 siblings, 0 replies; 10+ messages in thread
From: Roland Dreier @ 2005-10-30 14:17 UTC (permalink / raw)
To: Martin J. Bligh; +Cc: linux-kernel, Andi Kleen
Fixed by:
http://lkml.org/lkml/2005/10/29/12
You .config breaks because it has
# CONFIG_HOTPLUG is not set
- R.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.14-git1 (and -git2) build failure on AMD64
2005-10-30 14:03 2.6.14-git1 (and -git2) build failure on AMD64 Martin J. Bligh
2005-10-30 14:17 ` Roland Dreier
@ 2005-10-30 15:28 ` Andi Kleen
2005-10-30 15:50 ` Martin J. Bligh
2005-10-30 16:15 ` Roland Dreier
2005-10-30 15:49 ` [PATCH] x86_64: Work around " Andi Kleen
2 siblings, 2 replies; 10+ messages in thread
From: Andi Kleen @ 2005-10-30 15:28 UTC (permalink / raw)
To: Martin J. Bligh; +Cc: linux-kernel
On Sunday 30 October 2005 15:03, Martin J. Bligh wrote:
> CC arch/x86_64/pci/../../i386/pci/fixup.o
> arch/x86_64/pci/../../i386/pci/fixup.c: In function `pci_fixup_i450nx':
> arch/x86_64/pci/../../i386/pci/fixup.c:13: error: pci_fixup_i450nx causes a section type conflict
> make[1]: *** [arch/x86_64/pci/../../i386/pci/fixup.o] Error 1
> make: *** [arch/x86_64/pci] Error 2
>
> Config: http://ftp.kernel.org/pub/linux/kernel/people/mbligh/config/abat/amd64
What compiler do you use? I cannot make sense of the error - as far
as I can see the function only has a single section attribute.
But gcc 4.0.2 reports the same error for me on a different function.
-Andi
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] x86_64: Work around Re: 2.6.14-git1 (and -git2) build failure on AMD64
2005-10-30 14:03 2.6.14-git1 (and -git2) build failure on AMD64 Martin J. Bligh
2005-10-30 14:17 ` Roland Dreier
2005-10-30 15:28 ` Andi Kleen
@ 2005-10-30 15:49 ` Andi Kleen
2005-10-30 16:17 ` Roland Dreier
2 siblings, 1 reply; 10+ messages in thread
From: Andi Kleen @ 2005-10-30 15:49 UTC (permalink / raw)
To: Martin J. Bligh; +Cc: linux-kernel, discuss
On Sunday 30 October 2005 15:03, Martin J. Bligh wrote:
> CC arch/x86_64/pci/../../i386/pci/fixup.o
> arch/x86_64/pci/../../i386/pci/fixup.c: In function `pci_fixup_i450nx':
> arch/x86_64/pci/../../i386/pci/fixup.c:13: error: pci_fixup_i450nx causes a section type conflict
> make[1]: *** [arch/x86_64/pci/../../i386/pci/fixup.o] Error 1
> make: *** [arch/x86_64/pci] Error 2
>
> Config: http://ftp.kernel.org/pub/linux/kernel/people/mbligh/config/abat/amd64
>
I think it's a gcc bug. Anyways, this should work around it.
Linus, can you please apply it?
---
Work around gcc bug that causes build failures like
(exact function it is reported on varies with compiler version and optimization
level)
> arch/x86_64/pci/../../i386/pci/fixup.c: In function `pci_fixup_i450nx':
> arch/x86_64/pci/../../i386/pci/fixup.c:13: error: pci_fixup_i450nx causes a section type conflict
with !CONFIG_HOTPLUG. It makes the !CONFIG_HOTPLUG case act
like CONFIG_HOTPLUG. This wastes a bit of memory, but is not
too bad.
The sections are legitimate, but gcc somehow gets confused.
Compiling with -O3 seems to also help at least with gcc 4, but I'm
not sure it'll help everything. Splitting up the file might
a different option.
Signed-off-by: Andi Kleen <ak@suse.de>
diff -u linux-2.6.14-git2/arch/i386/pci/fixup.c-o linux-2.6.14-git2/arch/i386/pci/fixup.c
--- linux-2.6.14-git2/arch/i386/pci/fixup.c-o 2005-10-30 16:09:41.000000000 +0100
+++ linux-2.6.14-git2/arch/i386/pci/fixup.c 2005-10-30 16:42:32.000000000 +0100
@@ -8,6 +8,9 @@
#include <linux/init.h>
#include "pci.h"
+/* Works around a gcc bug which gets confused with so many section switches */
+#undef __devinit
+#define __devinit
static void __devinit pci_fixup_i450nx(struct pci_dev *d)
{
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.14-git1 (and -git2) build failure on AMD64
2005-10-30 15:28 ` Andi Kleen
@ 2005-10-30 15:50 ` Martin J. Bligh
2005-10-30 16:15 ` Roland Dreier
1 sibling, 0 replies; 10+ messages in thread
From: Martin J. Bligh @ 2005-10-30 15:50 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
--Andi Kleen <ak@suse.de> wrote (on Sunday, October 30, 2005 16:28:29 +0100):
> On Sunday 30 October 2005 15:03, Martin J. Bligh wrote:
>> CC arch/x86_64/pci/../../i386/pci/fixup.o
>> arch/x86_64/pci/../../i386/pci/fixup.c: In function `pci_fixup_i450nx':
>> arch/x86_64/pci/../../i386/pci/fixup.c:13: error: pci_fixup_i450nx causes a section type conflict
>> make[1]: *** [arch/x86_64/pci/../../i386/pci/fixup.o] Error 1
>> make: *** [arch/x86_64/pci] Error 2
>>
>> Config: http://ftp.kernel.org/pub/linux/kernel/people/mbligh/config/abat/amd64
>
> What compiler do you use? I cannot make sense of the error - as far
> as I can see the function only has a single section attribute.
> But gcc 4.0.2 reports the same error for me on a different function.
Looks like it's 3.4.0 on that box.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 2.6.14-git1 (and -git2) build failure on AMD64
2005-10-30 15:28 ` Andi Kleen
2005-10-30 15:50 ` Martin J. Bligh
@ 2005-10-30 16:15 ` Roland Dreier
1 sibling, 0 replies; 10+ messages in thread
From: Roland Dreier @ 2005-10-30 16:15 UTC (permalink / raw)
To: Andi Kleen; +Cc: Martin J. Bligh, linux-kernel
Andi> What compiler do you use? I cannot make sense of the error -
Andi> as far as I can see the function only has a single section
Andi> attribute. But gcc 4.0.2 reports the same error for me on a
Andi> different function.
Yes, the gcc error is very strange. The underlying cause is that
(with CONFIG_HOTPLUG=n so __devinit is not just defined away to
nothing) having toshiba_ohci1394_dmi_table[] declared __devinit makes
gcc think it has to put the array in a section along with code. But
instead of complaining about the array declaration, gcc complains
about some random function earlier in the file -- and which function
it picks to complain about seems to change depending on gcc version
and the phase of the moon.
- R.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] x86_64: Work around Re: 2.6.14-git1 (and -git2) build failure on AMD64
2005-10-30 15:49 ` [PATCH] x86_64: Work around " Andi Kleen
@ 2005-10-30 16:17 ` Roland Dreier
2005-10-30 16:23 ` Andi Kleen
2005-11-02 5:16 ` Martin J. Bligh
0 siblings, 2 replies; 10+ messages in thread
From: Roland Dreier @ 2005-10-30 16:17 UTC (permalink / raw)
To: Andi Kleen; +Cc: Martin J. Bligh, linux-kernel, discuss
Andi> Linus, can you please apply it?
No, please don't apply this. The correct fix is to mark
toshiba_ohci1394_dmi_table[] as __devinitdata in that file, as in the
patch I posted here:
http://lkml.org/lkml/2005/10/29/12
- R.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] x86_64: Work around Re: 2.6.14-git1 (and -git2) build failure on AMD64
2005-10-30 16:17 ` Roland Dreier
@ 2005-10-30 16:23 ` Andi Kleen
2005-10-30 16:32 ` Roland Dreier
2005-11-02 5:16 ` Martin J. Bligh
1 sibling, 1 reply; 10+ messages in thread
From: Andi Kleen @ 2005-10-30 16:23 UTC (permalink / raw)
To: Roland Dreier; +Cc: Martin J. Bligh, linux-kernel, discuss
On Sunday 30 October 2005 17:17, Roland Dreier wrote:
> Andi> Linus, can you please apply it?
>
> No, please don't apply this. The correct fix is to mark
> toshiba_ohci1394_dmi_table[] as __devinitdata in that file, as in the
> patch I posted here:
>
> http://lkml.org/lkml/2005/10/29/12
While not correct I don't see how it should guarantee it will
work around that gcc bug on all possible gcc versions (which show
different behaviour) My patch is more conservative and safer.
-Andi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] x86_64: Work around Re: 2.6.14-git1 (and -git2) build failure on AMD64
2005-10-30 16:23 ` Andi Kleen
@ 2005-10-30 16:32 ` Roland Dreier
0 siblings, 0 replies; 10+ messages in thread
From: Roland Dreier @ 2005-10-30 16:32 UTC (permalink / raw)
To: Andi Kleen; +Cc: Martin J. Bligh, linux-kernel, discuss
Andi> While not correct I don't see how it should guarantee it
Andi> will work around that gcc bug on all possible gcc versions
Andi> (which show different behaviour) My patch is more
Andi> conservative and safer.
What's the gcc bug? The current fixup.c code is asking gcc to put
toshiba_ohci1394_dmi_table[] in the .init.text section. This makes
gcc think that .init.text contains writable data. Then some other
declaration in the file asks gcc to put a function in .init.text. gcc
correctly complains that text and writable data can't share a section.
If we fix toshiba_ohci1394_dmi_table[] to go into .init.data as is
intended, then gcc is happy.
The only thing remotely like a gcc bug is that the diagnostic gcc
prints does not flag toshiba_ohci1394_dmi_table[] as the problem.
Admittedly I have only tested gcc 4.0 and gcc 3.4, but given that no
one reported this problem before toshiba_ohci1394_dmi_table[] was
added, and that the __devinit declaration of an array is obviously
wrong and would cause exactly this sort of section conflict, I think
we should at least try the correct fix.
- R.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] x86_64: Work around Re: 2.6.14-git1 (and -git2) build failure on AMD64
2005-10-30 16:17 ` Roland Dreier
2005-10-30 16:23 ` Andi Kleen
@ 2005-11-02 5:16 ` Martin J. Bligh
1 sibling, 0 replies; 10+ messages in thread
From: Martin J. Bligh @ 2005-11-02 5:16 UTC (permalink / raw)
To: Roland Dreier, Andi Kleen, Linus Torvalds; +Cc: linux-kernel, discuss
--Roland Dreier <rolandd@cisco.com> wrote (on Sunday, October 30, 2005 08:17:39 -0800):
> Andi> Linus, can you please apply it?
>
> No, please don't apply this. The correct fix is to mark
> toshiba_ohci1394_dmi_table[] as __devinitdata in that file, as in the
> patch I posted here:
>
> http://lkml.org/lkml/2005/10/29/12
Tested, fixes it for me. Linus - this is still broken in -git4, any chance
you could pick this one up? Makes nasty red marks across my shiny green
test matrix ;-)
Thanks,
M.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-11-02 5:16 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-30 14:03 2.6.14-git1 (and -git2) build failure on AMD64 Martin J. Bligh
2005-10-30 14:17 ` Roland Dreier
2005-10-30 15:28 ` Andi Kleen
2005-10-30 15:50 ` Martin J. Bligh
2005-10-30 16:15 ` Roland Dreier
2005-10-30 15:49 ` [PATCH] x86_64: Work around " Andi Kleen
2005-10-30 16:17 ` Roland Dreier
2005-10-30 16:23 ` Andi Kleen
2005-10-30 16:32 ` Roland Dreier
2005-11-02 5:16 ` Martin J. Bligh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox