public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Myron Stowe <myron.stowe@hp.com>
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, ak@linux.intel.com, ying.huang@intel.com
Subject: [PATCH 0/7] ACPI: Memory Mapped I/O (MMIO) pre-mapping
Date: Thu, 21 Oct 2010 14:23:43 -0600	[thread overview]
Message-ID: <20101021201916.9220.5711.stgit@bob.kio> (raw)

ACPI's system event related IRQ handing accesses specific fixed
hardware registers; namely PM1a event, PM1b event, GPE0, and GPE1
which are declared in the FADT.  If these registers are backed by
MMIO, as opposed to I/O port space, accessing them within interrupt
context will incur a panic since acpi_read() and acpi_write() end up
calling ioremap(), which may block to allocate memory - BZ 18012.

This patch series creates a list for maintaining ACPI MMIO remappings
and augments the corresponding mapping and unmapping interface
routines (acpi_os_map_memory() and acpi_os_unmap_memory()) to
dynamically add to, and delete from, the list as necessary.  In
addition to the list, interfaces for mapping and unmapping ACPI
registers, that are backed by MMIO, are added.  Together, they enable
accesses of such registers from within interrupt context.

Huang Ying introduced similar functionality specific to ACPI Platform
Error Interfaces in commit 15651291a2f8c11e7e6a42d8bfde7a213ff13262.
Much of this series re-factors Ying's commit - patches 5/7 and
6/7 [*] are practically verbatim copies - providing equivalent
functionality but in a more generalized manner allowing usage in
non-specific contexts.


[*]  The page based coalescing optimization of patch 6/7 is definitely
insightful but I question if the additional complexity, and potential
maintenance, outweigh its value.  I would be interested in others
opinions on this.

There is a behavioral difference that the optimization introduces
although I do not believe it matters in this instance:
  Consider two ioremap() requests occurring that specify the same
  physical address.  Prior to this optimization, two separate ioremap()
  requests would occur and two distinct virtual addresses would be
  returned (multiple calls to ioremap() with the same physical address
  do not return the same virtual address).  With the optimization in
  place, the two ioremap() requests will end up returning the same
  virtual address.


Reference: https://bugzilla.kernel.org/show_bug.cgi?id=18012


---

Myron Stowe (7):
      ACPI: Fix ioremap size for MMIO reads and writes
      ACPI: Maintain a list of ACPI memory mapped I/O remappings
      ACPI: Add interfaces for ioremapping/iounmapping ACPI registers
      ACPI: Pre-map 'system event' related register blocks
      ACPI: Convert simple locking to RCU based locking
      ACPI: Page based coalescing of I/O remappings optimization
      ACPI: Re-factor and remove ./drivers/acpi/atomicio.[ch]


 drivers/acpi/Makefile         |    1 
 drivers/acpi/apei/apei-base.c |   11 +
 drivers/acpi/apei/ghes.c      |    9 -
 drivers/acpi/atomicio.c       |  361 -----------------------------------------
 drivers/acpi/osl.c            |  276 ++++++++++++++++++++++++++-----
 include/acpi/atomicio.h       |   10 -
 include/linux/acpi.h          |    3 
 7 files changed, 242 insertions(+), 429 deletions(-)
 delete mode 100644 drivers/acpi/atomicio.c
 delete mode 100644 include/acpi/atomicio.h


             reply	other threads:[~2010-10-21 20:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 20:23 Myron Stowe [this message]
2010-10-21 20:23 ` [PATCH 1/7] ACPI: Fix ioremap size for MMIO reads and writes Myron Stowe
2010-10-21 20:23 ` [PATCH 2/7] ACPI: Maintain a list of ACPI memory mapped I/O remappings Myron Stowe
2010-10-21 20:23 ` [PATCH 3/7] ACPI: Add interfaces for ioremapping/iounmapping ACPI registers Myron Stowe
2010-10-21 20:24 ` [PATCH 4/7] ACPI: Pre-map 'system event' related register blocks Myron Stowe
2010-10-21 20:24 ` [PATCH 5/7] ACPI: Convert simple locking to RCU based locking Myron Stowe
2010-10-21 20:24 ` [PATCH 6/7] ACPI: Page based coalescing of I/O remappings optimization Myron Stowe
2010-10-22  1:03   ` Huang Ying
2010-10-22  3:23     ` Myron Stowe
2010-10-22  5:17       ` Huang Ying
2010-10-22 16:27         ` Myron Stowe
2010-10-25  1:22           ` Huang Ying
2010-10-21 20:24 ` [PATCH 7/7] ACPI: Re-factor and remove ./drivers/acpi/atomicio.[ch] Myron Stowe
2010-10-22  2:43 ` [PATCH 0/7] ACPI: Memory Mapped I/O (MMIO) pre-mapping Shaohua Li
2010-10-22  2:57   ` Huang Ying
2010-10-22  3:16     ` Shaohua Li
2010-10-22  3:24       ` Huang Ying
2010-10-22 17:10       ` Bjorn Helgaas
2010-10-25  8:34         ` Andi Kleen
2010-10-25  8:43           ` Huang Ying
2010-10-25  9:29             ` Andi Kleen
2010-10-25  3:38 ` Len Brown
2010-10-25 15:34   ` Myron Stowe
2010-10-25 18:34   ` Andi Kleen
2010-10-28  1:53     ` Len Brown

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=20101021201916.9220.5711.stgit@bob.kio \
    --to=myron.stowe@hp.com \
    --cc=ak@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=ying.huang@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