undefined reference to pci_io_base
Geoff Levand
geoffrey.levand at am.sony.com
Wed Aug 30 09:57:12 EST 2006
Linas Vepstas wrote:
> 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 ??
I found the same, but was thinking
#if defined(CONFIG_ISA) && !defined(__mc68000__)
So it is only built when CONFIG_ISA=y. Is there any
reason to always have it whit PCI?
Paul, can I send you that fix, or should I send it to
someone else?
-Geoff
More information about the Linuxppc-dev
mailing list