<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/acpi/platform/aclinux.h, branch v3.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-05-27T16:13:08Z</updated>
<entry>
<title>ACPI: Clean up acpi_os_map/unmap_memory() to eliminate __iomem.</title>
<updated>2014-05-27T16:13:08Z</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-05-20T07:39:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:08Z</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-05-12T07:46:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:07Z</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-05-12T07:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:07Z</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-05-12T07:46:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:07Z</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-05-12T07:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:01Z</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-04-30T02:05:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:38Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2014-04-04T04:38:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:37Z</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-04-04T04:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>Merge branch 'acpi-config' into acpica</title>
<updated>2014-03-18T00:53:28Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2014-03-18T00:53:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bcef50814c9de8e0672d3e7f9f1abd85e1b95d13'/>
<id>urn:sha1:bcef50814c9de8e0672d3e7f9f1abd85e1b95d13</id>
<content type='text'>
Conflicts:
	include/acpi/platform/aclinux.h
</content>
</entry>
<entry>
<title>ACPICA: acpidump: Remove integer types translation protection.</title>
<updated>2014-02-13T15:21:15Z</updated>
<author>
<name>Lv Zheng</name>
<email>lv.zheng@intel.com</email>
</author>
<published>2014-02-11T02:51:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e252652fb2664d42de19f933aa3688bbc470de3f'/>
<id>urn:sha1:e252652fb2664d42de19f933aa3688bbc470de3f</id>
<content type='text'>
Remove translation protection for applications as Linux tools folder will
start to use such types.

In Linux kernel source tree, after removing this translation protection,
the u8/u16/u32/u64/s32/s64 typedefs are exposed for both __KERNEL__ builds
and !__KERNEL__ builds (tools/power/acpi) and the original definitions of
ACPI_UINT8/16/32/64_MAX are changed.

For !__KERNEL__ builds, this kind of defintions should already been tested
by the distribution vendors that are distributing binary ACPICA package and
we've achieved the successful built/run test result in the kernel source
tree.

For __KERNEL__ builds, there are 2 things affected:
1. u8/u16/u32/u64/s32/s64 type definitions:
   Since Linux has already type defined u8/u16/u32/u64/s32/s64 in
   include/uapi/asm-generic/int-ll64.h for __KERNEL__.  In order not to
   introduce build regressions where the 2 typedefs are differed,
   ACPI_USE_SYSTEM_INTTYPES is introduced to mask out ACPICA's typedefs.
   It must be defined for Linux __KERNEL__ builds.
2. ACPI_UINT8/16/32/64_MAX definitions:
   Before applying this change:
     ACPI_UINT8_MAX: sizeof (UINT8)
      UINT8: unsigned char
     ACPI_UINT16_MAX: sizeof (UINT16)
      UINT16: unsigned short
     ACPI_UINT32_MAX: sizeof (UINT32)
      INT32: int
      UINT32: unsigned int
     ACPI_UINT64_MAX: sizeof (UINT64)
      INT64: COMPILER_DEPENDENT_INT64
       COMPILER_DEPENDENT_INT64: signed long (IA64) or
                                 signed long long (IA32)
      UINT64: COMPILER_DEPENDENT_UINT64
       COMPILER_DEPENDENT_UINT64: unsigned long (IA64) or
                                  unsigned long long (IA32)
   After applying this change:
     ACPI_UINT8_MAX: sizeof (u8)
      u8: unsigned char
      UINT8: (removed from actypes.h)
     ACPI_UINT16_MAX: sizeof (u16)
      u16: unsigned short
      UINT16: (removed from actypes.h)
     ACPI_UINT32_MAX: sizeof (u32)
      INT32/UINT32: (removed from actypes.h)
      s32: signed int
      u32: unsigned int
     ACPI_UINT64_MAX: sizeof (u64)
      INT64/UINT64: (removed from actypes.h)
      u64: unsigned long long
      s64: signed long long
      COMPILER_DEPENDENT_INT64: signed long (IA64) (not used any more)
                                signed long long (IA32) (not used any more)
      COMPILER_DEPENDENT_UINT64: unsigned long (IA64) (not used any more)
                                 unsigned long long (IA32) (not used any more)
   All definitions are equal except ACPI_UINT64_MAX for CONFIG_IA64.  It
   is changed from sizeof(unsigned long) to sizeof(unsigned long long).
   By investigation, 64bit Linux kernel build is LP64 compliant, i.e.,
   sizeof(long) and (pointer) are 64.  As sizeof(unsigned long) equals to
   sizeof(unsigned long long) on IA64 platform where CONFIG_64BIT cannot be
   disabled, this change actually will not affect the value of
   ACPI_UINT64_MAX on IA64 platforms.

This patch is necessary for the ACPICA's acpidump tool to build
correctly.  Lv Zheng.

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>
