From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: "David E. Box" <david.e.box@linux.intel.com>
Cc: lenb@kernel.org, Randy Wright <rwright@hp.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI: Fix bug when acpi reset register is implemented in system memory
Date: Thu, 05 Jun 2014 14:58:22 +0200 [thread overview]
Message-ID: <7970700.XBb1Ob3tCb@vostro.rjw.lan> (raw)
In-Reply-To: <1401897359-28873-1-git-send-email-david.e.box@linux.intel.com>
On Wednesday, June 04, 2014 08:55:59 AM David E. Box wrote:
> From: Randy Wright <rwright@hp.com>
>
> Use acpi_os_map_generic_address to pre-map the reset register if it is memory
> mapped, thereby preventing https://bugzilla.kernel.org/show_bug.cgi?id=77131
>
> Signed-off-by: Randy Wright <rwright@hp.com>
> Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Applied with minor changes, thanks!.
Please check the bleeding-edge branch of the linux-pm.git tree.
Rafael
> ---
> drivers/acpi/osl.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index 6776c59..5325844 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -1798,6 +1798,19 @@ acpi_status __init acpi_os_initialize(void)
> acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1b_event_block);
> acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe0_block);
> acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe1_block);
> + if (acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) {
> + /*
> + * Use acpi_os_map_generic_address to pre-map the reset
> + * register if it's in system memory, thereby preventing
> + * https://bugzilla.kernel.org/show_bug.cgi?id=77131
> + */
> + int rv;
> + struct acpi_generic_address *reset_reg
> + = &acpi_gbl_FADT.reset_register;
> + rv = acpi_os_map_generic_address(reset_reg);
> + pr_info(PREFIX
> + "%s: map reset_reg status %d\n", __func__, rv);
> + }
>
> return AE_OK;
> }
> @@ -1826,6 +1839,8 @@ acpi_status acpi_os_terminate(void)
> acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe0_block);
> acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1b_event_block);
> acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1a_event_block);
> + if (acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER)
> + acpi_os_unmap_generic_address(&acpi_gbl_FADT.reset_register);
>
> destroy_workqueue(kacpid_wq);
> destroy_workqueue(kacpi_notify_wq);
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
prev parent reply other threads:[~2014-06-05 12:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 15:55 [PATCH] ACPI: Fix bug when acpi reset register is implemented in system memory David E. Box
2014-06-05 12:58 ` Rafael J. Wysocki [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=7970700.XBb1Ob3tCb@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=david.e.box@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rwright@hp.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