All of lore.kernel.org
 help / color / mirror / Atom feed
From: matthieu castet <castet.matthieu@free.fr>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Zhao Yakui <yakui.zhao@intel.com>, linux-acpi@vger.kernel.org
Subject: Re: [PATCH] check that acpi_wakeup_address is below 1MB v2
Date: Fri, 11 Apr 2008 20:04:02 +0200	[thread overview]
Message-ID: <47FFA812.3070108@free.fr> (raw)
In-Reply-To: <200804111712.24233.rjw@sisk.pl>

Hi,

Rafael J. Wysocki wrote:
> On Friday, 11 of April 2008, Zhao Yakui wrote:
>> On Thu, 2008-04-10 at 23:33 +0200, matthieu castet wrote:
>>> Hi,
>>>
>>> this patch add a check that the memory allocated for s3 wakeup is in the 
>>> first 1MB as required by acpi spec.
>>>
>> Have you found whether some systems are afflicted by this ?
>>
>> In fact that OS allacates the acpi_wake_address follows the below two
>> functions:
>> reserve_bootmem(0, PAGE_SIZE, BOOTMEM_DEFAULT);
>> reserve_bootmem(PAGE_SIZE, PAGE_SIZE, BOOTMEM_DEFAULT);
>>
That's on 32 bits kernel. Aren't the 1MB limitation valid on 64 bits 
kernel ?

>> The above mechanism can insure that the acpi_wake_address is in memroy
>> below 1M. (It is unncessary to apply the patch. IMO)
> 
> Agreed.
>  
>> Of course the addressing check will be more strict after this patch is
>> applied.
> 
> Matthieu, can you please explain why you consider the patch as necessary?
This can help to debug strange S3 wakeup problem. It make sure the 
allocation is correct.

Also I believe relying on the bootmem allocator internal to be sure it 
is in the first 1MB is a bad things (why can't it start allocating 
memory to the top of 16MB memory).
If you are sure of the allocated memory before the call, why don't do a
reserve_bootmem(PAGE_SIZE*2, PAGE_SIZE*2, BOOTMEM_DEFAULT); ?


Matthieu

      reply	other threads:[~2008-04-11 18:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10 21:33 [PATCH] check that acpi_wakeup_address is below 1MB v2 matthieu castet
2008-04-11  9:55 ` Zhao Yakui
2008-04-11 15:12   ` Rafael J. Wysocki
2008-04-11 18:04     ` matthieu castet [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=47FFA812.3070108@free.fr \
    --to=castet.matthieu@free.fr \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=yakui.zhao@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 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.