<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/acpi/platform, branch v3.16.61</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.16.61</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.16.61'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2015-05-20T12:26:17+00:00</updated>
<entry>
<title>ACPICA: Utilities: split IO address types from data type models.</title>
<updated>2015-05-20T12:26:17+00:00</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2015-04-13T03:48:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=da800d800ae18040171d8c271c429faeefc41da0'/>
<id>urn:sha1:da800d800ae18040171d8c271c429faeefc41da0</id>
<content type='text'>
commit 2b8760100e1de69b6ff004c986328a82947db4ad upstream.

ACPICA commit aacf863cfffd46338e268b7415f7435cae93b451

It is reported that on a physically 64-bit addressed machine, 32-bit kernel
can trigger crashes in accessing the memory regions that are beyond the
32-bit boundary. The region field's start address should still be 32-bit
compliant, but after a calculation (adding some offsets), it may exceed the
32-bit boundary. This case is rare and buggy, but there are real BIOSes
leaked with such issues (see References below).

This patch fixes this gap by always defining IO addresses as 64-bit, and
allows OSPMs to optimize it for a real 32-bit machine to reduce the size of
the internal objects.

Internal acpi_physical_address usages in the structures that can be fixed
by this change include:
 1. struct acpi_object_region:
    acpi_physical_address		address;
 2. struct acpi_address_range:
    acpi_physical_address		start_address;
    acpi_physical_address		end_address;
 3. struct acpi_mem_space_context;
    acpi_physical_address		address;
 4. struct acpi_table_desc
    acpi_physical_address		address;
See known issues 1 for other usages.

Note that acpi_io_address which is used for ACPI_PROCESSOR may also suffer
from same problem, so this patch changes it accordingly.

For iasl, it will enforce acpi_physical_address as 32-bit to generate
32-bit OSPM compatible tables on 32-bit platforms, we need to define
ACPI_32BIT_PHYSICAL_ADDRESS for it in acenv.h.

Known issues:
 1. Cleanup of mapped virtual address
   In struct acpi_mem_space_context, acpi_physical_address is used as a virtual
   address:
    acpi_physical_address                   mapped_physical_address;
   It is better to introduce acpi_virtual_address or use acpi_size instead.
   This patch doesn't make such a change. Because this should be done along
   with a change to acpi_os_map_memory()/acpi_os_unmap_memory().
   There should be no functional problem to leave this unchanged except
   that only this structure is enlarged unexpectedly.

Link: https://github.com/acpica/acpica/commit/aacf863c
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=87971
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=79501
Reported-and-tested-by: Paul Menzel &lt;paulepanter@users.sourceforge.net&gt;
Reported-and-tested-by: Sial Nije &lt;sialnije@gmail.com&gt;
Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Signed-off-by: Bob Moore &lt;robert.moore@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</content>
</entry>
<entry>
<title>ACPI: Clean up acpi_os_map/unmap_memory() to eliminate __iomem.</title>
<updated>2014-05-27T16:13:08+00:00</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-05-20T07:39:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a238317ce8185519ed083e81e84260907fbbcf7f'/>
<id>urn:sha1:a238317ce8185519ed083e81e84260907fbbcf7f</id>
<content type='text'>
ACPICA doesn't include protections around address space checking, Linux
build tests always complain increased sparse warnings around ACPICA
internal acpi_os_map/unmap_memory() invocations.  This patch tries to fix
this issue permanently.

There are 2 choices left for us to solve this issue:
 1. Add __iomem address space awareness into ACPICA.
 2. Remove sparse checker of __iomem from ACPICA source code.

This patch chooses solution 2, because:
 1.  Most of the acpi_os_map/unmap_memory() invocations are used for ACPICA.
     table mappings, which in fact are not IO addresses.
 2.  The only IO addresses usage is for "system memory space" mapping code in:
      drivers/acpi/acpica/exregion.c
      drivers/acpi/acpica/evrgnini.c
      drivers/acpi/acpica/exregion.c
    The mapped address is accessed in the handler of "system memory space"
    - acpi_ex_system_memory_space_handler().  This function in fact can be
    changed to invoke acpi_os_read/write_memory() so that __iomem can
    always be type-casted in the OSL layer.

According to the above investigation, we drew the following conclusion:
It is not a good idea to introduce __iomem address space awareness into
ACPICA mostly in order to protect non-IO addresses.

