Re: Linux 6.4.4 on m68k - Q40 - pata_falcon causes oops at boot time

Michael Schmitz
2023-07-28T07:52:22Z

Hi Finn,

Am 28.07.2023 um 11:47 schrieb Finn Thain:
>>> Anyway, you make a good point about on-going maintenance. Do you think
>>> that by supporting standard ISA drivers we might actually reduce the
>>> ideosyncracies in m68k IO code?
>>
>> You and DaveM ought to have a chat about that - abstracting the legacy
>> drivers from the ISA constraints was his preferred option when I last
>> attempted to get the Gayle network driver patches merged. When I say
>> 'preferred', I'm probably understating a little.
>>
>
> A discussion with maintainers probably won't get far without working code
> to look at. Perhaps William will send an RFC patch to illustrate his
> approach.

That would be good to have. Once that's tested and shown to work, we can
float the idea with the IDE maintainers first.

>> I had toyed with that using the EtherNEC driver as test case but never
>> got very far (this would have been splitting the driver into a core
>> lib8390 module and a platform-specific module that allows to hook a
>> variety of IO accessors as hooks, not static defines, and I wasn't too
>> certain about performance impacts of such a change, the performance of
>> the EtherNEC being so shitty it won't make any impact there),
>>
>> The only other option (that I can see) would be creating a bus driver
>> for the ISA bus, with platforms allowed to register their particular IO
>> accessors for IO and memory accesses - again, performance impacts to
>> consider and getting test coverage on legacy ISA hardware a nightmare.
>> This would allow to use legacy driver code more or less unchanged.
>> Haven't given that much thought at all (the idea pretty much originated
>> from this present mess, but that's all).
>>
>> There may be other approaches that can be considered, if none of this is
>> what you had in mind.
>>
>
> What I had in mind is probably unacceptable because drivers end up having
> to do byteswapping as happens in pata_falcon (or falconide and q40ide).

Yes, but Q40 and Falcon are impossible to support any other way, and
byte swapping the IDE interface in hardware was never repeated anywhere
else, fortunately. We will have to keep pata_falcon around for that
cause in any event.

> Perhaps your bus driver idea would probabably find more acceptance. OTOH
> if the aim of the exercise is to use standard drivers (like pata_legacy)
> there would probably be driver changes either way.

Supporting non-IDE drivers without too much hassle would be enough for
starters (again excepting EtherNEC. Hmmm - I don't seem to have any
hardware to test that wouldn't need quirky accessor hooks!).

> It might be helpful to look for some precedent for this kind of thing
> among the other big-endian platforms with ISA. MIPS Magnum is dual-endian
> but Linux only runs in little-endian mode and the problem doesn't arise.
> But there must be other examples. Maybe CHRP?

Not all of CHRP, hearing Geert tell it. But there must be some boards
that have an ISA bus?
Probably not ISA, but I've got a PCMCIA slot on the Powerbook that I
haven't been able to use. Maybe something's to be gleaned there.

Cheers.

Michael