linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org, benh@kernel.crashing.org
Subject: Re: Where are inb/outb macros?
Date: Sun, 7 Oct 2007 01:46:50 +0200	[thread overview]
Message-ID: <200710070146.51140.arnd@arndb.de> (raw)
In-Reply-To: <1191704881.6414.3.camel@pasglop>

On Saturday 06 October 2007, Benjamin Herrenschmidt wrote:
> On Sun, 2007-10-07 at 00:47 +0400, Peter Lemenkov wrote:
> > Hello All!
> > I can't compile one small software title because of lack <sys/io.h>
> > and inb/outb macros. What sould I do to overcome this obstacle?
> > 
> > My linux distro is Fedora 7 if it is matter.
> 
> They don't exist in user space on non-x86. You have to do things
> differently. What is your software trying to do ? If it's trying to
> access a PCI device IO space, you probably want to mmap it in sysfs and
> write your own accessors with appropriate memory barriers.

All cases where I've seen application software use <sys/io.h>, there was
actually a full device driver in the kernel that already exported a 
high-level interface to user space. If that's the case here, the application
should use that instead of sysfs.

	Arnd <><

  reply	other threads:[~2007-10-06 23:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-06 20:47 Where are inb/outb macros? Peter Lemenkov
2007-10-06 21:08 ` Benjamin Herrenschmidt
2007-10-06 23:46   ` Arnd Bergmann [this message]
2007-10-08  6:05     ` Misbah khan
2007-10-08  8:11       ` Benjamin Herrenschmidt

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=200710070146.51140.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.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).