We can simply remove __iomem for acpi_os_map/unmap_memory() to remove
__iomem checker for ACPICA code. Then we need to enforce external usages
to invoke other APIs that are aware of __iomem address space.
The external usages are:
 drivers/acpi/apei/einj.c
 drivers/acpi/acpi_extlog.c
 drivers/char/tpm/tpm_acpi.c
 drivers/acpi/nvs.c

This patch thus performs cleanups in this way:
 1. Add acpi_os_map/unmap_iomem() to be invoked by non-ACPICA code.
 2. Remove __iomem from acpi_os_map/unmap_memory().

Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPICA: Clean up redudant definitions already defined elsewhere</title>
<updated>2014-05-27T16:13:08+00:00</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-05-12T07:46:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=92985ef1db428cc6129a1d375a68c277aa05820b'/>
<id>urn:sha1:92985ef1db428cc6129a1d375a68c277aa05820b</id>
<content type='text'>
Since mis-order issues have been solved, we can cleanup redundant
definitions that already have defaults in &lt;acpi/platform/acenv.h&gt;.

This patch removes redudant environments for __KERNEL__ surrounded code.

Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPICA: Linux headers: Add &lt;asm/acenv.h&gt; to remove mis-ordered inclusion of &lt;asm/acpi.h&gt;</title>
<updated>2014-05-27T16:13:07+00:00</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-05-12T07:46:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=07d8391433380fc72f999d99c554b1cfedea9778'/>
<id>urn:sha1:07d8391433380fc72f999d99c554b1cfedea9778</id>
<content type='text'>
There is a mis-order inclusion for &lt;asm/acpi.h&gt;.

As we will enforce including &lt;linux/acpi.h&gt; for all Linux ACPI users, we
can find the inclusion order is as follows:

&lt;linux/acpi.h&gt;
  &lt;acpi/acpi.h&gt;
   &lt;acpi/platform/acenv.h&gt;
    (acenv.h before including aclinux.h)
    &lt;acpi/platform/aclinux.h&gt;
...........................................................................
     (aclinux.h before including asm/acpi.h)
     &lt;asm/acpi.h&gt;                             @Redundant@
      (ACPICA specific stuff)
...........................................................................
...........................................................................
      (Linux ACPI specific stuff) ? - - - - - - - - - - - - +
     (aclinux.h after including asm/acpi.h)   @Invisible@   |
    (acenv.h after including aclinux.h)       @Invisible@   |
   other ACPICA headers                       @Invisible@   |
............................................................|..............
  &lt;acpi/acpi_bus.h&gt;                                         |
  &lt;acpi/acpi_drivers.h&gt;                                     |
  &lt;asm/acpi.h&gt; (Excluded)                                   |
   (Linux ACPI specific stuff) ! &lt;- - - - - - - - - - - - - +

NOTE that, in ACPICA, &lt;acpi/platform/acenv.h&gt; is more like Kconfig
generated &lt;generated/autoconf.h&gt; for Linux, it is meant to be included
before including any ACPICA code.

In the above figure, there is a question mark for "Linux ACPI specific
stuff" in &lt;asm/acpi.h&gt; which should be included after including all other
ACPICA header files.  Thus they really need to be moved to the position
marked with exclaimation mark or the definitions in the blocks marked with
"@Invisible@" will be invisible to such architecture specific "Linux ACPI
specific stuff" header blocks.  This leaves 2 issues:
1. All environmental definitions in these blocks should have a copy in the
   area marked with "@Redundant@" if they are required by the "Linux ACPI
   specific stuff".
2. We cannot use any ACPICA defined types in &lt;asm/acpi.h&gt;.

This patch splits architecture specific ACPICA stuff from &lt;asm/acpi.h&gt; to
fix this issue.

Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPICA: Linux headers: Add &lt;acpi/platform/aclinuxex.h&gt;</title>
<updated>2014-05-27T16:13:07+00:00</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-05-12T07:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d13bd5a602982cd7f697e39b13ac736c2c553af1'/>
<id>urn:sha1:d13bd5a602982cd7f697e39b13ac736c2c553af1</id>
<content type='text'>
From ACPICA's perspective, &lt;acpi/actypes.h&gt; should be included after
inclusion of &lt;acpi/platform/acenv.h&gt;.  But currently in Linux,
&lt;acpi/platform/aclinux.h&gt; included by &lt;acpi/platform/acenv.h&gt; has
included &lt;acpi/actypes.h&gt; to find ACPICA types for inline functions.

