> > 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
|