lkml.org 
[lkml]   [2008]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129
    Le 02.03.2008 16:53, Fabio Checconi a écrit :
    >
    > __ioremap() emits a warning if the pfn after the last one it's going
    > to map is of normal ram. Correct this and emit the warning (once)
    > only if one of the asked pages is.
    >
    > Signed-off-by: Fabio Checconi <fabio@gandalf.sssup.it>

    Tested-by: Laurent Riffard <laurent.riffard@free.fr>

    With this patch, the WARNING at arch/x86/mm/ioremap.c does not occur anymore.

    thanks
    ~~
    laurent

    > ---
    > diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
    > index ac3c959..6f7b158 100644
    > --- a/arch/x86/mm/ioremap.c
    > +++ b/arch/x86/mm/ioremap.c
    > @@ -109,7 +109,7 @@ static int ioremap_change_attr(unsigned long vaddr, unsigned long size,
    > static void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
    > enum ioremap_mode mode)
    > {
    > - unsigned long pfn, offset, last_addr, vaddr;
    > + unsigned long pfn, offset, last_addr, vaddr, is_ram = 0;
    > struct vm_struct *area;
    > pgprot_t prot;
    >
    > @@ -132,9 +132,10 @@ static void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
    > if (page_is_ram(pfn) && pfn_valid(pfn) &&
    > !PageReserved(pfn_to_page(pfn)))
    > return NULL;
    > + is_ram |= page_is_ram(pfn);
    > }
    >
    > - WARN_ON_ONCE(page_is_ram(pfn));
    > + WARN_ON_ONCE(is_ram);
    >
    > switch (mode) {
    > case IOR_MODE_UNCACHED:
    >
    --
    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: 2008-03-02 21:45    [W:0.041 / U:0.036 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site