This causes the following problem:
1. Redundant code in &lt;asm/acpi.h&gt; and &lt;acpi/platform/aclinux.h&gt;:
   Linux must be careful to keep conditions for &lt;acpi/actypes.h&gt; inclusion
   consistent with the conditions for &lt;acpi/platform/aclinux.h&gt; inclusion.
   Which finally leads to the issue that we have to keep many useless macro
   definitions in &lt;acpi/platform/aclinux.h&gt; or &lt;asm/acpi.h&gt;.
   Such conditions include:
     COMPILER_DEPENDENT_UINT64
     COMPILER_DEPENDENT_INT64
     ACPI_INLINE
     ACPI_SYSTEM_XFACE
     ACPI_EXTERNAL_XFACE
     ACPI_INTERNAL_XFACE
     ACPI_INTERNAL_VAR_XFACE
     ACPI_MUTEX_TYPE
     DEBUGGER_THREADING
     ACPI_ACQUIRE_GLOBAL_LOCK
     ACPI_RELEASE_GLOBAL_LOCK
     ACPI_FLUSH_CPU_CACHE
   They have default implementations in &lt;include/acpi/platform/acenv.h&gt;
   while Linux need to keep a copy in &lt;asm/acpi.h&gt; to avoid build errors.

This patch introduces &lt;acpi/platform/aclinuxex.h&gt; to fix this issue by
splitting conditions and declarations (most of them are inline functions)
into 2 header files so that the wrong inclusion of &lt;acpi/actypes.h&gt; can be
removed from &lt;acpi/platform/aclinux.h&gt;.

This patch also removes old ACPI_NATIVE_INTERFACE_HEADER mechanism which is
not preferred by Linux and adds the platform/acenvex.h to be the solution
to solve this issue.

Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPICA: Linux headers: Remove ACPI_PREEMPTION_POINT() due to no usages.</title>
<updated>2014-05-27T16:13:07+00:00</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-05-12T07:45:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=636fcfefa2a45f5b54f475309928ef191b27dd19'/>
<id>urn:sha1:636fcfefa2a45f5b54f475309928ef191b27dd19</id>
<content type='text'>
This patch deletes deprecated ACPI_PREEMPTION_POINT(), there is no user
for it in Linux kernel now.

Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPICA: Linux header: Add support for stubbed externals.</title>
<updated>2014-05-06T22:55:01+00:00</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-04-30T02:05:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=42873a84a22f6ee089b720c817bb61aebeff6e0d'/>
<id>urn:sha1:42873a84a22f6ee089b720c817bb61aebeff6e0d</id>
<content type='text'>
Linux wants to include all header files but leave empty inline
stub variables for a feature that is not configured during build.

This patch configures ACPICA external globals/macros/functions out and
defines them into no-op when CONFIG_ACPI is not enabled.  Lv Zheng.

Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Signed-off-by: Bob Moore &lt;robert.moore@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPICA: Linux-specific header: Add support for PPC64 compilation.</title>
<updated>2014-04-20T20:59:38+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2014-04-04T04:38:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=72bdad969271b713e109fd747111d39a0b41d289'/>
<id>urn:sha1:72bdad969271b713e109fd747111d39a0b41d289</id>
<content type='text'>
Adds PPC64 as a 64-bit architecture. Colin Ian King.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Bob Moore &lt;robert.moore@intel.com&gt;
Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPICA: Clean up comment divergences in aclinux.h</title>
<updated>2014-04-20T20:59:37+00:00</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-04-04T04:37:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a3a80da3ef396c5c64ade0c834a8145d3f283a24'/>
<id>urn:sha1:a3a80da3ef396c5c64ade0c834a8145d3f283a24</id>
<content type='text'>
When the following commmit is back ported to ACPICA, comments have been
updated:
  Subject: ACPICA: Linux-specific header: Update support for Linux/acpi
           applications.

This patch back ports the differences between the ACPICA upstream and
Linux.

Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Signed-off-by: Bob Moore &lt;robert.moore@intel.com&gt;
[rjw: Subject]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPICA: gcc-specific: Fix possible issue with the strchr function.</title>
<updated>2014-04-20T20:59:37+00:00</updated>
<author>
<name>Bob Moore</name>
<email>robert.moore@intel.com</email>
</author>
<published>2014-04-04T04:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ed823264845f7c2f14d3278405e593ddfdc50f6'/>
<id>urn:sha1:7ed823264845f7c2f14d3278405e593ddfdc50f6</id>
<content type='text'>
Some versions of gcc implement strchr via a macro, which either
contains bugs or can provoke a bug in the compiler. This change
fixes a possible compile-time error when using this function.
The problem is usually seen when compiling the getopt.c module.

Signed-off-by: Bob Moore &lt;robert.moore@intel.com&gt;
Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
