linux-mips
[Top] [All Lists]

Re: [PATCH] I/O helpers rework

To: macro@mips.com
Subject: Re: [PATCH] I/O helpers rework
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 11 Jan 2005 02:21:38 +0900 (JST)
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org, macro@linux-mips.org
In-reply-to: <Pine.LNX.4.61.0501101503020.18023@perivale.mips.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <Pine.LNX.4.61.0412151936460.14855@perivale.mips.com> <20050107.004521.74752947.anemo@mba.ocn.ne.jp> <Pine.LNX.4.61.0501101503020.18023@perivale.mips.com>
Sender: linux-mips-bounce@linux-mips.org
>>>>> On Mon, 10 Jan 2005 15:28:24 +0000 (GMT), "Maciej W. Rozycki" 
>>>>> <macro@mips.com> said:
macro>  Hmm, what's the semantics of "volatile void *"?  I can't
macro> imagine any, so I don't think it would be useful.

Well, maybe the 'volatile' have no sense, but some archs (including
i386, of course :-)) and some drivers use it.  Adding the 'volatile'
will remove some compiler warnings.

macro>  Instead of using "#ifndef" the generic versions could be moved
macro> to <asm-mips/mach-generic/mangle-port.h>.  Otherwise it sounds
macro> reasonable.

Hmm, if all *ioswab*() were moved to mangle-port.h,
mach-ip22/mangle-port.h (for example) must provide all *ioswab*()
instead of only ioswabw() and __raw_ioswabw().  OTOH providing
complete set of *ioswab* in one file might be better to understand the
code.  Both are acceptable for me.

macro>  Note that __mem is a virtual address, though, so you'd have to
macro> perform a physical address lookup before deciding on a swapping
macro> strategy -- would we really have a gain on any system from
macro> using regions with different swapping properties?

Yes, virt-to-phys conversion might be needed, but if we only use KSEG1
for I/O port/memory, it does not matter.

And I have some custom boards which really needs different swapping
properties (PCI regions need SWAP_IO_SPACE, but ISA region does not,
for example).  I agree that those boards were misdesigned but I want
to run Linux on it without modifying existing drivers.

Thank you.

---
Atsushi Nemoto

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