public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.1-rc1 compile error
@ 2003-12-31 14:09 Srihari Vijayaraghavan
  2004-01-01  9:26 ` Juergen Hasch
  0 siblings, 1 reply; 7+ messages in thread
From: Srihari Vijayaraghavan @ 2003-12-31 14:09 UTC (permalink / raw)
  To: linux-kernel

While "make bzImage", it showed these error messages:
  CC      arch/x86_64/kernel/io_apic.o
arch/x86_64/kernel/io_apic.c:1215: error: redefinition of 
`disable_edge_ioapic_irq'
include/asm/io_apic.h:178: error: `disable_edge_ioapic_irq' previously defined 
here
arch/x86_64/kernel/io_apic.c:1259: error: redefinition of 
`end_edge_ioapic_irq'
include/asm/io_apic.h:180: error: `end_edge_ioapic_irq' previously defined 
here
arch/x86_64/kernel/io_apic.c:1346: error: redefinition of 
`mask_and_ack_level_ioapic_irq'
include/asm/io_apic.h:179: error: `mask_and_ack_level_ioapic_irq' previously 
defined here
make[1]: *** [arch/x86_64/kernel/io_apic.o] Error 1
make: *** [arch/x86_64/kernel] Error 2

I applied this patch (I do not know, it could be wrong):
--- 2.6.1-rc1/arch/x86_64/kernel/io_apic.c.orig 2004-01-01 00:56:40.534040872 
+1100
+++ 2.6.1-rc1/arch/x86_64/kernel/io_apic.c      2004-01-01 00:57:46.491013888 
+1100
@@ -1212,7 +1212,6 @@
  */
 #define enable_edge_ioapic_irq unmask_IO_APIC_irq

-static void disable_edge_ioapic_irq (unsigned int irq) { /* nothing */ }

 /*
  * Starting up a edge-triggered IO-APIC interrupt is
@@ -1256,7 +1255,6 @@
        ack_APIC_irq();
 }

-static void end_edge_ioapic_irq (unsigned int i) { /* nothing */ }


 /*
@@ -1343,7 +1341,6 @@
        }
 }

-static void mask_and_ack_level_ioapic_irq (unsigned int irq) { /* nothing */ 
}

 static void set_ioapic_affinity (unsigned int irq, cpumask_t mask)
 {


Then it compiled the io_apic.c and progressed (maybe a lot). But it failed and 
showed this error message:
  LD      .tmp_vmlinux1
arch/i386/pci/built-in.o(.text+0xc6e): In function `pcibios_lookup_irq':
: undefined reference to `can_request_irq'
make: *** [.tmp_vmlinux1] Error 1

Please feel free to send me patches, I am happy to test and report. BTW I see 
the same behaviour with 2.6.1-rc1-mm1 too.

Thanks
Hari
harisri@bigpond.com

PS: I am hoping for a good 2.6.1 (out of the box) for x86-64


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

* Re: 2.6.1-rc1 compile error
  2003-12-31 14:09 Srihari Vijayaraghavan
@ 2004-01-01  9:26 ` Juergen Hasch
  2004-01-01 19:34   ` Linus Torvalds
  0 siblings, 1 reply; 7+ messages in thread
From: Juergen Hasch @ 2004-01-01  9:26 UTC (permalink / raw)
  To: Srihari Vijayaraghavan, linux-kernel; +Cc: Linus Torvalds

[-- Attachment #1: Type: text/plain, Size: 880 bytes --]

Am Mittwoch, 31. Dezember 2003 15:09 schrieb Srihari Vijayaraghavan:
>
>
> Then it compiled the io_apic.c and progressed (maybe a lot). But it failed
> and showed this error message:
>   LD      .tmp_vmlinux1
>
> arch/i386/pci/built-in.o(.text+0xc6e): In function `pcibios_lookup_irq':
> : undefined reference to `can_request_irq'
>
> make: *** [.tmp_vmlinux1] Error 1
>

This is obviously due to can_request_irq is found in arch/i386/kernel/irq.c
and the x86_64 build just includes some stuff from arch/i386/pci/irq.c where
can_request_irq is used too. 

Linus introduced this function a few weeks ago. I used the patch below to move 
the function from kernel/irq.c to pci/irq.c, but he will probably fix it
himself soon.

Btw. there are a lot of other fixes for the x86_64 build from Andi Kleen which
you should apply too. However, they don't apply cleanly anymore.

...Juergen

[-- Attachment #2: can_request_irq.diff --]
[-- Type: text/x-diff, Size: 1075 bytes --]

--- arch/i386/kernel/irq.c.orig	2004-01-01 10:06:00.000000000 +0100
+++ arch/i386/kernel/irq.c	2003-12-31 13:13:58.000000000 +0100
@@ -511,19 +511,6 @@
 	return 1;
 }
 
-int can_request_irq(unsigned int irq, unsigned long irqflags)
-{
-	struct irqaction *action;
-
-	if (irq >= NR_IRQS)
-		return 0;
-	action = irq_desc[irq].action;
-	if (action) {
-		if (irqflags & action->flags & SA_SHIRQ)
-			action = NULL;
-	}
-	return !action;
-}
 
 /**
  *	request_irq - allocate an interrupt line
--- arch/i386/pci/irq.c.orig	2004-01-01 10:06:42.000000000 +0100
+++ arch/i386/pci/irq.c	2003-12-31 13:24:35.000000000 +0100
@@ -939,6 +939,20 @@
 	pirq_penalty[irq] += 100;
 }
 
+int can_request_irq(unsigned int irq, unsigned long irqflags)
+{
+       struct irqaction *action;
+
+       if (irq >= NR_IRQS)
+               return 0;
+       action = irq_desc[irq].action;
+       if (action) {
+               if (irqflags & action->flags & SA_SHIRQ)
+                       action = NULL;
+       }
+       return !action;
+}
+
 int pirq_enable_irq(struct pci_dev *dev)
 {
 	u8 pin;

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

* Re: 2.6.1-rc1 compile error
  2004-01-01  9:26 ` Juergen Hasch
