Re: [PATCH 4/5] m68k,mm: Extend table allocator for multiple sizes

From: Will Deacon
Date: Wed Jan 29 2020 - 08:15:28 EST


On Wed, Jan 29, 2020 at 01:43:52PM +0100, Peter Zijlstra wrote:
> On Wed, Jan 29, 2020 at 12:17:53PM +0000, Will Deacon wrote:
> > On Wed, Jan 29, 2020 at 11:39:45AM +0100, Peter Zijlstra wrote:
>
> > > +extern void *get_pointer_table(int type);
> >
> > Could be prettier/obfuscated with an enum type?
>
> Definitely, but then we get to bike-shed on names :-)

At least we don't need an emulator for *that*!

> enum m68k_table_type {
> TABLE_BIG = 0,
> TABLE_SMALL,
> };
>
> Is not exactly _that_ much better, and while TABLE_PTE works,
> TABLE_PGD_PMD is a bit crap.

Some alternatives:

TABLE_PXD / TABLE_PTE
TABLE_BRANCH / TABLE_LEAF
TABLE_DIR / TABLE_PTE
TABLE_TI_AB / TABLE_TI_C

Will