linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Borislav Petkov <bp@amd64.org>, Yinghai Lu <yinghai@kernel.org>
Cc: Jacob Shin <jacob.shin@amd.com>, X86-ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>, Tejun Heo <tj@kernel.org>,
	Dave Young <dyoung@redhat.com>, Chao Wang <chaowang@redhat.com>,
	Vivek Goyal <vgoyal@redhat.com>,
	Andreas Herrmann <andreas.herrmann3@amd.com>
Subject: Re: [PATCH 4/6] x86: Only direct map addresses that are marked as E820_RAM
Date: Wed, 29 Aug 2012 23:28:16 -0700	[thread overview]
Message-ID: <2e8c14cd-b82a-49e6-8d5e-85dbe86da6ca@email.android.com> (raw)
In-Reply-To: <20120829213246.GE31869@aftab.osrc.amd.com>

This week is Kernel Summit & Plumbers... people are kind of distracted.

Borislav Petkov <bp@amd64.org> wrote:

>On Wed, Aug 29, 2012 at 02:17:51PM -0700, Yinghai Lu wrote:
>> > +struct range pfn_mapped[E820_X_MAX];
>> > +int nr_pfn_mapped;
>> 
>> change to static?
>> 
>> > +
>> > +void add_pfn_range_mapped(unsigned long start_pfn, unsigned long
>end_pfn)
>> > +{
>> > +       nr_pfn_mapped = add_range_with_merge(pfn_mapped,
>E820_X_MAX,
>> > +                                            nr_pfn_mapped,
>start_pfn, end_pfn);
>> > +       nr_pfn_mapped = clean_sort_range(pfn_mapped, E820_X_MAX);
>> > +
>> > +       max_pfn_mapped = max(max_pfn_mapped, end_pfn);
>> > +
>> > +       if (end_pfn <= (1UL << (32 - PAGE_SHIFT)))
>> > +               max_low_pfn_mapped = max(max_low_pfn_mapped,
>end_pfn);
>> > +}
>> > +
>> > +bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long
>end_pfn)
>> > +{
>> > +       int i;
>> > +
>> > +       for (i = 0; i < nr_pfn_mapped; i++)
>> > +               if ((start_pfn >= pfn_mapped[i].start) &&
>> > +                   (end_pfn <= pfn_mapped[i].end))
>> > +                       return true;
>> > +
>> > +       return false;
>> > +}
>> > +
>> > +bool pfn_is_mapped(unsigned long pfn)
>> > +{
>> > +       return pfn_range_is_mapped(pfn, pfn + 1);
>> > +}
>> 
>> wonder if those functions have to be in arch/x86/kernel/setup.c.
>> 
>> also do we need to update the tracking array when we have do memory
>hot-remove?
>
>Would you please make sure you've reviewed this whole patchset
>thoroughly so that Jacob can do all changes at once and not keep
>resending them twice a week.
>
>Thanks a lot!
>
>-- 
>Regards/Gruss,
>Boris.
>
>Advanced Micro Devices GmbH
>Einsteinring 24, 85609 Dornach
>GM: Alberto Bozzo
>Reg: Dornach, Landkreis Muenchen
>HRB Nr. 43632 WEEE Registernr: 129 19551

-- 
Sent from my mobile phone. Please excuse brevity and lack of formatting.

  reply	other threads:[~2012-08-30  6:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-29 19:04 [PATCH V5 0/6] x86: Create direct mappings for E820_RAM only Jacob Shin
2012-08-29 19:04 ` [PATCH 1/6] x86, mm: Add page_size_mask() Jacob Shin
2012-08-29 19:04 ` [PATCH 2/6] x86, mm: Split out split_mem_range Jacob Shin
2012-08-29 19:04 ` [PATCH 3/6] x86/mm: find_early_table_space based on memory ranges that are being mapped Jacob Shin
2012-08-29 19:04 ` [PATCH 4/6] x86: Only direct map addresses that are marked as E820_RAM Jacob Shin
2012-08-29 21:17   ` Yinghai Lu
2012-08-29 21:32     ` Borislav Petkov
2012-08-30  6:28       ` H. Peter Anvin [this message]
2012-08-30 23:06         ` [PATCH 0/8] x86, mm: init_memory_mapping cleanup Yinghai Lu
2012-08-30 23:06           ` [PATCH 1/8] x86, mm: Add global page_size_mask Yinghai Lu
2012-08-30 23:06           ` [PATCH 2/8] x86, mm: Split out split_mem_range Yinghai Lu
2012-08-30 23:06           ` [PATCH 3/8] x86, mm: Moving init_memory_mapping calling Yinghai Lu
2012-08-30 23:06           ` [PATCH 4/8] x86, mm: Revert back good_end setting for 64bit Yinghai Lu
2012-08-30 23:06           ` [PATCH 5/8] x86, mm: Find early page table only one time Yinghai Lu
2012-08-30 23:06           ` [PATCH 6/8] x86: if kernel .text .data .bss are not marked as E820_RAM, complain and fix Yinghai Lu
2012-08-30 23:06           ` [PATCH 7/8] x86: Fixup code testing if a pfn is direct mapped Yinghai Lu
2012-08-30 23:06           ` [PATCH 8/8] x86: Only direct map addresses that are marked as E820_RAM Yinghai Lu
2012-08-30 23:14           ` [PATCH 0/8] x86, mm: init_memory_mapping cleanup Yinghai Lu
2012-08-30 23:22           ` Jacob Shin
2012-08-29 21:46     ` [PATCH 4/6] x86: Only direct map addresses that are marked as E820_RAM Jacob Shin
2012-08-29 19:04 ` [PATCH 5/6] x86: Fixup code testing if a pfn is direct mapped Jacob Shin
2012-08-29 21:02   ` Yinghai Lu
2012-08-29 19:04 ` [PATCH 6/6] x86: if kernel .text .data .bss are not marked as E820_RAM, complain and fix Jacob Shin

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=2e8c14cd-b82a-49e6-8d5e-85dbe86da6ca@email.android.com \
    --to=hpa@zytor.com \
    --cc=andreas.herrmann3@amd.com \
    --cc=bp@amd64.org \
    --cc=chaowang@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=jacob.shin@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=vgoyal@redhat.com \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).