linux-mips
[Top] [All Lists]

Re: ISA

To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Subject: Re: ISA
From: Jim Paris <jim@jtan.com>
Date: Tue, 18 Dec 2001 17:24:56 -0500
Cc: linux-mips@oss.sgi.com
In-reply-to: <Pine.GSO.3.96.1011218225404.10322C-100000@delta.ds2.pg.gda.pl>; from macro@ds2.pg.gda.pl on Tue, Dec 18, 2001 at 11:01:04PM +0100
References: <20011218164409.A12517@neurosis.mit.edu> <Pine.GSO.3.96.1011218225404.10322C-100000@delta.ds2.pg.gda.pl>
Reply-to: jim@jtan.com
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
> > 1) Isn't the purpose of ioremap to remap I/O memory addresses to
> >    physical ones?  For an ISA architecture like mine, this means
> >    it needs to add isa_slot_offset.
> 
>  Yes it is.  Also see Documentation/IO-mapping.txt and the Alpha port.

So I should modify ioremap to return (addr+isa_slot_offset) when
CONFIG_ISA is defined and the given I/O address is in the 16 MB ISA
range.  That will make things work according to Linus' description of
how they should.

>  It *has to* contain the system RAM.  Otherwise a device driver would be
> allowed to grab a chunk of that memory successfully, possibly destroying
> the system.  Now it gets an error and can gracefully handle it if it tries
> to get the memory for some, possibly legitimate reason. 

Okay, point.  So the i82365 driver is at fault when it calls
check_mem_region(ISA_address).  How should I fix that?  Should it
call check_mem_region(ioremap(ISA_address)) instead?  

Or should /proc/iomap contain physical addresses, which the i82365
driver has no way of knowing without breaking abstractions?  (And if
that's the case, how should I do it?  Create isa_check_mem_region?)

-jim

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