All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-arch@vger.kernel.org, Dave Hansen <haveblue@us.ibm.com>,
	Randolph Chung <randolph@tausq.org>
Subject: Re: no-arch-specific-mem_map-init
Date: Thu, 10 Mar 2005 14:18:04 +0000	[thread overview]
Message-ID: <20050310141804.GF21986@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20050309225833.6d80fc42.akpm@osdl.org>

On Wed, Mar 09, 2005 at 10:58:33PM -0800, Andrew Morton wrote:
> Everyone OK with this?

Since I don't understand VM and he's touching everything except my port,
no ;-P

> From: Dave Hansen <haveblue@us.ibm.com>
> The following patch does what my first one did (don't pass mem_map into the
> init functions), incorporates Jesse Barnes' ia64 fixes on top of that, and
> gets rid of all but one of the global mem_map initializations (parisc is
> weird).  It also magically removes more code than it adds.  It could be
> smaller, but I shamelessly added some comments.  

I'm not quite sure why parisc is 'weird'.  Here's the code block in question:

void __init mem_init(void)
{
        high_memory = __va((max_pfn << PAGE_SHIFT));

#ifndef CONFIG_DISCONTIGMEM
        max_mapnr = page_to_pfn(virt_to_page(high_memory - 1)) + 1;
        mem_map = zone_table[ZONE_DMA]->zone_mem_map;
        totalram_pages += free_all_bootmem();
#else
        {
                int i;

                for (i = 0; i < npmem_ranges; i++)
                        totalram_pages += free_all_bootmem_node(NODE_DATA(i));
        }
#endif

Something that may not be intuitively obvious to someone with i386 biases
is that on PA-RISC (at least in the case of CONFIG_DISCONTIGMEM=n), all
memory is in ZONE_DMA.  Does that help divine what the right answer is
for parisc?

Randolph, you touched this code last ... can you help Dave understand it?

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

  parent reply	other threads:[~2005-03-10 14:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-10  6:58 no-arch-specific-mem_map-init Andrew Morton
2005-03-10  7:38 ` no-arch-specific-mem_map-init Martin J. Bligh
2005-03-10  8:22 ` no-arch-specific-mem_map-init Paul Mackerras
2005-03-10 13:35 ` no-arch-specific-mem_map-init Paul Mundt
2005-03-10 14:18 ` Matthew Wilcox [this message]
2005-03-10 14:30   ` no-arch-specific-mem_map-init David Howells
2005-03-10 14:33     ` no-arch-specific-mem_map-init Matthew Wilcox
2005-03-10 15:24     ` no-arch-specific-mem_map-init Randolph Chung
2005-03-10 15:26   ` no-arch-specific-mem_map-init Martin J. Bligh
2005-03-10 15:58     ` no-arch-specific-mem_map-init Dave Hansen
2005-03-10 16:21       ` no-arch-specific-mem_map-init Matthew Wilcox
2005-03-10 22:54 ` no-arch-specific-mem_map-init Russell King
  -- strict thread matches above, loose matches on Subject: below --
2005-03-10 19:59 no-arch-specific-mem_map-init Luck, Tony

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=20050310141804.GF21986@parcelfarce.linux.theplanet.co.uk \
    --to=matthew@wil.cx \
    --cc=akpm@osdl.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=randolph@tausq.org \
    /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.