All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: steve@digidescorp.com
Cc: microblaze-uclinux@itee.uq.edu.au, monstr@monstr.eu,
	linux-kernel@vger.kernel.org,
	Chen Liqin <liqin.chen@sunplusct.com>,
	Lennox Wu <lennox.wu@gmail.com>,
	David Howells <dhowells@redhat.com>,
	Greg Ungerer <gerg@snapgear.com>
Subject: Re: [PATCH] microblaze: Fix pfn_valid() for noMMU
Date: Mon, 16 Nov 2009 14:14:26 -0800	[thread overview]
Message-ID: <20091116141426.9fc63622.akpm@linux-foundation.org> (raw)
In-Reply-To: <1258150109-6884-1-git-send-email-steve@digidescorp.com>

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?



  parent reply	other threads:[~2009-11-16 22:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13 22:08 [PATCH] microblaze: Fix pfn_valid() for noMMU steve
2009-11-16 10:12 ` Michal Simek
2009-11-16 22:14 ` Andrew Morton [this message]
2009-11-17 14:27   ` Steven J. Magnani
2009-11-18  1:37     ` liqin.chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091116141426.9fc63622.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=gerg@snapgear.com \
    --cc=lennox.wu@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liqin.chen@sunplusct.com \
    --cc=microblaze-uclinux@itee.uq.edu.au \
    --cc=monstr@monstr.eu \
    --cc=steve@digidescorp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.