Re: is_highmem() and WANT_PAGE_VIRTUAL (was: Re: Linux 2.6.8-rc1)

Geert Uytterhoeven
2004-07-12T14:24:10Z

On Mon, 12 Jul 2004, Andy Whitcroft wrote:
> --- Geert wrote:
> > | --- reference/mm/page_alloc.c 2004-07-07 18:08:56.000000000 +0100
> > | +++ current/mm/page_alloc.c 2004-07-07 18:10:15.000000000 +0100
> > | @@ -1421,7 +1421,7 @@ void __init memmap_init_zone(struct page
> > | INIT_LIST_HEAD(&page->lru);
> > | #ifdef WANT_PAGE_VIRTUAL
> > | /* The shift won't overflow because ZONE_NORMAL is below 4G. */
> > | - if (zone != ZONE_HIGHMEM)
> > | + if (!is_highmem(zone))
> > | set_page_address(page, __va(start_pfn << PAGE_SHIFT));
> > | #endif
> > | start_pfn++;
> >
> > The above change is incorrect, since zone is an unsigned long, while
> > is_highmem() takes a struct zone *.
>
> My bad. I was stupidly assuming that this was used then ZONE_HIGHMEM was
> not enabled. This should apply on top of 2.6.8-rc1 and repair the damage.
>
> -apw
>
> === 8< ===
> Should be applying is_highmem() to a zone.

I can confirm this patch fixes compilation.

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