From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Greg Allen <gallen@arlut.utexas.edu>, <linuxppc-dev@lists.linuxppc.org>
Subject: Re: Directly accessing I/O ports
Date: Sat, 20 Jul 2002 20:10:58 +0200 [thread overview]
Message-ID: <20020720181058.30333@192.168.4.1> (raw)
In-Reply-To: <p05111b16b95d05434f09@[10.8.16.89]>
>For that matter, what's the *right* way to access this sort of thing
>from userland?
mmap /proc/bus/pci with proper flags. By defaults it's PIO,
but you can use ioctl after the open() call and before the mmap()
call to set the requested mapping type to MMIO, PIO, ...
The code handling this is in drivers/pci/proc.c
The important point is that on PPC, the PIO space isn't limited
to one 64k space like on x86, but is a full set of separate address
spaces (one per host PCI bus).
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2002-07-20 18:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-19 0:06 Directly accessing I/O ports Greg Allen
2002-07-20 18:10 ` Benjamin Herrenschmidt [this message]
2002-07-22 17:00 ` Tom Rini
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=20020720181058.30333@192.168.4.1 \
--to=benh@kernel.crashing.org \
--cc=gallen@arlut.utexas.edu \
--cc=linuxppc-dev@lists.linuxppc.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).