Re: [PATCH 00 of 10] x86: unify asm/pgtable.h

Jeremy Fitzhardinge
2008-01-08T23:25:08Z

Ingo Molnar wrote:
> threw this into the random test setup: it found the attached config
> after a few iterations, which needed the fix below. (config builds and
> boots fine with this fix)
>
> the problem was that set_pud() is used by
> include/asm-generic/pgtable-nopud.h, to build set_pgd():
>
> #define set_pgd(pgdptr, pgdval) set_pud((pud_t *)(pgdptr), (pud_t) { pgdval })
>

Oh, yeah. That's bitten me before, but I guess I lost that part of the
patch somewhere :(.

> it's truly a maze ... took me 10 straight minutes of staring at the code
> to figure out where the set_pud() came from :-/
>

It's pretty awful. The pagetable level folding stuff is fairly deep
into "too clever" territory, but its hard to see what better
alternatives there are... Dropping non-PAE support would be nice, but
impractical given that even relatively recent chips are missing support
for it.

> anyway, your patchset is holding up pretty good so far in testing.
>

Great!

J