linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Geoff Levand <geoffrey.levand@am.sony.com>
To: Linas Vepstas <linas@austin.ibm.com>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: undefined reference to pci_io_base
Date: Tue, 29 Aug 2006 16:57:12 -0700	[thread overview]
Message-ID: <44F4D458.7030707@am.sony.com> (raw)
In-Reply-To: <20060829232026.GC27372@austin.ibm.com>

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

  reply	other threads:[~2006-08-29 23:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29 17:34 undefined reference to pci_io_base Geoff Levand
2006-08-29 20:28 ` Linas Vepstas
2006-08-29 22:38   ` Benjamin Herrenschmidt
2006-08-29 22:42 ` Paul Mackerras
2006-08-29 23:20   ` Linas Vepstas
2006-08-29 23:57     ` Geoff Levand [this message]
2006-08-30  0:13       ` Paul Mackerras
2006-08-30 15:05         ` Geoff Levand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44F4D458.7030707@am.sony.com \
    --to=geoffrey.levand@am.sony.com \
    --cc=linas@austin.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).