Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350857
b: refs/heads/master
c: 739dcbb
h: refs/heads/master
i:
  350855: 8ae79d6
v: v3
  • Loading branch information
Lv Zheng authored and Rafael J. Wysocki committed Jan 10, 2013
1 parent 3971153 commit 34fb438
Show file tree
Hide file tree
Showing 22 changed files with 69 additions and 90 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 56324c1090ecf057c89a4d470a23a8ca61061b61
refs/heads/master: 739dcbb90a347a66f25cc0c3ef4eef3d4558f409
1 change: 1 addition & 0 deletions trunk/drivers/acpi/acpica/accommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
*
* Note: The order of these include files is important.
*/
#include <acpi/acconfig.h> /* Global configuration constants */
#include "acmacros.h" /* C macros */
#include "aclocal.h" /* Internal data types */
#include "acobject.h" /* ACPI internal object */
Expand Down
33 changes: 17 additions & 16 deletions trunk/drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,6 @@ ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;

/* Mutex for _OSI support */

ACPI_EXTERN acpi_mutex acpi_gbl_osi_mutex;

/* Reader/Writer lock is used for namespace walk and dynamic table unload */

ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock;

/*****************************************************************************
*
* Mutual exclusion within ACPICA subsystem
Expand Down Expand Up @@ -233,6 +225,14 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_pending;
ACPI_EXTERN acpi_spinlock acpi_gbl_gpe_lock; /* For GPE data structs and registers */
ACPI_EXTERN acpi_spinlock acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */

/* Mutex for _OSI support */

ACPI_EXTERN acpi_mutex acpi_gbl_osi_mutex;

/* Reader/Writer lock is used for namespace walk and dynamic table unload */

ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock;

/*****************************************************************************
*
* Miscellaneous globals
Expand Down Expand Up @@ -304,6 +304,7 @@ extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list;
ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list;
ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats;
ACPI_EXTERN u8 acpi_gbl_disable_mem_tracking;
#endif

/*****************************************************************************
Expand Down Expand Up @@ -365,19 +366,18 @@ ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
*
****************************************************************************/

extern struct acpi_fixed_event_info
acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
ACPI_EXTERN struct acpi_fixed_event_handler
acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
ACPI_EXTERN struct acpi_gpe_block_info
*acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];

#if (!ACPI_REDUCED_HARDWARE)

ACPI_EXTERN u8 acpi_gbl_all_gpes_initialized;
ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
ACPI_EXTERN struct acpi_gpe_block_info
*acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];
ACPI_EXTERN acpi_gbl_event_handler acpi_gbl_global_event_handler;
ACPI_EXTERN void *acpi_gbl_global_event_handler_context;
ACPI_EXTERN struct acpi_fixed_event_handler
acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
extern struct acpi_fixed_event_info
acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];

#endif /* !ACPI_REDUCED_HARDWARE */

Expand Down Expand Up @@ -428,6 +428,7 @@ extern u8 acpi_gbl_db_terminate_threads;
ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
ACPI_EXTERN u8 acpi_gbl_db_opt_no_region_support;

ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
ACPI_EXTERN acpi_object_type acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS];
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,6 @@ struct acpi_gpe_notify_info {
struct acpi_gpe_notify_info *next;
};

struct acpi_gpe_notify_object {
struct acpi_namespace_node *node;
struct acpi_gpe_notify_object *next;
};

/*
* GPE dispatch info. At any time, the GPE can have at most one type
* of dispatch - Method, Handler, or Implicit Notify.
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/acpi/acpica/amlresrc.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ struct aml_resource_fixed_dma {
struct aml_resource_large_header {
AML_RESOURCE_LARGE_HEADER_COMMON};

/* General Flags for address space resource descriptors */

#define ACPI_RESOURCE_FLAG_DEC 2
#define ACPI_RESOURCE_FLAG_MIF 4
#define ACPI_RESOURCE_FLAG_MAF 8

