linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ACPI: Re-factor and remove ./drivers/acpi/atomicio.[ch]
@ 2012-01-21  2:13 Myron Stowe
  2012-01-21  2:13 ` [PATCH 1/3] ACPI, APEI: Add 64-bit read/write support for APEI on i386 Myron Stowe
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Myron Stowe @ 2012-01-21  2:13 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi, rjw, ying.huang, bhelgaas, trenn, linux-kernel

I recently submitted a patch series that re-factored some existing
work that Huang Ying introduced adding support for accessing ACPI
generic registers, backed by Memory Mapped I/O (MMIO), while within
interrupt context:
  Original series: http://marc.info/?l=linux-acpi&m=128769263327206&w=2
  Follow on series: http://marc.info/?l=linux-kernel&m=132070825520957&w=2

An underlying goal has been to re-factor ./drivers/acpi/atomicio.c into
./drivers/acpi/osl.c, providing equivalent functionality but in a more
generalized manner, to allow usage in non-specific (i.e. APEI) contexts
and remove atomicio.c.

In the most recent follow on series, there ended up being additions to
atomicio.c that coincided with the attempt to remove it and as such, the
series final removal patch could not be taken without first pulling the
additions into osl.c.  The fact that the follow on series conversion
patch - commit 700130b41f4 - was taken has inadvertently created
regressions with respect to the recent atomicio.c additions due to the
conversion patch effectively making atomicio.c obsolete.

The additions were commit 04c25997c97 "ACPI, Add 64bit read/write
support to atomicio on i386" and commit 76da3fb3575 "ACPI, Add RAM
mapping support to ACPI atomic IO support".

This patch series addresses both of these issues, bringing in the
additional functionality into the re-factored files (apei-base.c and
osl.c) and then again, reintroduces the patch to remove
./drivers/acpi/atomicio.[ch].
---

Myron Stowe (3):
      ACPI: Remove ./drivers/acpi/atomicio.[ch]
      ACPI, APEI: Add RAM mapping support to ACPI
      ACPI, APEI: Add 64-bit read/write support for APEI on i386


 drivers/acpi/Makefile         |    1 
 drivers/acpi/apei/apei-base.c |   35 ---
 drivers/acpi/atomicio.c       |  422 -----------------------------------------
 drivers/acpi/osl.c            |  152 +++++++++++++++
 include/acpi/acpiosxf.h       |    4 
 include/acpi/atomicio.h       |   10 -
 6 files changed, 158 insertions(+), 466 deletions(-)
 delete mode 100644 drivers/acpi/atomicio.c
 delete mode 100644 include/acpi/atomicio.h

-- 

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] ACPI, APEI: Add RAM mapping support to ACPI
@ 2012-01-23 15:51 Thomas Renninger
  2012-01-23 17:48 ` Myron Stowe
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Thomas Renninger @ 2012-01-23 15:51 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Myron Stowe, lenb, linux-acpi, rjw, ying.huang, linux-kernel,
	Tony Luck, linux-ia64

Hi,

Please ignore my previous mail, my mailer wrongly formatted
it with html tags and it got filtered out from the lists.

Firstly: This has to get in quickly if it shouldn't miss
3.3 (again). Tiny adjustings (I don't see any, beside the
issue Bjorn brought up) can still be done later, but I
guess this rather big one gets rejected by Linus after
the merge window closed.

Here again:

On Saturday, January 21, 2012 09:38:27 PM Bjorn Helgaas wrote:
> +cc Tony, linux-ia64
> 
...
> >>  {
> >> @@ -353,7 +385,7 @@ acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
> >>
> >>        pg_off = round_down(phys, PAGE_SIZE);
> >>        pg_sz = round_up(phys + size, PAGE_SIZE) - pg_off;
> >> -       virt = acpi_os_ioremap(pg_off, pg_sz);
> >> +       virt = acpi_map(pg_off, pg_sz);
Ok, that worked before, also on IA64.
That means that typically/normally/always io mem is tried to be mapped.

It's due to the new APEI infrastructure/features that ram could
get mapped via acpi_os_map_memory.

Is there any Itanium out there implementing any APEI table?
Will there ever be one?
Even if, isn't it a BIOS bug if such stuff is declared in ram and not
in reserved memory (also on X86)?
Especially on an Enterprise Itanium platform,
I guess the vendor should or better has to fix it up.

I'd do:
can_use_ioremap(pfn) instead of should_use_kmap(pfn)
and let it return false in ram + ia64 case, something like:
#ifdef IA64
#define can_use_ioremap(pfn)   !page_is_ram(pfn)
#endif

Pass the error upwards and APEI should get disabled on IA64,
if any ACPI code tries to ioremap real memory early (when
the APEI table parsing happens).
A nice FW_BUG message could be added as well (also on X86?).

Don't forget to use:
iounmap(vaddr);
only in acpi_unmap() then.

FWIW I even grepped for APEI tables on the most recent IA
machine we have -> no APEI tables.

If the rest is functionally the same as the patch series
you've send some months ago, feel free to add:

Reviewed-by: Thomas Renninger <trenn@suse.de>

I had a rather close look at those patches.

   Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-02-06  1:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-21  2:13 [PATCH 0/3] ACPI: Re-factor and remove ./drivers/acpi/atomicio.[ch] Myron Stowe
2012-01-21  2:13 ` [PATCH 1/3] ACPI, APEI: Add 64-bit read/write support for APEI on i386 Myron Stowe
2012-01-21  2:13 ` [PATCH 2/3] ACPI, APEI: Add RAM mapping support to ACPI Myron Stowe
2012-01-21 15:04   ` Bjorn Helgaas
2012-01-21 20:38     ` Bjorn Helgaas
2012-01-23 18:03     ` Myron Stowe
2012-01-29  0:58     ` Huang Ying
2012-01-29 20:41       ` Bjorn Helgaas
2012-01-30  0:35         ` Huang Ying
2012-02-06  1:37         ` Huang Ying
2012-01-21  2:13 ` [PATCH 3/3] ACPI: Remove ./drivers/acpi/atomicio.[ch] Myron Stowe
2012-01-21  3:15 ` [PATCH 0/3] ACPI: Re-factor and remove ./drivers/acpi/atomicio.[ch] Huang Ying
2012-01-23 15:51 [PATCH 2/3] ACPI, APEI: Add RAM mapping support to ACPI Thomas Renninger
2012-01-23 17:48 ` Myron Stowe
2012-01-23 18:23 ` Luck, Tony
2012-01-29  1:09 ` Huang Ying

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).