Merge branch 'acpi-headers'

* acpi-headers:
  ACPI: Add support to force header inclusion rules for <acpi/acpi.h>.
  ACPI / SFI: Fix wrong <acpi/acpi.h> inclusion in SFI/ACPI wrapper - table definitions.
  ACPICA: Linux: Allow ACPICA inclusion for CONFIG_ACPI=n builds.
  ACPICA: Linux: Add support to exclude <asm/acenv.h> inclusion.
  ACPICA: Linux: Add stub implementation of ACPICA 64-bit mathematics.
  ACPICA: Linux: Add stub support for Linux specific variables and functions.
This commit is contained in:
Rafael J. Wysocki
2014-07-27 23:52:05 +02:00
9 changed files with 55 additions and 29 deletions

View File

@@ -53,8 +53,6 @@
#include <acpi/actbl.h>
#include <acpi/acbuffer.h>
extern u8 acpi_gbl_permanent_mmap;
/*****************************************************************************
*
* Macros used for ACPICA globals and configuration
@@ -889,17 +887,25 @@ ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1)
/*
* Divergences
*/
acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap);
acpi_status acpi_unload_table_id(acpi_owner_id id);
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_get_id(acpi_handle object,
acpi_owner_id * out_type))
acpi_status
acpi_get_table_with_size(acpi_string signature,
u32 instance, struct acpi_table_header **out_table,
acpi_size *tbl_size);
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_unload_table_id(acpi_owner_id id))
acpi_status
acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data,
void (*callback)(void *));
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_get_table_with_size(acpi_string signature,
u32 instance,
struct acpi_table_header
**out_table,
acpi_size *tbl_size))
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_get_data_full(acpi_handle object,
acpi_object_handler handler,
void **data,
void (*callback)(void *)))
#endif /* __ACXFACE_H__ */

View File

@@ -44,6 +44,16 @@
#ifndef __ACLINUX_H__
#define __ACLINUX_H__
#ifdef __KERNEL__
/* ACPICA external files should not include ACPICA headers directly. */
#if !defined(BUILDING_ACPICA) && !defined(_LINUX_ACPI_H)
#error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead."
#endif
#endif
/* Common (in-kernel/user-space) ACPICA configuration */
#define ACPI_USE_SYSTEM_CLIBRARY
@@ -70,7 +80,9 @@
#ifdef EXPORT_ACPI_INTERFACES
#include <linux/export.h>
#endif
#ifdef CONFIG_ACPI
#include <asm/acenv.h>
#endif
#ifndef CONFIG_ACPI

View File

@@ -46,6 +46,28 @@
#ifdef __KERNEL__
#ifndef ACPI_USE_NATIVE_DIVIDE
#ifndef ACPI_DIV_64_BY_32
#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
do { \
u64 (__n) = ((u64) n_hi) << 32 | (n_lo); \
(r32) = do_div ((__n), (d32)); \
(q32) = (u32) (__n); \
} while (0)
#endif
#ifndef ACPI_SHIFT_RIGHT_64
#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
do { \
(n_lo) >>= 1; \
(n_lo) |= (((n_hi) & 1) << 31); \
(n_hi) >>= 1; \
} while (0)
#endif
#endif
/*
* Overrides for in-kernel ACPICA
*/