From: tsbogend@alpha.franken.de (Thomas Bogendoerfer)
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Mel Gorman <mel@csn.ul.ie>,
Bob Picco <bob.picco@hp.com>, Dave Hansen <haveblue@us.ibm.com>,
Andy Whitcroft <apw@shadowen.org>, Andi Kleen <ak@muc.de>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Keith Mannthey <kmannth@gmail.com>,
"Luck, Tony" <tony.luck@intel.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Yasunori Goto <y-goto@jp.fujitsu.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] Fix crash with FLAT_MEMORY and ARCH_PFN_OFFSET != 0
Date: Tue, 18 Dec 2007 13:31:52 +0100 [thread overview]
Message-ID: <20071218123152.GA19536@alpha.franken.de> (raw)
In-Reply-To: <20071218042404.df5d459c.akpm@linux-foundation.org>
On Tue, Dec 18, 2007 at 04:24:04AM -0800, Andrew Morton wrote:
> On Tue, 18 Dec 2007 13:03:00 +0100 (CET) Thomas Bogendoerfer <tsbogend@alpha.franken.de> wrote:
> > --- a/mm/page_alloc.c
> > +++ b/mm/page_alloc.c
> > @@ -3427,7 +3427,7 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
> > mem_map = NODE_DATA(0)->node_mem_map;
> > #ifdef CONFIG_ARCH_POPULATES_NODE_MAP
> > if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
> > - mem_map -= pgdat->node_start_pfn;
> > + mem_map -= (pgdat->node_start_pfn - ARCH_PFN_OFFSET);
> > #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */
> > }
> > #endif
>
> hm. It's rather non-trivial to verify that this will compile OK on all
> architectures.
I grepped through include/asm-* and found:
#if defined(CONFIG_FLATMEM)
#ifndef ARCH_PFN_OFFSET
#define ARCH_PFN_OFFSET (0UL)
#endif
in include/asm-generic/memory_model.h. So I'm still confident, that
this works on all architectures. It's tested on MIPS.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ RFC1925, 2.3 ]
next prev parent reply other threads:[~2007-12-18 12:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-18 12:03 [PATCH] Fix crash with FLAT_MEMORY and ARCH_PFN_OFFSET != 0 Thomas Bogendoerfer
2007-12-18 12:24 ` Andrew Morton
2007-12-18 12:31 ` Thomas Bogendoerfer [this message]
2007-12-18 13:58 ` Mel Gorman
2007-12-18 16:09 ` Thomas Bogendoerfer
2007-12-20 11:44 ` Mel Gorman
2007-12-20 12:43 ` Thomas Bogendoerfer
2007-12-20 13:27 ` Mel Gorman
2007-12-30 11:37 ` Thomas Bogendoerfer
2008-01-07 12:15 ` Mel Gorman
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=20071218123152.GA19536@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=ak@muc.de \
--cc=akpm@linux-foundation.org \
--cc=apw@shadowen.org \
--cc=benh@kernel.crashing.org \
--cc=bob.picco@hp.com \
--cc=haveblue@us.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kmannth@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=paulus@samba.org \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
--cc=y-goto@jp.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox