linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Rondonneau <mathieu.rondonneau@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Yinghai <yinghai.lu@oracle.com>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] Prevent reserving RAM in the region already reserved by  BIOS
Date: Wed, 19 May 2010 15:58:33 -0700	[thread overview]
Message-ID: <AANLkTikYcu6fM3yLoYIZOGZXgsRUfCgJeWS51Sjo-Fny@mail.gmail.com> (raw)
In-Reply-To: <4BF4235D.3080904@zytor.com>

Thanks for the feedback.

No, I don' t see any changes in the /proc/iomem.

I am trying to prevent a ioremap of a 4K size on a non aligned 4K
address that is below the ISA_START_ADDRESS.

The problem generates a oops about overlapping.
I have a fix which instruct to not to do any re-map if the section
name is "reserved".
Which is not really clean.
I am looking for a clean way to tell the ioremap function to not remap
bios reserved memory.
That' s why I thought the e820 would be a good start.

I will continue looking into this. It does not crash the systems. A
warning generates the oops.

-Mathieu


On Wed, May 19, 2010 at 10:43 AM, H. Peter Anvin <hpa@zytor.com> wrote:
> On 05/19/2010 10:40 AM, Yinghai wrote:
>> On 05/18/2010 10:35 PM, Mathieu Rondonneau wrote:
>>> Does it make sense to prevent looking for stolen RAM below the ISA section.
>>>
>>>
>>> Signed-off-by: Mathieu Rondonneau <mathieu.rondonneau@gmail.com>
>>> ---
>>>  arch/x86/kernel/e820.c |    2 ++
>>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
>>> index 7bca3c6..322c9c3 100644
>>> --- a/arch/x86/kernel/e820.c
>>> +++ b/arch/x86/kernel/e820.c
>>> @@ -1156,6 +1156,8 @@ void __init e820_reserve_resources_late(void)
>>>                         end = MAX_RESOURCE_SIZE;
>>>                 if (start >= end)
>>>                         continue;
>>> +               if (end < ISA_START_ADDRESS)
>>> +                       continue;
>>>                 printk(KERN_DEBUG "reserve RAM buffer: %016llx - %016llx ",
>>>                                start, end);
>>>                 reserve_region_with_split(&iomem_resource, start, end,
>>
>> do you notice any changes in /proc/iomem?
>>
>
> It should be harmless to reserve memory which is already reserved, so
> this patch is at best a no-op.  Furthermore, it introduces another
> instance of special address space (ISA_START_ADDRESS in this case) which
> is never a good thing.
>
>        -hpa
>
>

  reply	other threads:[~2010-05-19 23:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19  5:35 [PATCH] Prevent reserving RAM in the region already reserved by BIOS Mathieu Rondonneau
2010-05-19 17:40 ` Yinghai
2010-05-19 17:43   ` H. Peter Anvin
2010-05-19 22:58     ` Mathieu Rondonneau [this message]
2010-05-19 23:00       ` H. Peter Anvin
2010-05-20  0:01         ` Mathieu Rondonneau
2010-05-20  0:07           ` Yinghai
2010-05-20  0:09           ` H. Peter Anvin
2010-05-20 12:12           ` Alan Cox
2010-05-21 15:15             ` Mathieu Rondonneau
2010-05-22  4:58               ` Mathieu Rondonneau

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=AANLkTikYcu6fM3yLoYIZOGZXgsRUfCgJeWS51Sjo-Fny@mail.gmail.com \
    --to=mathieu.rondonneau@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=yinghai.lu@oracle.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;
as well as URLs for NNTP newsgroup(s).