From: Jakub Jelinek <jakub@redhat.com>
To: ultralinux@vger.kernel.org
Subject: Re: "sparc_cpu_model" undefined
Date: Sat, 20 May 2000 06:05:01 +0000 [thread overview]
Message-ID: <marc-linux-ultrasparc-95880266820011@msgid-missing> (raw)
In-Reply-To: <marc-linux-ultrasparc-95874021030030@msgid-missing>
On Fri, May 19, 2000 at 06:44:38PM -0700, Murray Stokely wrote:
> On Fri, 19 May 2000, Pete Zaitcev wrote:
> % Imagine for a second that we make an <asm/io.h> on sparc that
> % gets included in your program without errors. What makes you think
> % that inb/outb there may be useful to you, even after ioperm() ?
> % They easily may happen to be defined as stba/lduba instructions,
> % or may require port address to be offset.
>
> Ok, so how do I get around these problems to write a few bytes
> directly to an IO port. As an example, I would like to write a few
> bytes to the parallel port to control a LED or program a
> microcontroller. With Linux/x86 I just call ioperm() and then outb().
> How do I do this under Linux/sparc?
There are __NO I/O PORTS__ on SPARC. Everything is I/O mapped.
>
> % Programs that resort to direct I/O must carry machine and system
> % dependent parts with them, including definitions of inb/outb.
> % If they do not, we cannot help it.
>
> You feel this is always the case? That inb/outb should not be a
> function of the OS libraries/headers?
Yes, that's always the case. You really have to know exactly what kind of
hardware are you accessing and how do you drive it.
Jakub
next prev parent reply other threads:[~2000-05-20 6:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-19 12:34 "sparc_cpu_model" undefined Murray Stokely
2000-05-19 12:49 ` Jakub Jelinek
2000-05-19 15:23 ` Pete Zaitcev
2000-05-20 1:44 ` Murray Stokely
2000-05-20 6:05 ` Jakub Jelinek [this message]
2000-05-21 21:48 ` Murray Stokely
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=marc-linux-ultrasparc-95880266820011@msgid-missing \
--to=jakub@redhat.com \
--cc=ultralinux@vger.kernel.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