Skip to contentSkip to conversation

Build error: kvm/reset.c

DISCUSSION Russell King - ARM Linux 2 participants 4 messages Aug 15, 2013 – Aug 19, 2013 Arm (32-bit)

lore
Share & tools
lore
#1 lore raw
Quoted 7 lines · Russell King - ARM Linux

Last night's omap4430-sdp randconfig failed with this error in the KVM code:

arch/arm/kvm/reset.c:43:2: error: unknown field 'irq' specified in initializer

Configs etc at http://www.arm.linux.org.uk/developer/build/

Tree is my tip plus arm-soc tip plus Linus' tip.

hmmm, I'm wondering if this is actually related to:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676

Can you tell me which GCC version you are using?

I have been unable to reproduce this in any way (unfortunately it seems the randconfig generating this error is also not available anymore), but this patch may solve the issue:

arch/arm/kvm/reset.c +1 -1
index b7840e7..71e08ba 100644
@@ -40,7 +40,7 @@ static struct kvm_regs a15_regs_reset = {
 };
 
 static const struct kvm_irq_level a15_vtimer_irq = {
-	.irq = 27,
+	{ .irq = 27 },
 	.level = 1,
 };
 

-Christoffer

#2 lore raw
Quoted 7 lines · Christoffer Dall
Quoted 6 lines · Russell King - ARM Linux

Last night's omap4430-sdp randconfig failed with this error in the KVM code:

arch/arm/kvm/reset.c:43:2: error: unknown field 'irq' specified in initializer

Configs etc at http://www.arm.linux.org.uk/developer/build/

Quoted 7 lines
Quoted 1 line

Tree is my tip plus arm-soc tip plus Linus' tip.

hmmm, I'm wondering if this is actually related to:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676

Can you tell me which GCC version you are using?

4.5.4.

Quoted 9 lines

I have been unable to reproduce this in any way (unfortunately it seems the randconfig generating this error is also not available anymore), but this patch may solve the issue:

arch/arm/kvm/reset.c +0 -0
index b7840e7..71e08ba 100644

arch/arm/kvm/reset.c static struct kvm_regs a15_regs_reset = { · line 45

Quoted 7 lines
arch/arm/kvm/reset.c +1 -1
@@ -40,7 +40,7 @@ static struct kvm_regs a15_regs_reset = {
 };
 
 static const struct kvm_irq_level a15_vtimer_irq = {
-	.irq = 27,
+	{ .irq = 27 },
 	.level = 1,
 };

Yes, that appears to fix it with the test I just tried:

struct kvm_irq_level {
        union {
                unsigned irq;
                int status;
        };
        unsigned level;
};
const struct kvm_irq_level a15_vtimer_irq = {
        { .irq = 15, },
        .level = 1,
};

produces:

a15_vtimer_irq:

	.word	15
	.word	1

which is correct.

#3 lore raw
Quoted 50 lines · Russell King - ARM Linux
Quoted 7 lines · Christoffer Dall
Quoted 6 lines · Russell King - ARM Linux

Last night's omap4430-sdp randconfig failed with this error in the KVM code:

arch/arm/kvm/reset.c:43:2: error: unknown field 'irq' specified in initializer

Configs etc at http://www.arm.linux.org.uk/developer/build/

Quoted 7 lines
Quoted 1 line

Tree is my tip plus arm-soc tip plus Linus' tip.

hmmm, I'm wondering if this is actually related to:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676

Can you tell me which GCC version you are using?

4.5.4.

Quoted 9 lines

I have been unable to reproduce this in any way (unfortunately it seems the randconfig generating this error is also not available anymore), but this patch may solve the issue:

arch/arm/kvm/reset.c +0 -0
index b7840e7..71e08ba 100644

arch/arm/kvm/reset.c static struct kvm_regs a15_regs_reset = { · line 45

Quoted 7 lines
arch/arm/kvm/reset.c +1 -1
@@ -40,7 +40,7 @@ static struct kvm_regs a15_regs_reset = {
 };
 
 static const struct kvm_irq_level a15_vtimer_irq = {
-	.irq = 27,
+	{ .irq = 27 },
 	.level = 1,
 };

Yes, that appears to fix it with the test I just tried:

struct kvm_irq_level {
        union {
                unsigned irq;
                int status;
        };
        unsigned level;
};
const struct kvm_irq_level a15_vtimer_irq = {
        { .irq = 15, },
        .level = 1,
};
Quoted 7 lines

produces:

a15_vtimer_irq:

	.word	15
	.word	1

which is correct.

Thanks,
I'll queue this patch.

-Christoffer