lkml.org 
[lkml]   [2004]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patches in this message
    /
    Date
    From
    SubjectRe: is_highmem() and WANT_PAGE_VIRTUAL (was: Re: Linux 2.6.8-rc1)
    --- 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.

    Revision: $Rev: 386 $

    Signed-off-by: Andy Whitcroft <apw@shadowen.org>

    ---
    diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/mm/page_alloc.c current/mm/page_alloc.c
    --- reference/mm/page_alloc.c 2004-07-12 13:15:57.000000000 +0100
    +++ current/mm/page_alloc.c 2004-07-12 14:37:19.000000000 +0100
    @@ -1402,7 +1402,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 (!is_highmem(zone))
    + if (!is_highmem(page_zone(page)))
    set_page_address(page, __va(start_pfn << PAGE_SHIFT));
    #endif
    start_pfn++;
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 14:04    [W:3.314 / U:0.264 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site