@ 2004-01-01 19:34   ` Linus Torvalds
  0 siblings, 0 replies; 7+ messages in thread
From: Linus Torvalds @ 2004-01-01 19:34 UTC (permalink / raw)
  To: Juergen Hasch; +Cc: Srihari Vijayaraghavan, linux-kernel



On Thu, 1 Jan 2004, Juergen Hasch wrote:
> 
> Linus introduced this function a few weeks ago. I used the patch below to move 
> the function from kernel/irq.c to pci/irq.c, but he will probably fix it
> himself soon.

I'd much rather have x86-64 have their own version. I would prefer to keep
the irq knowledge in the irq layer. Eventually that irq layer will get
unified, but for now I do _not_ want some random PCI file to know about
irq handler internal data structures.

		Linus

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

* Re: 2.6.1-rc1 compile error
       [not found] <18PmG-40b-9@gated-at.bofh.it>
@ 2004-01-01 22:01 ` Andi Kleen
  2004-01-03  2:09   ` Srihari Vijayaraghavan
  0 siblings, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2004-01-01 22:01 UTC (permalink / raw)
  To: Srihari Vijayaraghavan; +Cc: linux-kernel

Srihari Vijayaraghavan <harisri@bigpond.com> writes:

> While "make bzImage", it showed these error messages:
>   CC      arch/x86_64/kernel/io_apic.o

I already submitted a patch to fix that and Linus merged it.
Use current -bk*

The MSI code is unfortunately quite broken and will need more
work to really work on anything except IA32.

-Andi

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

* Re: 2.6.1-rc1 compile error
  2004-01-01 22:01 ` 2.6.1-rc1 compile error Andi Kleen
@ 2004-01-03  2:09   ` Srihari Vijayaraghavan
  2004-01-03  2:51     ` Andi Kleen
  2004-01-03  4:22     ` Srihari Vijayaraghavan
  0 siblings, 2 replies; 7+ messages in thread
From: Srihari Vijayaraghavan @ 2004-01-03  2:09 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel

Hello Andi,

On Friday 02 January 2004 09:01, Andi Kleen wrote:
> Srihari Vijayaraghavan <harisri@bigpond.com> writes:
> > While "make bzImage", it showed these error messages:
> >   CC      arch/x86_64/kernel/io_apic.o
>
> I already submitted a patch to fix that and Linus merged it.
> Use current -bk*

Unfortunately the current -bk* would not apply cleanly. For eg, 
patch-2.6.1-rc1-bk3 does not apply to 2.6.1-rc1. Maybe when 2.6.1-rc2 is out 
I shall try it out at that time.

(BTW I have tried 2.6.1-rc1-x8664-1, and all is fine with that.)
 
> The MSI code is unfortunately quite broken and will need more
> work to really work on anything except IA32.
>
> -Andi

Thanks
Hari
harisri@bigpond.com


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

* Re: 2.6.1-rc1 compile error
  2004-01-03  2:09   ` Srihari Vijayaraghavan
@ 2004-01-03  2:51     ` Andi Kleen
  2004-01-03  4:22     ` Srihari Vijayaraghavan
  1 sibling, 0 replies; 7+ messages in thread
From: Andi Kleen @ 2004-01-03  2:51 UTC (permalink / raw)
  To: Srihari Vijayaraghavan; +Cc: Andi Kleen, linux-kernel

On Sat, Jan 03, 2004 at 01:09:10PM +1100, Srihari Vijayaraghavan wrote:
> Hello Andi,
> 
> On Friday 02 January 2004 09:01, Andi Kleen wrote:
> > Srihari Vijayaraghavan <harisri@bigpond.com> writes:
> > > While "make bzImage", it showed these error messages:
> > >   CC      arch/x86_64/kernel/io_apic.o
> >
> > I already submitted a patch to fix that and Linus merged it.
> > Use current -bk*
> 
> Unfortunately the current -bk* would not apply cleanly. For eg, 
> patch-2.6.1-rc1-bk3 does not apply to 2.6.1-rc1. Maybe when 2.6.1-rc2 is out 
> I shall try it out at that time.

It applied fine for me. Maybe your trees are corrupted. 

> (BTW I have tried 2.6.1-rc1-x8664-1, and all is fine with that.)

There's one bug in there that breaks it on some boxes.

-Andi

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

* Re: 2.6.1-rc1 compile error
  2004-01-03  2:09   ` Srihari Vijayaraghavan
  2004-01-03  2:51     ` Andi Kleen
@ 2004-01-03  4:22     ` Srihari Vijayaraghavan
  1 sibling, 0 replies; 7+ messages in thread
From: Srihari Vijayaraghavan @ 2004-01-03  4:22 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel

Thanks Andi. With a clean 2.6.1-rc1 tree and -bk3 patch all is well.

Hari
harisri@bigpond.com


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

end of thread, other threads:[~2004-01-03  4:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <18PmG-40b-9@gated-at.bofh.it>
2004-01-01 22:01 ` 2.6.1-rc1 compile error Andi Kleen
2004-01-03  2:09   ` Srihari Vijayaraghavan
2004-01-03  2:51     ` Andi Kleen
2004-01-03  4:22     ` Srihari Vijayaraghavan
2003-12-31 14:09 Srihari Vijayaraghavan
2004-01-01  9:26 ` Juergen Hasch
2004-01-01 19:34   ` Linus Torvalds

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