mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: hpa@zytor.com, tglx@linutronix.de, venkatesh.pallipadi@intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] x86, pat: fix free_memtype() for legacy 1MB range
Date: Wed, 14 Jan 2009 20:16:32 +0100	[thread overview]
Message-ID: <20090114191632.GA17766@elte.hu> (raw)
In-Reply-To: <20090114184834.GC1290@linux-os.sc.intel.com>


* Suresh Siddha <suresh.b.siddha@intel.com> wrote:

> -	is_range_ram = pagerange_is_ram(start, end);
> -	if (is_range_ram == 1)
> -		return free_ram_pages_type(start, end);
> -	else if (is_range_ram < 0)
> -		return -EINVAL;
> +	/*
> +	 * For legacy reasons, some parts of the physical address range in the
> +	 * legacy 1MB region is treated as non-RAM (even when listed as RAM in
> +	 * the e820 tables).  So we will track the memory attributes of this
> +	 * legacy 1MB region using the linear memtype_list always.
> +	 */
> +	if (end >= ISA_END_ADDRESS) {
> +		is_range_ram = pagerange_is_ram(start, end);
> +		if (is_range_ram == 1)
> +			return free_ram_pages_type(start, end);
> +		else if (is_range_ram < 0)
> +			return -EINVAL;
> +	}

this logic is now repeated in an open-coded way in two places in pat.c. 
Could you please send another delta patch that consolidates them into a 
single helper function, which is used both in free_memtype() and 
reserve_memtype()?

Thanks,

	Ingo

      reply	other threads:[~2009-01-14 19:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14 18:48 Suresh Siddha
2009-01-14 19:16 ` Ingo Molnar [this message]

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=20090114191632.GA17766@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.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

all inboxes | Powered by JetHome®