Skip to contentSkip to conversation

Compile fails an Alpha: include/asm/pci.h included from arch/alpha/kernel/setup.c

DISCUSSION Jan-Benedict Glaw 3 participants 3 messages May 21, 2001

lore
Share & tools
lore
#0 lore raw

Hi!

Kernel 2.4.5-pre[34] don't compile on Alpha:

In incluse/asm-alpha/pci.h (include during compile of arch/alpha/kernel/setup.c), there is

    150 static __inline__ int pci_controller_num(struct pci_dev *pdev)
    151 {
    152         struct pci_controller *hose = pdev->sysdata;
    153 
    154         if (hose != NULL)
    155                 return hose->index;
    156 
    157         return -ENXIO;
    158 }

which breaks on line 152:
In file included from arch/alpha/kernel/setup.c:52:
/usr/src/packages/linux-2.4.5-pre4/include/asm/pci.h: In function `pci_controller_num':
/usr/src/packages/linux-2.4.5-pre4/include/asm/pci.h:152: dereferencing pointer to incomplete type
make: *** [arch/alpha/kernel/setup.o] Error 1

MfG, JBG

Signature · 4 lines
Fehler eingestehen, Größe zeigen: Nehmt die Rechtschreibreform zurück!!!
/* Jan-Benedict Glaw <[email protected]> -- +49-172-7608481 */
keyID=0x8399E1BB fingerprint=250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB
     "insmod vi.o and there we go..." (Alexander Viro on linux-kernel)
#1 lore raw
Quoted 7 lines · Jan-Benedict Glaw

Hi!

Kernel 2.4.5-pre[34] don't compile on Alpha:

In incluse/asm-alpha/pci.h (include during compile of arch/alpha/kernel/setup.c), there is

include linux/pci.h not asm/pci.h... I've got a fix patch going to
Linus today, along with some other small Alpha build fixes like this.

Signature · 3 lines
Jeff Garzik      | "Are you the police?"
Building 1024    | "No, ma'am.  We're musicians."
MandrakeSoft     |
#2 lore raw
In reply to Jan-Benedict Glaw
Quoted 3 lines · Jan-Benedict Glaw

Kernel 2.4.5-pre[34] don't compile on Alpha:

....

Quoted 1 line
    152         struct pci_controller *hose = pdev->sysdata;
                                                 ^^^

This is the problem (a type for 'pdev' is not defined). And this is a possible fix:

include/asm-alpha/pci.h renamed from include/asm-alpha/pci.h~ +1 -0
@@ -6,6 +6,7 @@
 #include <linux/spinlock.h>
 #include <asm/scatterlist.h>
 #include <asm/machvec.h>
+#include <linux/pci.h>
 
 /*
  * The following structure is used to manage multiple PCI busses.

The patch is for 2.4.4-ac11, so offsets are possibly slightly different, but probably not. :-)

Michal