struct aml_resource_memory24 {
AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
u16 minimum;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/acpica/dsobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
union acpi_parse_object *parent;
union acpi_operand_object *obj_desc = NULL;
acpi_status status = AE_OK;
unsigned i;
u32 i;
u16 index;
u16 reference_count;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/acpica/exregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ acpi_ex_system_memory_space_handler(u32 function,
page_boundary_map_length =
ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address;

if (!page_boundary_map_length) {
if (page_boundary_map_length == 0) {
page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/acpi/acpica/hwregs.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
#include "acevents.h"

#define _COMPONENT ACPI_HARDWARE
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/acpica/hwsleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <acpi/acpi.h>
#include <linux/acpi.h>
#include "accommon.h"
#include <linux/module.h>

#define _COMPONENT ACPI_HARDWARE
ACPI_MODULE_NAME("hwsleep")
Expand Down Expand Up @@ -323,7 +322,8 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state)
* and use it to determine whether the system is rebooting or
* resuming. Clear WAK_STS for compatibility.
*/
acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, 1);
(void)acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS,
ACPI_CLEAR_STATUS);
acpi_gbl_system_awake_and_running = TRUE;

/* Enable power button */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/acpica/hwxfsleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
* POSSIBILITY OF SUCH DAMAGES.
*/

#include <linux/export.h>
#include <acpi/acpi.h>
#include "accommon.h"
#include <linux/module.h>

#define _COMPONENT ACPI_HARDWARE
ACPI_MODULE_NAME("hwxfsleep")
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/acpi/acpica/nsdumpdv.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
*/

#include <acpi/acpi.h>
#include "accommon.h"

/* TBD: This entire module is apparently obsolete and should be removed */

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/acpi/acpica/nsinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "acnamesp.h"
#include "acdispat.h"
#include "acinterp.h"
#include <linux/nmi.h>

#define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME("nsinit")
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/acpi/acpica/nsutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "accommon.h"
#include "acnamesp.h"
#include "amlcode.h"
#include "actables.h"

#define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME("nsutils")
Expand Down
8 changes: 5 additions & 3 deletions trunk/drivers/acpi/acpica/nsxfeval.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,18 +602,20 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,

/* Walk the CID list */

found = 0;
found = FALSE;
for (i = 0; i < cid->count; i++) {
if (ACPI_STRCMP(cid->ids[i].string, info->hid)
== 0) {
/* Found a matching CID */
found = 1;
found = TRUE;
break;
}
}

ACPI_FREE(cid);
if (!found)
if (!found) {
return (AE_OK);
}
}
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/acpi/acpica/tbxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <linux/export.h>
#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
#include "actables.h"

#define _COMPONENT ACPI_TABLES
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/acpi/acpica/utxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@
#include <linux/export.h>
#include <acpi/acpi.h>
#include "accommon.h"
#include "acevents.h"
#include "acnamesp.h"
#include "acdebug.h"
#include "actables.h"
#include "acinterp.h"

#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME("utxface")
Expand Down
22 changes: 0 additions & 22 deletions trunk/include/acpi/acconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@
*
*****************************************************************************/

/* Number of distinct GPE register blocks and register width */

#define ACPI_MAX_GPE_BLOCKS 2
#define ACPI_GPE_REGISTER_WIDTH 8

/* Method info (in WALK_STATE), containing local variables and argumetns */

#define ACPI_METHOD_NUM_LOCALS 8
Expand All @@ -163,12 +158,6 @@
#define ACPI_METHOD_NUM_ARGS 7
#define ACPI_METHOD_MAX_ARG 6

/* Length of _HID, _UID, _CID, and UUID values */

#define ACPI_DEVICE_ID_LENGTH 0x09
#define ACPI_MAX_CID_LENGTH 48
#define ACPI_UUID_LENGTH 16

/*
* Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
*/
Expand All @@ -186,17 +175,6 @@
*/
#define ACPI_RESULTS_OBJ_NUM_MAX 255

/* Names within the namespace are 4 bytes long */

#define ACPI_NAME_SIZE 4
#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
#define ACPI_PATH_SEPARATOR '.'

/* Sizes for ACPI table headers */

#define ACPI_OEM_ID_SIZE 6
#define ACPI_OEM_TABLE_ID_SIZE 8

/* Constants used in searching for the RSDP in low memory */

#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */
Expand Down
7 changes: 5 additions & 2 deletions trunk/include/acpi/acpiosxf.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ void acpi_os_release_mutex(acpi_mutex handle);
*/
void *acpi_os_allocate(acpi_size size);

void acpi_os_free(void *memory);

void __iomem *acpi_os_map_memory(acpi_physical_address where,
acpi_size length);

Expand Down Expand Up @@ -180,12 +182,13 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object);
* Interrupt handlers
*/
acpi_status
acpi_os_install_interrupt_handler(u32 gsi,
acpi_os_install_interrupt_handler(u32 interrupt_number,
acpi_osd_handler service_routine,
void *context);

acpi_status
acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine);
acpi_os_remove_interrupt_handler(u32 interrupt_number,
acpi_osd_handler service_routine);

void acpi_os_gpe_count(u32 gpe_number);
void acpi_os_fixed_event_count(u32 fixed_event_number);
Expand Down
43 changes: 20 additions & 23 deletions trunk/include/acpi/acpixf.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ extern u8 acpi_gbl_permanent_mmap;
/*
* Globals that are publically available
*/
extern u32 acpi_current_gpe_count;
extern struct acpi_table_fadt acpi_gbl_FADT;
extern u8 acpi_gbl_system_awake_and_running;
extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */
/* Runtime configuration of debug print levels */
extern u32 acpi_dbg_level;
extern u32 acpi_dbg_layer;
Expand Down Expand Up @@ -100,11 +104,6 @@ extern u8 acpi_gbl_disable_auto_repair;

#endif /* !ACPI_REDUCED_HARDWARE */

extern u32 acpi_current_gpe_count;
extern struct acpi_table_fadt acpi_gbl_FADT;
extern u8 acpi_gbl_system_awake_and_running;
extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */

extern u32 acpi_rsdt_forced;
/*
* Initialization
Expand All @@ -121,15 +120,14 @@ acpi_status acpi_initialize_objects(u32 flags);

acpi_status acpi_terminate(void);

#ifdef ACPI_FUTURE_USAGE
acpi_status acpi_subsystem_status(void);
#endif

/*
* Miscellaneous global interfaces
*/
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
#ifdef ACPI_FUTURE_USAGE
acpi_status acpi_subsystem_status(void);
#endif

#ifdef ACPI_FUTURE_USAGE
acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer);
Expand Down Expand Up @@ -466,6 +464,10 @@ acpi_buffer_to_resource(u8 *aml_buffer,
*/
acpi_status acpi_reset(void);

acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);

acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);

ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_read_bit_register(u32 register_id,
u32 *return_value))
Expand All @@ -474,20 +476,6 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_write_bit_register(u32 register_id,
u32 value))

ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_set_firmware_waking_vector(u32
physical_address))

#if ACPI_MACHINE_WIDTH == 64
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_set_firmware_waking_vector64(u64
physical_address))
#endif

acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);

acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);

/*
* Sleep/Wake interfaces
*/
Expand All @@ -504,6 +492,15 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);

acpi_status acpi_leave_sleep_state(u8 sleep_state);

ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_set_firmware_waking_vector(u32
physical_address))

#if ACPI_MACHINE_WIDTH == 64
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_set_firmware_waking_vector64(u64
physical_address))
#endif
/*
* ACPI Timer interfaces
*/
Expand Down
Loading

0 comments on commit 34fb438

Please sign in to comment.