Commit 8c7cba55 authored by Linus Torvalds's avatar Linus Torvalds

v2.4.9.15 -> v2.4.10

  - Andrew Grover: ACPI update
  - Al Viro: block devices..
  - Andrea Arcangeli: fix list manipulation bogosity
  - Trond Myklebust: 64-bit file locking fixes
  - Brad Hards: USB CDC ethernet
  - Chris Mason: reiserfs speedup
  - Robert Love: re-merge AMD 761 GART support that was lost in -ac merge
  - Adam Richter: check pci_module_init() return value
parent e2f6721a
......@@ -2578,10 +2578,10 @@ CONFIG_AGP_VIA
the GLX component for XFree86 3.3.6, which can be downloaded from
http://utah-glx.sourceforge.net/ .
AMD Irongate support
AMD Irongate, 761, and 762 support
CONFIG_AGP_AMD
This option gives you AGP support for the GLX component of the
XFree86 4.x on AMD Irongate and 761 chipsets.
XFree86 4.x on AMD Irongate, 761, and 762 chipsets.
For the moment, you should probably say N, unless you want to test
the GLX component for XFree86 3.3.6, which can be downloaded from
......@@ -11572,6 +11572,29 @@ CONFIG_USB_CATC
The module will be called catc.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
USB Communication Class Ethernet driver
CONFIG_USB_CDCETHER
This driver supports devices conforming to the Communication Device
Class Ethernet Control Model. This is used in some cable modems.
For more details on the specification, get the Communication Device
Class specification from <http://www.usb.org>.
This driver should work with the following devices:
* Ericsson PipeRider (all variants)
* Motorola (DM100 and SB4100)
* Broadcom Cable Modem (reference design)
* Toshiba PCX1100U and possibly other cable modems
The device creates a network device (ethX, where X depends on what
other networking devices you have in use), as for a normal PCI
or ISA based ethernet network card.
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called CDCEther.o. If you want to compile it as
a module, say M here and read <file:Documentation/modules.txt>.
USB Kodak DC-2xx Camera support
CONFIG_USB_DC2XX
Say Y here if you want to connect this type of still camera to
......
......@@ -1458,7 +1458,7 @@ W: http://www.kroah.com/linux-usb/
USB CDC ETHERNET DRIVER
P: Brad Hards
M: bhards@bigpond.net.au
M: bradh@frogmouth.net
L: linux-usb-users@lists.sourceforge.net
L: linux-usb-devel@lists.sourceforge.net
S: Maintained
......@@ -1481,7 +1481,7 @@ S: Maintained
USB KAWASAKI LSI DRIVER
P: Brad Hards
M: bhards@bigpond.net.au
M: bradh@frogmouth.net
L: linux-usb-users@lists.sourceforge.net
L: linux-usb-devel@lists.sourceforge.net
S: Maintained
......
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 10
EXTRAVERSION =-pre15
EXTRAVERSION =
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
......
#
# Makefile for the Linux ACPI interpreter
# (It's a mess, but it's all here for a reason.)
#
O_TARGET := acpi.o
......@@ -22,9 +21,12 @@ acpi-subdirs := utilities dispatcher events hardware \
executer namespace parser resources tables
ifdef CONFIG_ACPI_DEBUG
ACPI_CFLAGS += -DACPI_DEBUG -Wno-unused #-DENABLE_DEBUGGER
ACPI_CFLAGS += -DACPI_DEBUG -Wno-unused
endif
#acpi-subdirs += debugger
ifdef CONFIG_ACPI_DEBUGGER
ACPI_CFLAGS += -DENABLE_DEBUGGER
acpi-subdirs += debugger
endif
EXTRA_CFLAGS += $(ACPI_CFLAGS)
......
......@@ -38,26 +38,19 @@ EXPORT_SYMBOL(acpi_in_debugger);
EXPORT_SYMBOL(acpi_db_user_commands);
#endif
EXPORT_SYMBOL(acpi_gbl_FADT);
EXPORT_SYMBOL(acpi_os_free);
EXPORT_SYMBOL(acpi_os_breakpoint);
EXPORT_SYMBOL(acpi_os_printf);
EXPORT_SYMBOL(acpi_os_callocate);
EXPORT_SYMBOL(acpi_os_sleep);
EXPORT_SYMBOL(acpi_os_sleep_usec);
EXPORT_SYMBOL(acpi_os_in8);
EXPORT_SYMBOL(acpi_os_out8);
EXPORT_SYMBOL(acpi_os_stall);
EXPORT_SYMBOL(acpi_os_queue_for_execution);
EXPORT_SYMBOL(acpi_dbg_layer);
EXPORT_SYMBOL(acpi_dbg_level);
EXPORT_SYMBOL(function_exit);
EXPORT_SYMBOL(function_trace);
EXPORT_SYMBOL(function_status_exit);
EXPORT_SYMBOL(function_value_exit);
EXPORT_SYMBOL(debug_print_raw);
EXPORT_SYMBOL(debug_print_prefix);
EXPORT_SYMBOL(acpi_ut_format_exception);
EXPORT_SYMBOL(acpi_format_exception);
EXPORT_SYMBOL(acpi_get_handle);
EXPORT_SYMBOL(acpi_get_parent);
......@@ -96,11 +89,20 @@ EXPORT_SYMBOL(acpi_os_create_semaphore);
EXPORT_SYMBOL(acpi_os_delete_semaphore);
EXPORT_SYMBOL(acpi_os_wait_semaphore);
EXPORT_SYMBOL(acpi_os_in32);
EXPORT_SYMBOL(acpi_os_out32);
EXPORT_SYMBOL(acpi_os_read_port);
EXPORT_SYMBOL(acpi_os_write_port);
EXPORT_SYMBOL(acpi_fadt);
EXPORT_SYMBOL(acpi_hw_register_bit_access);
EXPORT_SYMBOL(acpi_hw_obtain_sleep_type_register_data);
EXPORT_SYMBOL(acpi_enter_sleep_state);
EXPORT_SYMBOL(acpi_get_system_info);
EXPORT_SYMBOL(acpi_leave_sleep_state);
/*EXPORT_SYMBOL(acpi_save_state_mem);*/
/*EXPORT_SYMBOL(acpi_save_state_disk);*/
EXPORT_SYMBOL(acpi_hw_register_read);
EXPORT_SYMBOL(acpi_set_firmware_waking_vector);
EXPORT_SYMBOL(acpi_subsystem_status);
EXPORT_SYMBOL(acpi_os_signal);
#
# Makefile for all Linux ACPI interpreter subdirectories
# EXCEPT for the ospm directory
#
O_TARGET := $(notdir $(CURDIR)).o
obj-$(CONFIG_ACPI) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
include $(TOPDIR)/Rules.make
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*******************************************************************************
*
* Module Name: dbexec - debugger control method execution
* $Revision: 26 $
* $Revision: 34 $
*
******************************************************************************/
......@@ -41,7 +41,7 @@
MODULE_NAME ("dbexec")
DB_METHOD_INFO info;
db_method_info acpi_gbl_db_method_info;
/*******************************************************************************
......@@ -57,18 +57,18 @@ DB_METHOD_INFO info;
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_db_execute_method (
DB_METHOD_INFO *info,
ACPI_BUFFER *return_obj)
db_method_info *info,
acpi_buffer *return_obj)
{
ACPI_STATUS status;
ACPI_OBJECT_LIST param_objects;
ACPI_OBJECT params[MTH_NUM_ARGS];
acpi_status status;
acpi_object_list param_objects;
acpi_object params[MTH_NUM_ARGS];
u32 i;
if (output_to_file && !acpi_dbg_level) {
if (acpi_gbl_db_output_to_file && !acpi_dbg_level) {
acpi_os_printf ("Warning: debug output is not enabled!\n");
}
......@@ -100,8 +100,8 @@ acpi_db_execute_method (
/* Prepare for a return object of arbitrary size */
return_obj->pointer = buffer;
return_obj->length = BUFFER_SIZE;
return_obj->pointer = acpi_gbl_db_buffer;
return_obj->length = ACPI_DEBUG_BUFFER_SIZE;
/* Do the actual method execution */
......@@ -129,7 +129,7 @@ acpi_db_execute_method (
void
acpi_db_execute_setup (
DB_METHOD_INFO *info)
db_method_info *info)
{
/* Catenate the current scope to the supplied name */
......@@ -137,7 +137,7 @@ acpi_db_execute_setup (
info->pathname[0] = 0;
if ((info->name[0] != '\\') &&
(info->name[0] != '/')) {
STRCAT (info->pathname, scope_buf);
STRCAT (info->pathname, acpi_gbl_db_scope_buf);
}
STRCAT (info->pathname, info->name);
......@@ -159,6 +159,40 @@ acpi_db_execute_setup (
}
/*******************************************************************************
*
* FUNCTION: Acpi_db_get_outstanding_allocations
*
* PARAMETERS: None
*
* RETURN: Current global allocation count minus cache entries
*
* DESCRIPTION: Determine the current number of "outstanding" allocations --
* those allocations that have not been freed and also are not
* in one of the various object caches.
*
******************************************************************************/
u32
acpi_db_get_outstanding_allocations (void)
{
u32 i;
u32 outstanding = 0;
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
for (i = ACPI_MEM_LIST_FIRST_CACHE_LIST; i < ACPI_NUM_MEM_LISTS; i++) {
outstanding += (acpi_gbl_memory_lists[i].total_allocated -
acpi_gbl_memory_lists[i].total_freed -
acpi_gbl_memory_lists[i].cache_depth);
}
#endif
return (outstanding);
}
/*******************************************************************************
*
* FUNCTION: Acpi_db_execute
......@@ -180,21 +214,51 @@ acpi_db_execute (
NATIVE_CHAR **args,
u32 flags)
{
ACPI_STATUS status;
ACPI_BUFFER return_obj;
acpi_status status;
acpi_buffer return_obj;
#ifdef ACPI_DEBUG
u32 previous_allocations;
u32 allocations;
/* Memory allocation tracking */
previous_allocations = acpi_db_get_outstanding_allocations ();
#endif
acpi_gbl_db_method_info.name = name;
acpi_gbl_db_method_info.args = args;
acpi_gbl_db_method_info.flags = flags;
acpi_db_execute_setup (&acpi_gbl_db_method_info);
status = acpi_db_execute_method (&acpi_gbl_db_method_info, &return_obj);
info.name = name;
info.args = args;
info.flags = flags;
/*
* Allow any handlers in separate threads to complete.
* (Such as Notify handlers invoked from AML executed above).
*/
acpi_os_sleep (0, 10);
acpi_db_execute_setup (&info);
status = acpi_db_execute_method (&info, &return_obj);
#ifdef ACPI_DEBUG
/* Memory allocation tracking */
allocations = acpi_db_get_outstanding_allocations () - previous_allocations;
acpi_db_set_output_destination (DB_DUPLICATE_OUTPUT);
if (allocations > 0) {
acpi_os_printf ("Outstanding: %ld allocations after execution\n",
allocations);
}
#endif
if (ACPI_FAILURE (status)) {
acpi_os_printf ("Execution of %s failed with status %s\n",
info.pathname, acpi_ut_format_exception (status));
acpi_gbl_db_method_info.pathname, acpi_format_exception (status));
}
else {
......@@ -202,7 +266,7 @@ acpi_db_execute (
if (return_obj.length) {
acpi_os_printf ("Execution of %s returned object %p Buflen %X\n",
info.pathname, return_obj.pointer, return_obj.length);
acpi_gbl_db_method_info.pathname, return_obj.pointer, return_obj.length);
acpi_db_dump_object (return_obj.pointer, 1);
}
}
......@@ -228,10 +292,10 @@ void
acpi_db_method_thread (
void *context)
{
ACPI_STATUS status;
DB_METHOD_INFO *info = context;
acpi_status status;
db_method_info *info = context;
u32 i;
ACPI_BUFFER return_obj;
acpi_buffer return_obj;
for (i = 0; i < info->num_loops; i++) {
......@@ -245,7 +309,6 @@ acpi_db_method_thread (
}
}
/* Signal our completion */
acpi_os_signal_semaphore (info->thread_gate, 1);
......@@ -272,11 +335,11 @@ acpi_db_create_execution_threads (
NATIVE_CHAR *num_loops_arg,
NATIVE_CHAR *method_name_arg)
{
ACPI_STATUS status;
acpi_status status;
u32 num_threads;
u32 num_loops;
u32 i;
ACPI_HANDLE thread_gate;
acpi_handle thread_gate;
/* Get the arguments */
......@@ -294,19 +357,19 @@ acpi_db_create_execution_threads (
status = acpi_os_create_semaphore (1, 0, &thread_gate);
if (ACPI_FAILURE (status)) {
acpi_os_printf ("Could not create semaphore, %s\n", acpi_ut_format_exception (status));
acpi_os_printf ("Could not create semaphore, %s\n", acpi_format_exception (status));
return;
}
/* Setup the context to be passed to each thread */
info.name = method_name_arg;
info.args = NULL;
info.flags = 0;
info.num_loops = num_loops;
info.thread_gate = thread_gate;
acpi_gbl_db_method_info.name = method_name_arg;
acpi_gbl_db_method_info.args = NULL;
acpi_gbl_db_method_info.flags = 0;
acpi_gbl_db_method_info.num_loops = num_loops;
acpi_gbl_db_method_info.thread_gate = thread_gate;
acpi_db_execute_setup (&info);
acpi_db_execute_setup (&acpi_gbl_db_method_info);
/* Create the threads */
......@@ -314,7 +377,7 @@ acpi_db_create_execution_threads (
acpi_os_printf ("Creating %X threads to execute %X times each\n", num_threads, num_loops);
for (i = 0; i < (num_threads); i++) {
acpi_os_queue_for_execution (OSD_PRIORITY_MED, acpi_db_method_thread, &info);
acpi_os_queue_for_execution (OSD_PRIORITY_MED, acpi_db_method_thread, &acpi_gbl_db_method_info);
}
......
......@@ -2,7 +2,7 @@
*
* Module Name: dbfileio - Debugger file I/O commands. These can't usually
* be used when running the debugger in Ring 0 (Kernel mode)
* $Revision: 41 $
* $Revision: 48 $
*
******************************************************************************/
......@@ -38,11 +38,9 @@
MODULE_NAME ("dbfileio")
ACPI_PARSE_OBJECT *root;
#ifdef ACPI_APPLICATION
#include <stdio.h>
FILE *debug_file = NULL;
FILE *acpi_gbl_debug_file = NULL;
#endif
......@@ -64,7 +62,7 @@ FILE *debug_file = NULL;
*
******************************************************************************/
ACPI_OBJECT_TYPE8
acpi_object_type8
acpi_db_match_argument (
NATIVE_CHAR *user_argument,
ARGUMENT_INFO *arguments)
......@@ -78,7 +76,7 @@ acpi_db_match_argument (
for (i = 0; arguments[i].name; i++) {
if (STRSTR (arguments[i].name, user_argument) == arguments[i].name) {
return ((ACPI_OBJECT_TYPE8) i);
return ((acpi_object_type8) i);
}
}
......@@ -107,11 +105,11 @@ acpi_db_close_debug_file (
#ifdef ACPI_APPLICATION
if (debug_file) {
fclose (debug_file);
debug_file = NULL;
output_to_file = FALSE;
acpi_os_printf ("Debug output file %s closed\n", debug_filename);
if (acpi_gbl_debug_file) {
fclose (acpi_gbl_debug_file);
acpi_gbl_debug_file = NULL;
acpi_gbl_db_output_to_file = FALSE;
acpi_os_printf ("Debug output file %s closed\n", acpi_gbl_db_debug_filename);
}
#endif
......@@ -138,11 +136,11 @@ acpi_db_open_debug_file (
#ifdef ACPI_APPLICATION
acpi_db_close_debug_file ();
debug_file = fopen (name, "w+");
if (debug_file) {
acpi_gbl_debug_file = fopen (name, "w+");
if (acpi_gbl_debug_file) {
acpi_os_printf ("Debug output file %s opened\n", name);
STRCPY (debug_filename, name);
output_to_file = TRUE;
STRCPY (acpi_gbl_db_debug_filename, name);
acpi_gbl_db_output_to_file = TRUE;
}
else {
acpi_os_printf ("Could not open debug file %s\n", name);
......@@ -167,22 +165,22 @@ acpi_db_open_debug_file (
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_db_load_table(
FILE *fp,
ACPI_TABLE_HEADER **table_ptr,
acpi_table_header **table_ptr,
u32 *table_length)
{
ACPI_TABLE_HEADER table_header;
acpi_table_header table_header;
u8 *aml_ptr;
u32 aml_length;
u32 actual;
ACPI_STATUS status;
acpi_status status;
/* Read the table header */
if (fread (&table_header, 1, sizeof (table_header), fp) != sizeof (ACPI_TABLE_HEADER)) {
if (fread (&table_header, 1, sizeof (table_header), fp) != sizeof (acpi_table_header)) {
acpi_os_printf ("Couldn't read the table header\n");
return (AE_BAD_SIGNATURE);
}
......@@ -204,15 +202,17 @@ acpi_db_load_table(
STRNCMP ((char *) table_header.signature, PSDT_SIG, 4) &&
STRNCMP ((char *) table_header.signature, SSDT_SIG, 4)) {
acpi_os_printf ("Table signature is invalid\n");
DUMP_BUFFER (&table_header, sizeof (acpi_table_header));
return (AE_ERROR);
}
/* Allocate a buffer for the table */
*table_length = table_header.length;
*table_ptr = (ACPI_TABLE_HEADER *) acpi_ut_allocate ((size_t) *table_length);
*table_ptr = ACPI_MEM_ALLOCATE ((size_t) *table_length);
if (!*table_ptr) {
acpi_os_printf ("Could not allocate memory for the table (size=%X)\n", table_header.length);
acpi_os_printf ("Could not allocate memory for ACPI table %4.4s (size=%X)\n",
table_header.signature, table_header.length);
return (AE_NO_MEMORY);
}
......@@ -238,7 +238,7 @@ acpi_db_load_table(
acpi_os_printf ("Error - could not read the table file\n");
acpi_ut_free (*table_ptr);
ACPI_MEM_FREE (*table_ptr);
*table_ptr = NULL;
*table_length = 0;
......@@ -265,16 +265,18 @@ acpi_db_load_table(
*
******************************************************************************/
ACPI_STATUS
acpi_status
ae_local_load_table (
ACPI_TABLE_HEADER *table_ptr)
acpi_table_header *table_ptr)
{
ACPI_STATUS status;
ACPI_TABLE_DESC table_info;
acpi_status status;
acpi_table_desc table_info;
FUNCTION_TRACE ("Ae_local_load_table");
if (!table_ptr) {
return (AE_BAD_PARAMETER);
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
/* Install the new table into the local data structures */
......@@ -286,7 +288,7 @@ ae_local_load_table (
/* Free table allocated by Acpi_tb_get_table */
acpi_tb_delete_single_table (&table_info);
return (status);
return_ACPI_STATUS (status);
}
......@@ -295,12 +297,12 @@ ae_local_load_table (
if (ACPI_FAILURE (status)) {
/* Uninstall table and free the buffer */
acpi_tb_uninstall_table (table_info.installed_desc);
return (status);
acpi_tb_delete_acpi_table (ACPI_TABLE_DSDT);
return_ACPI_STATUS (status);
}
#endif
return (status);
return_ACPI_STATUS (status);
}
......@@ -316,14 +318,14 @@ ae_local_load_table (
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_db_load_acpi_table (
NATIVE_CHAR *filename)
{
#ifdef ACPI_APPLICATION
FILE *fp;
ACPI_STATUS status;
ACPI_TABLE_HEADER *table_ptr;
acpi_status status;
acpi_table_header *table_ptr;
u32 table_length;
......@@ -356,11 +358,13 @@ acpi_db_load_acpi_table (
acpi_os_printf ("Table %4.4s is already installed\n",
&table_ptr->signature);
}
else {
acpi_os_printf ("Could not install table, %s\n",
acpi_ut_format_exception (status));
acpi_format_exception (status));
}
acpi_ut_free (table_ptr);
ACPI_MEM_FREE (table_ptr);
return (status);
}
......
/******************************************************************************
*
* Module Name: dbhistry - debugger HISTORY command
* $Revision: 18 $
* $Revision: 19 $
*
*****************************************************************************/
......@@ -54,11 +54,11 @@ typedef struct history_info
} HISTORY_INFO;
HISTORY_INFO history_buffer[HISTORY_SIZE];
u16 lo_history = 0;
u16 num_history = 0;
u16 next_history_index = 0;
u32 next_cmd_num = 1;
HISTORY_INFO acpi_gbl_history_buffer[HISTORY_SIZE];
u16 acpi_gbl_lo_history = 0;
u16 acpi_gbl_num_history = 0;
u16 acpi_gbl_next_history_index = 0;
u32 acpi_gbl_next_cmd_num = 1;
/*******************************************************************************
......@@ -81,28 +81,29 @@ acpi_db_add_to_history (
/* Put command into the next available slot */
STRCPY (history_buffer[next_history_index].command, command_line);
history_buffer[next_history_index].cmd_num = next_cmd_num;
STRCPY (acpi_gbl_history_buffer[acpi_gbl_next_history_index].command, command_line);
acpi_gbl_history_buffer[acpi_gbl_next_history_index].cmd_num = acpi_gbl_next_cmd_num;
/* Adjust indexes */
if ((num_history == HISTORY_SIZE) &&
(next_history_index == lo_history)) {
lo_history++;
if (lo_history >= HISTORY_SIZE) {
lo_history = 0;
if ((acpi_gbl_num_history == HISTORY_SIZE) &&
(acpi_gbl_next_history_index == acpi_gbl_lo_history)) {
acpi_gbl_lo_history++;
if (acpi_gbl_lo_history >= HISTORY_SIZE) {
acpi_gbl_lo_history = 0;
}
}
next_history_index++;
if (next_history_index >= HISTORY_SIZE) {
next_history_index = 0;
acpi_gbl_next_history_index++;
if (acpi_gbl_next_history_index >= HISTORY_SIZE) {
acpi_gbl_next_history_index = 0;
}
next_cmd_num++;
if (num_history < HISTORY_SIZE) {
num_history++;
acpi_gbl_next_cmd_num++;
if (acpi_gbl_num_history < HISTORY_SIZE) {
acpi_gbl_num_history++;
}
}
......@@ -127,12 +128,13 @@ acpi_db_display_history (void)
u16 history_index;
history_index = lo_history;
history_index = acpi_gbl_lo_history;
/* Dump entire history buffer */
for (i = 0; i < num_history; i++) {
acpi_os_printf ("%ld %s\n", history_buffer[history_index].cmd_num, history_buffer[history_index].command);
for (i = 0; i < acpi_gbl_num_history; i++) {
acpi_os_printf ("%ld %s\n", acpi_gbl_history_buffer[history_index].cmd_num,
acpi_gbl_history_buffer[history_index].command);
history_index++;
if (history_index >= HISTORY_SIZE) {
......@@ -165,7 +167,7 @@ acpi_db_get_from_history (
if (command_num_arg == NULL) {
cmd_num = next_cmd_num - 1;
cmd_num = acpi_gbl_next_cmd_num - 1;
}
else {
......@@ -175,12 +177,12 @@ acpi_db_get_from_history (
/* Search history buffer */
history_index = lo_history;
for (i = 0; i < num_history; i++) {
if (history_buffer[history_index].cmd_num == cmd_num) {
history_index = acpi_gbl_lo_history;
for (i = 0; i < acpi_gbl_num_history; i++) {
if (acpi_gbl_history_buffer[history_index].cmd_num == cmd_num) {
/* Found the commnad, return it */
return (history_buffer[history_index].command);
return (acpi_gbl_history_buffer[history_index].command);
}
......
This diff is collapsed.
This diff is collapsed.
/*******************************************************************************
*
* Module Name: dbutils - AML debugger utilities
* $Revision: 37 $
* $Revision: 43 $
*
******************************************************************************/
......@@ -62,7 +62,7 @@ acpi_db_set_output_destination (
acpi_gbl_db_output_flags = (u8) output_flags;
if (output_flags & DB_REDIRECTABLE_OUTPUT) {
if (output_to_file) {
if (acpi_gbl_db_output_to_file) {
acpi_dbg_level = acpi_gbl_db_debug_level;
}
}
......@@ -91,7 +91,7 @@ acpi_db_dump_buffer (
acpi_os_printf ("\n_location %X:\n", address);
acpi_dbg_level |= TRACE_TABLES;
acpi_dbg_level |= ACPI_LV_TABLES;
acpi_ut_dump_buffer ((u8 *) address, 64, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
}
......@@ -111,7 +111,7 @@ acpi_db_dump_buffer (
void
acpi_db_dump_object (
ACPI_OBJECT *obj_desc,
acpi_object *obj_desc,
u32 level)
{
u32 i;
......@@ -129,12 +129,14 @@ acpi_db_dump_object (
switch (obj_desc->type) {
case ACPI_TYPE_ANY:
acpi_os_printf ("[Object Reference] Value: %p\n", obj_desc->reference.handle);
acpi_os_printf ("[Object Reference] = %p\n", obj_desc->reference.handle);
break;
case ACPI_TYPE_INTEGER:
acpi_os_printf ("[Number] Value: %ld (%lX)\n", obj_desc->integer.value, obj_desc->integer.value);
acpi_os_printf ("[Integer] = %X%8.8X\n", HIDWORD (obj_desc->integer.value),
LODWORD (obj_desc->integer.value));
break;
......@@ -150,7 +152,7 @@ acpi_db_dump_object (
case ACPI_TYPE_BUFFER:
acpi_os_printf ("[Buffer] Value: ");
acpi_os_printf ("[Buffer] = ");
acpi_ut_dump_buffer ((u8 *) obj_desc->buffer.pointer, obj_desc->buffer.length, DB_DWORD_DISPLAY, _COMPONENT);
break;
......@@ -166,17 +168,23 @@ acpi_db_dump_object (
case INTERNAL_TYPE_REFERENCE:
acpi_os_printf ("[Object Reference] Value: %p\n", obj_desc->reference.handle);
acpi_os_printf ("[Object Reference] = %p\n", obj_desc->reference.handle);
break;
case ACPI_TYPE_PROCESSOR:
acpi_os_printf ("[Processor]\n");
break;
case ACPI_TYPE_POWER:
acpi_os_printf ("[Power Resource]\n");
break;
default:
acpi_os_printf ("[Unknown Type] %X \n", obj_desc->type);
......@@ -247,15 +255,15 @@ acpi_db_prep_namestring (
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_db_second_pass_parse (
ACPI_PARSE_OBJECT *root)
acpi_parse_object *root)
{
ACPI_PARSE_OBJECT *op = root;
ACPI_PARSE2_OBJECT *method;
ACPI_PARSE_OBJECT *search_op;
ACPI_PARSE_OBJECT *start_op;
ACPI_STATUS status = AE_OK;
acpi_parse_object *op = root;
acpi_parse2_object *method;
acpi_parse_object *search_op;
acpi_parse_object *start_op;
acpi_status status = AE_OK;
u32 base_aml_offset;
......@@ -263,7 +271,7 @@ acpi_db_second_pass_parse (
while (op) {
if (op->opcode == AML_METHOD_OP) {
method = (ACPI_PARSE2_OBJECT *) op;
method = (acpi_parse2_object *) op;
status = acpi_ps_parse_aml (op, method->data, method->length, 0,
NULL, NULL, NULL, acpi_ds_load1_begin_op, acpi_ds_load1_end_op);
......@@ -311,13 +319,13 @@ acpi_db_second_pass_parse (
*
******************************************************************************/
ACPI_NAMESPACE_NODE *
acpi_namespace_node *
acpi_db_local_ns_lookup (
NATIVE_CHAR *name)
{
NATIVE_CHAR *internal_path;
ACPI_STATUS status;
ACPI_NAMESPACE_NODE *node = NULL;
acpi_status status;
acpi_namespace_node *node = NULL;
acpi_db_prep_namestring (name);
......@@ -339,11 +347,11 @@ acpi_db_local_ns_lookup (
NS_NO_UPSEARCH | NS_DONT_OPEN_SCOPE, NULL, &node);
if (ACPI_FAILURE (status)) {
acpi_os_printf ("Could not locate name: %s %s\n", name, acpi_ut_format_exception (status));
acpi_os_printf ("Could not locate name: %s %s\n", name, acpi_format_exception (status));
}
acpi_ut_free (internal_path);
ACPI_MEM_FREE (internal_path);
return (node);
}
......
/*******************************************************************************
*
* Module Name: dbxface - AML Debugger external interfaces
* $Revision: 37 $
* $Revision: 41 $
*
******************************************************************************/
......@@ -54,18 +54,20 @@
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_db_single_step (
ACPI_WALK_STATE *walk_state,
ACPI_PARSE_OBJECT *op,
acpi_walk_state *walk_state,
acpi_parse_object *op,
u8 op_type)
{
ACPI_PARSE_OBJECT *next;
ACPI_STATUS status = AE_OK;
acpi_parse_object *next;
acpi_status status = AE_OK;
u32 original_debug_level;
ACPI_PARSE_OBJECT *display_op;
acpi_parse_object *display_op;
FUNCTION_ENTRY ();
/* Is there a breakpoint set? */
if (walk_state->method_breakpoint) {
......@@ -81,12 +83,10 @@ acpi_db_single_step (
}
}
/*
* Check if this is an opcode that we are interested in --
* namely, opcodes that have arguments
*/
if (op->opcode == AML_INT_NAMEDFIELD_OP) {
return (AE_OK);
}
......@@ -109,16 +109,14 @@ acpi_db_single_step (
}
}
/*
* Under certain debug conditions, display this opcode and its operands
*/
if ((output_to_file) ||
if ((acpi_gbl_db_output_to_file) ||
(acpi_gbl_cm_single_step) ||
(acpi_dbg_level & TRACE_PARSE)) {
if ((output_to_file) ||
(acpi_dbg_level & TRACE_PARSE)) {
(acpi_dbg_level & ACPI_LV_PARSE)) {
if ((acpi_gbl_db_output_to_file) ||
(acpi_dbg_level & ACPI_LV_PARSE)) {
acpi_os_printf ("\n[Aml_debug] Next AML Opcode to execute:\n");
}
......@@ -127,9 +125,8 @@ acpi_db_single_step (
* and disable parser trace output for the duration of the display because
* we don't want the extraneous debug output)
*/
original_debug_level = acpi_dbg_level;
acpi_dbg_level &= ~(TRACE_PARSE | TRACE_FUNCTIONS);
acpi_dbg_level &= ~(ACPI_LV_PARSE | ACPI_LV_FUNCTIONS);
next = op->next;
op->next = NULL;
......@@ -160,14 +157,12 @@ acpi_db_single_step (
/* TBD */
}
/* Restore everything */
op->next = next;
acpi_os_printf ("\n");
acpi_dbg_level = original_debug_level;
}
}
/* If we are not single stepping, just continue executing the method */
......@@ -180,7 +175,6 @@ acpi_db_single_step (
* If we are executing a step-to-call command,
* Check if this is a method call.
*/
if (acpi_gbl_step_to_next_call) {
if (op->opcode != AML_INT_METHODCALL_OP) {
/* Not a method call, just keep executing */
......@@ -198,7 +192,6 @@ acpi_db_single_step (
* If the next opcode is a method call, we will "step over" it
* by default.
*/
if (op->opcode == AML_INT_METHODCALL_OP) {
acpi_gbl_cm_single_step = FALSE; /* No more single step while executing called method */
......@@ -244,15 +237,14 @@ acpi_db_single_step (
/* Get the user input line */
acpi_os_get_line (line_buf);
acpi_os_get_line (acpi_gbl_db_line_buf);
}
status = acpi_db_command_dispatch (line_buf, walk_state, op);
status = acpi_db_command_dispatch (acpi_gbl_db_line_buf, walk_state, op);
}
/* Acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE); */
/* User commands complete, continue execution of the interrupted method */
return (status);
......@@ -278,12 +270,12 @@ acpi_db_initialize (void)
/* Init globals */
buffer = acpi_os_allocate (BUFFER_SIZE);
acpi_gbl_db_buffer = acpi_os_allocate (ACPI_DEBUG_BUFFER_SIZE);
/* Initial scope is the root */
scope_buf [0] = '\\';
scope_buf [1] = 0;
acpi_gbl_db_scope_buf [0] = '\\';
acpi_gbl_db_scope_buf [1] = 0;
/*
......@@ -291,7 +283,6 @@ acpi_db_initialize (void)
* a separate thread so that the front end can be in another address
* space, environment, or even another machine.
*/
if (acpi_gbl_debugger_configuration & DEBUGGER_MULTI_THREADED) {
/* These were created with one unit, grab it */
......@@ -303,13 +294,12 @@ acpi_db_initialize (void)
acpi_os_queue_for_execution (0, acpi_db_execute_thread, NULL);
}
if (!opt_verbose) {
INDENT_STRING = " ";
opt_disasm = TRUE;
opt_stats = FALSE;
if (!acpi_gbl_db_opt_verbose) {
acpi_gbl_db_disasm_indent = " ";
acpi_gbl_db_opt_disasm = TRUE;
acpi_gbl_db_opt_stats = FALSE;
}
return (0);
}
......
/******************************************************************************
*
* Module Name: dsfield - Dispatcher field routines
* $Revision: 41 $
* $Revision: 44 $
*
*****************************************************************************/
......@@ -60,19 +60,22 @@
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_ds_create_field (
ACPI_PARSE_OBJECT *op,
ACPI_NAMESPACE_NODE *region_node,
ACPI_WALK_STATE *walk_state)
acpi_parse_object *op,
acpi_namespace_node *region_node,
acpi_walk_state *walk_state)
{
ACPI_STATUS status = AE_AML_ERROR;
ACPI_PARSE_OBJECT *arg;
ACPI_NAMESPACE_NODE *node;
acpi_status status = AE_AML_ERROR;
acpi_parse_object *arg;
acpi_namespace_node *node;
u8 field_flags;
u32 field_bit_position = 0;
FUNCTION_TRACE_PTR ("Ds_create_field", op);
/* First arg is the name of the parent Op_region */
arg = op->value.arg;
......@@ -81,7 +84,7 @@ acpi_ds_create_field (
ACPI_TYPE_REGION, IMODE_EXECUTE,
NS_SEARCH_PARENT, walk_state, &region_node);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
}
......@@ -115,23 +118,22 @@ acpi_ds_create_field (
case AML_INT_NAMEDFIELD_OP:
status = acpi_ns_lookup (walk_state->scope_info,
(NATIVE_CHAR *) &((ACPI_PARSE2_OBJECT *)arg)->name,
(NATIVE_CHAR *) &((acpi_parse2_object *)arg)->name,
INTERNAL_TYPE_REGION_FIELD, IMODE_LOAD_PASS1,
NS_NO_UPSEARCH | NS_DONT_OPEN_SCOPE,
NULL, &node);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
/*
* Initialize an object for the new Node that is on
* the object stack
*/
status = acpi_ex_prep_region_field_value (node, region_node, field_flags,
field_bit_position, arg->value.size);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
/* Keep track of bit position for *next* field */
......@@ -143,7 +145,7 @@ acpi_ds_create_field (
arg = arg->next;
}
return (status);
return_ACPI_STATUS (status);
}
......@@ -161,21 +163,24 @@ acpi_ds_create_field (
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_ds_create_bank_field (
ACPI_PARSE_OBJECT *op,
ACPI_NAMESPACE_NODE *region_node,
ACPI_WALK_STATE *walk_state)
acpi_parse_object *op,
acpi_namespace_node *region_node,
acpi_walk_state *walk_state)
{
ACPI_STATUS status = AE_AML_ERROR;
ACPI_PARSE_OBJECT *arg;
ACPI_NAMESPACE_NODE *register_node;
ACPI_NAMESPACE_NODE *node;
acpi_status status = AE_AML_ERROR;
acpi_parse_object *arg;
acpi_namespace_node *register_node;
acpi_namespace_node *node;
u32 bank_value;
u8 field_flags;
u32 field_bit_position = 0;
FUNCTION_TRACE_PTR ("Ds_create_bank_field", op);
/* First arg is the name of the parent Op_region */
arg = op->value.arg;
......@@ -184,7 +189,7 @@ acpi_ds_create_bank_field (
ACPI_TYPE_REGION, IMODE_EXECUTE,
NS_SEARCH_PARENT, walk_state, &region_node);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
}
......@@ -197,19 +202,19 @@ acpi_ds_create_bank_field (
NS_NO_UPSEARCH | NS_DONT_OPEN_SCOPE,
NULL, &register_node);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
/* Third arg is the Bank_value */
arg = arg->next;
bank_value = arg->value.integer;
bank_value = arg->value.integer32;
/* Next arg is the field flags */
arg = arg->next;
field_flags = (u8) arg->value.integer;
field_flags = arg->value.integer8;
/* Each remaining arg is a Named Field */
......@@ -236,24 +241,23 @@ acpi_ds_create_bank_field (
case AML_INT_NAMEDFIELD_OP:
status = acpi_ns_lookup (walk_state->scope_info,
(NATIVE_CHAR *) &((ACPI_PARSE2_OBJECT *)arg)->name,
(NATIVE_CHAR *) &((acpi_parse2_object *)arg)->name,
INTERNAL_TYPE_REGION_FIELD, IMODE_LOAD_PASS1,
NS_NO_UPSEARCH | NS_DONT_OPEN_SCOPE,
NULL, &node);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
/*
* Initialize an object for the new Node that is on
* the object stack
*/
status = acpi_ex_prep_bank_field_value (node, region_node, register_node,
bank_value, field_flags, field_bit_position,
arg->value.size);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
/* Keep track of bit position for the *next* field */
......@@ -266,7 +270,7 @@ acpi_ds_create_bank_field (
arg = arg->next;
}
return (status);
return_ACPI_STATUS (status);
}
......@@ -284,21 +288,24 @@ acpi_ds_create_bank_field (
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_ds_create_index_field (
ACPI_PARSE_OBJECT *op,
ACPI_NAMESPACE_NODE *region_node,
ACPI_WALK_STATE *walk_state)
acpi_parse_object *op,
acpi_namespace_node *region_node,
acpi_walk_state *walk_state)
{
ACPI_STATUS status;
ACPI_PARSE_OBJECT *arg;
ACPI_NAMESPACE_NODE *node;
ACPI_NAMESPACE_NODE *index_register_node;
ACPI_NAMESPACE_NODE *data_register_node;
acpi_status status;
acpi_parse_object *arg;
acpi_namespace_node *node;
acpi_namespace_node *index_register_node;
acpi_namespace_node *data_register_node;
u8 field_flags;
u32 field_bit_position = 0;
FUNCTION_TRACE_PTR ("Ds_create_index_field", op);
arg = op->value.arg;
/* First arg is the name of the Index register */
......@@ -308,7 +315,7 @@ acpi_ds_create_index_field (
NS_NO_UPSEARCH | NS_DONT_OPEN_SCOPE,
NULL, &index_register_node);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
/* Second arg is the data register */
......@@ -320,7 +327,7 @@ acpi_ds_create_index_field (
NS_NO_UPSEARCH | NS_DONT_OPEN_SCOPE,
NULL, &data_register_node);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
......@@ -355,24 +362,23 @@ acpi_ds_create_index_field (
case AML_INT_NAMEDFIELD_OP:
status = acpi_ns_lookup (walk_state->scope_info,
(NATIVE_CHAR *) &((ACPI_PARSE2_OBJECT *)arg)->name,
(NATIVE_CHAR *) &((acpi_parse2_object *)arg)->name,
INTERNAL_TYPE_INDEX_FIELD, IMODE_LOAD_PASS1,
NS_NO_UPSEARCH | NS_DONT_OPEN_SCOPE,
NULL, &node);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
/*
* Initialize an object for the new Node that is on
* the object stack
*/
status = acpi_ex_prep_index_field_value (node, index_register_node,
data_register_node, field_flags,
field_bit_position, arg->value.size);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
/* Keep track of bit position for the *next* field */
......@@ -383,6 +389,8 @@ acpi_ds_create_index_field (
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid opcode in field list: %X\n",
arg->opcode));
status = AE_AML_ERROR;
break;
}
......@@ -390,7 +398,7 @@ acpi_ds_create_index_field (
arg = arg->next;
}
return (status);
return_ACPI_STATUS (status);
}
/******************************************************************************
*
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
* $Revision: 63 $
* $Revision: 65 $
*
*****************************************************************************/
......@@ -56,30 +56,36 @@
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_ds_parse_method (
ACPI_HANDLE obj_handle)
acpi_handle obj_handle)
{
ACPI_STATUS status;
ACPI_OPERAND_OBJECT *obj_desc;
ACPI_PARSE_OBJECT *op;
ACPI_NAMESPACE_NODE *node;
ACPI_OWNER_ID owner_id;
acpi_status status;
acpi_operand_object *obj_desc;
acpi_parse_object *op;
acpi_namespace_node *node;
acpi_owner_id owner_id;
FUNCTION_TRACE_PTR ("Ds_parse_method", obj_handle);
/* Parameter Validation */
if (!obj_handle) {
return (AE_NULL_ENTRY);
return_ACPI_STATUS (AE_NULL_ENTRY);
}
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Parsing [%4.4s] **** Named_obj=%p\n",
&((acpi_namespace_node *)obj_handle)->name, obj_handle));
/* Extract the method object from the method Node */
node = (ACPI_NAMESPACE_NODE *) obj_handle;
node = (acpi_namespace_node *) obj_handle;
obj_desc = node->object;
if (!obj_desc) {
return (AE_NULL_OBJECT);
return_ACPI_STATUS (AE_NULL_OBJECT);
}
/* Create a mutex for the method if there is a concurrency limit */
......@@ -90,7 +96,7 @@ acpi_ds_parse_method (
obj_desc->method.concurrency,
&obj_desc->method.semaphore);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
}
......@@ -100,7 +106,7 @@ acpi_ds_parse_method (
*/
op = acpi_ps_alloc_op (AML_METHOD_OP);
if (!op) {
return (AE_NO_MEMORY);
return_ACPI_STATUS (AE_NO_MEMORY);
}
/* Init new op with the method name and pointer back to the Node */
......@@ -126,7 +132,7 @@ acpi_ds_parse_method (
acpi_ds_load1_begin_op, acpi_ds_load1_end_op);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
/* Get a new Owner_id for objects created by this method */
......@@ -134,12 +140,15 @@ acpi_ds_parse_method (
owner_id = acpi_ut_allocate_owner_id (OWNER_TYPE_METHOD);
obj_desc->method.owning_id = owner_id;
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** [%4.4s] Parsed **** Named_obj=%p Op=%p\n",
&((acpi_namespace_node *)obj_handle)->name, obj_handle, op));
/* Install the parsed tree in the method object */
/* TBD: [Restructure] Obsolete field? */
acpi_ps_delete_parse_tree (op);
return (status);
return_ACPI_STATUS (status);
}
......@@ -161,17 +170,20 @@ acpi_ds_parse_method (
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_ds_begin_method_execution (
ACPI_NAMESPACE_NODE *method_node,
ACPI_OPERAND_OBJECT *obj_desc,
ACPI_NAMESPACE_NODE *calling_method_node)
acpi_namespace_node *method_node,
acpi_operand_object *obj_desc,
acpi_namespace_node *calling_method_node)
{
ACPI_STATUS status = AE_OK;
acpi_status status = AE_OK;
FUNCTION_TRACE_PTR ("Ds_begin_method_execution", method_node);
if (!method_node) {
return (AE_NULL_ENTRY);
return_ACPI_STATUS (AE_NULL_ENTRY);
}
......@@ -190,7 +202,7 @@ acpi_ds_begin_method_execution (
*/
if (method_node == calling_method_node) {
if (obj_desc->method.thread_count >= obj_desc->method.concurrency) {
return (AE_AML_METHOD_LIMIT);
return_ACPI_STATUS (AE_AML_METHOD_LIMIT);
}
}
......@@ -209,7 +221,7 @@ acpi_ds_begin_method_execution (
*/
obj_desc->method.thread_count++;
return (status);
return_ACPI_STATUS (status);
}
......@@ -226,31 +238,36 @@ acpi_ds_begin_method_execution (
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_ds_call_control_method (
ACPI_WALK_LIST *walk_list,
ACPI_WALK_STATE *this_walk_state,
ACPI_PARSE_OBJECT *op)
acpi_walk_list *walk_list,
acpi_walk_state *this_walk_state,
acpi_parse_object *op)
{
ACPI_STATUS status;
ACPI_NAMESPACE_NODE *method_node;
ACPI_OPERAND_OBJECT *obj_desc;
ACPI_WALK_STATE *next_walk_state;
ACPI_PARSE_STATE *parser_state;
acpi_status status;
acpi_namespace_node *method_node;
acpi_operand_object *obj_desc;
acpi_walk_state *next_walk_state;
acpi_parse_state *parser_state;
u32 i;
FUNCTION_TRACE_PTR ("Ds_call_control_method", this_walk_state);
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Execute method %p, currentstate=%p\n",
this_walk_state->prev_op, this_walk_state));
/*
* Get the namespace entry for the control method we are about to call
*/
method_node = this_walk_state->method_call_node;
if (!method_node) {
return (AE_NULL_ENTRY);
return_ACPI_STATUS (AE_NULL_ENTRY);
}
obj_desc = acpi_ns_get_attached_object (method_node);
if (!obj_desc) {
return (AE_NULL_OBJECT);
return_ACPI_STATUS (AE_NULL_OBJECT);
}
......@@ -259,7 +276,7 @@ acpi_ds_call_control_method (
status = acpi_ds_begin_method_execution (method_node, obj_desc,
this_walk_state->method_node);
if (ACPI_FAILURE (status)) {
return (status);
return_ACPI_STATUS (status);
}
/* Create and initialize a new parser state */
......@@ -267,7 +284,7 @@ acpi_ds_call_control_method (
parser_state = acpi_ps_create_state (obj_desc->method.pcode,
obj_desc->method.pcode_length);
if (!parser_state) {
return (AE_NO_MEMORY);
return_ACPI_STATUS (AE_NO_MEMORY);
}
acpi_ps_init_scope (parser_state, NULL);
......@@ -281,7 +298,7 @@ acpi_ds_call_control_method (
if (!next_walk_state) {
/* TBD: delete parser state */
return (AE_NO_MEMORY);
return_ACPI_STATUS (AE_NO_MEMORY);
}
next_walk_state->walk_type = WALK_METHOD;
......@@ -323,7 +340,7 @@ acpi_ds_call_control_method (
op = acpi_ps_alloc_op (AML_SCOPE_OP);
if (!op) {
return (AE_NO_MEMORY);
return_ACPI_STATUS (AE_NO_MEMORY);
}
status = acpi_ps_parse_aml (op, obj_desc->method.pcode,
......@@ -348,7 +365,10 @@ acpi_ds_call_control_method (
this_walk_state->num_operands = 0;
return (AE_OK);
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Starting nested execution, newstate=%p\n",
next_walk_state));
return_ACPI_STATUS (AE_OK);
/* On error, we must delete the new walk state */
......@@ -356,7 +376,7 @@ acpi_ds_call_control_method (
cleanup:
acpi_ds_terminate_control_method (next_walk_state);
acpi_ds_delete_walk_state (next_walk_state);
return (status);
return_ACPI_STATUS (status);
}
......@@ -374,12 +394,15 @@ acpi_ds_call_control_method (
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_ds_restart_control_method (
ACPI_WALK_STATE *walk_state,
ACPI_OPERAND_OBJECT *return_desc)
acpi_walk_state *walk_state,
acpi_operand_object *return_desc)
{
ACPI_STATUS status;
acpi_status status;
FUNCTION_TRACE_PTR ("Ds_restart_control_method", walk_state);
if (return_desc) {
......@@ -391,7 +414,7 @@ acpi_ds_restart_control_method (
status = acpi_ds_result_push (return_desc, walk_state);
if (ACPI_FAILURE (status)) {
acpi_ut_remove_reference (return_desc);
return (status);
return_ACPI_STATUS (status);
}
}
......@@ -405,8 +428,13 @@ acpi_ds_restart_control_method (
}
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"Method=%p Return=%p Return_used?=%X Res_stack=%p State=%p\n",
walk_state->method_call_op, return_desc, walk_state->return_used,
walk_state->results, walk_state));
return (AE_OK);
return_ACPI_STATUS (AE_OK);
}
......@@ -424,19 +452,22 @@ acpi_ds_restart_control_method (
*
******************************************************************************/
ACPI_STATUS
acpi_status
acpi_ds_terminate_control_method (
ACPI_WALK_STATE *walk_state)
acpi_walk_state *walk_state)
{
ACPI_OPERAND_OBJECT *obj_desc;
ACPI_NAMESPACE_NODE *method_node;
acpi_operand_object *obj_desc;
acpi_namespace_node *method_node;
FUNCTION_TRACE_PTR ("Ds_terminate_control_method", walk_state);
/* The method object should be stored in the walk state */
obj_desc = walk_state->method_desc;
if (!obj_desc) {
return (AE_OK);
return_ACPI_STATUS (AE_OK);
}
/* Delete all arguments and locals */
......@@ -488,7 +519,7 @@ acpi_ds_terminate_control_method (
}
acpi_ut_release_mutex (ACPI_MTX_PARSER);
return (AE_OK);
return_ACPI_STATUS (AE_OK);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -42,11 +42,6 @@
#include "acpi.h"
#include "driver.h"
#ifdef CONFIG_ACPI_KERNEL_CONFIG
#include <asm/efi.h>
#define ACPI_USE_EFI
#endif
#define _COMPONENT OS_DEPENDENT
MODULE_NAME ("driver")
......@@ -61,9 +56,8 @@ static int acpi_disabled = 0;
int
acpi_init(void)
{
ACPI_PHYSICAL_ADDRESS rsdp_phys;
ACPI_BUFFER buffer;
ACPI_SYSTEM_INFO sys_info;
acpi_buffer buffer;
acpi_system_info sys_info;
if (PM_IS_ACTIVE()) {
printk(KERN_NOTICE "ACPI: APM is already active, exiting\n");
......@@ -81,18 +75,8 @@ acpi_init(void)
return -ENODEV;
}
#ifndef ACPI_USE_EFI
if (!ACPI_SUCCESS(acpi_find_root_pointer(&rsdp_phys))) {
printk(KERN_ERR "ACPI: System description tables not found\n");
return -ENODEV;
}
#else
rsdp_phys = efi.acpi;
#endif
/* from this point on, on error we must call acpi_terminate() */
if (!ACPI_SUCCESS(acpi_load_tables(rsdp_phys))) {
if (!ACPI_SUCCESS(acpi_load_tables())) {
printk(KERN_ERR "ACPI: System description table load failed\n");
acpi_terminate();
return -ENODEV;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment