Re: [PATCH RFC 0/2] Fix m68k multiplatform ISA support

Michael Schmitz
2021-06-03T03:44:18Z

Point of detail: don't forget to run 'make clean' after applying this
series. Modules are not automatically rebuilt after changes to our
io_mm.h (should they?)

Cheers,

Michael

Am 02.06.2021 um 17:21 schrieb Michael Schmitz:
> Finn Thain found out that our multiplatform support is broken when
> attempting to build a kernel with support for both Q40 and Atari (when
> setting CONFIG_ISA through CONFIG_Q40, but not CONFIG_ATARI_ROM_ISA).
>
> Inspection of the code in io_mm.h reveals that in that case, ISA I/O
> accessors with address translation are used for the Atari IDE driver, where
> MMIO accessors with no address translation would have been appropriate.
>
> Setting CONFIG_ATARI_ROM_ISA will fix the issue for Atari, but then force the
> use of I/O accessors without address translation for Q40. The code in
> io_mm.h is fundamentally broken for kernels that have both Q40 and Atari
> support.
>
> Address this by adding a check for address < 1024 to the Atari address
> translation case, changing the default address translation to return the
> untranslated address, and changing the CONFIG_ATARI_ROM_ISA section to use
> ISA I/O accessors for addresses > 1024 (i.e., those not intended to map to
> the ROM port).
>
> Tested on ARAnyM with all combinations of CONFIG_ATARI_ROM_ISA and
> CONFIG_ISA. Earlier versions tested on my Falcon hardware, all using
> pata_falcon.
>
> A thorough review in particular in regard to ramifications for Q40 and Amiga
> would be welcome. If there is a better way to implement these changes, I'd
> appreciate a hint. This is all academic as long as support for Q40 and Atari
> in the same kernel image is not needed, of course.
>
> I suspect patch 2 may not be needed, since the isa_sex variable should always
> be zero?
>
> Cheers,
>
> Michael
>