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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux