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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Finn,

Am 05.06.2021 um 11:31 schrieb Finn Thain:
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?

I take it this is not supported by our current Kconfig syntax?


That may be because CPP hacking is seen as a competitive sport in some
circles.

Good one.


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


Since the items may be bools or tristates, it not clear what type the
group has.

All three are of type bool.


Anyway, I see that we can already write this:

#define IS_MULTI(a,b) __or(IS_ENABLED(a), IS_ENABLED(b))

So maybe we just need an exclusive-OR macro to go with the other operators
defined in include/linux/kconfig.h? Then we could write this:

#define IS_SINGLE(a,b) __xor(IS_ENABLED(a), IS_ENABLED(b))

But these only work for a 2-way group. Extending them to N-way groups is
beyond my CPP abilities. It probably requires N-way __or() and __xor()...

I'll pass on this one for now ...

Cheers,

	Michael





[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux