[Top] [All Lists]

Re: Removal of ____raw_readq() and ____raw_writeq() from asm-mips/io.h

To: Ladislav Michl <>
Subject: Re: Removal of ____raw_readq() and ____raw_writeq() from asm-mips/io.h
From: Jes Sorensen <>
Date: 29 Jan 2004 05:35:47 -0500
Cc: Kevin Paul Herbert <>,
In-reply-to: <>
Original-recipient: rfc822;
References: <1075255111.8744.4.camel@shakedown> <20040128094032.GB900@kopretinka> <> <>
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
>>>>> "Ladislav" == Ladislav Michl <> writes:

Ladislav> On Wed, Jan 28, 2004 at 05:49:58AM -0500, Jes Sorensen
Ladislav> wrote:
>> 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!

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

Very wrong!

the readX/writeX macro names are for PCI and busses with similar
properties. One should never access anything through readX/writeX
without ioremaping it first.

readq/writeq are not mips specific, they are available on all/most 64
bit architectures, so portability rants do apply.


<Prev in Thread] Current Thread [Next in Thread>