undefined reference to pci_io_base

Linas Vepstas linas at austin.ibm.com
Wed Aug 30 09:20:26 EST 2006


On Wed, Aug 30, 2006 at 08:42:56AM +1000, Paul Mackerras wrote:
> Geoff Levand writes:
> 
> > I'm trying to understand the intended design of the inb()
> > and outb() macros in asm-powerpc/io.h. They are causing
> > me some grief when I set CONFIG_PCI=n:
> > 
> >   drivers/built-in.o: undefined reference to `pci_io_base'
> > 
> > This is coming from drivers/char/mem.c, which is always
> > built in, and is referencing pci_io_base through inb()
> > and outb().
> 
> Hmmm.  inb and outb are designed for accessing PCI I/O space.  I guess
> we could turn them into BUG() when CONFIG_PCI=n.

I just looked at drivers/char/mem.c and the code in question
is surrounded by 

#if defined(CONFIG_ISA) || !defined(__mc68000__)

which seems just plain wrong.

It should probably be changed to 

#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)

This code surrounds fileops to enale fileio on /dev/port
which maps to inb/outb.  

Do we want to enable /dev/port for pci space ??

--linas



More information about the Linuxppc-dev mailing list