From: Stephen Rothwell on
Hi Jeremy,

After merging the xen tree, today's linux-next build (86_64 allmodconfig)
failed like this:

arch/x86/xen/enlighten.c:71: error: __pcpu_scope_xen_vcpu causes a section type conflict
arch/x86/xen/enlighten.c:72: error: __pcpu_scope_xen_vcpu_info causes a section type conflict
arch/x86/xen/enlighten.c:71: error: __pcpu_unique_xen_vcpu causes a section type conflict
arch/x86/xen/enlighten.c:72: error: __pcpu_unique_xen_vcpu_info causes a section type conflict
arch/x86/xen/enlighten.c:558: error: __pcpu_unique_idt_desc causes a section type conflict
arch/x86/xen/enlighten.c:760: error: __pcpu_unique_xen_cr0_value causes a section type conflict

Not sure what has caused this. I have dropped the xen tree for today.

gcc version 4.4.4 binutils version 2.20.1.
--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
From: Jeremy Fitzhardinge on
On 07/22/2010 09:01 PM, Stephen Rothwell wrote:
> Hi Jeremy,
>
> After merging the xen tree, today's linux-next build (86_64 allmodconfig)
> failed like this:
>
> arch/x86/xen/enlighten.c:71: error: __pcpu_scope_xen_vcpu causes a section type conflict
> arch/x86/xen/enlighten.c:72: error: __pcpu_scope_xen_vcpu_info causes a section type conflict
> arch/x86/xen/enlighten.c:71: error: __pcpu_unique_xen_vcpu causes a section type conflict
> arch/x86/xen/enlighten.c:72: error: __pcpu_unique_xen_vcpu_info causes a section type conflict
> arch/x86/xen/enlighten.c:558: error: __pcpu_unique_idt_desc causes a section type conflict
> arch/x86/xen/enlighten.c:760: error: __pcpu_unique_xen_cr0_value causes a section type conflict
>
> Not sure what has caused this. I have dropped the xen tree for today.
> gcc version 4.4.4 binutils version 2.20.1.
>


How mysterious. I couldn't reproduce it with an allmodconfig with gcc
4.4.3 binutils 2.19.51 (Fedora 12). I'm re-trying with Fedora 13's
toolchain, which has matching version numbers to yours.

Thanks,
J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Jeremy Fitzhardinge on
On 07/22/2010 09:01 PM, Stephen Rothwell wrote:
> After merging the xen tree, today's linux-next build (86_64 allmodconfig)
> failed like this:
>
> arch/x86/xen/enlighten.c:71: error: __pcpu_scope_xen_vcpu causes a section type conflict
> arch/x86/xen/enlighten.c:72: error: __pcpu_scope_xen_vcpu_info causes a section type conflict
> arch/x86/xen/enlighten.c:71: error: __pcpu_unique_xen_vcpu causes a section type conflict
> arch/x86/xen/enlighten.c:72: error: __pcpu_unique_xen_vcpu_info causes a section type conflict
> arch/x86/xen/enlighten.c:558: error: __pcpu_unique_idt_desc causes a section type conflict
> arch/x86/xen/enlighten.c:760: error: __pcpu_unique_xen_cr0_value causes a section type conflict
>
> Not sure what has caused this. I have dropped the xen tree for today.
>
> gcc version 4.4.4 binutils version 2.20.1.
>

I can reproduce this.

I bisected it down to change bee6ab53e652a414af20392899879b58cd80d033.

Ah! That change uses RESERVE_BRK(), which creates a dummy function and
puts it into the .discard section. Presumably that makes gcc think that
..discard is for code, and so when the percpu stuff starts putting data
into .discard, gcc (now) complains. If we add more .discard.* sections
then everyone is happy:

diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index 86b1506..ef292c7 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -82,7 +82,7 @@ void *extend_brk(size_t size, size_t align);
* executable.)
*/
#define RESERVE_BRK(name,sz) \
- static void __section(.discard) __used \
+ static void __section(.discard.text) __used \
__brk_reservation_fn_##name##__(void) { \
asm volatile ( \
".pushsection .brk_reservation,\"aw\",@nobits;" \
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 48c5299..ae6b88e 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -643,6 +643,7 @@
EXIT_DATA \
EXIT_CALL \
*(.discard) \
+ *(.discard.*) \
}

/**

I'll write up a proper patch.


Thanks,
J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Jeremy Fitzhardinge on
On 07/22/2010 09:01 PM, Stephen Rothwell wrote:
> arch/x86/xen/enlighten.c:71: error: __pcpu_scope_xen_vcpu causes a section type conflict
> arch/x86/xen/enlighten.c:72: error: __pcpu_scope_xen_vcpu_info causes a section type conflict
> arch/x86/xen/enlighten.c:71: error: __pcpu_unique_xen_vcpu causes a section type conflict
> arch/x86/xen/enlighten.c:72: error: __pcpu_unique_xen_vcpu_info causes a section type conflict
> arch/x86/xen/enlighten.c:558: error: __pcpu_unique_idt_desc causes a section type conflict
> arch/x86/xen/enlighten.c:760: error: __pcpu_unique_xen_cr0_value causes a section type conflict
>
> Not sure what has caused this. I have dropped the xen tree for today.
>
> gcc version 4.4.4 binutils version 2.20.1.
>

I've updated upstream/xen with the patch I just posted to fix this problem.

Thanks,
J

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Stephen Rothwell on
Hi Jeremy,

On Thu, 22 Jul 2010 23:05:10 -0700 Jeremy Fitzhardinge <jeremy(a)goop.org> wrote:
>
> I've updated upstream/xen with the patch I just posted to fix this problem.

Thanks. I will pick it up on Monday.

--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
http://www.canb.auug.org.au/~sfr/