Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: Jes Sorensen <jes@wildopensource.com>
Cc: Kevin Paul Herbert <kph@cisco.com>, linux-mips@linux-mips.org
Subject: Re: Removal of ____raw_readq() and ____raw_writeq() from asm-mips/io.h
Date: Wed, 28 Jan 2004 15:08:28 +0000	[thread overview]
Message-ID: <20040128150828.A19525@linux-mips.org> (raw)
In-Reply-To: <yq07jzcz6sp.fsf@wildopensource.com>; from jes@wildopensource.com on Wed, Jan 28, 2004 at 05:49:58AM -0500

On Wed, Jan 28, 2004 at 05:49:58AM -0500, Jes Sorensen wrote:
> >>>>> "Ladislav" == Ladislav Michl <ladis@linux-mips.org> writes:
> 
> Ladislav> On Tue, Jan 27, 2004 at 05:58:31PM -0800, Kevin Paul Herbert
> Ladislav> wrote:
> >> In edit 1.68, the non-interrupt locking versions of
> >> raw_readq()/raw_writeq() were removed, in favor of locking
> >> ones. While this makes sense in general, it breaks the compilation
> >> of the sb1250 which uses the non-locking versions (____raw_readq()
> >> and ____raw_writeq()) in interrupt handlers.
> 
> Ladislav> Why was someone using these function at all? if you don't
> Ladislav> need locking simply do *reg_addr = val;
> 
> ARGHHHHHHHHHH!
> 
> If you are accessing memory mapped registers or memory on a PCI
> device, ie. likely on a 1250, you *must* use the readX/__raw_readX
> macros. Anybody just doing *reg = val on a PCI device should be
> banned from writing code for life!

eh? I said nothing about PCI device. These ____raw_writeq are
used in board specific code. Anyway, defining struct sb_registers
and ioremaping it would be nice solution (I didn't read code too
carefully, so maybye not in this particular case where registers
are 64bit width, but I definitely prefer it in board specific code
over read[bwl]/write[bwl]). Also readq/writeq seems mips specific,
so rants about portability doesn't apply.

	ladis

  reply	other threads:[~2004-01-28 15:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-28  1:58 Removal of ____raw_readq() and ____raw_writeq() from asm-mips/io.h Kevin Paul Herbert
2004-01-28  9:40 ` Ladislav Michl
2004-01-28 10:49   ` Jes Sorensen
2004-01-28 15:08     ` Ladislav Michl [this message]
2004-01-28 16:01       ` Ralf Baechle
2004-01-29 10:35       ` Jes Sorensen
2004-01-28 14:30 ` Ralf Baechle
2004-01-28 15:00   ` Ralf Baechle

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=20040128150828.A19525@linux-mips.org \
    --to=ladis@linux-mips.org \
    --cc=jes@wildopensource.com \
    --cc=kph@cisco.com \
    --cc=linux-mips@linux-mips.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