Re: [PATCH RFC 1/2] m68k: io_mm.h: conditionalize ISA address translation on Atari

Geert Uytterhoeven
2021-06-04T07:54:42Z

Hi Michael,

On Fri, Jun 4, 2021 at 2:19 AM Michael Schmitz <schmitzmic@gmail.com> wrote:
> On 3/06/21 8:23 pm, Finn Thain wrote:
> > On Wed, 2 Jun 2021, Michael Schmitz wrote:
> >> --- a/arch/m68k/include/asm/io_mm.h
> >> +++ b/arch/m68k/include/asm/io_mm.h
> >> @@ -52,7 +52,11 @@
> >> #define Q40_ISA_MEM_B(madr) (q40_isa_mem_base+1+4*((unsigned long)(madr)))
> >> #define Q40_ISA_MEM_W(madr) (q40_isa_mem_base+ 4*((unsigned long)(madr)))
> >>
> >> +#ifdef CONFIG_ATARI
> >> +#define MULTI_ISA 1
> >> +#else
> >> #define MULTI_ISA 0
> >> +#endif /* Atari */
> >> #endif /* Q40 */
> >>
> > I have to wonder whether there is a nice simple definition for MULTI_ISA.
>
> As I understand it, MULTI_ISA means that different byte orders and/or
> different address translations need to be used in the same kernel, so
> all that cannot be decided at build time.
>
> As long as there is only a single platform that will use this code (ISA
> only used on a single platform, and neither Atari IDE nor EtherNEC
> used), MULTI_ISA is not needed.
>
> If we have Kconfig symbols for 'single platform only', and
> 'multi-platform ISA use', that might be shorter to write and easier to
> understand. Geert?

It would be nice to have that automatically, like with the current
MULTI_ISA define (and all the MACH_* in arch/m68k/include/asm/setup.h).
Perhaps we should extend kconfig syntax to define a group of
related symbols, and to automatically generate CONFIG_FOO_MULTI or
CONFIG_FOO_SINGLE (and even CONFIG_BAR_ONLY?) symbols?

group ISA
item ATARI_ROM_ISA
item AMIGA_PCMCIA
item Q40

=> CONFIG_ISA_MULTI or CONFIG_ISA_SINGLE (+ e.g. ATARI_ROM_ISA_ONLY
if appropriate).

Are there other users who can benefit from this?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds