lkml.org 
[lkml]   [2009]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] microblaze: Fix pfn_valid() for noMMU
On Fri, 13 Nov 2009 16:08:29 -0600
steve@digidescorp.com wrote:

> Configuring DEBUG_SLAB causes a noMMU kernel to die during initialization
> with an invalid virtual address panic in kfree_debugcheck().
> The panic is due to an improper definition of pfn_valid().
>
> Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
> ---
> diff -uprN a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h
> --- a/arch/microblaze/include/asm/page.h 2009-09-09 17:13:59.000000000 -0500
> +++ b/arch/microblaze/include/asm/page.h 2009-11-13 15:20:26.000000000 -0600
> @@ -161,7 +161,8 @@ extern int page_is_ram(unsigned long pfn
> # endif /* CONFIG_MMU */
>
> # ifndef CONFIG_MMU
> -# define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) <= max_mapnr)
> +# define pfn_valid(pfn) (((pfn) >= min_low_pfn) && \
> + ((pfn) <= (min_low_pfn + max_mapnr)))
> # define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
> # else /* CONFIG_MMU */
> # define ARCH_PFN_OFFSET (memory_start >> PAGE_SHIFT)

Is arch/score/include/asm/page.h buggy also?




\
 
 \ /
  Last update: 2009-11-16 23:19    [W:0.050 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site