Messages in this thread Patch in this message | | | Date | Fri, 05 Apr 2024 13:24:28 +0200 | From | "Arnd Bergmann" <> | Subject | Re: [PATCH 0/1] m68k: Handle HAS_IOPORT dependencies |
| |
On Fri, Apr 5, 2024, at 12:16, Geert Uytterhoeven wrote: > On Wed, Apr 3, 2024 at 8:35 PM Arnd Bergmann <arnd@kernel.org> wrote: >> On Wed, Apr 3, 2024, at 20:11, Michael Schmitz wrote: >> >> For the Q40, it may be better in the long run to change the >> drivers to just use MMIO directly though. > > Q40 uses ISA.
Ah, indeed. I got confused by the NE2000 example as that contains "depends on (ISA || (Q40 && m)", which would have indicated that it's not actually using CONFIG_ISA.
> Michael is worried about non-ISA drivers using inb() and friends. > At some point in time (i.e. eons ago), we were told it was better to > use in[bwl]()/read[bwl]() instead of directly dereferencing volatile > pointers...
It's definitely still better to use an abstraction layer for MMIO accesses using inline asm instructions than open-coding the volatile pointer dereferences. Over time we have gotten better at defining which of the available abstractions should be used for a given bus, so inb()/outb() is now only really used for things derived from ISA in some form, including e.g. PCI and LPC.
> Anyway, I don't think we have many users of inb() and friends left, and > I assume the bots should have detected any/most remaining users in Niklas' > branch... > > arch/m68k/include/asm/floppy.h on Sun-3x might be the only offender?
Could be. I think we can leave this one to whoever tries to get sun3x floppy support working, it's been marked broken for a while (see below). If there are any others, they will cause pretty obvious build failures once inb()/outb() are removed from the build, and they should be trivial to fix then.
Arnd
commit f1e0f28a85001f4faa3ea930fcf201933f42340e Author: akpm <akpm> Date: Mon Jan 19 18:31:30 2004 +0000
[PATCH] M68k floppy selection From: Geert Uytterhoeven <geert@linux-m68k.org> Floppy: On m68k, PC-style floppies are used on Q40/Q60 and Sun-3x only. Sun-3x floppy is currently broken (needs I/O abstractions) BKrev: 400c2282G1O-TsH5FiwzPbOorftQhg
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 2dce1d2699a9..32fdec34568e 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -6,7 +6,7 @@ menu "Block devices" config BLK_DEV_FD tristate "Normal floppy disk support" - depends on !X86_PC9800 && !ARCH_S390 + depends on (!X86_PC9800 && !ARCH_S390 && !M68K) || Q40 || (SUN3X && BROKEN) ---help--- If you want to use the floppy disk drive(s) of your PC under Linux, say Y. Information about this driver, especially important for IBM
| |