mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Merge branch 'acpica'
* acpica: (30 commits) ACPICA: Add new GPE public interface - acpi_mark_gpe_for_wake. ACPICA: GPEs: Do not allow enable for GPEs that have no handler(s). ACPICA: Fix a regression for deletion of Alias() objects. ACPICA: Update version to 20140627 ACPICA: Tables: Merge DMAR table structure updates ACPICA: Hardware: back port of a recursive locking fix ACPICA: utprint/oslibcfs: cleanup - no functional change ACPICA: Executer: Fix trivial issues in acpi_get_serial_access_bytes() ACPICA: OSL: Update acpidump to reduce source code differences ACPICA: acpidump: Reduce freopen() invocations to improve portability ACPICA: acpidump: Replace file IOs with new APIs to improve portability ACPICA: acpidump: Remove exit() from generic layer to improve portability ACPICA: acpidump: Add memory/string OSL usage to improve portability ACPICA: Common: Enhance acpi_getopt() to improve portability ACPICA: Common: Enhance cm_get_file_size() to improve portability ACPICA: Application: Enhance ACPI_USAGE_xxx/ACPI_OPTION with acpi_os_printf() to improve portability ACPICA: Utilities: Introduce acpi_log_error() to improve portability ACPICA: Utilities: Add formatted printing APIs ACPICA: OSL: Add portable file IO to improve portability ACPICA: OSL: Clean up acpi_os_printf()/acpi_os_vprintf() stubs ...
This commit is contained in:
commit
92a18409ba
38 changed files with 3340 additions and 404 deletions
|
|
@ -399,4 +399,35 @@ char *acpi_os_get_next_filename(void *dir_handle);
|
|||
void acpi_os_close_directory(void *dir_handle);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* File I/O and related support
|
||||
*/
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_file
|
||||
ACPI_FILE acpi_os_open_file(const char *path, u8 modes);
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_file
|
||||
void acpi_os_close_file(ACPI_FILE file);
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_file
|
||||
int
|
||||
acpi_os_read_file(ACPI_FILE file,
|
||||
void *buffer, acpi_size size, acpi_size count);
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_file
|
||||
int
|
||||
acpi_os_write_file(ACPI_FILE file,
|
||||
void *buffer, acpi_size size, acpi_size count);
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_file_offset
|
||||
long acpi_os_get_file_offset(ACPI_FILE file);
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_set_file_offset
|
||||
acpi_status acpi_os_set_file_offset(ACPI_FILE file, long offset, u8 from);
|
||||
#endif
|
||||
|
||||
#endif /* __ACPIOSXF_H__ */
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20140424
|
||||
#define ACPI_CA_VERSION 0x20140627
|
||||
|
||||
#include <acpi/acconfig.h>
|
||||
#include <acpi/actypes.h>
|
||||
|
|
@ -335,6 +335,23 @@ ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
|
|||
|
||||
#endif /* ACPI_DEBUG_OUTPUT */
|
||||
|
||||
/*
|
||||
* Application prototypes
|
||||
*
|
||||
* All interfaces used by application will be configured
|
||||
* out of the ACPICA build unless the ACPI_APPLICATION
|
||||
* flag is defined.
|
||||
*/
|
||||
#ifdef ACPI_APPLICATION
|
||||
#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
|
||||
prototype;
|
||||
|
||||
#else
|
||||
#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
|
||||
static ACPI_INLINE prototype {return;}
|
||||
|
||||
#endif /* ACPI_APPLICATION */
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* ACPICA public interface prototypes
|
||||
|
|
@ -657,6 +674,10 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
|||
acpi_finish_gpe(acpi_handle gpe_device,
|
||||
u32 gpe_number))
|
||||
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||
acpi_mark_gpe_for_wake(acpi_handle gpe_device,
|
||||
u32 gpe_number))
|
||||
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
|
||||
acpi_setup_gpe_for_wake(acpi_handle
|
||||
parent_device,
|
||||
|
|
@ -861,6 +882,9 @@ ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
|
|||
const char *module_name,
|
||||
u32 component_id,
|
||||
const char *format, ...))
|
||||
ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_log_error(const char *format, ...))
|
||||
|
||||
/*
|
||||
* Divergences
|
||||
|
|
|
|||
|
|
@ -604,7 +604,7 @@ struct acpi_hest_generic {
|
|||
|
||||
/* Generic Error Status block */
|
||||
|
||||
struct acpi_generic_status {
|
||||
struct acpi_hest_generic_status {
|
||||
u32 block_status;
|
||||
u32 raw_data_offset;
|
||||
u32 raw_data_length;
|
||||
|
|
@ -614,15 +614,15 @@ struct acpi_generic_status {
|
|||
|
||||
/* Values for block_status flags above */
|
||||
|
||||
#define ACPI_GEN_ERR_UC BIT(0)
|
||||
#define ACPI_GEN_ERR_CE BIT(1)
|
||||
#define ACPI_GEN_ERR_MULTI_UC BIT(2)
|
||||
#define ACPI_GEN_ERR_MULTI_CE BIT(3)
|
||||
#define ACPI_GEN_ERR_COUNT_SHIFT (0xFF<<4) /* 8 bits, error count */
|
||||
#define ACPI_HEST_UNCORRECTABLE (1)
|
||||
#define ACPI_HEST_CORRECTABLE (1<<1)
|
||||
#define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
|
||||
#define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
|
||||
#define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
|
||||
|
||||
/* Generic Error Data entry */
|
||||
|
||||
struct acpi_generic_data {
|
||||
struct acpi_hest_generic_data {
|
||||
u8 section_type[16];
|
||||
u32 error_severity;
|
||||
u16 revision;
|
||||
|
|
|
|||
|
|
@ -516,7 +516,7 @@ struct acpi_dmar_andd {
|
|||
struct acpi_dmar_header header;
|
||||
u8 reserved[3];
|
||||
u8 device_number;
|
||||
u8 object_name[];
|
||||
char object_name[1];
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@
|
|||
typedef unsigned char u8;
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short u16;
|
||||
typedef short s16;
|
||||
typedef COMPILER_DEPENDENT_UINT64 u64;
|
||||
typedef COMPILER_DEPENDENT_INT64 s64;
|
||||
|
||||
|
|
@ -1244,4 +1245,17 @@ struct acpi_memory_list {
|
|||
#define ACPI_OSI_WIN_7 0x0B
|
||||
#define ACPI_OSI_WIN_8 0x0C
|
||||
|
||||
/* Definitions of file IO */
|
||||
|
||||
#define ACPI_FILE_READING 0x01
|
||||
#define ACPI_FILE_WRITING 0x02
|
||||
#define ACPI_FILE_BINARY 0x04
|
||||
|
||||
#define ACPI_FILE_BEGIN 0x01
|
||||
#define ACPI_FILE_END 0x02
|
||||
|
||||
/* Definitions of getopt */
|
||||
|
||||
#define ACPI_OPT_END -1
|
||||
|
||||
#endif /* __ACTYPES_H__ */
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
struct ghes {
|
||||
struct acpi_hest_generic *generic;
|
||||
struct acpi_generic_status *estatus;
|
||||
struct acpi_hest_generic_status *estatus;
|
||||
u64 buffer_paddr;
|
||||
unsigned long flags;
|
||||
union {
|
||||
|
|
|
|||
|
|
@ -87,20 +87,14 @@
|
|||
#define ACPI_DBG_TRACK_ALLOCATIONS
|
||||
#endif
|
||||
|
||||
/* acpi_names configuration. Single threaded with debugger output enabled. */
|
||||
|
||||
#ifdef ACPI_NAMES_APP
|
||||
#define ACPI_DEBUGGER
|
||||
#define ACPI_APPLICATION
|
||||
#define ACPI_SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* acpi_bin/acpi_dump/acpi_src/acpi_xtract/Example configuration. All single
|
||||
* threaded, with no debug output.
|
||||
* acpi_bin/acpi_dump/acpi_help/acpi_names/acpi_src/acpi_xtract/Example configuration.
|
||||
* All single threaded.
|
||||
*/
|
||||
#if (defined ACPI_BIN_APP) || \
|
||||
(defined ACPI_DUMP_APP) || \
|
||||
(defined ACPI_HELP_APP) || \
|
||||
(defined ACPI_NAMES_APP) || \
|
||||
(defined ACPI_SRC_APP) || \
|
||||
(defined ACPI_XTRACT_APP) || \
|
||||
(defined ACPI_EXAMPLE_APP)
|
||||
|
|
@ -108,12 +102,40 @@
|
|||
#define ACPI_SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
/* acpi_help configuration. Error messages disabled. */
|
||||
|
||||
#ifdef ACPI_HELP_APP
|
||||
#define ACPI_APPLICATION
|
||||
#define ACPI_SINGLE_THREADED
|
||||
#define ACPI_NO_ERROR_MESSAGES
|
||||
#endif
|
||||
|
||||
/* acpi_names configuration. Debug output enabled. */
|
||||
|
||||
#ifdef ACPI_NAMES_APP
|
||||
#define ACPI_DEBUG_OUTPUT
|
||||
#endif
|
||||
|
||||
/* acpi_exec/acpi_names/Example configuration. Native RSDP used. */
|
||||
|
||||
#if (defined ACPI_EXEC_APP) || \
|
||||
(defined ACPI_EXAMPLE_APP) || \
|
||||
(defined ACPI_NAMES_APP)
|
||||
#define ACPI_USE_NATIVE_RSDP_POINTER
|
||||
#endif
|
||||
|
||||
/* acpi_dump configuration. Native mapping used if provied by OSPMs */
|
||||
|
||||
#ifdef ACPI_DUMP_APP
|
||||
#define ACPI_USE_NATIVE_MEMORY_MAPPING
|
||||
#define USE_NATIVE_ALLOCATE_ZEROED
|
||||
#endif
|
||||
|
||||
/* acpi_names/Example configuration. Hardware disabled */
|
||||
|
||||
#if (defined ACPI_EXAMPLE_APP) || \
|
||||
(defined ACPI_NAMES_APP)
|
||||
#define ACPI_REDUCED_HARDWARE 1
|
||||
#endif
|
||||
|
||||
/* Linkable ACPICA library */
|
||||
|
||||
#ifdef ACPI_LIBRARY
|
||||
|
|
@ -185,6 +207,9 @@
|
|||
#elif defined(_AED_EFI)
|
||||
#include "acefi.h"
|
||||
|
||||
#elif defined(_GNU_EFI)
|
||||
#include "acefi.h"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
#include "achaiku.h"
|
||||
|
||||
|
|
@ -399,8 +424,12 @@ typedef char *va_list;
|
|||
#ifdef ACPI_APPLICATION
|
||||
#include <stdio.h>
|
||||
#define ACPI_FILE FILE *
|
||||
#define ACPI_FILE_OUT stdout
|
||||
#define ACPI_FILE_ERR stderr
|
||||
#else
|
||||
#define ACPI_FILE void *
|
||||
#define ACPI_FILE_OUT NULL
|
||||
#define ACPI_FILE_ERR NULL
|
||||
#endif /* ACPI_APPLICATION */
|
||||
#endif /* ACPI_FILE */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue