Skip to contentSkip to conversation

ACPI patches for 2.6.21

PATCH In review Len Brown 3 participants 143 messages Feb 7, 2007 – Apr 13, 2007 4 messages not in the archive Page 2 of 2

Subsystems (10)
lore
Share & tools
lore
author reviewer
#96 lore raw

PATCH 94/140 ACPICA: Use manifest constants for parse pass number

In reply to Len Brown

From: Bob Moore <[email protected]>

---
 drivers/acpi/dispatcher/dsmethod.c |    3 ++-
 drivers/acpi/dispatcher/dsopcode.c |    4 ++--
 drivers/acpi/dispatcher/dswload.c  |    2 +-
 drivers/acpi/namespace/nsparse.c   |    6 +++---
 drivers/acpi/parser/psxface.c      |    2 +-
 include/acpi/aclocal.h             |    2 +-
 6 files changed, 10 insertions(+), 9 deletions(-)
drivers/acpi/dispatcher/dsmethod.c +2 -1
index aa60dca..57c5159 100644
@@ -382,7 +382,8 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
 
 	status = acpi_ds_init_aml_walk(next_walk_state, NULL, method_node,
 				       obj_desc->method.aml_start,
-				       obj_desc->method.aml_length, info, 3);
+				       obj_desc->method.aml_length, info,
+				       ACPI_IMODE_EXECUTE);
 
 	ACPI_FREE(info);
 	if (ACPI_FAILURE(status)) {
drivers/acpi/dispatcher/dsopcode.c +2 -2
index 5b974a8..26035a3 100644
@@ -114,7 +114,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node,
 	}
 
 	status = acpi_ds_init_aml_walk(walk_state, op, NULL, aml_start,
-				       aml_length, NULL, 1);
+				       aml_length, NULL, ACPI_IMODE_LOAD_PASS1);
 	if (ACPI_FAILURE(status)) {
 		acpi_ds_delete_walk_state(walk_state);
 		goto cleanup;
@@ -157,7 +157,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node,
 	/* Execute the opcode and arguments */
 
 	status = acpi_ds_init_aml_walk(walk_state, op, NULL, aml_start,
-				       aml_length, NULL, 3);
+				       aml_length, NULL, ACPI_IMODE_EXECUTE);
 	if (ACPI_FAILURE(status)) {
 		acpi_ds_delete_walk_state(walk_state);
 		goto cleanup;
drivers/acpi/dispatcher/dswload.c +1 -1
index 4ed0868..baf04e8 100644
@@ -754,7 +754,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
 		}
 
 		flags = ACPI_NS_NO_UPSEARCH;
-		if (walk_state->pass_number == 3) {
+		if (walk_state->pass_number == ACPI_IMODE_EXECUTE) {
 
 			/* Execution mode, node cannot already exist, node is temporary */
 
drivers/acpi/namespace/nsparse.c +3 -3
index 2e22479..a68de26 100644
@@ -160,10 +160,10 @@ acpi_ns_parse_table(acpi_native_uint table_index,
 	 * each Parser Op subtree is deleted when it is finished.  This saves
 	 * a great deal of memory, and allows a small cache of parse objects
 	 * to service the entire parse.  The second pass of the parse then
-	 * performs another complete parse of the AML..
+	 * performs another complete parse of the AML.
 	 */
 	ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 1\n"));
-	status = acpi_ns_one_complete_parse(1, table_index);
+	status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1, table_index);
 	if (ACPI_FAILURE(status)) {
 		return_ACPI_STATUS(status);
 	}
@@ -178,7 +178,7 @@ acpi_ns_parse_table(acpi_native_uint table_index,
 	 * parse objects are all cached.
 	 */
 	ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 2\n"));
-	status = acpi_ns_one_complete_parse(2, table_index);
+	status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2, table_index);
 	if (ACPI_FAILURE(status)) {
 		return_ACPI_STATUS(status);
 	}
drivers/acpi/parser/psxface.c +1 -1
index 9069c69..fc5b3e5 100644
@@ -260,7 +260,7 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
 
 	/* Create and initialize a new walk state */
 
-	info->pass_number = 3;
+	info->pass_number = ACPI_IMODE_EXECUTE;
 	walk_state =
 	    acpi_ds_create_walk_state(info->obj_desc->method.owner_id, NULL,
 				      NULL, NULL);
include/acpi/aclocal.h +1 -1
index 287da6f..7b28d93 100644
@@ -162,7 +162,7 @@ struct acpi_mutex_info {
 typedef enum {
 	ACPI_IMODE_LOAD_PASS1 = 0x01,
 	ACPI_IMODE_LOAD_PASS2 = 0x02,
-	ACPI_IMODE_EXECUTE = 0x0E
+	ACPI_IMODE_EXECUTE = 0x03
 } acpi_interpreter_mode;
 
 union acpi_name_union {
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#97 lore raw

PATCH 95/140 ACPICA: Update comments

From: Bob Moore <[email protected]>

---
 drivers/acpi/namespace/nswalk.c |   46 +++++++++++++++++++++-----------------
 1 files changed, 25 insertions(+), 21 deletions(-)
drivers/acpi/namespace/nswalk.c +25 -21
index a138fcb..c6619d8 100644
@@ -193,21 +193,28 @@ acpi_ns_walk_namespace(acpi_object_type type,
 		    acpi_ns_get_next_node(ACPI_TYPE_ANY, parent_node,
 					  child_node);
 		if (child_node) {
-			/*
-			 * Found node, Get the type if we are not
-			 * searching for ANY
-			 */
+
+			/* Found node, Get the type if we are not searching for ANY */
+
 			if (type != ACPI_TYPE_ANY) {
 				child_type = child_node->type;
 			}
 
+			/*
+			 * 1) Type must match
+			 * 2) Permanent namespace nodes are OK
+			 * 3) Ignore temporary nodes unless told otherwise. Typically,
+			 *    the temporary nodes can cause a race condition where they can
+			 *    be deleted during the execution of the user function. Only the
+			 *    debugger namespace dump will examine the temporary nodes.
+			 */
 			if ((child_type == type) &&
 			    (!(child_node->flags & ANOBJ_TEMPORARY) ||
 			     (child_node->flags & ANOBJ_TEMPORARY)
 			     && (flags & ACPI_NS_WALK_TEMP_NODES))) {
 				/*
-				 * Found a matching node, invoke the user
-				 * callback function
+				 * Found a matching node, invoke the user callback function.
+				 * Unlock the namespace if flag is set.
 				 */
 				if (flags & ACPI_NS_WALK_UNLOCK) {
 					mutex_status =
@@ -219,8 +226,9 @@ acpi_ns_walk_namespace(acpi_object_type type,
 					}
 				}
 
-				status = user_function(child_node, level,
-						       context, return_value);
+				status =
+				    user_function(child_node, level, context,
+						  return_value);
 
 				if (flags & ACPI_NS_WALK_UNLOCK) {
 					mutex_status =
@@ -254,20 +262,17 @@ acpi_ns_walk_namespace(acpi_object_type type,
 			}
 
 			/*
-			 * Depth first search:
-			 * Attempt to go down another level in the namespace
-			 * if we are allowed to.  Don't go any further if we
-			 * have reached the caller specified maximum depth
-			 * or if the user function has specified that the
-			 * maximum depth has been reached.
+			 * Depth first search: Attempt to go down another level in the
+			 * namespace if we are allowed to.  Don't go any further if we have
+			 * reached the caller specified maximum depth or if the user
+			 * function has specified that the maximum depth has been reached.
 			 */
 			if ((level < max_depth) && (status != AE_CTRL_DEPTH)) {
 				if (acpi_ns_get_next_node
 				    (ACPI_TYPE_ANY, child_node, NULL)) {
-					/*
-					 * There is at least one child of this
-					 * node, visit the onde
-					 */
+
+					/* There is at least one child of this node, visit it */
+
 					level++;
 					parent_node = child_node;
 					child_node = NULL;
@@ -275,9 +280,8 @@ acpi_ns_walk_namespace(acpi_object_type type,
 			}
 		} else {
 			/*
-			 * No more children of this node (acpi_ns_get_next_node
-			 * failed), go back upwards in the namespace tree to
-			 * the node's parent.
+			 * No more children of this node (acpi_ns_get_next_node failed), go
+			 * back upwards in the namespace tree to the node's parent.
 			 */
 			level--;
 			child_node = parent_node;
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#98 lore raw

PATCH 96/140 ACPICA: Abort downward walk on temporary node detection.

From: Bob Moore <[email protected]>

Enhancement to code that ignores temporary namespace nodes

---
 drivers/acpi/namespace/nswalk.c |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)
drivers/acpi/namespace/nswalk.c +15 -11
index c6619d8..bccf27d 100644
@@ -194,24 +194,28 @@ acpi_ns_walk_namespace(acpi_object_type type,
 					  child_node);
 		if (child_node) {
 
-			/* Found node, Get the type if we are not searching for ANY */
+			/* Found next child, get the type if we are not searching for ANY */
 
 			if (type != ACPI_TYPE_ANY) {
 				child_type = child_node->type;
 			}
 
 			/*
-			 * 1) Type must match
-			 * 2) Permanent namespace nodes are OK
-			 * 3) Ignore temporary nodes unless told otherwise. Typically,
-			 *    the temporary nodes can cause a race condition where they can
-			 *    be deleted during the execution of the user function. Only the
-			 *    debugger namespace dump will examine the temporary nodes.
+			 * Ignore all temporary namespace nodes (created during control
+			 * method execution) unless told otherwise. These temporary nodes
+			 * can cause a race condition because they can be deleted during the
+			 * execution of the user function (if the namespace is unlocked before
+			 * invocation of the user function.) Only the debugger namespace dump
+			 * will examine the temporary nodes.
 			 */
-			if ((child_type == type) &&
-			    (!(child_node->flags & ANOBJ_TEMPORARY) ||
-			     (child_node->flags & ANOBJ_TEMPORARY)
-			     && (flags & ACPI_NS_WALK_TEMP_NODES))) {
+			if ((child_node->flags & ANOBJ_TEMPORARY) &&
+			    !(flags & ACPI_NS_WALK_TEMP_NODES)) {
+				status = AE_CTRL_DEPTH;
+			}
+
+			/* Type must match requested type */
+
+			else if (child_type == type) {
 				/*
 				 * Found a matching node, invoke the user callback function.
 				 * Unlock the namespace if flag is set.
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#99 lore raw

PATCH 97/140 ACPICA: Fixes for parameter validation.

From: Bob Moore <[email protected]>

Extra checks for valid handle/path combinations, BZ 478

---
 drivers/acpi/namespace/nsxfname.c |   45 +++++++++++++++++++-----------------
 1 files changed, 24 insertions(+), 21 deletions(-)
drivers/acpi/namespace/nsxfname.c +24 -21
index 978213a..408bd11 100644
@@ -84,38 +84,41 @@ acpi_get_handle(acpi_handle parent,
 	/* Convert a parent handle to a prefix node */
 
 	if (parent) {
-		status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
-		if (ACPI_FAILURE(status)) {
-			return (status);
-		}
-
 		prefix_node = acpi_ns_map_handle_to_node(parent);
 		if (!prefix_node) {
-			(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
 			return (AE_BAD_PARAMETER);
 		}
+	}
+
+	/*
+	 * Valid cases are:
+	 * 1) Fully qualified pathname
+	 * 2) Parent + Relative pathname
+	 *
+	 * Error for <null Parent + relative path>
+	 */
+	if (acpi_ns_valid_root_prefix(pathname[0])) {
 
-		status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
-		if (ACPI_FAILURE(status)) {
-			return (status);
+		/* Pathname is fully qualified (starts with '\') */
+
+		/* Special case for root-only, since we can't search for it */
+
+		if (!ACPI_STRCMP(pathname, ACPI_NS_ROOT_PATH)) {
+			*ret_handle =
+			    acpi_ns_convert_entry_to_handle(acpi_gbl_root_node);
+			return (AE_OK);
 		}
-	}
+	} else if (!prefix_node) {
 
-	/* Special case for root, since we can't search for it */
+		/* Relative path with null prefix is disallowed */
 
-	if (ACPI_STRCMP(pathname, ACPI_NS_ROOT_PATH) == 0) {
-		*ret_handle =
-		    acpi_ns_convert_entry_to_handle(acpi_gbl_root_node);
-		return (AE_OK);
+		return (AE_BAD_PARAMETER);
 	}
 
-	/*
-	 *  Find the Node and convert to a handle
-	 */
-	status = acpi_ns_get_node(prefix_node, pathname, ACPI_NS_NO_UPSEARCH,
-				  &node);
+	/* Find the Node and convert to a handle */
 
-	*ret_handle = NULL;
+	status =
+	    acpi_ns_get_node(prefix_node, pathname, ACPI_NS_NO_UPSEARCH, &node);
 	if (ACPI_SUCCESS(status)) {
 		*ret_handle = acpi_ns_convert_entry_to_handle(node);
 	}
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#100 lore raw

PATCH 98/140 ACPICA: Update version to 20061011

From: Bob Moore <[email protected]>

---
 include/acpi/acconfig.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/acpi/acconfig.h +1 -1
index bd5560b..9aa3b19 100644
@@ -63,7 +63,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20060927
+#define ACPI_CA_VERSION                 0x20061011
 
 /*
  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#101 lore raw

PATCH 99/140 ACPICA: Remove duplicate table manager

From: Alexey Starikovskiy <[email protected]>

---
 arch/i386/kernel/acpi/boot.c       |   40 ++--
 arch/i386/kernel/acpi/earlyquirk.c |    4 +-
 arch/i386/mach-es7000/es7000.h     |    9 -
 arch/i386/mach-es7000/es7000plat.c |   53 +----
 arch/i386/pci/mmconfig.c           |    2 +-
 drivers/acpi/tables.c              |  396 ++----------------------------------
 include/linux/acpi.h               |    7 +-
 7 files changed, 50 insertions(+), 461 deletions(-)
arch/i386/kernel/acpi/boot.c +20 -20
index 9adabc4..543eac5 100644
@@ -169,16 +169,16 @@ char *__acpi_map_table(unsigned long phys, unsigned long size)
 struct acpi_table_mcfg_config *pci_mmcfg_config;
 int pci_mmcfg_config_num;
 
-int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
+int __init acpi_parse_mcfg(struct acpi_table_header *header)
 {
 	struct acpi_table_mcfg *mcfg;
 	unsigned long i;
 	int config_size;
 
-	if (!phys_addr || !size)
+	if (!header)
 		return -EINVAL;
 
-	mcfg = (struct acpi_table_mcfg *)__acpi_map_table(phys_addr, size);
+	mcfg = (struct acpi_table_mcfg *)header;
 	if (!mcfg) {
 		printk(KERN_WARNING PREFIX "Unable to map MCFG\n");
 		return -ENODEV;
@@ -186,7 +186,7 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
 
 	/* how many config structures do we have */
 	pci_mmcfg_config_num = 0;
-	i = size - sizeof(struct acpi_table_mcfg);
+	i = header->length - sizeof(struct acpi_table_mcfg);
 	while (i >= sizeof(struct acpi_table_mcfg_config)) {
 		++pci_mmcfg_config_num;
 		i -= sizeof(struct acpi_table_mcfg_config);
@@ -220,14 +220,14 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
 #endif				/* CONFIG_PCI_MMCONFIG */
 
 #ifdef CONFIG_X86_LOCAL_APIC
-static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size)
+static int __init acpi_parse_madt(struct acpi_table_header *header)
 {
 	struct acpi_table_madt *madt = NULL;
 
-	if (!phys_addr || !size || !cpu_has_apic)
+	if (!header|| !cpu_has_apic)
 		return -EINVAL;
 
-	madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size);
+	madt = (struct acpi_table_madt *)header;
 	if (!madt) {
 		printk(KERN_WARNING PREFIX "Unable to map MADT\n");
 		return -ENODEV;
@@ -619,14 +619,14 @@ acpi_scan_rsdp(unsigned long start, unsigned long length)
 	return 0;
 }
 
-static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size)
+static int __init acpi_parse_sbf(struct acpi_table_header *header)
 {
 	struct acpi_table_sbf *sb;
 
-	if (!phys_addr || !size)
+	if (!header)
 		return -EINVAL;
 
-	sb = (struct acpi_table_sbf *)__acpi_map_table(phys_addr, size);
+	sb = (struct acpi_table_sbf *)header;
 	if (!sb) {
 		printk(KERN_WARNING PREFIX "Unable to map SBF\n");
 		return -ENODEV;
@@ -639,16 +639,16 @@ static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size)
 
 #ifdef CONFIG_HPET_TIMER
 
-static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
+static int __init acpi_parse_hpet(struct acpi_table_header *header)
 {
 	struct acpi_table_hpet *hpet_tbl;
 	struct resource *hpet_res;
 	resource_size_t res_start;
 
-	if (!phys || !size)
+	if (!header)
 		return -EINVAL;
 
-	hpet_tbl = (struct acpi_table_hpet *)__acpi_map_table(phys, size);
+	hpet_tbl = (struct acpi_table_hpet *)header;
 	if (!hpet_tbl) {
 		printk(KERN_WARNING PREFIX "Unable to map HPET\n");
 		return -ENODEV;
@@ -707,11 +707,11 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
 extern u32 pmtmr_ioport;
 #endif
 
-static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
+static int __init acpi_parse_fadt(struct acpi_table_header *header)
 {
 	struct fadt_descriptor *fadt = NULL;
 
-	fadt = (struct fadt_descriptor *)__acpi_map_table(phys, size);
+	fadt = (struct fadt_descriptor *)header;
 	if (!fadt) {
 		printk(KERN_WARNING PREFIX "Unable to map FADT\n");
 		return 0;
@@ -901,7 +901,7 @@ static void __init acpi_process_madt(void)
 #ifdef CONFIG_X86_LOCAL_APIC
 	int count, error;
 
-	count = acpi_table_parse(ACPI_APIC, acpi_parse_madt);
+	count = acpi_table_parse("APIC", acpi_parse_madt);
 	if (count >= 1) {
 
 		/*
@@ -1197,7 +1197,7 @@ int __init acpi_boot_table_init(void)
 		return error;
 	}
 
-	acpi_table_parse(ACPI_BOOT, acpi_parse_sbf);
+	acpi_table_parse("BOOT", acpi_parse_sbf);
 
 	/*
 	 * blacklist may disable ACPI entirely
@@ -1225,19 +1225,19 @@ int __init acpi_boot_init(void)
 	if (acpi_disabled && !acpi_ht)
 		return 1;
 
-	acpi_table_parse(ACPI_BOOT, acpi_parse_sbf);
+	acpi_table_parse("BOOT", acpi_parse_sbf);
 
 	/*
 	 * set sci_int and PM timer address
 	 */
-	acpi_table_parse(ACPI_FADT, acpi_parse_fadt);
+	acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt);
 
 	/*
 	 * Process the Multiple APIC Description Table (MADT), if present
 	 */
 	acpi_process_madt();
 
-	acpi_table_parse(ACPI_HPET, acpi_parse_hpet);
+	acpi_table_parse("HPET", acpi_parse_hpet);
 
 	return 0;
 }
arch/i386/kernel/acpi/earlyquirk.c +2 -2
index 4b60af7..4261c85 100644
@@ -16,7 +16,7 @@
 
 static int nvidia_hpet_detected __initdata;
 
-static int __init nvidia_hpet_check(unsigned long phys, unsigned long size)
+static int __init nvidia_hpet_check(struct acpi_table_header *header)
 {
 	nvidia_hpet_detected = 1;
 	return 0;
@@ -30,7 +30,7 @@ static int __init check_bridge(int vendor, int device)
 	   is enabled. */
 	if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) {
 		nvidia_hpet_detected = 0;
-		acpi_table_parse(ACPI_HPET, nvidia_hpet_check);
+		acpi_table_parse("HPET", nvidia_hpet_check);
 		if (nvidia_hpet_detected == 0) {
 			acpi_skip_timer_override = 1;
 			  printk(KERN_INFO "Nvidia board "
arch/i386/mach-es7000/es7000.h +0 -9
index 80566ca..c8d5aa1 100644
@@ -84,15 +84,6 @@ struct es7000_oem_table {
 };
 
 #ifdef CONFIG_ACPI
-struct acpi_table_sdt {
-	unsigned long pa;
-	unsigned long count;
-	struct {
-		unsigned long pa;
-		enum acpi_table_id id;
-		unsigned long size;
-	}	entry[50];
-};
 
 struct oem_table {
 	struct acpi_table_header Header;
arch/i386/mach-es7000/es7000plat.c +8 -45

59 lines not on this page · raw message

arch/i386/pci/mmconfig.c +1 -1
index e2616a2..80522e3 100644
@@ -199,7 +199,7 @@ void __init pci_mmcfg_init(int type)
 	if ((pci_probe & PCI_PROBE_MMCONF) == 0)
 		return;
 
-	acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
+	acpi_table_parse("MCFG", acpi_parse_mcfg);
 	if ((pci_mmcfg_config_num == 0) ||
 	    (pci_mmcfg_config == NULL) ||
 	    (pci_mmcfg_config[0].base_address == 0))
drivers/acpi/tables.c +16 -380

461 lines not on this page · raw message

include/linux/acpi.h +3 -4
index b3e8a26..88cb1fe 100644
@@ -340,7 +340,7 @@ enum acpi_table_id {
 	ACPI_TABLE_COUNT
 };
 
-typedef int (*acpi_table_handler) (unsigned long phys_addr, unsigned long size);
+typedef int (*acpi_table_handler) (struct acpi_table_header *header);
 
 extern acpi_table_handler acpi_table_ops[ACPI_TABLE_COUNT];
 
@@ -353,11 +353,10 @@ int acpi_boot_table_init (void);
 int acpi_numa_init (void);
 
 int acpi_table_init (void);
-int acpi_table_parse (enum acpi_table_id id, acpi_table_handler handler);
-int acpi_get_table_header_early (enum acpi_table_id id, struct acpi_table_header **header);
+int acpi_table_parse (char *id, acpi_table_handler handler);
 int acpi_table_parse_madt (enum acpi_madt_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries);
 int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries);
-int acpi_parse_mcfg (unsigned long phys_addr, unsigned long size);
+int acpi_parse_mcfg (struct acpi_table_header *header);
 void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr);
 void acpi_table_print_madt_entry (acpi_table_entry_header *madt);
 void acpi_table_print_srat_entry (acpi_table_entry_header *srat);
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#102 lore raw

PATCH 100/140 ACPICA: use new ACPI headers.

From: Alexey Starikovskiy <[email protected]>

---
 arch/i386/kernel/acpi/boot.c            |   10 +++++-----
 arch/i386/kernel/cpu/cpufreq/longhaul.c |   15 ++++++---------
 arch/i386/kernel/mpparse.c              |    4 ++--
 arch/ia64/kernel/acpi.c                 |    6 +++---
 arch/x86_64/kernel/genapic.c            |    4 ++--
 arch/x86_64/kernel/mpparse.c            |    2 +-
 drivers/acpi/bus.c                      |    6 +++---
 drivers/acpi/osl.c                      |    2 +-
 drivers/acpi/pci_link.c                 |    2 +-
 drivers/acpi/processor_core.c           |    6 +++---
 drivers/acpi/processor_idle.c           |   28 ++++++++++++++--------------
 drivers/acpi/processor_perflib.c        |   12 ++++++------
 drivers/acpi/processor_throttling.c     |    4 ++--
 drivers/acpi/scan.c                     |    4 ++--
 include/acpi/acglobal.h                 |    1 -
 include/acpi/actbl.h                    |    3 ---
 include/acpi/actbl1.h                   |   10 ----------
 17 files changed, 51 insertions(+), 68 deletions(-)
arch/i386/kernel/acpi/boot.c +5 -5
index 543eac5..cbbcf9c 100644
@@ -357,7 +357,7 @@ static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
 
 	/*
 	 * stash over-ride to indicate we've been here
-	 * and for later update of acpi_fadt
+	 * and for later update of acpi_gbl_FADT
 	 */
 	acpi_sci_override_gsi = gsi;
 	return;
@@ -376,7 +376,7 @@ acpi_parse_int_src_ovr(acpi_table_entry_header * header,
 
 	acpi_table_print_madt_entry(header);
 
-	if (intsrc->bus_irq == acpi_fadt.sci_int) {
+	if (intsrc->bus_irq == acpi_gbl_FADT.sci_interrupt) {
 		acpi_sci_ioapic_setup(intsrc->global_irq,
 				      intsrc->flags.polarity,
 				      intsrc->flags.trigger);
@@ -709,9 +709,9 @@ extern u32 pmtmr_ioport;
 
 static int __init acpi_parse_fadt(struct acpi_table_header *header)
 {
-	struct fadt_descriptor *fadt = NULL;
+	struct acpi_table_fadt *fadt = NULL;
 
-	fadt = (struct fadt_descriptor *)header;
+	fadt = (struct acpi_table_fadt *)header;
 	if (!fadt) {
 		printk(KERN_WARNING PREFIX "Unable to map FADT\n");
 		return 0;
@@ -873,7 +873,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
 	 * pretend we got one so we can set the SCI flags.
 	 */
 	if (!acpi_sci_override_gsi)
-		acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0);
+		acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt, 0, 0);
 
 	/* Fill in identity legacy mapings where no override */
 	mp_config_acpi_legacy_irqs();
arch/i386/kernel/cpu/cpufreq/longhaul.c +6 -9
index e940e00..a3db933 100644
@@ -190,7 +190,7 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
 		/* Invoke C3 */
 		inb(cx_address);
 		/* Dummy op - must do something useless after P_LVL3 read */
-		t = inl(acpi_fadt.xpm_tmr_blk.address);
+		t = inl(acpi_gbl_FADT.xpm_timer_block.address);
 	}
 	/* Disable bus ratio bit */
 	local_irq_disable();
@@ -250,8 +250,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
 		outb(3, 0x22);
 	} else if ((pr != NULL) && pr->flags.bm_control) {
  		/* Disable bus master arbitration */
-		acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1,
-				  ACPI_MTX_DO_NOT_LOCK);
+		acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1);
 	}
 	switch (longhaul_version) {
 
@@ -281,8 +280,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
 	case TYPE_POWERSAVER:
 		if (longhaul_flags & USE_ACPI_C3) {
 			/* Don't allow wakeup */
-			acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0,
-					  ACPI_MTX_DO_NOT_LOCK);
+			acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
 			do_powersaver(cx->address, clock_ratio_index);
 		} else {
 			do_powersaver(0, clock_ratio_index);
@@ -295,8 +293,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
 		outb(0, 0x22);
 	} else if ((pr != NULL) && pr->flags.bm_control) {
 		/* Enable bus master arbitration */
-		acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0,
-				  ACPI_MTX_DO_NOT_LOCK);
+		acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
 	}
 	outb(pic2_mask,0xA1);	/* restore mask */
 	outb(pic1_mask,0x21);
@@ -414,7 +411,7 @@ static int __init longhaul_get_ranges(void)
 	highest_speed = calc_speed(maxmult);
 	lowest_speed = calc_speed(minmult);
 	dprintk ("FSB:%dMHz  Lowest speed: %s   Highest speed:%s\n", fsb,
-		 print_speed(lowest_speed/1000), 
+		 print_speed(lowest_speed/1000),
 		 print_speed(highest_speed/1000));
 
 	if (lowest_speed == highest_speed) {
@@ -498,7 +495,7 @@ static void __init longhaul_setup_voltagescaling(void)
 		maxvid.mV/1000, maxvid.mV%1000,
 		minvid.mV/1000, minvid.mV%1000,
 		numvscales);
-	
+
 	j = 0;
 	while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) {
 		speed = longhaul_table[j].frequency;
arch/i386/kernel/mpparse.c +2 -2
index 49bff35..4f5983c 100644
@@ -1057,7 +1057,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
 	static int		gsi_to_irq[MAX_GSI_NUM];
 
 	/* Don't set up the ACPI SCI because it's already set up */
-	if (acpi_fadt.sci_int == gsi)
+	if (acpi_gbl_FADT.sci_interrupt == gsi)
 		return gsi;
 
 	ioapic = mp_find_ioapic(gsi);
@@ -1114,7 +1114,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
 			/*
 			 * Don't assign IRQ used by ACPI SCI
 			 */
-			if (gsi == acpi_fadt.sci_int)
+			if (gsi == acpi_gbl_FADT.sci_interrupt)
 				gsi = pci_irq++;
 			gsi_to_irq[irq] = gsi;
 		} else {
arch/ia64/kernel/acpi.c +3 -3
index aa6f967..d37fb8e 100644
@@ -617,7 +617,7 @@ EXPORT_SYMBOL(acpi_unregister_gsi);
 static int __init acpi_parse_fadt(unsigned long phys_addr, unsigned long size)
 {
 	struct acpi_table_header *fadt_header;
-	struct fadt_descriptor *fadt;
+	struct acpi_table_fadt *fadt;
 
 	if (!phys_addr || !size)
 		return -EINVAL;
@@ -626,9 +626,9 @@ static int __init acpi_parse_fadt(unsigned long phys_addr, unsigned long size)
 	if (fadt_header->revision != 3)
 		return -ENODEV;	/* Only deal with ACPI 2.0 FADT */
 
-	fadt = (struct fadt_descriptor *)fadt_header;
+	fadt = (struct acpi_table_fadt *)fadt_header;
 
-	acpi_register_gsi(fadt->sci_int, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW);
+	acpi_register_gsi(fadt->sci_interrupt, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW);
 	return 0;
 }
 
arch/x86_64/kernel/genapic.c +2 -2
index b007433..0b3603a 100644
@@ -58,8 +58,8 @@ void __init clustered_apic_check(void)
 	 * Some x86_64 machines use physical APIC mode regardless of how many
 	 * procs/clusters are present (x86_64 ES7000 is an example).
 	 */
-	if (acpi_fadt.revision > FADT2_REVISION_ID)
-		if (acpi_fadt.force_apic_physical_destination_mode) {
+	if (acpi_gbl_FADT.header.revision > FADT2_REVISION_ID)
+		if (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL) {
 			genapic = &apic_cluster;
 			goto print;
 		}
arch/x86_64/kernel/mpparse.c +1 -1
index 0807256..50dd8be 100644
@@ -798,7 +798,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
 		return gsi;
 
 	/* Don't set up the ACPI SCI because it's already set up */
-	if (acpi_fadt.sci_int == gsi)
+	if (acpi_gbl_FADT.sci_interrupt == gsi)
 		return gsi;
 
 	ioapic = mp_find_ioapic(gsi);
drivers/acpi/bus.c +3 -3
index cb807c4..324b099 100644
@@ -627,15 +627,15 @@ void __init acpi_early_init(void)
 			acpi_sci_flags.trigger = 3;
 
 		/* Set PIC-mode SCI trigger type */
-		acpi_pic_sci_set_trigger(acpi_fadt.sci_int,
+		acpi_pic_sci_set_trigger(acpi_gbl_FADT.sci_interrupt,
 					 acpi_sci_flags.trigger);
 	} else {
 		extern int acpi_sci_override_gsi;
 		/*
-		 * now that acpi_fadt is initialized,
+		 * now that acpi_gbl_FADT is initialized,
 		 * update it with result from INT_SRC_OVR parsing
 		 */
-		acpi_fadt.sci_int = acpi_sci_override_gsi;
+		acpi_gbl_FADT.sci_interrupt = acpi_sci_override_gsi;
 	}
 #endif
 
drivers/acpi/osl.c +1 -1
index c1c2100..a28f5b8 100644
@@ -245,7 +245,7 @@ acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler,
 	 * FADT. It may not be the same if an interrupt source override exists
 	 * for the SCI.
 	 */
-	gsi = acpi_fadt.sci_int;
+	gsi = acpi_gbl_FADT.sci_interrupt;
 	if (acpi_gsi_to_irq(gsi, &irq) < 0) {
 		printk(KERN_ERR PREFIX "SCI (ACPI GSI %d) not registered\n",
 		       gsi);
drivers/acpi/pci_link.c +1 -1
index 662e429..0f683c8 100644
@@ -513,7 +513,7 @@ int __init acpi_irq_penalty_init(void)
 		}
 	}
 	/* Add a penalty for the SCI */
-	acpi_irq_penalty[acpi_fadt.sci_int] += PIRQ_PENALTY_PCI_USING;
+	acpi_irq_penalty[acpi_gbl_FADT.sci_interrupt] += PIRQ_PENALTY_PCI_USING;
 
 	return 0;
 }
drivers/acpi/processor_core.c +3 -3
index 4d552f7..1b6bc66 100644
@@ -431,7 +431,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
 	 * Check to see if we have bus mastering arbitration control.  This
 	 * is required for proper C3 usage (to maintain cache coherency).
 	 */
-	if (acpi_fadt.pm2_control_block && acpi_fadt.pm2_control_length) {
+	if (acpi_gbl_FADT.pm2_control_block && acpi_gbl_FADT.pm2_control_length) {
 		pr->flags.bm_control = 1;
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 				  "Bus mastering arbitration control present\n"));
@@ -490,8 +490,8 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
 			    object.processor.pblk_length);
 	else {
 		pr->throttling.address = object.processor.pblk_address;
-		pr->throttling.duty_offset = acpi_fadt.duty_offset;
-		pr->throttling.duty_width = acpi_fadt.duty_width;
+		pr->throttling.duty_offset = acpi_gbl_FADT.duty_offset;
+		pr->throttling.duty_width = acpi_gbl_FADT.duty_width;
 
 		pr->pblk = object.processor.pblk_address;
 
drivers/acpi/processor_idle.c +14 -14
index db21dda..1d633f7 100644
@@ -160,7 +160,7 @@ static inline u32 ticks_elapsed(u32 t1, u32 t2)
 {
 	if (t2 >= t1)
 		return (t2 - t1);
-	else if (!(acpi_fadt.flags & ACPI_FADT_32BIT_TIMER))
+	else if (!(acpi_gbl_FADT.flags & ACPI_FADT_32BIT_TIMER))
 		return (((0x00FFFFFF - t1) + t2) & 0x00FFFFFF);
 	else
 		return ((0xFFFFFFFF - t1) + t2);
@@ -234,7 +234,7 @@ static void acpi_cstate_enter(struct acpi_processor_cx *cstate)
 		/* Dummy wait op - must do something useless after P_LVL2 read
 		   because chipsets cannot guarantee that STPCLK# signal
 		   gets asserted in time to freeze execution properly. */
-		unused = inl(acpi_fadt.xpm_timer_block.address);
+		unused = inl(acpi_gbl_FADT.xpm_timer_block.address);
 	}
 }
 
@@ -334,7 +334,7 @@ static void acpi_processor_idle(void)
 	 * detection phase, to work cleanly with logical CPU hotplug.
 	 */
 	if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && 
-	    !pr->flags.has_cst && !(acpi_fadt.flags & ACPI_FADT_C2_MP_SUPPORTED))
+	    !pr->flags.has_cst && !(acpi_gbl_FADT.flags & ACPI_FADT_C2_MP_SUPPORTED))
 		cx = &pr->power.states[ACPI_STATE_C1];
 #endif
 
@@ -380,11 +380,11 @@ static void acpi_processor_idle(void)
 
 	case ACPI_STATE_C2:
 		/* Get start time (ticks) */
-		t1 = inl(acpi_fadt.xpm_timer_block.address);
+		t1 = inl(acpi_gbl_FADT.xpm_timer_block.address);
 		/* Invoke C2 */
 		acpi_cstate_enter(cx);
 		/* Get end time (ticks) */
-		t2 = inl(acpi_fadt.xpm_timer_block.address);
+		t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
 
 #ifdef CONFIG_GENERIC_TIME
 		/* TSC halts in C2, so notify users */
@@ -415,11 +415,11 @@ static void acpi_processor_idle(void)
 		}
 
 		/* Get start time (ticks) */
-		t1 = inl(acpi_fadt.xpm_timer_block.address);
+		t1 = inl(acpi_gbl_FADT.xpm_timer_block.address);
 		/* Invoke C3 */
 		acpi_cstate_enter(cx);
 		/* Get end time (ticks) */
-		t2 = inl(acpi_fadt.xpm_timer_block.address);
+		t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
 		if (pr->flags.bm_check) {
 			/* Enable bus master arbitration */
 			atomic_dec(&c3_cpu_count);
@@ -451,7 +451,7 @@ static void acpi_processor_idle(void)
 #ifdef CONFIG_HOTPLUG_CPU
 	/* Don't do promotion/demotion */
 	if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) &&
-	    !pr->flags.has_cst && !(acpi_fadt.flags & ACPI_FADT_C2_MP_SUPPORTED)) {
+	    !pr->flags.has_cst && !(acpi_gbl_FADT.flags & ACPI_FADT_C2_MP_SUPPORTED)) {
 		next_state = cx;
 		goto end;
 	}
@@ -622,7 +622,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
 	 * an SMP system. 
 	 */
 	if ((num_online_cpus() > 1) &&
-	    !(acpi_fadt.flags & ACPI_FADT_C2_MP_SUPPORTED))
+	    !(acpi_gbl_FADT.flags & ACPI_FADT_C2_MP_SUPPORTED))
 		return -ENODEV;
 #endif
 
@@ -631,8 +631,8 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
 	pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5;
 
 	/* determine latencies from FADT */
-	pr->power.states[ACPI_STATE_C2].latency = acpi_fadt.C2latency;
-	pr->power.states[ACPI_STATE_C3].latency = acpi_fadt.C3latency;
+	pr->power.states[ACPI_STATE_C2].latency = acpi_gbl_FADT.C2latency;
+	pr->power.states[ACPI_STATE_C3].latency = acpi_gbl_FADT.C3latency;
 
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 			  "lvl2[0x%08x] lvl3[0x%08x]\n",
@@ -878,7 +878,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
 		 * WBINVD should be set in fadt, for C3 state to be
 		 * supported on when bm_check is not required.
 		 */
-		if (!(acpi_fadt.flags & ACPI_FADT_WBINVD)) {
+		if (!(acpi_gbl_FADT.flags & ACPI_FADT_WBINVD)) {
 			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 					  "Cache invalidation should work properly"
 					  " for C3 to be enabled on SMP systems\n"));
@@ -1158,9 +1158,9 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
 	if (!pr)
 		return -EINVAL;
 
-	if (acpi_fadt.cst_control && !nocst) {
+	if (acpi_gbl_FADT.cst_control && !nocst) {
 		status =
-		    acpi_os_write_port(acpi_fadt.smi_command, acpi_fadt.cst_control, 8);
+		    acpi_os_write_port(acpi_gbl_FADT.smi_command, acpi_gbl_FADT.cst_control, 8);
 		if (ACPI_FAILURE(status)) {
 			ACPI_EXCEPTION((AE_INFO, status,
 					"Notifying BIOS of _CST ability failed"));
drivers/acpi/processor_perflib.c +6 -6
index aabb988..058f13c 100644
@@ -353,7 +353,7 @@ int acpi_processor_notify_smm(struct module *calling_module)
 	is_done = -EIO;
 
 	/* Can't write pstate_control to smi_command if either value is zero */
-	if ((!acpi_fadt.smi_command) || (!acpi_fadt.pstate_control)) {
+	if ((!acpi_gbl_FADT.smi_command) || (!acpi_gbl_FADT.pstate_control)) {
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No SMI port or pstate_control\n"));
 		module_put(calling_module);
 		return 0;
@@ -361,15 +361,15 @@ int acpi_processor_notify_smm(struct module *calling_module)
 
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 			  "Writing pstate_control [0x%x] to smi_command [0x%x]\n",
-			  acpi_fadt.pstate_control, acpi_fadt.smi_command));
+			  acpi_gbl_FADT.pstate_control, acpi_gbl_FADT.smi_command));
 
-	status = acpi_os_write_port(acpi_fadt.smi_command,
-				    (u32) acpi_fadt.pstate_control, 8);
+	status = acpi_os_write_port(acpi_gbl_FADT.smi_command,
+				    (u32) acpi_gbl_FADT.pstate_control, 8);
 	if (ACPI_FAILURE(status)) {
 		ACPI_EXCEPTION((AE_INFO, status,
 				"Failed to write pstate_control [0x%x] to "
-				"smi_command [0x%x]", acpi_fadt.pstate_control,
-				acpi_fadt.smi_command));
+				"smi_command [0x%x]", acpi_gbl_FADT.pstate_control,
+				acpi_gbl_FADT.smi_command));
 		module_put(calling_module);
 		return status;
 	}
drivers/acpi/processor_throttling.c +2 -2
index 0ec7dcd..89dff36 100644
@@ -125,7 +125,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state)
 		/* Used to clear all duty_value bits */
 		duty_mask = pr->throttling.state_count - 1;
 
-		duty_mask <<= acpi_fadt.duty_offset;
+		duty_mask <<= acpi_gbl_FADT.duty_offset;
 		duty_mask = ~duty_mask;
 	}
 
@@ -208,7 +208,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
 		return 0;
 	}
 
-	pr->throttling.state_count = 1 << acpi_fadt.duty_width;
+	pr->throttling.state_count = 1 << acpi_gbl_FADT.duty_width;
 
 	/*
 	 * Compute state values. Note that throttling displays a linear power/
drivers/acpi/scan.c +2 -2
index b1692b1..0de4586 100644
@@ -1333,7 +1333,7 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
 	/*
 	 * Enumerate all fixed-feature devices.
 	 */
-	if ((acpi_fadt.flags & ACPI_FADT_POWER_BUTTON) == 0) {
+	if ((acpi_gbl_FADT.flags & ACPI_FADT_POWER_BUTTON) == 0) {
 		result = acpi_add_single_object(&device, acpi_root,
 						NULL,
 						ACPI_BUS_TYPE_POWER_BUTTON);
@@ -1341,7 +1341,7 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
 			result = acpi_start_single_object(device);
 	}
 
-	if ((acpi_fadt.flags & ACPI_FADT_SLEEP_BUTTON) == 0) {
+	if ((acpi_gbl_FADT.flags & ACPI_FADT_SLEEP_BUTTON) == 0) {
 		result = acpi_add_single_object(&device, acpi_root,
 						NULL,
 						ACPI_BUS_TYPE_SLEEP_BUTTON);
include/acpi/acglobal.h +0 -1
index 8dab29a..d1a5363 100644
@@ -144,7 +144,6 @@ ACPI_EXTERN u32 acpi_gbl_trace_flags;
  */
 ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list;
 ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT;
-#define acpi_fadt acpi_gbl_FADT
 extern acpi_native_uint acpi_gbl_permanent_mmap;
 
 /* These addresses are calculated from FADT address values */
include/acpi/actbl.h +0 -3
index 6f63b3b..c5d5ec3 100644
@@ -236,9 +236,6 @@ struct acpi_table_fadt {
 	struct acpi_generic_address xgpe1_block;	/* 64-bit Extended General Purpose Event 1 Reg Blk address */
 };
 
-#define fadt_descriptor acpi_table_fadt
-#define sci_int sci_interrupt
-
 /* FADT flags */
 
 #define ACPI_FADT_WBINVD            (1)	/* 00: The wbinvd instruction works properly */
include/acpi/actbl1.h +0 -10
index 3156d1a..b7178eb 100644
@@ -669,16 +669,6 @@ struct acpi_srat_mem_affinity {
 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1)	/* 01: Memory region is hot pluggable */
 #define ACPI_SRAT_MEM_NON_VOLATILE  (1<<2)	/* 02: Memory region is non-volatile */
 
-/* Memory types */
-
-enum acpi_address_range_id {
-	ACPI_ADDRESS_RANGE_MEMORY = 1,
-	ACPI_ADDRESS_RANGE_RESERVED = 2,
-	ACPI_ADDRESS_RANGE_ACPI = 3,
-	ACPI_ADDRESS_RANGE_NVS = 4,
-	ACPI_ADDRESS_RANGE_COUNT = 5
-};
-
 /*******************************************************************************
  *
  * TCPA - Trusted Computing Platform Alliance table
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#103 lore raw

PATCH 101/140 ACPICA: Remove duplicate table definitions.

From: Alexey Starikovskiy <[email protected]>

---
 arch/i386/kernel/acpi/boot.c |   29 ++++++++++----------
 drivers/acpi/ec.c            |    8 +++---
 include/acpi/actbl.h         |    5 +--
 include/linux/acpi.h         |   59 ------------------------------------------
 4 files changed, 20 insertions(+), 81 deletions(-)
arch/i386/kernel/acpi/boot.c +14 -15
index cbbcf9c..389a8a5 100644
@@ -204,9 +204,9 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
 		return -ENOMEM;
 	}
 
-	memcpy(pci_mmcfg_config, &mcfg->config, config_size);
+	memcpy(pci_mmcfg_config, &mcfg[1], config_size);
 	for (i = 0; i < pci_mmcfg_config_num; ++i) {
-		if (mcfg->config[i].base_reserved) {
+		if (pci_mmcfg_config[i].base_reserved) {
 			printk(KERN_ERR PREFIX
 			       "MMCONFIG not in low 4GB of memory\n");
 			kfree(pci_mmcfg_config);
@@ -233,11 +233,11 @@ static int __init acpi_parse_madt(struct acpi_table_header *header)
 		return -ENODEV;
 	}
 
-	if (madt->lapic_address) {
-		acpi_lapic_addr = (u64) madt->lapic_address;
+	if (madt->address) {
+		acpi_lapic_addr = (u64) madt->address;
 
 		printk(KERN_DEBUG PREFIX "Local APIC address 0x%08x\n",
-		       madt->lapic_address);
+		       madt->address);
 	}
 
 	acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id);
@@ -654,7 +654,7 @@ static int __init acpi_parse_hpet(struct acpi_table_header *header)
 		return -ENODEV;
 	}
 
-	if (hpet_tbl->addr.space_id != ACPI_SPACE_MEM) {
+	if (hpet_tbl->address.space_id != ACPI_SPACE_MEM) {
 		printk(KERN_WARNING PREFIX "HPET timers must be located in "
 		       "memory.\n");
 		return -1;
@@ -667,29 +667,28 @@ static int __init acpi_parse_hpet(struct acpi_table_header *header)
 		hpet_res->name = (void *)&hpet_res[1];
 		hpet_res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 		snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE,
-			 "HPET %u", hpet_tbl->number);
+			 "HPET %u", hpet_tbl->sequence);
 		hpet_res->end = (1 * 1024) - 1;
 	}
 
-#ifdef	CONFIG_X86_64
-	vxtime.hpet_address = hpet_tbl->addr.addrl |
-	    ((long)hpet_tbl->addr.addrh << 32);
+#ifdef CONFIG_X86_64
+	vxtime.hpet_address = hpet_tbl->address.address;
 
 	printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
-	       hpet_tbl->id, vxtime.hpet_address);
+		hpet_tbl->id, vxtime.hpet_address);
 
 	res_start = vxtime.hpet_address;
-#else				/* X86 */
+#else                          /* X86 */
 	{
 		extern unsigned long hpet_address;
 
-		hpet_address = hpet_tbl->addr.addrl;
+		hpet_address = hpet_tbl->address.address;
 		printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
-		       hpet_tbl->id, hpet_address);
+			hpet_tbl->id, hpet_address);
 
 		res_start = hpet_address;
 	}
-#endif				/* X86 */
+#endif                         /* X86 */
 
 	if (hpet_res) {
 		hpet_res->start = res_start;
drivers/acpi/ec.c +4 -4
index 7a1f2ba..710364e 100644
@@ -889,14 +889,14 @@ static int __init acpi_ec_get_real_ecdt(void)
 	if (acpi_ec_mode == EC_INTR) {
 		init_waitqueue_head(&ec_ecdt->wait);
 	}
-	ec_ecdt->command_addr = ecdt_ptr->ec_control.address;
-	ec_ecdt->data_addr = ecdt_ptr->ec_data.address;
-	ec_ecdt->gpe = ecdt_ptr->gpe_bit;
+	ec_ecdt->command_addr = ecdt_ptr->control.address;
+	ec_ecdt->data_addr = ecdt_ptr->data.address;
+	ec_ecdt->gpe = ecdt_ptr->gpe;
 	/* use the GL just to be safe */
 	ec_ecdt->global_lock = TRUE;
 	ec_ecdt->uid = ecdt_ptr->uid;
 
-	status = acpi_get_handle(NULL, ecdt_ptr->ec_id, &ec_ecdt->handle);
+	status = acpi_get_handle(NULL, ecdt_ptr->id, &ec_ecdt->handle);
 	if (ACPI_FAILURE(status)) {
 		goto error;
 	}
include/acpi/actbl.h +2 -3
index c5d5ec3..d6af14e 100644
@@ -289,8 +289,7 @@ enum acpi_prefered_pm_profiles {
 /*
  * Get the remaining ACPI tables
  */
-/*
- Don't include any new tables definitions for now.
+
 #include <acpi/actbl1.h>
-*/
+
 #endif				/* __ACTBL_H__ */
include/linux/acpi.h +0 -59

89 lines not on this page · raw message

Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#104 lore raw

PATCH 102/140 ACPICA: Remove duplicate table definitions (non-conflicting)

From: Alexey Starikovskiy <[email protected]>

---
 arch/i386/kernel/acpi/boot.c |  156 ++++++++++++++++++--------------------
 arch/ia64/kernel/acpi.c      |  172 +++++++++++++++++++++---------------------
 drivers/acpi/bus.c           |   11 ++-
 drivers/acpi/tables.c        |  109 +++++++++++++-------------
 include/linux/acpi.h         |  106 +-------------------------
 5 files changed, 224 insertions(+), 330 deletions(-)
arch/i386/kernel/acpi/boot.c +74 -82
index 389a8a5..5fafbac 100644
@@ -66,7 +66,7 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return
 
 #define BAD_MADT_ENTRY(entry, end) (					    \
 		(!entry) || (unsigned long)entry + sizeof(*entry) > end ||  \
-		((acpi_table_entry_header *)entry)->length < sizeof(*entry))
+		((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
 
 #define PREFIX			"ACPI: "
 
@@ -79,7 +79,7 @@ int acpi_ioapic;
 int acpi_strict;
 EXPORT_SYMBOL(acpi_strict);
 
-acpi_interrupt_flags acpi_sci_flags __initdata;
+u8 acpi_sci_flags __initdata;
 int acpi_sci_override_gsi __initdata;
 int acpi_skip_timer_override __initdata;
 int acpi_use_timer_override __initdata;
@@ -246,11 +246,11 @@ static int __init acpi_parse_madt(struct acpi_table_header *header)
 }
 
 static int __init
-acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end)
+acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end)
 {
-	struct acpi_table_lapic *processor = NULL;
+	struct acpi_madt_local_apic *processor = NULL;
 
-	processor = (struct acpi_table_lapic *)header;
+	processor = (struct acpi_madt_local_apic *)header;
 
 	if (BAD_MADT_ENTRY(processor, end))
 		return -EINVAL;
@@ -258,8 +258,8 @@ acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end)
 	acpi_table_print_madt_entry(header);
 
 	/* Record local apic id only when enabled */
-	if (processor->flags.enabled)
-		x86_acpiid_to_apicid[processor->acpi_id] = processor->id;
+	if (processor->lapic_flags & ACPI_MADT_ENABLED)
+		x86_acpiid_to_apicid[processor->processor_id] = processor->id;
 
 	/*
 	 * We need to register disabled CPU as well to permit
@@ -269,18 +269,18 @@ acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end)
 	 * when we use CPU hotplug.
 	 */
 	mp_register_lapic(processor->id,	/* APIC ID */
-			  processor->flags.enabled);	/* Enabled? */
+			  processor->lapic_flags & ACPI_MADT_ENABLED);	/* Enabled? */
 
 	return 0;
 }
 
 static int __init
-acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header,
+acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header,
 			  const unsigned long end)
 {
-	struct acpi_table_lapic_addr_ovr *lapic_addr_ovr = NULL;
+	struct acpi_madt_local_apic_override *lapic_addr_ovr = NULL;
 
-	lapic_addr_ovr = (struct acpi_table_lapic_addr_ovr *)header;
+	lapic_addr_ovr = (struct acpi_madt_local_apic_override *)header;
 
 	if (BAD_MADT_ENTRY(lapic_addr_ovr, end))
 		return -EINVAL;
@@ -291,11 +291,11 @@ acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header,
 }
 
 static int __init
-acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end)
+acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long end)
 {
-	struct acpi_table_lapic_nmi *lapic_nmi = NULL;
+	struct acpi_madt_local_apic_nmi *lapic_nmi = NULL;
 
-	lapic_nmi = (struct acpi_table_lapic_nmi *)header;
+	lapic_nmi = (struct acpi_madt_local_apic_nmi *)header;
 
 	if (BAD_MADT_ENTRY(lapic_nmi, end))
 		return -EINVAL;
@@ -313,11 +313,11 @@ acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end)
 #ifdef CONFIG_X86_IO_APIC
 
 static int __init
-acpi_parse_ioapic(acpi_table_entry_header * header, const unsigned long end)
+acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end)
 {
-	struct acpi_table_ioapic *ioapic = NULL;
+	struct acpi_madt_io_apic *ioapic = NULL;
 
-	ioapic = (struct acpi_table_ioapic *)header;
+	ioapic = (struct acpi_madt_io_apic *)header;
 
 	if (BAD_MADT_ENTRY(ioapic, end))
 		return -EINVAL;
@@ -342,11 +342,11 @@ static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
 		polarity = 3;
 
 	/* Command-line over-ride via acpi_sci= */
-	if (acpi_sci_flags.trigger)
-		trigger = acpi_sci_flags.trigger;
+	if (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK)
+		trigger = (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK) >> 2;
 
-	if (acpi_sci_flags.polarity)
-		polarity = acpi_sci_flags.polarity;
+	if (acpi_sci_flags & ACPI_MADT_POLARITY_MASK)
+		polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK;
 
 	/*
 	 * mp_config_acpi_legacy_irqs() already setup IRQs < 16
@@ -364,44 +364,45 @@ static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
 }
 
 static int __init
-acpi_parse_int_src_ovr(acpi_table_entry_header * header,
+acpi_parse_int_src_ovr(struct acpi_subtable_header * header,
 		       const unsigned long end)
 {
-	struct acpi_table_int_src_ovr *intsrc = NULL;
+	struct acpi_madt_interrupt_override *intsrc = NULL;
 
-	intsrc = (struct acpi_table_int_src_ovr *)header;
+	intsrc = (struct acpi_madt_interrupt_override *)header;
 
 	if (BAD_MADT_ENTRY(intsrc, end))
 		return -EINVAL;
 
 	acpi_table_print_madt_entry(header);
 
-	if (intsrc->bus_irq == acpi_gbl_FADT.sci_interrupt) {
+	if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) {
 		acpi_sci_ioapic_setup(intsrc->global_irq,
-				      intsrc->flags.polarity,
-				      intsrc->flags.trigger);
+				      intsrc->inti_flags & ACPI_MADT_POLARITY_MASK,
+				      (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2);
 		return 0;
 	}
 
 	if (acpi_skip_timer_override &&
-	    intsrc->bus_irq == 0 && intsrc->global_irq == 2) {
+	    intsrc->source_irq == 0 && intsrc->global_irq == 2) {
 		printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
 		return 0;
 	}
 
-	mp_override_legacy_irq(intsrc->bus_irq,
-			       intsrc->flags.polarity,
-			       intsrc->flags.trigger, intsrc->global_irq);
+	mp_override_legacy_irq(intsrc->source_irq,
+				intsrc->inti_flags & ACPI_MADT_POLARITY_MASK,
+				(intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2,
+				intsrc->global_irq);
 
 	return 0;
 }
 
 static int __init
-acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end)
+acpi_parse_nmi_src(struct acpi_subtable_header * header, const unsigned long end)
 {
-	struct acpi_table_nmi_src *nmi_src = NULL;
+	struct acpi_madt_nmi_source *nmi_src = NULL;
 
-	nmi_src = (struct acpi_table_nmi_src *)header;
+	nmi_src = (struct acpi_madt_nmi_source *)header;
 
 	if (BAD_MADT_ENTRY(nmi_src, end))
 		return -EINVAL;
@@ -417,7 +418,7 @@ acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end)
 
 /*
  * acpi_pic_sci_set_trigger()
- * 
+ *
  * use ELCR to set PIC-mode trigger type for SCI
  *
  * If a PIC-mode SCI is not recognized or gives spurious IRQ7's
@@ -511,7 +512,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
 {
 	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 	union acpi_object *obj;
-	struct acpi_table_lapic *lapic;
+	struct acpi_madt_local_apic *lapic;
 	cpumask_t tmp_map, new_map;
 	u8 physid;
 	int cpu;
@@ -529,10 +530,10 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
 		return -EINVAL;
 	}
 
-	lapic = (struct acpi_table_lapic *)obj->buffer.pointer;
+	lapic = (struct acpi_madt_local_apic *)obj->buffer.pointer;
 
-	if ((lapic->header.type != ACPI_MADT_LAPIC) ||
-	    (!lapic->flags.enabled)) {
+	if (lapic->header.type != ACPI_MADT_TYPE_LOCAL_APIC ||
+	    !(lapic->lapic_flags & ACPI_MADT_ENABLED)) {
 		kfree(buffer.pointer);
 		return -EINVAL;
 	}
@@ -544,7 +545,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
 	buffer.pointer = NULL;
 
 	tmp_map = cpu_present_map;
-	mp_register_lapic(physid, lapic->flags.enabled);
+	mp_register_lapic(physid, lapic->lapic_flags & ACPI_MADT_ENABLED);
 
 	/*
 	 * If mp_register_lapic successfully generates a new logical cpu
@@ -619,36 +620,30 @@ acpi_scan_rsdp(unsigned long start, unsigned long length)
 	return 0;
 }
 
-static int __init acpi_parse_sbf(struct acpi_table_header *header)
+static int __init acpi_parse_sbf(struct acpi_table_header *table)
 {
-	struct acpi_table_sbf *sb;
-
-	if (!header)
-		return -EINVAL;
+	struct acpi_table_boot *sb;
 
-	sb = (struct acpi_table_sbf *)header;
+	sb = (struct acpi_table_boot *)table;
 	if (!sb) {
 		printk(KERN_WARNING PREFIX "Unable to map SBF\n");
 		return -ENODEV;
 	}
 
-	sbf_port = sb->sbf_cmos;	/* Save CMOS port */
+	sbf_port = sb->cmos_index;	/* Save CMOS port */
 
 	return 0;
 }
 
 #ifdef CONFIG_HPET_TIMER
 
-static int __init acpi_parse_hpet(struct acpi_table_header *header)
+static int __init acpi_parse_hpet(struct acpi_table_header *table)
 {
 	struct acpi_table_hpet *hpet_tbl;
 	struct resource *hpet_res;
 	resource_size_t res_start;
 
-	if (!header)
-		return -EINVAL;
-
-	hpet_tbl = (struct acpi_table_hpet *)header;
+	hpet_tbl = (struct acpi_table_hpet *)table;
 	if (!hpet_tbl) {
 		printk(KERN_WARNING PREFIX "Unable to map HPET\n");
 		return -ENODEV;
@@ -706,35 +701,28 @@ static int __init acpi_parse_hpet(struct acpi_table_header *header)
 extern u32 pmtmr_ioport;
 #endif
 
-static int __init acpi_parse_fadt(struct acpi_table_header *header)
+static int __init acpi_parse_fadt(struct acpi_table_header *table)
 {
-	struct acpi_table_fadt *fadt = NULL;
-
-	fadt = (struct acpi_table_fadt *)header;
-	if (!fadt) {
-		printk(KERN_WARNING PREFIX "Unable to map FADT\n");
-		return 0;
-	}
 
 #ifdef CONFIG_X86_PM_TIMER
 	/* detect the location of the ACPI PM Timer */
-	if (fadt->header.revision >= FADT2_REVISION_ID) {
+	if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) {
 		/* FADT rev. 2 */
-		if (fadt->xpm_timer_block.space_id !=
+		if (acpi_gbl_FADT.xpm_timer_block.space_id !=
 		    ACPI_ADR_SPACE_SYSTEM_IO)
 			return 0;
 
-		pmtmr_ioport = fadt->xpm_timer_block.address;
+		pmtmr_ioport = acpi_gbl_FADT.xpm_timer_block.address;
 		/*
 		 * "X" fields are optional extensions to the original V1.0
 		 * fields, so we must selectively expand V1.0 fields if the
 		 * corresponding X field is zero.
 	 	 */
 		if (!pmtmr_ioport)
-			pmtmr_ioport = fadt->pm_timer_block;
+			pmtmr_ioport = acpi_gbl_FADT.pm_timer_block;
 	} else {
 		/* FADT rev. 1 */
-		pmtmr_ioport = fadt->pm_timer_block;
+		pmtmr_ioport = acpi_gbl_FADT.pm_timer_block;
 	}
 	if (pmtmr_ioport)
 		printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n",
@@ -776,13 +764,13 @@ static int __init acpi_parse_madt_lapic_entries(void)
 	if (!cpu_has_apic)
 		return -ENODEV;
 
-	/* 
+	/*
 	 * Note that the LAPIC address is obtained from the MADT (32-bit value)
 	 * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value).
 	 */
 
 	count =
-	    acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR,
+	    acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE,
 				  acpi_parse_lapic_addr_ovr, 0);
 	if (count < 0) {
 		printk(KERN_ERR PREFIX
@@ -792,7 +780,7 @@ static int __init acpi_parse_madt_lapic_entries(void)
 
 	mp_register_lapic_address(acpi_lapic_addr);
 
-	count = acpi_table_parse_madt(ACPI_MADT_LAPIC, acpi_parse_lapic,
+	count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, acpi_parse_lapic,
 				      MAX_APICS);
 	if (!count) {
 		printk(KERN_ERR PREFIX "No LAPIC entries present\n");
@@ -805,7 +793,7 @@ static int __init acpi_parse_madt_lapic_entries(void)
 	}
 
 	count =
-	    acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0);
+	    acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0);
 	if (count < 0) {
 		printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
 		/* TBD: Cleanup to allow fallback to MPS */
@@ -834,7 +822,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
 		return -ENODEV;
 	}
 
-	if (!cpu_has_apic) 
+	if (!cpu_has_apic)
 		return -ENODEV;
 
 	/*
@@ -847,7 +835,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
 	}
 
 	count =
-	    acpi_table_parse_madt(ACPI_MADT_IOAPIC, acpi_parse_ioapic,
+	    acpi_table_parse_madt(ACPI_MADT_TYPE_IO_APIC, acpi_parse_ioapic,
 				  MAX_IO_APICS);
 	if (!count) {
 		printk(KERN_ERR PREFIX "No IOAPIC entries present\n");
@@ -858,7 +846,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
 	}
 
 	count =
-	    acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr,
+	    acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE, acpi_parse_int_src_ovr,
 				  NR_IRQ_VECTORS);
 	if (count < 0) {
 		printk(KERN_ERR PREFIX
@@ -878,7 +866,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
 	mp_config_acpi_legacy_irqs();
 
 	count =
-	    acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src,
+	    acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, acpi_parse_nmi_src,
 				  NR_IRQ_VECTORS);
 	if (count < 0) {
 		printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n");
@@ -900,7 +888,7 @@ static void __init acpi_process_madt(void)
 #ifdef CONFIG_X86_LOCAL_APIC
 	int count, error;
 
-	count = acpi_table_parse("APIC", acpi_parse_madt);
+	count = acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt);
 	if (count >= 1) {
 
 		/*
@@ -1187,7 +1175,7 @@ int __init acpi_boot_table_init(void)
 	if (acpi_disabled && !acpi_ht)
 		return 1;
 
-	/* 
+	/*
 	 * Initialize the ACPI boot-time table parser.
 	 */
 	error = acpi_table_init();
@@ -1196,7 +1184,7 @@ int __init acpi_boot_table_init(void)
 		return error;
 	}
 
-	acpi_table_parse("BOOT", acpi_parse_sbf);
+	acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf);
 
 	/*
 	 * blacklist may disable ACPI entirely
@@ -1224,7 +1212,7 @@ int __init acpi_boot_init(void)
 	if (acpi_disabled && !acpi_ht)
 		return 1;
 
-	acpi_table_parse("BOOT", acpi_parse_sbf);
+	acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf);
 
 	/*
 	 * set sci_int and PM timer address
@@ -1236,7 +1224,7 @@ int __init acpi_boot_init(void)
 	 */
 	acpi_process_madt();
 
-	acpi_table_parse("HPET", acpi_parse_hpet);
+	acpi_table_parse(ACPI_SIG_HPET, acpi_parse_hpet);
 
 	return 0;
 }
@@ -1307,13 +1295,17 @@ static int __init setup_acpi_sci(char *s)
 	if (!s)
 		return -EINVAL;
 	if (!strcmp(s, "edge"))
-		acpi_sci_flags.trigger = 1;
+		acpi_sci_flags =  ACPI_MADT_TRIGGER_EDGE |
+			(acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK);
 	else if (!strcmp(s, "level"))
-		acpi_sci_flags.trigger = 3;
+		acpi_sci_flags = ACPI_MADT_TRIGGER_LEVEL |
+			(acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK);
 	else if (!strcmp(s, "high"))
-		acpi_sci_flags.polarity = 1;
+		acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_HIGH |
+			(acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK);
 	else if (!strcmp(s, "low"))
-		acpi_sci_flags.polarity = 3;
+		acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_LOW |
+			(acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK);
 	else
 		return -EINVAL;
 	return 0;
arch/ia64/kernel/acpi.c +86 -86

442 lines not on this page · raw message

drivers/acpi/bus.c +6 -5
index 324b099..15d677e 100644
@@ -620,15 +620,16 @@ void __init acpi_early_init(void)
 
 #ifdef CONFIG_X86
 	if (!acpi_ioapic) {
-		extern acpi_interrupt_flags acpi_sci_flags;
+		extern u8 acpi_sci_flags;
 
 		/* compatible (0) means level (3) */
-		if (acpi_sci_flags.trigger == 0)
-			acpi_sci_flags.trigger = 3;
-
+		if (!(acpi_sci_flags & ACPI_MADT_TRIGGER_MASK)) {
+			acpi_sci_flags &= ~ACPI_MADT_TRIGGER_MASK;
+			acpi_sci_flags |= ACPI_MADT_TRIGGER_LEVEL;
+		}
 		/* Set PIC-mode SCI trigger type */
 		acpi_pic_sci_set_trigger(acpi_gbl_FADT.sci_interrupt,
-					 acpi_sci_flags.trigger);
+					 (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK) >> 2);
 	} else {
 		extern int acpi_sci_override_gsi;
 		/*
drivers/acpi/tables.c +55 -54

229 lines not on this page · raw message

include/linux/acpi.h +3 -103

127 lines not on this page · raw message

Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#105 lore raw

PATCH 103/140 ACPICA: Remove duplicate table definitions (non-conflicting), cont

From: Alexey Starikovskiy <[email protected]>

---
 arch/i386/kernel/acpi/boot.c                |   18 ++---
 arch/i386/kernel/acpi/earlyquirk.c          |    2 +-
 arch/i386/pci/mmconfig.c                    |   24 +++---
 arch/x86_64/kernel/early-quirks.c           |    4 +-
 arch/x86_64/mm/srat.c                       |   48 ++++++-----
 arch/x86_64/pci/mmconfig.c                  |   29 +++---
 drivers/acpi/blacklist.c                    |    2 +-
 drivers/acpi/ec.c                           |    3 +-
 drivers/acpi/numa.c                         |   77 ++++++++---------
 drivers/char/ipmi/ipmi_si_intf.c            |   18 ++--
 drivers/char/tpm/tpm_bios.c                 |    8 +-
 drivers/firmware/pcdp.c                     |    2 +-
 drivers/pci/hotplug/acpiphp_glue.c          |   10 +-
 include/asm-i386/mach-es7000/mach_mpparse.h |   17 ++--
 include/linux/acpi.h                        |  123 ++-------------------------
 15 files changed, 135 insertions(+), 250 deletions(-)
arch/i386/kernel/acpi/boot.c +7 -11
index 5fafbac..2147511 100644
@@ -166,7 +166,7 @@ char *__acpi_map_table(unsigned long phys, unsigned long size)
 
 #ifdef CONFIG_PCI_MMCONFIG
 /* The physical address of the MMCONFIG aperture.  Set from ACPI tables. */
-struct acpi_table_mcfg_config *pci_mmcfg_config;
+struct acpi_mcfg_allocation *pci_mmcfg_config;
 int pci_mmcfg_config_num;
 
 int __init acpi_parse_mcfg(struct acpi_table_header *header)
@@ -179,17 +179,13 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
 		return -EINVAL;
 
 	mcfg = (struct acpi_table_mcfg *)header;
-	if (!mcfg) {
-		printk(KERN_WARNING PREFIX "Unable to map MCFG\n");
-		return -ENODEV;
-	}
 
 	/* how many config structures do we have */
 	pci_mmcfg_config_num = 0;
 	i = header->length - sizeof(struct acpi_table_mcfg);
-	while (i >= sizeof(struct acpi_table_mcfg_config)) {
+	while (i >= sizeof(struct acpi_mcfg_allocation)) {
 		++pci_mmcfg_config_num;
-		i -= sizeof(struct acpi_table_mcfg_config);
+		i -= sizeof(struct acpi_mcfg_allocation);
 	};
 	if (pci_mmcfg_config_num == 0) {
 		printk(KERN_ERR PREFIX "MMCONFIG has no entries\n");
@@ -206,7 +202,7 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
 
 	memcpy(pci_mmcfg_config, &mcfg[1], config_size);
 	for (i = 0; i < pci_mmcfg_config_num; ++i) {
-		if (pci_mmcfg_config[i].base_reserved) {
+		if (pci_mmcfg_config[i].address > 0xFFFFFFFF) {
 			printk(KERN_ERR PREFIX
 			       "MMCONFIG not in low 4GB of memory\n");
 			kfree(pci_mmcfg_config);
@@ -220,14 +216,14 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
 #endif				/* CONFIG_PCI_MMCONFIG */
 
 #ifdef CONFIG_X86_LOCAL_APIC
-static int __init acpi_parse_madt(struct acpi_table_header *header)
+static int __init acpi_parse_madt(struct acpi_table_header *table)
 {
 	struct acpi_table_madt *madt = NULL;
 
-	if (!header|| !cpu_has_apic)
+	if (!cpu_has_apic)
 		return -EINVAL;
 
-	madt = (struct acpi_table_madt *)header;
+	madt = (struct acpi_table_madt *)table;
 	if (!madt) {
 		printk(KERN_WARNING PREFIX "Unable to map MADT\n");
 		return -ENODEV;
arch/i386/kernel/acpi/earlyquirk.c +1 -1
index 4261c85..bf86f76 100644
@@ -30,7 +30,7 @@ static int __init check_bridge(int vendor, int device)
 	   is enabled. */
 	if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) {
 		nvidia_hpet_detected = 0;
-		acpi_table_parse("HPET", nvidia_hpet_check);
+		acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check);
 		if (nvidia_hpet_detected == 0) {
 			acpi_skip_timer_override = 1;
 			  printk(KERN_INFO "Nvidia board "
arch/i386/pci/mmconfig.c +12 -12
index 80522e3..5700220 100644
@@ -36,7 +36,7 @@ static DECLARE_BITMAP(fallback_slots, MAX_CHECK_BUS*32);
 static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
 {
 	int cfg_num = -1;
-	struct acpi_table_mcfg_config *cfg;
+	struct acpi_mcfg_allocation *cfg;
 
 	if (seg == 0 && bus < MAX_CHECK_BUS &&
 	    test_bit(PCI_SLOT(devfn) + 32*bus, fallback_slots))
@@ -48,11 +48,11 @@ static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
 			break;
 		}
 		cfg = &pci_mmcfg_config[cfg_num];
-		if (cfg->pci_segment_group_number != seg)
+		if (cfg->pci_segment != seg)
 			continue;
 		if ((cfg->start_bus_number <= bus) &&
 		    (cfg->end_bus_number >= bus))
-			return cfg->base_address;
+			return cfg->address;
 	}
 
 	/* Handle more broken MCFG tables on Asus etc.
@@ -60,9 +60,9 @@ static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
  	   this applies to all busses. */
 	cfg = &pci_mmcfg_config[0];
 	if (pci_mmcfg_config_num == 1 &&
-		cfg->pci_segment_group_number == 0 &&
+		cfg->pci_segment == 0 &&
 		(cfg->start_bus_number | cfg->end_bus_number) == 0)
-		return cfg->base_address;
+		return cfg->address;
 
 	/* Fall back to type 0 */
 	return 0;
@@ -125,7 +125,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
 	unsigned long flags;
 	u32 base;
 
-	if ((bus > 255) || (devfn > 255) || (reg > 4095)) 
+	if ((bus > 255) || (devfn > 255) || (reg > 4095))
 		return -EINVAL;
 
 	base = get_base_addr(seg, bus, devfn);
@@ -199,19 +199,19 @@ void __init pci_mmcfg_init(int type)
 	if ((pci_probe & PCI_PROBE_MMCONF) == 0)
 		return;
 
-	acpi_table_parse("MCFG", acpi_parse_mcfg);
+	acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg);
 	if ((pci_mmcfg_config_num == 0) ||
 	    (pci_mmcfg_config == NULL) ||
-	    (pci_mmcfg_config[0].base_address == 0))
+	    (pci_mmcfg_config[0].address == 0))
 		return;
 
 	/* Only do this check when type 1 works. If it doesn't work
 	   assume we run on a Mac and always use MCFG */
-	if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].base_address,
-			pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
+	if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].address,
+			pci_mmcfg_config[0].address + MMCONFIG_APER_MIN,
 			E820_RESERVED)) {
-		printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",
-				pci_mmcfg_config[0].base_address);
+		printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %lx is not E820-reserved\n",
+				(unsigned long)pci_mmcfg_config[0].address);
 		printk(KERN_ERR "PCI: Not using MMCONFIG.\n");
 		return;
 	}
arch/x86_64/kernel/early-quirks.c +2 -2
index 49802f1..bd30d13 100644
@@ -32,7 +32,7 @@ static void via_bugs(void)
 
 static int nvidia_hpet_detected __initdata;
 
-static int __init nvidia_hpet_check(unsigned long phys, unsigned long size)
+static int __init nvidia_hpet_check(struct acpi_table_header *header)
 {
 	nvidia_hpet_detected = 1;
 	return 0;
@@ -53,7 +53,7 @@ static void nvidia_bugs(void)
 		return;
 
 	nvidia_hpet_detected = 0;
-	acpi_table_parse(ACPI_HPET, nvidia_hpet_check);
+	acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check);
 	if (nvidia_hpet_detected == 0) {
 		acpi_skip_timer_override = 1;
 		printk(KERN_INFO "Nvidia board "
arch/x86_64/mm/srat.c +25 -23

122 lines not on this page · raw message

arch/x86_64/pci/mmconfig.c +15 -14
index f8b6b28..faabb6e 100644
@@ -1,6 +1,6 @@
 /*
  * mmconfig.c - Low-level direct PCI config space access via MMCONFIG
- * 
+ *
  * This is an 64bit optimized version that always keeps the full mmconfig
  * space mapped. This allows lockless config space operation.
  */
@@ -25,7 +25,7 @@ static DECLARE_BITMAP(fallback_slots, 32*MAX_CHECK_BUS);
 
 /* Static virtual mapping of the MMCONFIG aperture */
 struct mmcfg_virt {
-	struct acpi_table_mcfg_config *cfg;
+	struct acpi_mcfg_allocation *cfg;
 	char __iomem *virt;
 };
 static struct mmcfg_virt *pci_mmcfg_virt;
@@ -33,14 +33,14 @@ static struct mmcfg_virt *pci_mmcfg_virt;
 static char __iomem *get_virt(unsigned int seg, unsigned bus)
 {
 	int cfg_num = -1;
-	struct acpi_table_mcfg_config *cfg;
+	struct acpi_mcfg_allocation *cfg;
 
 	while (1) {
 		++cfg_num;
 		if (cfg_num >= pci_mmcfg_config_num)
 			break;
 		cfg = pci_mmcfg_virt[cfg_num].cfg;
-		if (cfg->pci_segment_group_number != seg)
+		if (cfg->pci_segment != seg)
 			continue;
 		if ((cfg->start_bus_number <= bus) &&
 		    (cfg->end_bus_number >= bus))
@@ -52,7 +52,7 @@ static char __iomem *get_virt(unsigned int seg, unsigned bus)
  	   this applies to all busses. */
 	cfg = &pci_mmcfg_config[0];
 	if (pci_mmcfg_config_num == 1 &&
-		cfg->pci_segment_group_number == 0 &&
+		cfg->pci_segment == 0 &&
 		(cfg->start_bus_number | cfg->end_bus_number) == 0)
 		return pci_mmcfg_virt[0].virt;
 
@@ -170,19 +170,19 @@ void __init pci_mmcfg_init(int type)
 	if ((pci_probe & PCI_PROBE_MMCONF) == 0)
 		return;
 
-	acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
+	acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg);
 	if ((pci_mmcfg_config_num == 0) ||
 	    (pci_mmcfg_config == NULL) ||
-	    (pci_mmcfg_config[0].base_address == 0))
+	    (pci_mmcfg_config[0].address == 0))
 		return;
 
 	/* Only do this check when type 1 works. If it doesn't work
            assume we run on a Mac and always use MCFG */
-	if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].base_address,
-			pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
+	if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].address,
+			pci_mmcfg_config[0].address + MMCONFIG_APER_MIN,
 			E820_RESERVED)) {
-		printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",
-				pci_mmcfg_config[0].base_address);
+		printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %lx is not E820-reserved\n",
+				(unsigned long)pci_mmcfg_config[0].address);
 		printk(KERN_ERR "PCI: Not using MMCONFIG.\n");
 		return;
 	}
@@ -194,15 +194,16 @@ void __init pci_mmcfg_init(int type)
 	}
 	for (i = 0; i < pci_mmcfg_config_num; ++i) {
 		pci_mmcfg_virt[i].cfg = &pci_mmcfg_config[i];
-		pci_mmcfg_virt[i].virt = ioremap_nocache(pci_mmcfg_config[i].base_address,
+		pci_mmcfg_virt[i].virt = ioremap_nocache(pci_mmcfg_config[i].address,
 							 MMCONFIG_APER_MAX);
 		if (!pci_mmcfg_virt[i].virt) {
 			printk(KERN_ERR "PCI: Cannot map mmconfig aperture for "
 					"segment %d\n",
-			       pci_mmcfg_config[i].pci_segment_group_number);
+				pci_mmcfg_config[i].pci_segment);
 			return;
 		}
-		printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address);
+		printk(KERN_INFO "PCI: Using MMCONFIG at %lx\n",
+			(unsigned long)pci_mmcfg_config[i].address);
 	}
 
 	unreachable_devices();
drivers/acpi/blacklist.c +1 -1
index bdc169b..c8f4cac 100644
@@ -79,7 +79,7 @@ static int __init blacklist_by_year(void)
 {
 	int year = dmi_get_year(DMI_BIOS_DATE);
 	/* Doesn't exist? Likely an old system */
-	if (year == -1) 
+	if (year == -1)
 		return 1;
 	/* 0? Likely a buggy new BIOS */
 	if (year == 0)
drivers/acpi/ec.c +2 -1
index 710364e..743ce27 100644
@@ -872,7 +872,8 @@ static int __init acpi_ec_get_real_ecdt(void)
 	acpi_status status;
 	struct acpi_table_ecdt *ecdt_ptr;
 
-	status = acpi_get_table("ECDT", 1, (struct acpi_table_header **)&ecdt_ptr);
+	status = acpi_get_table(ACPI_SIG_ECDT, 1,
+				(struct acpi_table_header **)&ecdt_ptr);
 	if (ACPI_FAILURE(status))
 		return -ENODEV;
 
drivers/acpi/numa.c +38 -39

170 lines not on this page · raw message

drivers/char/ipmi/ipmi_si_intf.c +8 -10
index f1afd26..a7b33d2 100644
@@ -1802,7 +1802,7 @@ static __devinit int try_init_acpi(struct SPMITable *spmi)
   	    return -ENODEV;
 	}
 
-	if (spmi->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
+	if (spmi->addr.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
 		addr_space = IPMI_MEM_ADDR_SPACE;
 	else
 		addr_space = IPMI_IO_ADDR_SPACE;
@@ -1848,19 +1848,19 @@ static __devinit int try_init_acpi(struct SPMITable *spmi)
 		info->irq_setup = NULL;
 	}
 
-	if (spmi->addr.register_bit_width) {
+	if (spmi->addr.bit_width) {
 		/* A (hopefully) properly formed register bit width. */
-		info->io.regspacing = spmi->addr.register_bit_width / 8;
+		info->io.regspacing = spmi->addr.bit_width / 8;
 	} else {
 		info->io.regspacing = DEFAULT_REGSPACING;
 	}
 	info->io.regsize = info->io.regspacing;
-	info->io.regshift = spmi->addr.register_bit_offset;
+	info->io.regshift = spmi->addr.bit_offset;
 
-	if (spmi->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
+	if (spmi->addr.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
 		info->io_setup = mem_setup;
 		info->io.addr_type = IPMI_IO_ADDR_SPACE;
-	} else if (spmi->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
+	} else if (spmi->addr.space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
 		info->io_setup = port_setup;
 		info->io.addr_type = IPMI_MEM_ADDR_SPACE;
 	} else {
@@ -1888,10 +1888,8 @@ static __devinit void acpi_find_bmc(void)
 		return;
 
 	for (i = 0; ; i++) {
-		status = acpi_get_firmware_table("SPMI", i+1,
-						 ACPI_LOGICAL_ADDRESSING,
-						 (struct acpi_table_header **)
-						 &spmi);
+		status = acpi_get_table(ACPI_SIG_SPMI, i+1,
+					(struct acpi_table_header **)&spmi);
 		if (status != AE_OK)
 			return;
 
drivers/char/tpm/tpm_bios.c +3 -5
index a611972..7fca5f4 100644
@@ -372,10 +372,8 @@ static int read_log(struct tpm_bios_log *log)
 	}
 
 	/* Find TCPA entry in RSDT (ACPI_LOGICAL_ADDRESSING) */
-	status = acpi_get_firmware_table(ACPI_TCPA_SIG, 1,
-					 ACPI_LOGICAL_ADDRESSING,
-					 (struct acpi_table_header **)
-					 &buff);
+	status = acpi_get_table(ACPI_SIG_TCPA, 1,
+				(struct acpi_table_header **)&buff);
 
 	if (ACPI_FAILURE(status)) {
 		printk(KERN_ERR "%s: ERROR - Could not get TCPA table\n",
@@ -409,7 +407,7 @@ static int read_log(struct tpm_bios_log *log)
 
 	log->bios_event_log_end = log->bios_event_log + len;
 
-	acpi_os_map_memory(start, len, (void *) &virt);
+	virt = acpi_os_map_memory(start, len);
 
 	memcpy(log->bios_event_log, virt, len);
 
drivers/firmware/pcdp.c +1 -1
index c2ad72f..2b4b76e 100644
@@ -26,7 +26,7 @@ setup_serial_console(struct pcdp_uart *uart)
 	static char options[64], *p = options;
 	char parity;
 
-	mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY);
+	mmio = (uart->addr.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY);
 	p += sprintf(p, "console=uart,%s,0x%lx",
 		mmio ? "mmio" : "io", uart->addr.address);
 	if (uart->baud) {
drivers/pci/hotplug/acpiphp_glue.c +5 -5
index bd1faeb..fca978f 100644
@@ -773,13 +773,13 @@ static int get_gsi_base(acpi_handle handle, u32 *gsi_base)
 		goto out;
 
 	table = obj->buffer.pointer;
-	switch (((acpi_table_entry_header *)table)->type) {
-	case ACPI_MADT_IOSAPIC:
-		*gsi_base = ((struct acpi_table_iosapic *)table)->global_irq_base;
+	switch (((struct acpi_subtable_header *)table)->type) {
+	case ACPI_MADT_TYPE_IO_SAPIC:
+		*gsi_base = ((struct acpi_madt_io_sapic *)table)->global_irq_base;
 		result = 0;
 		break;
-	case ACPI_MADT_IOAPIC:
-		*gsi_base = ((struct acpi_table_ioapic *)table)->global_irq_base;
+	case ACPI_MADT_TYPE_IO_APIC:
+		*gsi_base = ((struct acpi_madt_io_apic *)table)->global_irq_base;
 		result = 0;
 		break;
 	default:
include/asm-i386/mach-es7000/mach_mpparse.h +9 -8
index 99f66be..24990e5 100644
@@ -3,13 +3,13 @@
 
 #include <linux/acpi.h>
 
-static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, 
+static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
 				struct mpc_config_translation *translation)
 {
 	Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
 }
 
-static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, 
+static inline void mpc_oem_pci_bus(struct mpc_config_bus *m,
 				struct mpc_config_translation *translation)
 {
 }
@@ -22,7 +22,7 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
 		char *productid)
 {
 	if (mpc->mpc_oemptr) {
-		struct mp_config_oemtable *oem_table = 
+		struct mp_config_oemtable *oem_table =
 			(struct mp_config_oemtable *)mpc->mpc_oemptr;
 		if (!strncmp(oem, "UNISYS", 6))
 			return parse_unisys_oem((char *)oem_table);
@@ -31,12 +31,13 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
 }
 
 #ifdef CONFIG_ACPI
+
 static inline int es7000_check_dsdt(void)
 {
-	struct acpi_table_header *header = NULL;
-	if(!acpi_get_table_header_early(ACPI_DSDT, &header))
-		acpi_table_print(header, 0);
-	if (!strncmp(header->oem_id, "UNISYS", 6))
+	struct acpi_table_header header;
+	memcpy(&header, 0, sizeof(struct acpi_table_header));
+	acpi_get_table_header(ACPI_SIG_DSDT, 0, &header);
+	if (!strncmp(header.oem_id, "UNISYS", 6))
 		return 1;
 	return 0;
 }
@@ -44,7 +45,7 @@ static inline int es7000_check_dsdt(void)
 /* Hook from generic ACPI tables.c */
 static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 {
-	unsigned long oem_addr; 
+	unsigned long oem_addr;
 	if (!find_unisys_acpi_oem_table(&oem_addr)) {
 		if (es7000_check_dsdt())
 			return parse_unisys_oem((char *)oem_addr);
include/linux/acpi.h +6 -117

163 lines not on this page · raw message

Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#106 lore raw

PATCH 104/140 ACPICA: Update debug output routines for data structure changes

From: Bob Moore <[email protected]>

---
 drivers/acpi/executer/exdump.c |   27 +++++----------------------
 1 files changed, 5 insertions(+), 22 deletions(-)
drivers/acpi/executer/exdump.c +5 -22
index 2450943..c9cab16 100644
@@ -59,8 +59,6 @@ static void acpi_ex_out_string(char *title, char *value);
 
 static void acpi_ex_out_pointer(char *title, void *value);
 
-static void acpi_ex_out_address(char *title, acpi_physical_address value);
-
 static void
 acpi_ex_dump_object(union acpi_operand_object *obj_desc,
 		    struct acpi_exdump_info *info);
@@ -92,10 +90,11 @@ static struct acpi_exdump_info acpi_ex_dump_string[4] = {
 	{ACPI_EXD_STRING, 0, NULL}
 };
 
-static struct acpi_exdump_info acpi_ex_dump_buffer[4] = {
+static struct acpi_exdump_info acpi_ex_dump_buffer[5] = {
 	{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer), NULL},
 	{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(buffer.length), "Length"},
 	{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.pointer), "Pointer"},
+	{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.node), "Parent Node"},
 	{ACPI_EXD_BUFFER, 0, NULL}
 };
 
@@ -165,8 +164,8 @@ static struct acpi_exdump_info acpi_ex_dump_power[5] = {
 
 static struct acpi_exdump_info acpi_ex_dump_processor[7] = {
 	{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_processor), NULL},
-	{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(processor.proc_id), "Processor ID"},
-	{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(processor.length), "Length"},
+	{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(processor.proc_id), "Processor ID"},
+	{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(processor.length), "Length"},
 	{ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(processor.address), "Address"},
 	{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.system_notify),
 	 "System Notify"},
@@ -379,18 +378,12 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
 			break;
 
 		case ACPI_EXD_POINTER:
+		case ACPI_EXD_ADDRESS:
 
 			acpi_ex_out_pointer(name,
 					    *ACPI_CAST_PTR(void *, target));
 			break;
 
-		case ACPI_EXD_ADDRESS:
-
-			acpi_ex_out_address(name,
-					    *ACPI_CAST_PTR
-					    (acpi_physical_address, target));
-			break;
-
 		case ACPI_EXD_STRING:
 
 			acpi_ut_print_string(obj_desc->string.pointer,
@@ -834,16 +827,6 @@ static void acpi_ex_out_pointer(char *title, void *value)
 	acpi_os_printf("%20s : %p\n", title, value);
 }
 
-static void acpi_ex_out_address(char *title, acpi_physical_address value)
-{
-
-#if ACPI_MACHINE_WIDTH == 16
-	acpi_os_printf("%20s : %p\n", title, value);
-#else
-	acpi_os_printf("%20s : %8.8X%8.8X\n", title, ACPI_FORMAT_UINT64(value));
-#endif
-}
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ex_dump_namespace_node
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#107 lore raw

PATCH 105/140 ACPICA: Miscellaneous table manager updates and optimizations

From: Alexey Starikovskiy <[email protected]>

---
 drivers/acpi/blacklist.c         |   12 +++---
 drivers/acpi/executer/exconfig.c |    8 +++-
 drivers/acpi/tables/tbinstal.c   |   91 ++++++++++++++++++++++---------------
 drivers/acpi/tables/tbutils.c    |   46 -------------------
 drivers/acpi/tables/tbxface.c    |   54 ++++++++++++++++------
 include/acpi/acpixf.h            |    2 +-
 include/acpi/actables.h          |    8 +---
 7 files changed, 108 insertions(+), 113 deletions(-)
drivers/acpi/blacklist.c +6 -6
index c8f4cac..f289fd4 100644
@@ -103,7 +103,7 @@ int __init acpi_blacklisted(void)
 {
 	int i = 0;
 	int blacklisted = 0;
-	struct acpi_table_header *table_header;
+	struct acpi_table_header table_header;
 
 	while (acpi_blacklist[i].oem_id[0] != '\0') {
 		if (acpi_get_table_header(acpi_blacklist[i].table, 0, &table_header)) {
@@ -111,13 +111,13 @@ int __init acpi_blacklisted(void)
 			continue;
 		}
 
-		if (strncmp(acpi_blacklist[i].oem_id, table_header->oem_id, 6)) {
+		if (strncmp(acpi_blacklist[i].oem_id, table_header.oem_id, 6)) {
 			i++;
 			continue;
 		}
 
 		if (strncmp
-		    (acpi_blacklist[i].oem_table_id, table_header->oem_table_id,
+		    (acpi_blacklist[i].oem_table_id, table_header.oem_table_id,
 		     8)) {
 			i++;
 			continue;
@@ -126,14 +126,14 @@ int __init acpi_blacklisted(void)
 		if ((acpi_blacklist[i].oem_revision_predicate == all_versions)
 		    || (acpi_blacklist[i].oem_revision_predicate ==
 			less_than_or_equal
-			&& table_header->oem_revision <=
+			&& table_header.oem_revision <=
 			acpi_blacklist[i].oem_revision)
 		    || (acpi_blacklist[i].oem_revision_predicate ==
 			greater_than_or_equal
-			&& table_header->oem_revision >=
+			&& table_header.oem_revision >=
 			acpi_blacklist[i].oem_revision)
 		    || (acpi_blacklist[i].oem_revision_predicate == equal
-			&& table_header->oem_revision ==
+			&& table_header.oem_revision ==
 			acpi_blacklist[i].oem_revision)) {
 
 			printk(KERN_ERR PREFIX
drivers/acpi/executer/exconfig.c +6 -2
index 20a5ab8..7aa18f9 100644
@@ -279,13 +279,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 	acpi_native_uint table_index;
 	acpi_physical_address address;
 	struct acpi_table_header table_header;
+	struct acpi_table_desc table_desc;
 	acpi_integer temp;
 	u32 i;
 
 	ACPI_FUNCTION_TRACE(ex_load_op);
 
 	/* Object can be either an op_region or a Field */
-
+	ACPI_MEMSET(&table_desc, 0, sizeof(struct acpi_table_desc));
 	switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
 	case ACPI_TYPE_REGION:
 
@@ -408,10 +409,13 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 		goto cleanup;
 	}
 
+	table_desc.pointer = table_ptr;
+	table_desc.length = table_ptr->length;
+	table_desc.flags = ACPI_TABLE_ORIGIN_ALLOCATED;
 	/*
 	 * Install the new table into the local data structures
 	 */
-	status = acpi_tb_add_table(table_ptr, &table_index);
+	status = acpi_tb_add_table(&table_desc, &table_index);
 	if (ACPI_FAILURE(status)) {
 		goto cleanup;
 	}
drivers/acpi/tables/tbinstal.c +54 -37

168 lines not on this page · raw message

drivers/acpi/tables/tbutils.c +0 -46

49 lines not on this page · raw message

drivers/acpi/tables/tbxface.c +39 -15

89 lines not on this page · raw message

include/acpi/acpixf.h +1 -1
index 9c26400..918280e 100644
@@ -109,7 +109,7 @@ acpi_status acpi_unload_table_id(acpi_owner_id id);
 acpi_status
 acpi_get_table_header(acpi_string signature,
 		      acpi_native_uint instance,
-		      struct acpi_table_header **out_table_header);
+		      struct acpi_table_header *out_table_header);
 
 acpi_status
 acpi_get_table(acpi_string signature,
include/acpi/actables.h +2 -6
index 4079f8a..5ef1b69 100644
@@ -69,7 +69,7 @@ acpi_status acpi_tb_resize_root_table_list(void);
 acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc);
 
 acpi_status
-acpi_tb_add_table(struct acpi_table_header *table,
+acpi_tb_add_table(struct acpi_table_desc *table_desc,
 		  acpi_native_uint * table_index);
 
 acpi_status
@@ -77,7 +77,7 @@ acpi_tb_store_table(acpi_physical_address address,
 		    struct acpi_table_header *table,
 		    u32 length, u8 flags, acpi_native_uint * table_index);
 
-void acpi_tb_delete_table(acpi_native_uint table_index);
+void acpi_tb_delete_table(struct acpi_table_desc *table_desc);
 
 void acpi_tb_terminate(void);
 
@@ -113,8 +113,4 @@ acpi_tb_install_table(acpi_physical_address address,
 acpi_status
 acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags);
 
-void *acpi_tb_map(acpi_physical_address address, u32 length, u32 flags);
-
-void acpi_tb_unmap(void *pointer, u32 length, u32 flags);
-
 #endif				/* __ACTABLES_H__ */
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#108 lore raw

PATCH 106/140 ACPICA: Fixes for load() operator.

From: Alexey Starikovskiy <[email protected]>

Optimized the Load operator in the case where the source operand is an operation region. Simply map the operation region memory, instead of performing a bytewise read.

---
 drivers/acpi/executer/exconfig.c |  160 ++++++++------------------------------
 drivers/acpi/executer/exresop.c  |   10 +--
 include/acpi/acopcode.h          |    2 +-
 include/acpi/amlcode.h           |    2 +-
 4 files changed, 40 insertions(+), 134 deletions(-)
drivers/acpi/executer/exconfig.c +34 -126
index 7aa18f9..61ec855 100644
@@ -119,7 +119,7 @@ acpi_ex_add_table(acpi_native_uint table_index,
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Load an ACPI table
+ * DESCRIPTION: Load an ACPI table from the RSDT/XSDT
  *
  ******************************************************************************/
 
@@ -138,21 +138,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
 
 	ACPI_FUNCTION_TRACE(ex_load_table_op);
 
-#if 0
-	/*
-	 * Make sure that the signature does not match one of the tables that
-	 * is already loaded.
-	 */
-	status = acpi_tb_match_signature(operand[0]->string.pointer, NULL);
-	if (status == AE_OK) {
-
-		/* Signature matched -- don't allow override */
-
-		return_ACPI_STATUS(AE_ALREADY_EXISTS);
-	}
-#endif
-
-	/* Find the ACPI table */
+	/* Find the ACPI table in the RSDT/XSDT */
 
 	status = acpi_tb_find_table(operand[0]->string.pointer,
 				    operand[1]->string.pointer,
@@ -256,7 +242,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
  *
  * FUNCTION:    acpi_ex_load_op
  *
- * PARAMETERS:  obj_desc        - Region or Field where the table will be
+ * PARAMETERS:  obj_desc        - Region or Buffer/Field where the table will be
  *                                obtained
  *              Target          - Where a handle to the table will be stored
  *              walk_state      - Current state
@@ -265,6 +251,12 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
  *
  * DESCRIPTION: Load an ACPI table from a field or operation region
  *
+ * NOTE: Region Fields (Field, bank_field, index_fields) are resolved to buffer
+ *       objects before this code is reached.
+ *
+ *       If source is an operation region, it must refer to system_memory, as
+ *       per the ACPI specification.
+ *
  ******************************************************************************/
 
 acpi_status
@@ -272,24 +264,26 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 		union acpi_operand_object *target,
 		struct acpi_walk_state *walk_state)
 {
-	acpi_status status;
 	union acpi_operand_object *ddb_handle;
-	union acpi_operand_object *buffer_desc = NULL;
-	struct acpi_table_header *table_ptr = NULL;
-	acpi_native_uint table_index;
-	acpi_physical_address address;
-	struct acpi_table_header table_header;
 	struct acpi_table_desc table_desc;
-	acpi_integer temp;
-	u32 i;
+	acpi_native_uint table_index;
+	acpi_status status;
 
 	ACPI_FUNCTION_TRACE(ex_load_op);
 
-	/* Object can be either an op_region or a Field */
 	ACPI_MEMSET(&table_desc, 0, sizeof(struct acpi_table_desc));
+
+	/* Source Object can be either an op_region or a Buffer/Field */
+
 	switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
 	case ACPI_TYPE_REGION:
 
+		/* Region must be system_memory (from ACPI spec) */
+
+		if (obj_desc->region.space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) {
+			return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
+		}
+
 		ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Load from Region %p %s\n",
 				  obj_desc,
 				  acpi_ut_get_object_type_name(obj_desc)));
@@ -305,113 +299,31 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 			}
 		}
 
-		/* Get the base physical address of the region */
-
-		address = obj_desc->region.address;
-
-		/* Get part of the table header to get the table length */
-
-		table_header.length = 0;
-		for (i = 0; i < 8; i++) {
-			status =
-			    acpi_ev_address_space_dispatch(obj_desc, ACPI_READ,
-							   (acpi_physical_address)
-							   (i + address), 8,
-							   &temp);
-			if (ACPI_FAILURE(status)) {
-				return_ACPI_STATUS(status);
-			}
-
-			/* Get the one valid byte of the returned 64-bit value */
-
-			ACPI_CAST_PTR(u8, &table_header)[i] = (u8) temp;
-		}
-
-		/* Sanity check the table length */
-
-		if (table_header.length < sizeof(struct acpi_table_header)) {
-			return_ACPI_STATUS(AE_BAD_HEADER);
-		}
-
-		/* Allocate a buffer for the entire table */
-
-		table_ptr = ACPI_ALLOCATE(table_header.length);
-		if (!table_ptr) {
-			return_ACPI_STATUS(AE_NO_MEMORY);
-		}
-
-		/* Get the entire table from the op region */
-
-		for (i = 0; i < table_header.length; i++) {
-			status =
-			    acpi_ev_address_space_dispatch(obj_desc, ACPI_READ,
-							   (acpi_physical_address)
-							   (i + address), 8,
-							   &temp);
-			if (ACPI_FAILURE(status)) {
-				goto cleanup;
-			}
-
-			/* Get the one valid byte of the returned 64-bit value */
-
-			ACPI_CAST_PTR(u8, table_ptr)[i] = (u8) temp;
-		}
+		table_desc.address = obj_desc->region.address;
+		table_desc.length = obj_desc->region.length;
+		table_desc.flags = ACPI_TABLE_ORIGIN_MAPPED;
 		break;
 
-	case ACPI_TYPE_LOCAL_REGION_FIELD:
-	case ACPI_TYPE_LOCAL_BANK_FIELD:
-	case ACPI_TYPE_LOCAL_INDEX_FIELD:
+	case ACPI_TYPE_BUFFER:	/* Buffer or resolved region_field */
 
-		ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Load from Field %p %s\n",
-				  obj_desc,
-				  acpi_ut_get_object_type_name(obj_desc)));
+		/* Simply extract the buffer from the buffer object */
 
-		/*
-		 * The length of the field must be at least as large as the table.
-		 * Read the entire field and thus the entire table.  Buffer is
-		 * allocated during the read.
-		 */
-		status =
-		    acpi_ex_read_data_from_field(walk_state, obj_desc,
-						 &buffer_desc);
-		if (ACPI_FAILURE(status)) {
-			return_ACPI_STATUS(status);
-		}
-
-		table_ptr = ACPI_CAST_PTR(struct acpi_table_header,
-					  buffer_desc->buffer.pointer);
-
-		/* All done with the buffer_desc, delete it */
-
-		buffer_desc->buffer.pointer = NULL;
-		acpi_ut_remove_reference(buffer_desc);
+		ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
+				  "Load from Buffer or Field %p %s\n", obj_desc,
+				  acpi_ut_get_object_type_name(obj_desc)));
 
-		/* Sanity check the table length */
+		table_desc.pointer = ACPI_CAST_PTR(struct acpi_table_header,
+						   obj_desc->buffer.pointer);
+		table_desc.length = table_desc.pointer->length;
+		table_desc.flags = ACPI_TABLE_ORIGIN_ALLOCATED;
 
-		if (table_ptr->length < sizeof(struct acpi_table_header)) {
-			status = AE_BAD_HEADER;
-			goto cleanup;
-		}
+		obj_desc->buffer.pointer = NULL;
 		break;
 
 	default:
 		return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
 	}
 
-	/* The table must be either an SSDT or a PSDT */
-
-	if ((!ACPI_COMPARE_NAME(table_ptr->signature, ACPI_SIG_PSDT)) &&
-	    (!ACPI_COMPARE_NAME(table_ptr->signature, ACPI_SIG_SSDT))) {
-		ACPI_ERROR((AE_INFO,
-			    "Table has invalid signature [%4.4s], must be SSDT or PSDT",
-			    table_ptr->signature));
-		status = AE_BAD_SIGNATURE;
-		goto cleanup;
-	}
-
-	table_desc.pointer = table_ptr;
-	table_desc.length = table_ptr->length;
-	table_desc.flags = ACPI_TABLE_ORIGIN_ALLOCATED;
 	/*
 	 * Install the new table into the local data structures
 	 */
@@ -440,13 +352,9 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 		return_ACPI_STATUS(status);
 	}
 
-	ACPI_INFO((AE_INFO,
-		   "Dynamic SSDT Load - OemId [%6.6s] OemTableId [%8.8s]",
-		   table_ptr->oem_id, table_ptr->oem_table_id));
-
       cleanup:
 	if (ACPI_FAILURE(status)) {
-		ACPI_FREE(table_ptr);
+		acpi_tb_delete_table(&table_desc);
 	}
 	return_ACPI_STATUS(status);
 }
drivers/acpi/executer/exresop.c +4 -6
index 4c93d09..411d120 100644
@@ -611,22 +611,20 @@ acpi_ex_resolve_operands(u16 opcode,
 			}
 			goto next_operand;
 
-		case ARGI_REGION_OR_FIELD:
+		case ARGI_REGION_OR_BUFFER:	/* Used by Load() only */
 
-			/* Need an operand of type REGION or a FIELD in a region */
+			/* Need an operand of type REGION or a BUFFER (which could be a resolved region field) */
 
 			switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
+			case ACPI_TYPE_BUFFER:
 			case ACPI_TYPE_REGION:
-			case ACPI_TYPE_LOCAL_REGION_FIELD:
-			case ACPI_TYPE_LOCAL_BANK_FIELD:
-			case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
 				/* Valid operand */
 				break;
 
 			default:
 				ACPI_ERROR((AE_INFO,
-					    "Needed [Region/RegionField], found [%s] %p",
+					    "Needed [Region/Buffer], found [%s] %p",
 					    acpi_ut_get_object_type_name
 					    (obj_desc), obj_desc));
 
include/acpi/acopcode.h +1 -1
index 7659a46..d71f5d9 100644
@@ -257,7 +257,7 @@
 #define ARGI_LLESSEQUAL_OP              ARGI_INVALID_OPCODE
 #define ARGI_LNOT_OP                    ARGI_LIST1 (ARGI_INTEGER)
 #define ARGI_LNOTEQUAL_OP               ARGI_INVALID_OPCODE
-#define ARGI_LOAD_OP                    ARGI_LIST2 (ARGI_REGION_OR_FIELD,ARGI_TARGETREF)
+#define ARGI_LOAD_OP                    ARGI_LIST2 (ARGI_REGION_OR_BUFFER,ARGI_TARGETREF)
 #define ARGI_LOAD_TABLE_OP              ARGI_LIST6 (ARGI_STRING,     ARGI_STRING,        ARGI_STRING,       ARGI_STRING,    ARGI_STRING, ARGI_ANYTYPE)
 #define ARGI_LOCAL0                     ARG_NONE
 #define ARGI_LOCAL1                     ARG_NONE
include/acpi/amlcode.h +1 -1
index cf18426..fd0c722 100644
@@ -273,7 +273,7 @@
 #define ARGI_DATAOBJECT             0x12	/* Buffer, String, package or reference to a Node - Used only by size_of operator */
 #define ARGI_COMPLEXOBJ             0x13	/* Buffer, String, or package (Used by INDEX op only) */
 #define ARGI_REF_OR_STRING          0x14	/* Reference or String (Used by DEREFOF op only) */
-#define ARGI_REGION_OR_FIELD        0x15	/* Used by LOAD op only */
+#define ARGI_REGION_OR_BUFFER       0x15	/* Used by LOAD op only */
 #define ARGI_DATAREFOBJ             0x16
 
 /* Note: types above can expand to 0x1F maximum */
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#109 lore raw

PATCH 107/140 ACPICA: Remove global lock handler on AcpiTerminate.

From: Bob Moore <[email protected]>

Added AcpiEvRemoveGlobalLockHandler

---
 drivers/acpi/events/evmisc.c |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)
drivers/acpi/events/evmisc.c +33 -0
index 545f934..db16300 100644
@@ -73,6 +73,8 @@ static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context);
 
 static u32 acpi_ev_global_lock_handler(void *context);
 
+static acpi_status acpi_ev_remove_global_lock_handler(void);
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ev_is_notify_object
@@ -376,6 +378,31 @@ acpi_status acpi_ev_init_global_lock_handler(void)
 	return_ACPI_STATUS(status);
 }
 
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ev_remove_global_lock_handler
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Remove the handler for the Global Lock
+ *
+ ******************************************************************************/
+
+static acpi_status acpi_ev_remove_global_lock_handler(void)
+{
+	acpi_status status;
+
+	ACPI_FUNCTION_TRACE(ev_remove_global_lock_handler);
+
+	acpi_gbl_global_lock_present = FALSE;
+	status = acpi_remove_fixed_event_handler(ACPI_EVENT_GLOBAL,
+						 acpi_ev_global_lock_handler);
+
+	return_ACPI_STATUS(status);
+}
+
 /******************************************************************************
  *
  * FUNCTION:    acpi_ev_acquire_global_lock
@@ -554,6 +581,12 @@ void acpi_ev_terminate(void)
 		if (ACPI_FAILURE(status)) {
 			ACPI_ERROR((AE_INFO, "Could not remove SCI handler"));
 		}
+
+		status = acpi_ev_remove_global_lock_handler();
+		if (ACPI_FAILURE(status)) {
+			ACPI_ERROR((AE_INFO,
+				    "Could not remove Global Lock handler"));
+		}
 	}
 
 	/* Deallocate all handler objects installed within GPE info structs */
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#110 lore raw

PATCH 108/140 ACPICA: Ensure that all structures in acobject.h are aligned, via #pragma.

From: Bob Moore <[email protected]>

Thus, even if the default compiler setting is non-aligned, the header is compiled
correctly.

---
 include/acpi/acobject.h |   17 +++++++++++++++--
 include/acpi/actypes.h  |    4 ++++
 2 files changed, 19 insertions(+), 2 deletions(-)
include/acpi/acobject.h +15 -2
index 8fdee31..b81e923 100644
@@ -52,7 +52,15 @@
  * to the interpreter, and to keep track of the various handlers such as
  * address space handlers and notify handlers. The object is a constant
  * size in order to allow it to be cached and reused.
+ *
+ * Note: The object is optimized to be aligned and will not work if it is
+ * byte-packed.
  */
+#if ACPI_MACHINE_WIDTH == 64
+#pragma pack(8)
+#else
+#pragma pack(4)
+#endif
 
 /*******************************************************************************
  *
@@ -101,7 +109,8 @@ struct acpi_object_common {
 ACPI_OBJECT_COMMON_HEADER};
 
 struct acpi_object_integer {
-	ACPI_OBJECT_COMMON_HEADER acpi_integer value;
+	ACPI_OBJECT_COMMON_HEADER u8 fill[3];	/* Prevent warning on some compilers */
+	acpi_integer value;
 };
 
 /*
@@ -203,7 +212,9 @@ struct acpi_object_power_resource {
 };
 
 struct acpi_object_processor {
-	ACPI_OBJECT_COMMON_HEADER u8 proc_id;
+	ACPI_OBJECT_COMMON_HEADER
+	    /* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */
+	u8 proc_id;
 	u8 length;
 	 ACPI_COMMON_NOTIFY_INFO acpi_io_address address;
 };
@@ -406,4 +417,6 @@ union acpi_descriptor {
 	union acpi_parse_object op;
 };
 
+#pragma pack()
+
 #endif				/* _ACOBJECT_H */
include/acpi/actypes.h +4 -0
index 6fa3f2a..d213f97 100644
@@ -156,6 +156,7 @@ typedef u64 acpi_physical_address;
 #define ACPI_MAX_PTR                    ACPI_UINT64_MAX
 #define ACPI_SIZE_MAX                   ACPI_UINT64_MAX
 
+#define ACPI_NATIVE_BOUNDARY            8
 #define ACPI_USE_NATIVE_DIVIDE	/* Has native 64-bit integer support */
 
 /*
@@ -196,6 +197,8 @@ typedef u32 acpi_physical_address;
 #define ACPI_MAX_PTR                    ACPI_UINT32_MAX
 #define ACPI_SIZE_MAX                   ACPI_UINT32_MAX
 
+#define ACPI_NATIVE_BOUNDARY            4
+
 /*******************************************************************************
  *
  * Types specific to 16-bit targets
@@ -222,6 +225,7 @@ typedef char *acpi_physical_address;
 #define ACPI_MAX_PTR                    ACPI_UINT16_MAX
 #define ACPI_SIZE_MAX                   ACPI_UINT16_MAX
 
+#define ACPI_NATIVE_BOUNDARY            2
 #define ACPI_USE_NATIVE_DIVIDE	/* No 64-bit integers, ok to use native divide */
 
 /* 64-bit integers cannot be supported */
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#111 lore raw

PATCH 109/140 ACPICA: Add ACPI_MAX macro

From: Bob Moore <[email protected]>

---
 include/acpi/acmacros.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
include/acpi/acmacros.h +1 -0
index 192fa09..9b2e4d7 100644
@@ -55,6 +55,7 @@
 #define ACPI_SET_BIT(target,bit)        ((target) |= (bit))
 #define ACPI_CLEAR_BIT(target,bit)      ((target) &= ~(bit))
 #define ACPI_MIN(a,b)                   (((a)<(b))?(a):(b))
+#define ACPI_MAX(a,b)                   (((a)>(b))?(a):(b))
 
 /* Size calculation */
 
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#112 lore raw

PATCH 110/140 ACPICA: Fail AcpiEnable if ACPI tables not loaded.

From: Bob Moore <[email protected]>

AcpiEnable will now fail if all of the required ACPI tables are not loaded (FADT, FACS, DSDT). BZ 477

---
 drivers/acpi/events/evxfevnt.c |    8 ++++++++
 drivers/acpi/tables/tbutils.c  |   23 +++++++++++++++++++++++
 include/acpi/actables.h        |    2 ++
 3 files changed, 33 insertions(+), 0 deletions(-)
drivers/acpi/events/evxfevnt.c +8 -0
index a3d148e..4eab4f5 100644
@@ -65,6 +65,14 @@ acpi_status acpi_enable(void)
 
 	ACPI_FUNCTION_TRACE(acpi_enable);
 
+	/* ACPI tables must be present */
+
+	if (!acpi_tb_tables_loaded()) {
+		return_ACPI_STATUS(AE_NO_ACPI_TABLES);
+	}
+
+	/* Check current mode */
+
 	if (acpi_hw_get_mode() == ACPI_SYS_MODE_ACPI) {
 		ACPI_DEBUG_PRINT((ACPI_DB_INIT,
 				  "System is already in ACPI mode\n"));
drivers/acpi/tables/tbutils.c +23 -0
index 0cb7439..0874ab2 100644
@@ -54,6 +54,29 @@ acpi_tb_get_root_table_entry(u8 * table_entry,
 
 /*******************************************************************************
  *
+ * FUNCTION:    acpi_tb_tables_loaded
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      TRUE if required ACPI tables are loaded
+ *
+ * DESCRIPTION: Determine if the minimum required ACPI tables are present
+ *              (FADT, FACS, DSDT)
+ *
+ ******************************************************************************/
+
+u8 acpi_tb_tables_loaded(void)
+{
+
+	if (acpi_gbl_root_table_list.count >= 3) {
+		return (TRUE);
+	}
+
+	return (FALSE);
+}
+
+/*******************************************************************************
+ *
  * FUNCTION:    acpi_tb_print_table_header
  *
  * PARAMETERS:  Address             - Table physical address
include/acpi/actables.h +2 -0
index 5ef1b69..e7efb8a 100644
@@ -97,6 +97,8 @@ void acpi_tb_set_table_loaded_flag(acpi_native_uint table_index, u8 is_loaded);
 /*
  * tbutils - table manager utilities
  */
+u8 acpi_tb_tables_loaded(void);
+
 void
 acpi_tb_print_table_header(acpi_physical_address address,
 			   struct acpi_table_header *header);
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#113 lore raw

PATCH 111/140 ACPICA: Add include of actables.h

From: Bob Moore <[email protected]>

---
 drivers/acpi/events/evxfevnt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/acpi/events/evxfevnt.c +1 -0
index 4eab4f5..bbd631d 100644
@@ -44,6 +44,7 @@
 #include <acpi/acpi.h>
 #include <acpi/acevents.h>
 #include <acpi/acnamesp.h>
+#include <acpi/actables.h>
 
 #define _COMPONENT          ACPI_EVENTS
 ACPI_MODULE_NAME("evxfevnt")
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#114 lore raw

PATCH 112/140 ACPICA: Update version to 20061109

From: Bob Moore <[email protected]>

---
 include/acpi/acconfig.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/acpi/acconfig.h +1 -1
index 9aa3b19..755340b 100644
@@ -63,7 +63,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20061011
+#define ACPI_CA_VERSION                 0x20061109
 
 /*
  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#115 lore raw

PATCH 113/140 ACPICA: Removed all 16-bit support.

From: Bob Moore <[email protected]>

Support for 16-bit ACPICA has been completely removed since it is no longer necessary and it clutters the code. All 16-bit macros, types, and conditional compiles have been removed, cleaning up and simplifying the code across the entire subsystem. DOS support is no longer needed since the Linux firmware kit is now available.

---
 drivers/acpi/events/evgpeblk.c   |   10 +++---
 drivers/acpi/executer/exoparg1.c |    2 -
 drivers/acpi/executer/exregion.c |    5 +--
 drivers/acpi/hardware/hwregs.c   |   14 +++----
 drivers/acpi/tables/tbxfroot.c   |    4 --
 include/acpi/acmacros.h          |   68 +-------------------------------------
 include/acpi/actypes.h           |   40 +---------------------
 7 files changed, 14 insertions(+), 129 deletions(-)
drivers/acpi/events/evgpeblk.c +5 -5
index 8a6f01a..a23634c 100644
@@ -796,12 +796,12 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
 		    (u8) (gpe_block->block_base_number +
 			  (i * ACPI_GPE_REGISTER_WIDTH));
 
-		ACPI_STORE_ADDRESS(this_register->status_address.address,
-				   (gpe_block->block_address.address + i));
+		this_register->status_address.address =
+		    gpe_block->block_address.address + i;
 
-		ACPI_STORE_ADDRESS(this_register->enable_address.address,
-				   (gpe_block->block_address.address
-				    + i + gpe_block->register_count));
+		this_register->enable_address.address =
+		    gpe_block->block_address.address + i +
+		    gpe_block->register_count;
 
 		this_register->status_address.space_id =
 		    gpe_block->block_address.space_id;
drivers/acpi/executer/exoparg1.c +0 -2
index 6374d8b..6f2e69c 100644
@@ -104,9 +104,7 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state)
 			status = AE_NO_MEMORY;
 			goto cleanup;
 		}
-#if ACPI_MACHINE_WIDTH != 16
 		return_desc->integer.value = acpi_os_get_timer();
-#endif
 		break;
 
 	default:		/*  Unknown opcode  */
drivers/acpi/executer/exregion.c +1 -4
index 4967447..c6819e0 100644
@@ -209,11 +209,10 @@ acpi_ex_system_memory_space_handler(u32 function,
 			*value = (acpi_integer) ACPI_GET32(logical_addr_ptr);
 			break;
 
-#if ACPI_MACHINE_WIDTH != 16
 		case 64:
 			*value = (acpi_integer) ACPI_GET64(logical_addr_ptr);
 			break;
-#endif
+
 		default:
 			/* bit_width was already validated */
 			break;
@@ -235,11 +234,9 @@ acpi_ex_system_memory_space_handler(u32 function,
 			ACPI_SET32(logical_addr_ptr) = (u32) * value;
 			break;
 
-#if ACPI_MACHINE_WIDTH != 16
 		case 64:
 			ACPI_SET64(logical_addr_ptr) = (u64) * value;
 			break;
-#endif
 
 		default:
 			/* bit_width was already validated */
drivers/acpi/hardware/hwregs.c +6 -8
index 716e4ae..5b19fc7 100644
@@ -788,8 +788,8 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg)
 
 	case ACPI_ADR_SPACE_SYSTEM_IO:
 
-		status = acpi_os_read_port((acpi_io_address) address,
-					   value, width);
+		status =
+		    acpi_os_read_port((acpi_io_address) address, value, width);
 		break;
 
 	default:
@@ -800,8 +800,7 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg)
 
 	ACPI_DEBUG_PRINT((ACPI_DB_IO,
 			  "Read:  %8.8X width %2d from %8.8X%8.8X (%s)\n",
-			  *value, width,
-			  ACPI_FORMAT_UINT64(address),
+			  *value, width, ACPI_FORMAT_UINT64(address),
 			  acpi_ut_get_region_name(reg->space_id)));
 
 	return (status);
@@ -858,8 +857,8 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg)
 
 	case ACPI_ADR_SPACE_SYSTEM_IO:
 
-		status = acpi_os_write_port((acpi_io_address) address,
-					    value, width);
+		status = acpi_os_write_port((acpi_io_address) address, value,
+					    width);
 		break;
 
 	default:
@@ -870,8 +869,7 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg)
 
 	ACPI_DEBUG_PRINT((ACPI_DB_IO,
 			  "Wrote: %8.8X width %2d   to %8.8X%8.8X (%s)\n",
-			  value, width,
-			  ACPI_FORMAT_UINT64(address),
+			  value, width, ACPI_FORMAT_UINT64(address),
 			  acpi_ut_get_region_name(reg->space_id)));
 
 	return (status);
drivers/acpi/tables/tbxfroot.c +0 -4
index 5c6e882..82c0b66 100644
@@ -98,8 +98,6 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
 	return (AE_OK);
 }
 
-#if ACPI_MACHINE_WIDTH != 16
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_tb_find_rsdp
@@ -275,5 +273,3 @@ static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
 			  start_address));
 	return_PTR(NULL);
 }
-
-#endif
include/acpi/acmacros.h +1 -67

118 lines not on this page · raw message

include/acpi/actypes.h +1 -39
index d213f97..fff2d24 100644
@@ -149,14 +149,12 @@ typedef int INT32;
 typedef u64 acpi_native_uint;
 typedef s64 acpi_native_int;
 
-typedef u64 acpi_table_ptr;
 typedef u64 acpi_io_address;
 typedef u64 acpi_physical_address;
 
 #define ACPI_MAX_PTR                    ACPI_UINT64_MAX
 #define ACPI_SIZE_MAX                   ACPI_UINT64_MAX
 
-#define ACPI_NATIVE_BOUNDARY            8
 #define ACPI_USE_NATIVE_DIVIDE	/* Has native 64-bit integer support */
 
 /*
@@ -190,51 +188,15 @@ typedef int INT32;
 typedef u32 acpi_native_uint;
 typedef s32 acpi_native_int;
 
-typedef u64 acpi_table_ptr;
 typedef u32 acpi_io_address;
 typedef u32 acpi_physical_address;
 
 #define ACPI_MAX_PTR                    ACPI_UINT32_MAX
 #define ACPI_SIZE_MAX                   ACPI_UINT32_MAX
 
-#define ACPI_NATIVE_BOUNDARY            4
-
-/*******************************************************************************
- *
- * Types specific to 16-bit targets
- *
- ******************************************************************************/
-
-#elif ACPI_MACHINE_WIDTH == 16
-
-/*! [Begin] no source code translation (keep the typedefs as-is) */
-
-typedef unsigned long UINT32;
-typedef short INT16;
-typedef long INT32;
-
-/*! [End] no source code translation !*/
-
-typedef u16 acpi_native_uint;
-typedef s16 acpi_native_int;
-
-typedef u32 acpi_table_ptr;
-typedef u32 acpi_io_address;
-typedef char *acpi_physical_address;
-
-#define ACPI_MAX_PTR                    ACPI_UINT16_MAX
-#define ACPI_SIZE_MAX                   ACPI_UINT16_MAX
-
-#define ACPI_NATIVE_BOUNDARY            2
-#define ACPI_USE_NATIVE_DIVIDE	/* No 64-bit integers, ok to use native divide */
-
-/* 64-bit integers cannot be supported */
-
-#define ACPI_NO_INTEGER64_SUPPORT
-
 #else
 
-/* ACPI_MACHINE_WIDTH must be either 64, 32, or 16 */
+/* ACPI_MACHINE_WIDTH must be either 64 or 32 */
 
 #error unknown ACPI_MACHINE_WIDTH
 #endif
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#116 lore raw

PATCH 114/140 ACPICA: Debugger multithreading enhancements.

From: Bob Moore <[email protected]>

Implemented enhancements to the multithreading support within the debugger to enable better multithreading evaluation of the subsystem.

---
 include/acpi/acdebug.h |    2 ++
 include/acpi/aclocal.h |   22 ++++++++++++++++++++--
 2 files changed, 22 insertions(+), 2 deletions(-)
include/acpi/acdebug.h +2 -0
index d816709..47296ff 100644
@@ -214,4 +214,6 @@ void acpi_db_prep_namestring(char *name);
 
 struct acpi_namespace_node *acpi_db_local_ns_lookup(char *name);
 
+void acpi_db_uint32_to_hex_string(u32 value, char *buffer);
+
 #endif				/* __ACDEBUG_H__ */
include/acpi/aclocal.h +20 -2
index 7b28d93..9b7e05c 100644
@@ -872,12 +872,30 @@ struct acpi_bit_register_info {
  ****************************************************************************/
 
 struct acpi_db_method_info {
-	acpi_handle thread_gate;
+	acpi_handle main_thread_gate;
+	acpi_handle thread_complete_gate;
+	u32 *threads;
+	u32 num_threads;
+	u32 num_created;
+	u32 num_completed;
+
 	char *name;
-	char **args;
 	u32 flags;
 	u32 num_loops;
 	char pathname[128];
+	char **args;
+
+	/*
+	 * Arguments to be passed to method for the command
+	 * Threads -
+	 *   the Number of threads, ID of current thread and
+	 *   Index of current thread inside all them created.
+	 */
+	char init_args;
+	char *arguments[4];
+	char num_threads_str[11];
+	char id_of_thread_str[11];
+	char index_of_thread_str[11];
 };
 
 struct acpi_integrity_info {
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#117 lore raw

PATCH 115/140 ACPICA: Update a comment.

From: Bob Moore <[email protected]>

---
 include/acpi/actypes.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
include/acpi/actypes.h +2 -1
index fff2d24..ee1a118 100644
@@ -48,7 +48,8 @@
 
 /*
  * ACPI_MACHINE_WIDTH must be specified in an OS- or compiler-dependent header
- * and must be either 16, 32, or 64
+ * and must be either 32 or 64. 16-bit ACPICA is no longer supported, as of
+ * 12/2006.
  */
 #ifndef ACPI_MACHINE_WIDTH
 #error ACPI_MACHINE_WIDTH not defined
Signature · 1 line
1.5.0.rc3.39.gec804

A message that is not in the archive (sent off-list or not yet received): 9e89dde2b063ca73fcdc9244fe68e2dea32c5088.1170873816.git.len.brown@intel.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

author reviewer
#120 lore raw

PATCH 117/140 ACPICA: Added option to display memory statistics upon termination.

From: Bob Moore <[email protected]>

---
 drivers/acpi/utilities/utalloc.c  |    9 +++++++++
 drivers/acpi/utilities/utglobal.c |    4 ++++
 include/acpi/acglobal.h           |    1 +
 3 files changed, 14 insertions(+), 0 deletions(-)
drivers/acpi/utilities/utalloc.c +9 -0
index f6cbc0b..b716797 100644
@@ -42,6 +42,7 @@
  */
 
 #include <acpi/acpi.h>
+#include <acpi/acdebug.h>
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utalloc")
@@ -142,6 +143,14 @@ acpi_status acpi_ut_create_caches(void)
 
 acpi_status acpi_ut_delete_caches(void)
 {
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+	char buffer[7];
+
+	if (acpi_gbl_display_final_mem_stats) {
+		ACPI_STRCPY(buffer, "MEMORY");
+		acpi_db_display_statistics(buffer);
+	}
+#endif
 
 	(void)acpi_os_delete_cache(acpi_gbl_namespace_cache);
 	acpi_gbl_namespace_cache = NULL;
drivers/acpi/utilities/utglobal.c +4 -0
index 509a85d..62929f4 100644
@@ -727,6 +727,10 @@ void acpi_ut_init_globals(void)
 	acpi_gbl_lowest_stack_pointer = ACPI_SIZE_MAX;
 #endif
 
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+	acpi_gbl_display_final_mem_stats = FALSE;
+#endif
+
 	return_VOID;
 }
 
include/acpi/acglobal.h +1 -0
index d1a5363..5b5d437 100644
@@ -200,6 +200,7 @@ ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock;	/* For ACPI H/W except GPE regis
 
 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;
 #endif
 
 /* Object caches */
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#121 lore raw

PATCH 118/140 ACPICA: Update version to 20061215

From: Bob Moore <[email protected]>

---
 include/acpi/acconfig.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/acpi/acconfig.h +1 -1
index 755340b..aaa2813 100644
@@ -63,7 +63,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20061109
+#define ACPI_CA_VERSION                 0x20061215
 
 /*
  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#122 lore raw

PATCH 119/140 ACPICA: Allow ACPI id to be u32 instead of u8.

From: Alexey Starikovskiy <[email protected]>

Allow ACPI id to be u32 instead of u8.
Requires drop of conversion tables with the acpiid as index.

---
 arch/i386/kernel/acpi/boot.c  |   17 ------
 arch/ia64/kernel/acpi.c       |   16 -----
 drivers/acpi/processor_core.c |  126 +++++++++++++++++++++++++++++++++++++----
 include/asm-i386/acpi.h       |   16 ++---
 include/asm-ia64/acpi.h       |    2 -
 include/asm-x86_64/acpi.h     |   16 ++---
 6 files changed, 128 insertions(+), 65 deletions(-)
arch/i386/kernel/acpi/boot.c +0 -17
index 2147511..e94aff6 100644
@@ -92,11 +92,6 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
 #warning ACPI uses CMPXCHG, i486 and later hardware
 #endif
 
-#define MAX_MADT_ENTRIES	256
-u8 x86_acpiid_to_apicid[MAX_MADT_ENTRIES] =
-    {[0 ... MAX_MADT_ENTRIES - 1] = 0xff };
-EXPORT_SYMBOL(x86_acpiid_to_apicid);
-
 /* --------------------------------------------------------------------------
                               Boot-time Configuration
    -------------------------------------------------------------------------- */
@@ -253,10 +248,6 @@ acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end)
 
 	acpi_table_print_madt_entry(header);
 
-	/* Record local apic id only when enabled */
-	if (processor->lapic_flags & ACPI_MADT_ENABLED)
-		x86_acpiid_to_apicid[processor->processor_id] = processor->id;
-
 	/*
 	 * We need to register disabled CPU as well to permit
 	 * counting disabled CPUs. This allows us to size
@@ -563,14 +554,6 @@ EXPORT_SYMBOL(acpi_map_lsapic);
 
 int acpi_unmap_lsapic(int cpu)
 {
-	int i;
-
-	for_each_possible_cpu(i) {
-		if (x86_acpiid_to_apicid[i] == x86_cpu_to_apicid[cpu]) {
-			x86_acpiid_to_apicid[i] = -1;
-			break;
-		}
-	}
 	x86_cpu_to_apicid[cpu] = -1;
 	cpu_clear(cpu, cpu_present_map);
 	num_processors--;
arch/ia64/kernel/acpi.c +0 -16
index 4719e48..989ffc3 100644
@@ -67,11 +67,6 @@ EXPORT_SYMBOL(pm_power_off);
 unsigned int acpi_cpei_override;
 unsigned int acpi_cpei_phys_cpuid;
 
-#define MAX_SAPICS 256
-u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = {[0 ... MAX_SAPICS - 1] = -1 };
-
-EXPORT_SYMBOL(ia64_acpiid_to_sapicid);
-
 const char *acpi_get_sysname(void)
 {
 #ifdef CONFIG_IA64_GENERIC
@@ -200,8 +195,6 @@ acpi_parse_lsapic(struct acpi_subtable_header * header, const unsigned long end)
 		smp_boot_data.cpu_phys_id[available_cpus] =
 		    (lsapic->id << 8) | lsapic->eid;
 #endif
-		ia64_acpiid_to_sapicid[lsapic->processor_id] =
-		    (lsapic->id << 8) | lsapic->eid;
 		++available_cpus;
 	}
 
@@ -880,7 +873,6 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
 
 	cpu_set(cpu, cpu_present_map);
 	ia64_cpu_to_sapicid[cpu] = physid;
-	ia64_acpiid_to_sapicid[lsapic->processor_id] = ia64_cpu_to_sapicid[cpu];
 
 	*pcpu = cpu;
 	return (0);
@@ -890,14 +882,6 @@ EXPORT_SYMBOL(acpi_map_lsapic);
 
 int acpi_unmap_lsapic(int cpu)
 {
-	int i;
-
-	for (i = 0; i < MAX_SAPICS; i++) {
-		if (ia64_acpiid_to_sapicid[i] == ia64_cpu_to_sapicid[cpu]) {
-			ia64_acpiid_to_sapicid[i] = -1;
-			break;
-		}
-	}
 	ia64_cpu_to_sapicid[cpu] = -1;
 	cpu_clear(cpu, cpu_present_map);
 
drivers/acpi/processor_core.c +114 -12

164 lines not on this page · raw message

include/asm-i386/acpi.h +7 -9
index 0fb0c01..5e657eb 100644
@@ -39,7 +39,7 @@
  * Calling conventions:
  *
  * ACPI_SYSTEM_XFACE        - Interfaces to host OS (handlers, threads)
- * ACPI_EXTERNAL_XFACE      - External ACPI interfaces 
+ * ACPI_EXTERNAL_XFACE      - External ACPI interfaces
  * ACPI_INTERNAL_XFACE      - Internal ACPI interfaces
  * ACPI_INTERNAL_VAR_XFACE  - Internal variable-parameter list interfaces
  */
@@ -87,7 +87,7 @@ extern void check_acpi_pci(void);
 static inline void check_acpi_pci(void) { }
 #endif
 
-#ifdef CONFIG_ACPI 
+#ifdef CONFIG_ACPI
 extern int acpi_lapic;
 extern int acpi_ioapic;
 extern int acpi_noirq;
@@ -95,9 +95,9 @@ extern int acpi_strict;
 extern int acpi_disabled;
 extern int acpi_ht;
 extern int acpi_pci_disabled;
-static inline void disable_acpi(void) 
-{ 
-	acpi_disabled = 1; 
+static inline void disable_acpi(void)
+{
+	acpi_disabled = 1;
 	acpi_ht = 0;
 	acpi_pci_disabled = 1;
 	acpi_noirq = 1;
@@ -114,9 +114,9 @@ extern int acpi_use_timer_override;
 #endif
 
 static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
-static inline void acpi_disable_pci(void) 
+static inline void acpi_disable_pci(void)
 {
-	acpi_pci_disabled = 1; 
+	acpi_pci_disabled = 1;
 	acpi_noirq_set();
 }
 extern int acpi_irq_balance_set(char *str);
@@ -144,8 +144,6 @@ extern void acpi_reserve_bootmem(void);
 
 #endif /*CONFIG_ACPI_SLEEP*/
 
-extern u8 x86_acpiid_to_apicid[];
-
 #define ARCH_HAS_POWER_INIT	1
 
 #endif /*__KERNEL__*/
include/asm-ia64/acpi.h +0 -2
index dba34d5..5d03792 100644
@@ -119,8 +119,6 @@ extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
 extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
 #endif
 
-extern u16 ia64_acpiid_to_sapicid[];
-
 /*
  * Refer Intel ACPI _PDC support document for bit definitions
  */
include/asm-x86_64/acpi.h +7 -9
index 49f92f3..a29f050 100644
@@ -37,7 +37,7 @@
  * Calling conventions:
  *
  * ACPI_SYSTEM_XFACE        - Interfaces to host OS (handlers, threads)
- * ACPI_EXTERNAL_XFACE      - External ACPI interfaces 
+ * ACPI_EXTERNAL_XFACE      - External ACPI interfaces
  * ACPI_INTERNAL_XFACE      - Internal ACPI interfaces
  * ACPI_INTERNAL_VAR_XFACE  - Internal variable-parameter list interfaces
  */
@@ -87,10 +87,10 @@ extern int acpi_strict;
 extern int acpi_disabled;
 extern int acpi_pci_disabled;
 extern int acpi_ht;
-static inline void disable_acpi(void) 
-{ 
-	acpi_disabled = 1; 
-	acpi_ht = 0; 
+static inline void disable_acpi(void)
+{
+	acpi_disabled = 1;
+	acpi_ht = 0;
 	acpi_pci_disabled = 1;
 	acpi_noirq = 1;
 }
@@ -100,9 +100,9 @@ static inline void disable_acpi(void)
 
 extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
 static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
-static inline void acpi_disable_pci(void) 
+static inline void acpi_disable_pci(void)
 {
-	acpi_pci_disabled = 1; 
+	acpi_pci_disabled = 1;
 	acpi_noirq_set();
 }
 extern int acpi_irq_balance_set(char *str);
@@ -136,8 +136,6 @@ extern void acpi_reserve_bootmem(void);
 extern int acpi_disabled;
 extern int acpi_pci_disabled;
 
-extern u8 x86_acpiid_to_apicid[];
-
 #define ARCH_HAS_POWER_INIT 1
 
 extern int acpi_skip_timer_override;
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#123 lore raw

PATCH 120/140 ACPICA: Allow processor to be declared with the Device() instead of Processor()

From: Alexey Starikovskiy <[email protected]>

Allow processor to be declered with the Device(), such as:

Device(CPU1234) {
	Name(_HID, "ACPI007")
	Name(_UID, 1234)
}
---
 drivers/acpi/processor_core.c |   53 ++++++++++++++++++++++++----------------
 include/acpi/acpi_drivers.h   |    2 +-
 2 files changed, 33 insertions(+), 22 deletions(-)
drivers/acpi/processor_core.c +32 -21
index 6893c0b..eacf9a2 100644
@@ -377,7 +377,7 @@ static int acpi_processor_remove_fs(struct acpi_device *device)
 /* Use the acpiid in MADT to map cpus in case of SMP */
 
 #ifndef CONFIG_SMP
-#define convert_acpiid_to_cpu(acpi_id) (-1)
+static int get_cpu_id(acpi_handle handle, u32 acpi_id) {return -1;}
 #else
 
 static struct acpi_table_madt *madt;
@@ -483,7 +483,7 @@ exit:
 	return apic_id;
 }
 
-static int get_apic_id(acpi_handle handle, u32 acpi_id)
+static int get_cpu_id(acpi_handle handle, u32 acpi_id)
 {
 	int i;
 	int apic_id = -1;
@@ -506,7 +506,7 @@ static int get_apic_id(acpi_handle handle, u32 acpi_id)
                                  Driver Interface
    -------------------------------------------------------------------------- */
 
-static int acpi_processor_get_info(struct acpi_processor *pr)
+static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid)
 {
 	acpi_status status = 0;
 	union acpi_object object = { 0 };
@@ -535,24 +535,35 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 				  "No bus mastering arbitration control\n"));
 
-	/*
-	 * Evalute the processor object.  Note that it is common on SMP to
-	 * have the first (boot) processor with a valid PBLK address while
-	 * all others have a NULL address.
-	 */
-	status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
-	if (ACPI_FAILURE(status)) {
-		printk(KERN_ERR PREFIX "Evaluating processor object\n");
-		return -ENODEV;
-	}
-
-	/*
-	 * TBD: Synch processor ID (via LAPIC/LSAPIC structures) on SMP.
-	 *      >>> 'acpi_get_processor_id(acpi_id, &id)' in arch/xxx/acpi.c
-	 */
-	pr->acpi_id = object.processor.proc_id;
+	/* Check if it is a Device with HID and UID */
+	if (has_uid) {
+		unsigned long value;
+		status = acpi_evaluate_integer(pr->handle, METHOD_NAME__UID,
+						NULL, &value);
+		if (ACPI_FAILURE(status)) {
+			printk(KERN_ERR PREFIX "Evaluating processor _UID\n");
+			return -ENODEV;
+		}
+		pr->acpi_id = value;
+	} else {
+		/*
+		* Evalute the processor object.  Note that it is common on SMP to
+		* have the first (boot) processor with a valid PBLK address while
+		* all others have a NULL address.
+		*/
+		status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
+		if (ACPI_FAILURE(status)) {
+			printk(KERN_ERR PREFIX "Evaluating processor object\n");
+			return -ENODEV;
+		}
 
-	cpu_index = get_apic_id(pr->handle, pr->acpi_id);
+		/*
+		* TBD: Synch processor ID (via LAPIC/LSAPIC structures) on SMP.
+		*      >>> 'acpi_get_processor_id(acpi_id, &id)' in arch/xxx/acpi.c
+		*/
+		pr->acpi_id = object.processor.proc_id;
+	}
+	cpu_index = get_cpu_id(pr->handle, pr->acpi_id);
 
 	/* Handle UP system running SMP kernel, with no LAPIC in MADT */
 	if (!cpu0_initialized && (cpu_index == -1) &&
@@ -621,7 +632,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
 
 	pr = acpi_driver_data(device);
 
-	result = acpi_processor_get_info(pr);
+	result = acpi_processor_get_info(pr, device->flags.unique_id);
 	if (result) {
 		/* Processor is physically not present */
 		return 0;
include/acpi/acpi_drivers.h +1 -1
index 6a5bdce..baaa734 100644
@@ -37,7 +37,7 @@
 /* _HID definitions */
 
 #define ACPI_POWER_HID			"ACPI_PWR"
-#define ACPI_PROCESSOR_HID		"ACPI_CPU"
+#define ACPI_PROCESSOR_HID		"ACPI0007"
 #define ACPI_SYSTEM_HID			"ACPI_SYS"
 #define ACPI_THERMAL_HID		"ACPI_THM"
 #define ACPI_BUTTON_HID_POWERF		"ACPI_FPB"
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#124 lore raw

PATCH 121/140 ACPICA: Update copyright to 2007.

From: Bob Moore <[email protected]>

Added 2007 copyright to all module headers and signons. This affects virtually every file in the ACPICA core subsystem, iASL compiler, and the utilities.

---
 drivers/acpi/dispatcher/dsfield.c  |    2 +-
 drivers/acpi/dispatcher/dsinit.c   |    2 +-
 drivers/acpi/dispatcher/dsmethod.c |    2 +-
 drivers/acpi/dispatcher/dsmthdat.c |    2 +-
 drivers/acpi/dispatcher/dsobject.c |    2 +-
 drivers/acpi/dispatcher/dsopcode.c |    2 +-
 drivers/acpi/dispatcher/dsutils.c  |    2 +-
 drivers/acpi/dispatcher/dswexec.c  |    2 +-
 drivers/acpi/dispatcher/dswload.c  |    2 +-
 drivers/acpi/dispatcher/dswscope.c |    2 +-
 drivers/acpi/dispatcher/dswstate.c |    2 +-
 drivers/acpi/events/evevent.c      |    2 +-
 drivers/acpi/events/evgpe.c        |    2 +-
 drivers/acpi/events/evgpeblk.c     |    2 +-
 drivers/acpi/events/evmisc.c       |    2 +-
 drivers/acpi/events/evregion.c     |    2 +-
 drivers/acpi/events/evrgnini.c     |    2 +-
 drivers/acpi/events/evsci.c        |    2 +-
 drivers/acpi/events/evxface.c      |    2 +-
 drivers/acpi/events/evxfevnt.c     |    2 +-
 drivers/acpi/events/evxfregn.c     |    2 +-
 drivers/acpi/executer/exconfig.c   |    2 +-
 drivers/acpi/executer/exconvrt.c   |    2 +-
 drivers/acpi/executer/excreate.c   |    2 +-
 drivers/acpi/executer/exdump.c     |    2 +-
 drivers/acpi/executer/exfield.c    |    2 +-
 drivers/acpi/executer/exfldio.c    |    2 +-
 drivers/acpi/executer/exmisc.c     |    2 +-
 drivers/acpi/executer/exmutex.c    |    2 +-
 drivers/acpi/executer/exnames.c    |    2 +-
 drivers/acpi/executer/exoparg1.c   |    2 +-
 drivers/acpi/executer/exoparg2.c   |    2 +-
 drivers/acpi/executer/exoparg3.c   |    2 +-
 drivers/acpi/executer/exoparg6.c   |    2 +-
 drivers/acpi/executer/exprep.c     |    2 +-
 drivers/acpi/executer/exregion.c   |    2 +-
 drivers/acpi/executer/exresnte.c   |    2 +-
 drivers/acpi/executer/exresolv.c   |    2 +-
 drivers/acpi/executer/exresop.c    |    2 +-
 drivers/acpi/executer/exstore.c    |    2 +-
 drivers/acpi/executer/exstoren.c   |    2 +-
 drivers/acpi/executer/exstorob.c   |    2 +-
 drivers/acpi/executer/exsystem.c   |    2 +-
 drivers/acpi/executer/exutils.c    |    2 +-
 drivers/acpi/hardware/hwacpi.c     |    2 +-
 drivers/acpi/hardware/hwgpe.c      |    2 +-
 drivers/acpi/hardware/hwregs.c     |    2 +-
 drivers/acpi/hardware/hwsleep.c    |    2 +-
 drivers/acpi/hardware/hwtimer.c    |    2 +-
 drivers/acpi/namespace/nsaccess.c  |    2 +-
 drivers/acpi/namespace/nsalloc.c   |    2 +-
 drivers/acpi/namespace/nsdump.c    |    2 +-
 drivers/acpi/namespace/nsdumpdv.c  |    2 +-
 drivers/acpi/namespace/nseval.c    |    2 +-
 drivers/acpi/namespace/nsinit.c    |    2 +-
 drivers/acpi/namespace/nsload.c    |    2 +-
 drivers/acpi/namespace/nsnames.c   |    2 +-
 drivers/acpi/namespace/nsobject.c  |    2 +-
 drivers/acpi/namespace/nsparse.c   |    2 +-
 drivers/acpi/namespace/nssearch.c  |    2 +-
 drivers/acpi/namespace/nsutils.c   |    2 +-
 drivers/acpi/namespace/nswalk.c    |    2 +-
 drivers/acpi/namespace/nsxfeval.c  |    2 +-
 drivers/acpi/namespace/nsxfname.c  |    2 +-
 drivers/acpi/namespace/nsxfobj.c   |    2 +-
 drivers/acpi/parser/psargs.c       |    2 +-
 drivers/acpi/parser/psloop.c       |    2 +-
 drivers/acpi/parser/psopcode.c     |    2 +-
 drivers/acpi/parser/psparse.c      |    2 +-
 drivers/acpi/parser/psscope.c      |    2 +-
 drivers/acpi/parser/pstree.c       |    2 +-
 drivers/acpi/parser/psutils.c      |    2 +-
 drivers/acpi/parser/pswalk.c       |    2 +-
 drivers/acpi/parser/psxface.c      |    2 +-
 drivers/acpi/resources/rsaddr.c    |    2 +-
 drivers/acpi/resources/rscalc.c    |    2 +-
 drivers/acpi/resources/rscreate.c  |    2 +-
 drivers/acpi/resources/rsdump.c    |    2 +-
 drivers/acpi/resources/rsinfo.c    |    2 +-
 drivers/acpi/resources/rsio.c      |    2 +-
 drivers/acpi/resources/rsirq.c     |    2 +-
 drivers/acpi/resources/rslist.c    |    2 +-
 drivers/acpi/resources/rsmemory.c  |    2 +-
 drivers/acpi/resources/rsmisc.c    |    2 +-
 drivers/acpi/resources/rsutils.c   |    2 +-
 drivers/acpi/resources/rsxface.c   |    2 +-
 drivers/acpi/tables/tbfadt.c       |    2 +-
 drivers/acpi/tables/tbfind.c       |    2 +-
 drivers/acpi/tables/tbinstal.c     |    2 +-
 drivers/acpi/tables/tbutils.c      |    2 +-
 drivers/acpi/tables/tbxface.c      |    2 +-
 drivers/acpi/tables/tbxfroot.c     |    2 +-
 drivers/acpi/utilities/utalloc.c   |    2 +-
 drivers/acpi/utilities/utcache.c   |    2 +-
 drivers/acpi/utilities/utcopy.c    |    2 +-
 drivers/acpi/utilities/utdebug.c   |    2 +-
 drivers/acpi/utilities/utdelete.c  |    2 +-
 drivers/acpi/utilities/uteval.c    |    2 +-
 drivers/acpi/utilities/utglobal.c  |    2 +-
 drivers/acpi/utilities/utinit.c    |    2 +-
 drivers/acpi/utilities/utmath.c    |    2 +-
 drivers/acpi/utilities/utmisc.c    |    2 +-
 drivers/acpi/utilities/utmutex.c   |    2 +-
 drivers/acpi/utilities/utobject.c  |    2 +-
 drivers/acpi/utilities/utresrc.c   |    2 +-
 drivers/acpi/utilities/utstate.c   |    2 +-
 drivers/acpi/utilities/utxface.c   |    2 +-
 include/acpi/acconfig.h            |    2 +-
 include/acpi/acdebug.h             |    2 +-
 include/acpi/acdisasm.h            |    2 +-
 include/acpi/acdispat.h            |    2 +-
 include/acpi/acevents.h            |    2 +-
 include/acpi/acexcep.h             |    2 +-
 include/acpi/acglobal.h            |    2 +-
 include/acpi/achware.h             |    2 +-
 include/acpi/acinterp.h            |    2 +-
 include/acpi/aclocal.h             |    2 +-
 include/acpi/acmacros.h            |    2 +-
 include/acpi/acnames.h             |    2 +-
 include/acpi/acnamesp.h            |    2 +-
 include/acpi/acobject.h            |    2 +-
 include/acpi/acopcode.h            |    2 +-
 include/acpi/acoutput.h            |    2 +-
 include/acpi/acparser.h            |    2 +-
 include/acpi/acpi.h                |    2 +-
 include/acpi/acpiosxf.h            |    2 +-
 include/acpi/acpixf.h              |    2 +-
 include/acpi/acresrc.h             |    2 +-
 include/acpi/acstruct.h            |    2 +-
 include/acpi/actables.h            |    2 +-
 include/acpi/actbl.h               |    2 +-
 include/acpi/actbl1.h              |    2 +-
 include/acpi/actypes.h             |    2 +-
 include/acpi/acutils.h             |    2 +-
 include/acpi/amlcode.h             |    2 +-
 include/acpi/amlresrc.h            |    2 +-
 include/acpi/platform/acenv.h      |    2 +-
 include/acpi/platform/acgcc.h      |    2 +-
 include/acpi/platform/aclinux.h    |    2 +-
 139 files changed, 139 insertions(+), 139 deletions(-)
drivers/acpi/dispatcher/dsfield.c +1 -1
index 379dd71..f049639 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/dispatcher/dsinit.c +1 -1
index 9db09de..af923c3 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/dispatcher/dsmethod.c +1 -1
index 57c5159..1cbe619 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/dispatcher/dsmthdat.c +1 -1
index 459160f..ba4626e 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/dispatcher/dsobject.c +1 -1
index f9f6862..a474ca2 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/dispatcher/dsopcode.c +1 -1
index 26035a3..6c6104a 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/dispatcher/dsutils.c +1 -1
index 05230ba..e4073e0 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/dispatcher/dswexec.c +1 -1
index b5b8f16..69693fa 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/dispatcher/dswload.c +1 -1
index baf04e8..8ab9d1b 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/dispatcher/dswscope.c +1 -1
index c922897..3927c49 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/dispatcher/dswstate.c +1 -1
index 7817e55..16c8e38 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/events/evevent.c +1 -1
index f09d1aa..a1f87b5 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/events/evgpe.c +1 -1
index 35933be..dfac3ec 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/events/evgpeblk.c +1 -1
index a23634c..ad5bc76 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/events/evmisc.c +1 -1
index db16300..1b784ff 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/events/evregion.c +1 -1
index ef45971..e99f0c4 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/events/evrgnini.c +1 -1
index 6176602..a4fa7e6 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/events/evsci.c +1 -1
index d7680ac..7e5d15c 100644
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/events/evxface.c +1 -1
index a2af48e..685a103 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/events/evxfevnt.c +1 -1
index bbd631d..17065e9 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/events/evxfregn.c +1 -1
index 83b12a9..7bf09c5 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exconfig.c +1 -1
index 61ec855..25802f3 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exconvrt.c +1 -1
index 544e81a..d470e8b 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/excreate.c +1 -1
index c665aa7..7c38528 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exdump.c +1 -1
index c9cab16..68d283f 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exfield.c +1 -1
index 9ea9c3a..2d88a3d 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exfldio.c +1 -1
index b3f30d8..65a48b6 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exmisc.c +1 -1
index bd98aab..f13d1ce 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exmutex.c +1 -1
index b0be2f4..5101bad 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exnames.c +1 -1
index d3d7036..1ee4fb1 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exoparg1.c +1 -1
index 6f2e69c..252f10a 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exoparg2.c +1 -1
index 7d2cbc1..17e652e 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exoparg3.c +1 -1
index e2d945d..7fe67cf 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exoparg6.c +1 -1
index f0c0ba6..bd80a9c 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exprep.c +1 -1
index 44d064f..a669662 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exregion.c +1 -1
index c6819e0..2e9ce94 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exresnte.c +1 -1
index 3089b05..2b3a01c 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exresolv.c +1 -1
index fa17f55..6c64e55 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exresop.c +1 -1
index 411d120..ba76186 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exstore.c +1 -1
index 0456405..f4b69a6 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exstoren.c +1 -1
index 591aaf0..1d622c6 100644
@@ -7,7 +7,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exstorob.c +1 -1
index 99ebe5a..8233d40 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exsystem.c +1 -1
index 7e5aeb1..9460baf 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/executer/exutils.c +1 -1
index e32d489..6b0aecc 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/hardware/hwacpi.c +1 -1
index dbcc4c0..6031ca1 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/hardware/hwgpe.c +1 -1
index 3d548b5..117a05c 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/hardware/hwregs.c +1 -1
index 5b19fc7..1d371fa 100644
@@ -7,7 +7,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/hardware/hwsleep.c +1 -1
index 7c96451..57901ca 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/hardware/hwtimer.c +1 -1
index abd86e8..c32eab6 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsaccess.c +1 -1
index 2529ae9..57faf59 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsalloc.c +1 -1
index 1e6a1b0..1d693d8 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsdump.c +1 -1
index ec5ce59..1fc4f86 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsdumpdv.c +1 -1
index c6bf5d3..5097e16 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nseval.c +1 -1
index 7156616..aa6370c 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsinit.c +1 -1
index 0d3a42b..326af8f 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsload.c +1 -1
index 5d555f8..d4f9654 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsnames.c +1 -1
index 97b8332..cbd94af 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsobject.c +1 -1
index aabe879..d9d7377 100644
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsparse.c +1 -1
index a68de26..0e57cc6 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nssearch.c +1 -1
index d261c9b..e863be6 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsutils.c +1 -1
index 4eb155c..90fd059 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nswalk.c +1 -1
index bccf27d..94eb8f3 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsxfeval.c +1 -1
index 6a0a46e..7ac6ace 100644
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsxfname.c +1 -1
index 408bd11..b489781 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/namespace/nsxfobj.c +1 -1
index a18b1c2..faa3758 100644
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/parser/psargs.c +1 -1
index bf88e07..c2b9835 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/parser/psloop.c +1 -1
index 881687c..773aee8 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/parser/psopcode.c +1 -1
index 4bd25e3..16d8b6c 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/parser/psparse.c +1 -1
index 6e875ce..5d63f48 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/parser/psscope.c +1 -1
index a3e0314..77cfa4e 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/parser/pstree.c +1 -1
index 0015717..966e7ea 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/parser/psutils.c +1 -1
index d405387..8ca5200 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/parser/pswalk.c +1 -1
index a84a547..49f9757 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/parser/psxface.c +1 -1
index fc5b3e5..94103bc 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rsaddr.c +1 -1
index 8fa3213..271e615 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rscalc.c +1 -1
index cf87b02..8c6d3fd 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rscreate.c +1 -1
index 008058a..1358c06 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rsdump.c +1 -1
index 9c99a72..de20a5d 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rsinfo.c +1 -1
index 9e7ae2f..7e3c335 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rsio.c +1 -1
index ea56716..b297bc3 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rsirq.c +1 -1
index 1fa63bc..5657f7b 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rslist.c +1 -1
index 29423ce..a92755c 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rsmemory.c +1 -1
index a513193..521eab7 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rsmisc.c +1 -1
index faf6e10..3b63b56 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rsutils.c +1 -1
index a9cbee8..2442a8f 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/resources/rsxface.c +1 -1
index 1999e2a..991f890 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/tables/tbfadt.c +1 -1
index 31a4a00..273b5fd 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/tables/tbfind.c +1 -1
index 769213c..058c064 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/tables/tbinstal.c +1 -1
index b07d9c8..0e7b121 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/tables/tbutils.c +1 -1
index 0874ab2..4a2f99e 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/tables/tbxface.c +1 -1
index 77224bd..84a8089 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/tables/tbxfroot.c +1 -1
index 82c0b66..cf8fa51 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utalloc.c +1 -1
index b716797..55a7648 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utcache.c +1 -1
index d796fca..870f6ed 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utcopy.c +1 -1
index 5c38276..84d529d 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utdebug.c +1 -1
index 8ba8624..179ad18 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utdelete.c +1 -1
index af8e65f..f777ceb 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/uteval.c +1 -1
index d6d7121..13d5879 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utglobal.c +1 -1
index 62929f4..af33358 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utinit.c +1 -1
index 303bde7..ad3c0d0 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utmath.c +1 -1
index 19d74be..0c56a0d 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utmisc.c +1 -1
index e437bc7..50133ff 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utmutex.c +1 -1
index 180e73c..cbad2ef 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utobject.c +1 -1
index ba7d8ac..4696124 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utresrc.c +1 -1
index 5a2de92..e8fe1ba 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utstate.c +1 -1
index eaa13d0..edcaafa 100644
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
drivers/acpi/utilities/utxface.c +1 -1
index 0a3202d..de3276f 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acconfig.h +1 -1
index aaa2813..ade404f 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acdebug.h +1 -1
index c46a33a..d626bb1 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acdisasm.h +1 -1
index ea35f1f..389d772 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acdispat.h +1 -1
index f0272d4..cb8d286 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acevents.h +1 -1
index 2341428..d23cdf3 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acexcep.h +1 -1
index 8fa00e8..b73f18a 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acglobal.h +1 -1
index 5b5d437..24c3f05 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/achware.h +1 -1
index ae449f2..9df275c 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acinterp.h +1 -1
index 8aebe57..ce7c9d6 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/aclocal.h +1 -1
index e135dab..6f83ddb 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acmacros.h +1 -1
index 549e533..8948a64 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acnames.h +1 -1
index b67da36..34bfae8 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acnamesp.h +1 -1
index 19a6129..535b7e1 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acobject.h +1 -1
index b81e923..04e9735 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acopcode.h +1 -1
index d71f5d9..e6f76a2 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acoutput.h +1 -1
index 8d5039d..7812267 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acparser.h +1 -1
index 9d49d3c..85c358e 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acpi.h +1 -1
index b9a39d1..2e5f00d 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acpiosxf.h +1 -1
index 9a5ffcf..781394b 100644
@@ -8,7 +8,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acpixf.h +1 -1
index 918280e..e08f7df 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acresrc.h +1 -1
index 80a3b33..9486ab2 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acstruct.h +1 -1
index 9c800b6..aeb4498 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/actables.h +1 -1
index e7efb8a..2b9f46f 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/actbl.h +1 -1
index d6af14e..09469e7 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/actbl1.h +1 -1
index b7178eb..4e5d3ca 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/actypes.h +1 -1
index ee1a118..72a6e2c 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/acutils.h +1 -1
index ba7d7e9..883ffe9 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/amlcode.h +1 -1
index fd0c722..da53a4e 100644
@@ -7,7 +7,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/amlresrc.h +1 -1
index be03818..f7d5412 100644
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/platform/acenv.h +1 -1
index 453a469..dab2ec5 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/platform/acgcc.h +1 -1
index da80933..3bb5049 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
include/acpi/platform/aclinux.h +1 -1
index 7f1e929..5f532d2 100644
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#125 lore raw

PATCH 122/140 ACPICA: Fix for incorrect parameter passed to AcpiTbDeleteTable during table load.

From: Bob Moore <[email protected]>

Bad pointer was passed in the case where the DSDT is overridden.

---
 drivers/acpi/tables/tbxface.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/acpi/tables/tbxface.c +2 -1
index 84a8089..807978d 100644
@@ -524,7 +524,8 @@ static acpi_status acpi_tb_load_namespace(void)
 		/*
 		 * DSDT table has been found
 		 */
-		acpi_tb_delete_table(ACPI_TABLE_INDEX_DSDT);
+		acpi_tb_delete_table(&acpi_gbl_root_table_list.
+				     tables[ACPI_TABLE_INDEX_DSDT]);
 		acpi_gbl_root_table_list.tables[ACPI_TABLE_INDEX_DSDT].pointer =
 		    table;
 		acpi_gbl_root_table_list.tables[ACPI_TABLE_INDEX_DSDT].length =
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#126 lore raw

PATCH 123/140 ACPICA: Update version to 20070126

From: Bob Moore <[email protected]>

---
 include/acpi/acconfig.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/acpi/acconfig.h +1 -1
index ade404f..422f29c 100644
@@ -63,7 +63,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20061215
+#define ACPI_CA_VERSION                 0x20070126
 
 /*
  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#127 lore raw

PATCH 124/140 ACPI: build fix for IBM x440 - CONFIG_X86_SUMMIT

From: Alexey Starikovskiy <[email protected]>

i386 srat.c broke due to re-names from ACPICA table-manager re-write.

---
 arch/i386/kernel/srat.c |   84 +++++++++++++++++++++++------------------------
 1 files changed, 41 insertions(+), 43 deletions(-)
arch/i386/kernel/srat.c +41 -43
index f7e735c..2a8713e 100644
@@ -62,19 +62,19 @@ extern void * boot_ioremap(unsigned long, unsigned long);
 /* Identify CPU proximity domains */
 static void __init parse_cpu_affinity_structure(char *p)
 {
-	struct acpi_table_processor_affinity *cpu_affinity = 
-				(struct acpi_table_processor_affinity *) p;
+	struct acpi_srat_cpu_affinity *cpu_affinity =
+				(struct acpi_srat_cpu_affinity *) p;
 
-	if (!cpu_affinity->flags.enabled)
+	if ((cpu_affinity->flags & ACPI_SRAT_CPU_ENABLED) == 0)
 		return;		/* empty entry */
 
 	/* mark this node as "seen" in node bitmap */
-	BMAP_SET(pxm_bitmap, cpu_affinity->proximity_domain);
+	BMAP_SET(pxm_bitmap, cpu_affinity->proximity_domain_lo);
 
-	apicid_to_pxm[cpu_affinity->apic_id] = cpu_affinity->proximity_domain;
+	apicid_to_pxm[cpu_affinity->apic_id] = cpu_affinity->proximity_domain_lo;
 
 	printk("CPU 0x%02X in proximity domain 0x%02X\n",
-		cpu_affinity->apic_id, cpu_affinity->proximity_domain);
+		cpu_affinity->apic_id, cpu_affinity->proximity_domain_lo);
 }
 
 /*
@@ -84,28 +84,27 @@ static void __init parse_cpu_affinity_structure(char *p)
 static void __init parse_memory_affinity_structure (char *sratp)
 {
 	unsigned long long paddr, size;
-	unsigned long start_pfn, end_pfn; 
+	unsigned long start_pfn, end_pfn;
 	u8 pxm;
 	struct node_memory_chunk_s *p, *q, *pend;
-	struct acpi_table_memory_affinity *memory_affinity =
-			(struct acpi_table_memory_affinity *) sratp;
+	struct acpi_srat_mem_affinity *memory_affinity =
+			(struct acpi_srat_mem_affinity *) sratp;
 
-	if (!memory_affinity->flags.enabled)
+	if ((memory_affinity->flags & ACPI_SRAT_MEM_ENABLED) == 0)
 		return;		/* empty entry */
 
+	pxm = memory_affinity->proximity_domain & 0xff;
+
 	/* mark this node as "seen" in node bitmap */
-	BMAP_SET(pxm_bitmap, memory_affinity->proximity_domain);
+	BMAP_SET(pxm_bitmap, pxm);
 
 	/* calculate info for memory chunk structure */
-	paddr = memory_affinity->base_addr_hi;
-	paddr = (paddr << 32) | memory_affinity->base_addr_lo;
-	size = memory_affinity->length_hi;
-	size = (size << 32) | memory_affinity->length_lo;
-	
+	paddr = memory_affinity->base_address;
+	size = memory_affinity->length;
+
 	start_pfn = paddr >> PAGE_SHIFT;
 	end_pfn = (paddr + size) >> PAGE_SHIFT;
-	
-	pxm = memory_affinity->proximity_domain;
+
 
 	if (num_memory_chunks >= MAXCHUNKS) {
 		printk("Too many mem chunks in SRAT. Ignoring %lld MBytes at %llx\n",
@@ -132,8 +131,8 @@ static void __init parse_memory_affinity_structure (char *sratp)
 	printk("Memory range 0x%lX to 0x%lX (type 0x%X) in proximity domain 0x%02X %s\n",
 		start_pfn, end_pfn,
 		memory_affinity->memory_type,
-		memory_affinity->proximity_domain,
-		(memory_affinity->flags.hot_pluggable ?
+		pxm,
+		((memory_affinity->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) ?
 		 "enabled and removable" : "enabled" ) );
 }
 
@@ -185,10 +184,10 @@ static int __init acpi20_parse_srat(struct acpi_table_srat *sratp)
 	num_memory_chunks = 0;
 	while (p < end) {
 		switch (*p) {
-		case ACPI_SRAT_PROCESSOR_AFFINITY:
+		case ACPI_SRAT_TYPE_CPU_AFFINITY:
 			parse_cpu_affinity_structure(p);
 			break;
-		case ACPI_SRAT_MEMORY_AFFINITY:
+		case ACPI_SRAT_TYPE_MEMORY_AFFINITY:
 			parse_memory_affinity_structure(p);
 			break;
 		default:
@@ -262,31 +261,30 @@ out_fail:
 	return 0;
 }
 
+struct acpi_static_rsdt {
+	struct acpi_table_rsdt table;
+	u32 padding[7]; /* Allow for 7 more table entries */
+};
+
 int __init get_memcfg_from_srat(void)
 {
 	struct acpi_table_header *header = NULL;
 	struct acpi_table_rsdp *rsdp = NULL;
 	struct acpi_table_rsdt *rsdt = NULL;
-	struct acpi_pointer *rsdp_address = NULL;
-	struct acpi_table_rsdt saved_rsdt;
+	acpi_native_uint rsdp_address = 0;
+	struct acpi_static_rsdt saved_rsdt;
 	int tables = 0;
 	int i = 0;
 
-	if (ACPI_FAILURE(acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING,
-						rsdp_address))) {
+	rsdp_address = acpi_find_rsdp();
+	if (!rsdp_address) {
 		printk("%s: System description tables not found\n",
 		       __FUNCTION__);
 		goto out_err;
 	}
 
-	if (rsdp_address->pointer_type == ACPI_PHYSICAL_POINTER) {
-		printk("%s: assigning address to rsdp\n", __FUNCTION__);
-		rsdp = (struct acpi_table_rsdp *)
-				(u32)rsdp_address->pointer.physical;
-	} else {
-		printk("%s: rsdp_address is not a physical pointer\n", __FUNCTION__);
-		goto out_err;
-	}
+	printk("%s: assigning address to rsdp\n", __FUNCTION__);
+	rsdp = (struct acpi_table_rsdp *)(u32)rsdp_address;
 	if (!rsdp) {
 		printk("%s: Didn't find ACPI root!\n", __FUNCTION__);
 		goto out_err;
@@ -295,13 +293,13 @@ int __init get_memcfg_from_srat(void)
 	printk(KERN_INFO "%.8s v%d [%.6s]\n", rsdp->signature, rsdp->revision,
 		rsdp->oem_id);
 
-	if (strncmp(rsdp->signature, RSDP_SIG,strlen(RSDP_SIG))) {
+	if (strncmp(rsdp->signature, ACPI_SIG_RSDP,strlen(ACPI_SIG_RSDP))) {
 		printk(KERN_WARNING "%s: RSDP table signature incorrect\n", __FUNCTION__);
 		goto out_err;
 	}
 
 	rsdt = (struct acpi_table_rsdt *)
-	    boot_ioremap(rsdp->rsdt_address, sizeof(struct acpi_table_rsdt));
+	    boot_ioremap(rsdp->rsdt_physical_address, sizeof(struct acpi_table_rsdt));
 
 	if (!rsdt) {
 		printk(KERN_WARNING
@@ -310,9 +308,9 @@ int __init get_memcfg_from_srat(void)
 		goto out_err;
 	}
 
-	header = & rsdt->header;
+	header = &rsdt->header;
 
-	if (strncmp(header->signature, RSDT_SIG, strlen(RSDT_SIG))) {
+	if (strncmp(header->signature, ACPI_SIG_RSDT, strlen(ACPI_SIG_RSDT))) {
 		printk(KERN_WARNING "ACPI: RSDT signature incorrect\n");
 		goto out_err;
 	}
@@ -330,9 +328,9 @@ int __init get_memcfg_from_srat(void)
 
 	memcpy(&saved_rsdt, rsdt, sizeof(saved_rsdt));
 
-	if (saved_rsdt.header.length > sizeof(saved_rsdt)) {
+	if (saved_rsdt.table.header.length > sizeof(saved_rsdt)) {
 		printk(KERN_WARNING "ACPI: Too big length in RSDT: %d\n",
-		       saved_rsdt.header.length);
+		       saved_rsdt.table.header.length);
 		goto out_err;
 	}
 
@@ -341,15 +339,15 @@ int __init get_memcfg_from_srat(void)
 	for (i = 0; i < tables; i++) {
 		/* Map in header, then map in full table length. */
 		header = (struct acpi_table_header *)
-			boot_ioremap(saved_rsdt.entry[i], sizeof(struct acpi_table_header));
+			boot_ioremap(saved_rsdt.table.table_offset_entry[i], sizeof(struct acpi_table_header));
 		if (!header)
 			break;
 		header = (struct acpi_table_header *)
-			boot_ioremap(saved_rsdt.entry[i], header->length);
+			boot_ioremap(saved_rsdt.table.table_offset_entry[i], header->length);
 		if (!header)
 			break;
 
-		if (strncmp((char *) &header->signature, "SRAT", 4))
+		if (strncmp((char *) &header->signature, ACPI_SIG_SRAT, 4))
 			continue;
 
 		/* we've found the srat table. don't need to look at any more tables */
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#128 lore raw

PATCH 125/140 ACPI: fix HP RX2600 IA64 boot

From: Alexey Starikovskiy <[email protected]>

Copy space_id of GAS structure to newly created GAS. The previous FADT conversion code defaulted to IO space.

---
 drivers/acpi/tables/tbfadt.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/acpi/tables/tbfadt.c +5 -0
index 273b5fd..a6723a2 100644
@@ -333,6 +333,8 @@ static void acpi_tb_convert_fadt(void)
 				     pm1_register_length,
 				     (acpi_gbl_FADT.xpm1a_event_block.address +
 				      pm1_register_length));
+	/* Don't forget to copy space_id of the GAS */
+	acpi_gbl_xpm1a_enable.space_id = acpi_gbl_FADT.xpm1a_event_block.space_id;
 
 	/* The PM1B register block is optional, ignore if not present */
 
@@ -341,6 +343,9 @@ static void acpi_tb_convert_fadt(void)
 					     pm1_register_length,
 					     (acpi_gbl_FADT.xpm1b_event_block.
 					      address + pm1_register_length));
+		/* Don't forget to copy space_id of the GAS */
+		acpi_gbl_xpm1b_enable.space_id = acpi_gbl_FADT.xpm1a_event_block.space_id;
+
 	}
 }
 
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#129 lore raw

PATCH 126/140 ACPI_NUMA: fix HP IA64 simulator issue with extended memory domain

From: Alexey Starikovskiy <[email protected]>

ACPI 3.0 incorporated the SRAT spec, upping the table version to 2, and extending the size of the proximity domain from 1-byte to 4-bytes. This extension was into a reserved field that firmware should set to 0, but the HP simulator had non-zero values there resulting in unexpected huge numbers.

So mask the domain down to 8-bits for now.
A more general fix will be to check the table version supplied by firmware and get paranoid about reserved fields.

---
 arch/ia64/kernel/acpi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/ia64/kernel/acpi.c +2 -2
index 989ffc3..a99b0cc 100644
@@ -422,8 +422,8 @@ static int get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma)
 	int pxm;
 
 	pxm = ma->proximity_domain;
-	if (ia64_platform_is("sn2"))
-		pxm += ma->reserved << 8;
+	if (!ia64_platform_is("sn2"))
+		pxm &= 0xff;
 
 	return pxm;
 }
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#130 lore raw

PATCH 127/140 ACPICA: reduce conflicts with Altix patch series

From: Len Brown <[email protected]>

Syntax only -- no functional changes.

---
 arch/ia64/sn/kernel/io_common.c |   18 ++++++++++++------
 arch/ia64/sn/kernel/iomv.c      |    5 ++---
 include/asm-ia64/sn/acpi.h      |   18 ++++++++++++++++++
 3 files changed, 32 insertions(+), 9 deletions(-)
 create mode 100644 include/asm-ia64/sn/acpi.h
arch/ia64/sn/kernel/io_common.c +12 -6
index 65979f1..75f0379 100644
@@ -25,6 +25,7 @@
 #include "xtalk/xwidgetdev.h"
 #include <linux/acpi.h>
 #include <asm/sn/sn2/sn_hwperf.h>
+#include <asm/sn/acpi.h>
 
 extern void sn_init_cpei_timer(void);
 extern void register_sn_procfs(void);
@@ -36,6 +37,7 @@ extern void sn_legacy_pci_window_fixup(struct pci_controller *, u64, u64);
 extern void sn_io_acpi_init(void);
 extern void sn_io_init(void);
 
+
 static struct list_head sn_sysdata_list;
 
 /* sysdata list struct */
@@ -48,7 +50,7 @@ int sn_ioif_inited;		/* SN I/O infrastructure initialized? */
 
 struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES];	/* indexed by asic type */
 
-int sn_acpi_base_support()
+int sn_acpi_base_support(void)
 {
 	struct acpi_table_header *header;
 	(void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header);
@@ -293,7 +295,7 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
 	list_add_tail(&pcidev_info->pdi_list,
 		      &(SN_PLATFORM_DATA(dev->bus)->pcidev_info));
 
-	if (sn_acpi_base_support())
+	if (SN_ACPI_BASE_SUPPORT())
 		sn_acpi_slot_fixup(dev, pcidev_info);
 	else
 		sn_more_slot_fixup(dev, pcidev_info);
@@ -505,7 +507,7 @@ void __devinit
 sn_pci_fixup_bus(struct pci_bus *bus)
 {
 
-	if (sn_acpi_base_support())
+	if (SN_ACPI_BASE_SUPPORT())
 		sn_acpi_bus_fixup(bus);
 	else
 		sn_bus_fixup(bus);
@@ -551,9 +553,13 @@ sn_io_early_init(void)
 	register_sn_procfs();
 #endif
 
-	printk(KERN_INFO "ACPI  DSDT OEM Rev 0x%x\n",
-	       acpi_gbl_DSDT->oem_revision);
-	if (sn_acpi_base_support())
+	{
+		struct acpi_table_header *header;
+		(void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header);
+		printk(KERN_INFO "ACPI  DSDT OEM Rev 0x%x\n",
+			header->oem_revision);
+	}
+	if (SN_ACPI_BASE_SUPPORT())
 		sn_io_acpi_init();
 	else
 		sn_io_init();
arch/ia64/sn/kernel/iomv.c +2 -3
index b1a47da..ab7e2fd 100644
@@ -16,6 +16,7 @@
 #include <asm/sn/pda.h>
 #include <asm/sn/sn_cpuid.h>
 #include <asm/sn/shub_mmr.h>
+#include <asm/sn/acpi.h>
 
 #define IS_LEGACY_VGA_IOPORT(p) \
 	(((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df))
@@ -29,8 +30,6 @@
  * SN i/o address.  Used by sn_in*() and sn_out*().
  */
 
-extern int sn_acpi_base_support();
-
 void *sn_io_addr(unsigned long port)
 {
 	if (!IS_RUNNING_ON_SIMULATOR()) {
@@ -39,7 +38,7 @@ void *sn_io_addr(unsigned long port)
 		/* On sn2, legacy I/O ports don't point at anything */
 		if (port < (64 * 1024))
 			return NULL;
-		if (sn_acpi_base_support())
+		if (SN_ACPI_BASE_SUPPORT())
 			return (__ia64_mk_io_addr(port));
 		else
 			return ((void *)(port | __IA64_UNCACHED_OFFSET));
include/asm-ia64/sn/acpi.h new file +18 -0
new file mode 100644
index 0000000..7d6cb3b
@@ -0,0 +1,18 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2006 Silicon Graphics, Inc. All rights reserved.
+ */
+
+#ifndef _ASM_IA64_SN_ACPI_H
+#define _ASM_IA64_SN_ACPI_H
+
+#include "acpi/acglobal.h"
+
+#define SN_ACPI_BASE_SUPPORT()   sn_acpi_base_support()
+
+extern int sn_acpi_base_support(void);
+
+#endif /* _ASM_IA64_SN_ACPI_H */
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#131 lore raw

PATCH 128/140 Altix: ACPI SSDT PCI device support

From: John Keller <[email protected]>

Add SN platform support for running with an ACPI capable PROM that defines PCI devices in SSDT tables. There is a SSDT table for every occupied slot on a root bus, containing info for every PPB and/or device on the bus. The SSDTs will be dynamically loaded/unloaded at hotplug enable/disable.

Platform specific information that is currently passed via a SAL call, will now be passed via the Vendor resource in the ACPI Device object(s) defined in each SSDT.

---
 arch/ia64/sn/kernel/io_acpi_init.c      |  314 ++++++++++++++++++++++++++++---
 arch/ia64/sn/kernel/io_common.c         |   91 ++-------
 arch/ia64/sn/kernel/io_init.c           |   54 +++++-
 arch/ia64/sn/pci/pcibr/pcibr_provider.c |    6 +-
 include/asm-ia64/sn/acpi.h              |    5 +-
 include/asm-ia64/sn/pcibr_provider.h    |    2 +-
 include/asm-ia64/sn/pcidev.h            |    8 +-
 7 files changed, 372 insertions(+), 108 deletions(-)
arch/ia64/sn/kernel/io_acpi_init.c +290 -24
index cb96b4e..8c331ca 100644
@@ -13,6 +13,7 @@
 #include <asm/sn/sn_sal.h>
 #include "xtalk/hubdev.h"
 #include <linux/acpi.h>
+#include <acpi/acnamesp.h>
 
 
 /*
@@ -31,6 +32,12 @@ struct acpi_vendor_uuid sn_uuid = {
 		    0xa2, 0x7c, 0x08, 0x00, 0x69, 0x13, 0xea, 0x51 },
 };
 
+struct sn_pcidev_match {
+	u8 bus;
+	unsigned int devfn;
+	acpi_handle handle;
+};
+
 /*
  * Perform the early IO init in PROM.
  */
@@ -119,9 +126,11 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
 	status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
 					  &sn_uuid, &buffer);
 	if (ACPI_FAILURE(status)) {
-		printk(KERN_ERR "get_acpi_pcibus_ptr: "
-		       "get_acpi_bussoft_info() failed: %d\n",
-		       status);
+		printk(KERN_ERR "%s: "
+		       "acpi_get_vendor_resource() failed (0x%x) for: ",
+		       __FUNCTION__, status);
+		acpi_ns_print_node_pathname(handle, NULL);
+		printk("\n");
 		return NULL;
 	}
 	resource = buffer.pointer;
@@ -130,8 +139,8 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
 	if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) !=
 	     sizeof(struct pcibus_bussoft *)) {
 		printk(KERN_ERR
-		       "get_acpi_bussoft_ptr: Invalid vendor data "
-		       "length %d\n", vendor->byte_length);
+		       "%s: Invalid vendor data length %d\n",
+			__FUNCTION__, vendor->byte_length);
 		kfree(buffer.pointer);
 		return NULL;
 	}
@@ -143,34 +152,254 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
 }
 
 /*
- * sn_acpi_bus_fixup
+ * sn_extract_device_info - Extract the pcidev_info and the sn_irq_info
+ *			    pointers from the vendor resource using the
+ *			    provided acpi handle, and copy the structures
+ *			    into the argument buffers.
  */
-void
-sn_acpi_bus_fixup(struct pci_bus *bus)
+static int
+sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
+		    struct sn_irq_info **sn_irq_info)
 {
-	struct pci_dev *pci_dev = NULL;
-	struct pcibus_bussoft *prom_bussoft_ptr;
-	extern void sn_common_bus_fixup(struct pci_bus *,
-					struct pcibus_bussoft *);
+	u64 addr;
+	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
+	struct sn_irq_info *irq_info, *irq_info_prom;
+	struct pcidev_info *pcidev_ptr, *pcidev_prom_ptr;
+	struct acpi_resource *resource;
+	int ret = 0;
+	acpi_status status;
+	struct acpi_resource_vendor_typed *vendor;
 
-	if (!bus->parent) {	/* If root bus */
-		prom_bussoft_ptr = sn_get_bussoft_ptr(bus);
-		if (prom_bussoft_ptr == NULL) {
+	/*
+	 * The pointer to this device's pcidev_info structure in
+	 * the PROM, is in the vendor resource.
+	 */
+	status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
+					  &sn_uuid, &buffer);
+	if (ACPI_FAILURE(status)) {
+		printk(KERN_ERR
+		       "%s: acpi_get_vendor_resource() failed (0x%x) for: ",
+		        __FUNCTION__, status);
+		acpi_ns_print_node_pathname(handle, NULL);
+		printk("\n");
+		return 1;
+	}
+
+	resource = buffer.pointer;
+	vendor = &resource->data.vendor_typed;
+	if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) !=
+	    sizeof(struct pci_devdev_info *)) {
+		printk(KERN_ERR
+		       "%s: Invalid vendor data length: %d for: ",
+		        __FUNCTION__, vendor->byte_length);
+		acpi_ns_print_node_pathname(handle, NULL);
+		printk("\n");
+		ret = 1;
+		goto exit;
+	}
+
+	pcidev_ptr = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
+	if (!pcidev_ptr)
+		panic("%s: Unable to alloc memory for pcidev_info", __FUNCTION__);
+
+	memcpy(&addr, vendor->byte_data, sizeof(struct pcidev_info *));
+	pcidev_prom_ptr = __va(addr);
+	memcpy(pcidev_ptr, pcidev_prom_ptr, sizeof(struct pcidev_info));
+
+	/* Get the IRQ info */
+	irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
+	if (!irq_info)
+		 panic("%s: Unable to alloc memory for sn_irq_info", __FUNCTION__);
+
+	if (pcidev_ptr->pdi_sn_irq_info) {
+		irq_info_prom = __va(pcidev_ptr->pdi_sn_irq_info);
+		memcpy(irq_info, irq_info_prom, sizeof(struct sn_irq_info));
+	}
+
+	*pcidev_info = pcidev_ptr;
+	*sn_irq_info = irq_info;
+
+exit:
+	kfree(buffer.pointer);
+	return ret;
+}
+
+static unsigned int
+get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
+{
+	unsigned long adr;
+	acpi_handle child;
+	unsigned int devfn;
+	int function;
+	acpi_handle parent;
+	int slot;
+	acpi_status status;
+
+	/*
+	 * Do an upward search to find the root bus device, and
+	 * obtain the host devfn from the previous child device.
+	 */
+	child = device_handle;
+	while (child) {
+		status = acpi_get_parent(child, &parent);
+		if (ACPI_FAILURE(status)) {
+			printk(KERN_ERR "%s: acpi_get_parent() failed "
+			       "(0x%x) for: ", __FUNCTION__, status);
+			acpi_ns_print_node_pathname(child, NULL);
+			printk("\n");
+			panic("%s: Unable to find host devfn\n", __FUNCTION__);
+		}
+		if (parent == rootbus_handle)
+			break;
+		child = parent;
+	}
+	if (!child) {
+		printk(KERN_ERR "%s: Unable to find root bus for: ",
+		       __FUNCTION__);
+		acpi_ns_print_node_pathname(device_handle, NULL);
+		printk("\n");
+		BUG();
+	}
+
+	status = acpi_evaluate_integer(child, METHOD_NAME__ADR, NULL, &adr);
+	if (ACPI_FAILURE(status)) {
+		printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: ",
+		       __FUNCTION__, status);
+		acpi_ns_print_node_pathname(child, NULL);
+		printk("\n");
+		panic("%s: Unable to find host devfn\n", __FUNCTION__);
+	}
+
+	slot = (adr >> 16) & 0xffff;
+	function = adr & 0xffff;
+	devfn = PCI_DEVFN(slot, function);
+	return devfn;
+}
+
+/*
+ * find_matching_device - Callback routine to find the ACPI device
+ *			  that matches up with our pci_dev device.
+ *			  Matching is done on bus number and devfn.
+ *			  To find the bus number for a particular
+ *			  ACPI device, we must look at the _BBN method
+ *			  of its parent.
+ */
+static acpi_status
+find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv)
+{
+	unsigned long bbn = -1;
+	unsigned long adr;
+	acpi_handle parent = NULL;
+	acpi_status status;
+	unsigned int devfn;
+	int function;
+	int slot;
+	struct sn_pcidev_match *info = context;
+
+        status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
+                                       &adr);
+        if (ACPI_SUCCESS(status)) {
+		status = acpi_get_parent(handle, &parent);
+		if (ACPI_FAILURE(status)) {
 			printk(KERN_ERR
-			       "sn_pci_fixup_bus: 0x%04x:0x%02x Unable to "
-			       "obtain prom_bussoft_ptr\n",
-			       pci_domain_nr(bus), bus->number);
-			return;
+			       "%s: acpi_get_parent() failed (0x%x) for: ",
+					__FUNCTION__, status);
+			acpi_ns_print_node_pathname(handle, NULL);
+			printk("\n");
+			return AE_OK;
+		}
+		status = acpi_evaluate_integer(parent, METHOD_NAME__BBN,
+					       NULL, &bbn);
+		if (ACPI_FAILURE(status)) {
+			printk(KERN_ERR
+			  "%s: Failed to find _BBN in parent of: ",
+					__FUNCTION__);
+			acpi_ns_print_node_pathname(handle, NULL);
+			printk("\n");
+			return AE_OK;
+		}
+
+                slot = (adr >> 16) & 0xffff;
+                function = adr & 0xffff;
+                devfn = PCI_DEVFN(slot, function);
+                if ((info->devfn == devfn) && (info->bus == bbn)) {
+			/* We have a match! */
+			info->handle = handle;
+			return 1;
 		}
-		sn_common_bus_fixup(bus, prom_bussoft_ptr);
 	}
-	list_for_each_entry(pci_dev, &bus->devices, bus_list) {
-		sn_pci_fixup_slot(pci_dev);
+	return AE_OK;
+}
+
+/*
+ * sn_acpi_get_pcidev_info - Search ACPI namespace for the acpi
+ *			     device matching the specified pci_dev,
+ *			     and return the pcidev info and irq info.
+ */
+int
+sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info,
+			struct sn_irq_info **sn_irq_info)
+{
+	unsigned int host_devfn;
+	struct sn_pcidev_match pcidev_match;
+	acpi_handle rootbus_handle;
+	unsigned long segment;
+	acpi_status status;
+
+	rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle;
+        status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL,
+                                       &segment);
+        if (ACPI_SUCCESS(status)) {
+		if (segment != pci_domain_nr(dev)) {
+			printk(KERN_ERR
+			       "%s: Segment number mismatch, 0x%lx vs 0x%x for: ",
+			       __FUNCTION__, segment, pci_domain_nr(dev));
+			acpi_ns_print_node_pathname(rootbus_handle, NULL);
+			printk("\n");
+			return 1;
+		}
+	} else {
+		printk(KERN_ERR "%s: Unable to get __SEG from: ",
+		       __FUNCTION__);
+		acpi_ns_print_node_pathname(rootbus_handle, NULL);
+		printk("\n");
+		return 1;
+	}
+
+	/*
+	 * We want to search all devices in this segment/domain
+	 * of the ACPI namespace for the matching ACPI device,
+	 * which holds the pcidev_info pointer in its vendor resource.
+	 */
+	pcidev_match.bus = dev->bus->number;
+	pcidev_match.devfn = dev->devfn;
+	pcidev_match.handle = NULL;
+
+	acpi_walk_namespace(ACPI_TYPE_DEVICE, rootbus_handle, ACPI_UINT32_MAX,
+			    find_matching_device, &pcidev_match, NULL);
+
+	if (!pcidev_match.handle) {
+		printk(KERN_ERR
+		       "%s: Could not find matching ACPI device for %s.\n",
+		       __FUNCTION__, pci_name(dev));
+		return 1;
 	}
+
+	if (sn_extract_device_info(pcidev_match.handle, pcidev_info, sn_irq_info))
+		return 1;
+
+	/* Build up the pcidev_info.pdi_slot_host_handle */
+	host_devfn = get_host_devfn(pcidev_match.handle, rootbus_handle);
+	(*pcidev_info)->pdi_slot_host_handle =
+			((unsigned long) pci_domain_nr(dev) << 40) |
+					/* bus == 0 */
+					host_devfn;
+	return 0;
 }
 
 /*
- * sn_acpi_slot_fixup - Perform any SN specific slot fixup.
+ * sn_acpi_slot_fixup - Obtain the pcidev_info and sn_irq_info.
+ *			Perform any SN specific slot fixup.
  *			At present there does not appear to be
  *			any generic way to handle a ROM image
  *			that has been shadowed by the PROM, so
@@ -179,11 +408,18 @@ sn_acpi_bus_fixup(struct pci_bus *bus)
  */
 
 void
-sn_acpi_slot_fixup(struct pci_dev *dev, struct pcidev_info *pcidev_info)
+sn_acpi_slot_fixup(struct pci_dev *dev)
 {
 	void __iomem *addr;
+	struct pcidev_info *pcidev_info = NULL;
+	struct sn_irq_info *sn_irq_info = NULL;
 	size_t size;
 
+	if (sn_acpi_get_pcidev_info(dev, &pcidev_info, &sn_irq_info)) {
+		panic("%s:  Failure obtaining pcidev_info for %s\n",
+		      __FUNCTION__, pci_name(dev));
+	}
+
 	if (pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE]) {
 		/*
 		 * A valid ROM image exists and has been shadowed by the
@@ -200,8 +436,11 @@ sn_acpi_slot_fixup(struct pci_dev *dev, struct pcidev_info *pcidev_info)
 						(unsigned long) addr + size;
 		dev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_BIOS_COPY;
 	}
+	sn_pci_fixup_slot(dev, pcidev_info, sn_irq_info);
 }
 
+EXPORT_SYMBOL(sn_acpi_slot_fixup);
+
 static struct acpi_driver acpi_sn_hubdev_driver = {
 	.name = "SGI HUBDEV Driver",
 	.ids = "SGIHUB,SGITIO",
@@ -212,6 +451,33 @@ static struct acpi_driver acpi_sn_hubdev_driver = {
 
 
 /*
+ * sn_acpi_bus_fixup -  Perform SN specific setup of software structs
+ *			(pcibus_bussoft, pcidev_info) and hardware
+ *			registers, for the specified bus and devices under it.
+ */
+void
+sn_acpi_bus_fixup(struct pci_bus *bus)
+{
+	struct pci_dev *pci_dev = NULL;
+	struct pcibus_bussoft *prom_bussoft_ptr;
+
+	if (!bus->parent) {	/* If root bus */
+		prom_bussoft_ptr = sn_get_bussoft_ptr(bus);
+		if (prom_bussoft_ptr == NULL) {
+			printk(KERN_ERR
+			       "%s: 0x%04x:0x%02x Unable to "
+			       "obtain prom_bussoft_ptr\n",
+			       __FUNCTION__, pci_domain_nr(bus), bus->number);
+			return;
+		}
+		sn_common_bus_fixup(bus, prom_bussoft_ptr);
+	}
+	list_for_each_entry(pci_dev, &bus->devices, bus_list) {
+		sn_acpi_slot_fixup(pci_dev);
+	}
+}
+
+/*
  * sn_io_acpi_init - PROM has ACPI support for IO, defining at a minimum the
  *		     nodes and root buses in the DSDT. As a result, bus scanning
  *		     will be initiated by the Linux ACPI code.
arch/ia64/sn/kernel/io_common.c +20 -71

149 lines not on this page · raw message

arch/ia64/sn/kernel/io_init.c +48 -6

96 lines not on this page · raw message

arch/ia64/sn/pci/pcibr/pcibr_provider.c +4 -2
index 6846dc9..04a8256 100644
@@ -20,7 +20,8 @@
 #include "xtalk/hubdev.h"
 
 int
-sal_pcibr_slot_enable(struct pcibus_info *soft, int device, void *resp)
+sal_pcibr_slot_enable(struct pcibus_info *soft, int device, void *resp,
+                      char **ssdt)
 {
 	struct ia64_sal_retval ret_stuff;
 	u64 busnum;
@@ -32,7 +33,8 @@ sal_pcibr_slot_enable(struct pcibus_info *soft, int device, void *resp)
 	segment = soft->pbi_buscommon.bs_persist_segment;
 	busnum = soft->pbi_buscommon.bs_persist_busnum;
 	SAL_CALL_NOLOCK(ret_stuff, (u64) SN_SAL_IOIF_SLOT_ENABLE, segment,
-			busnum, (u64) device, (u64) resp, 0, 0, 0);
+			busnum, (u64) device, (u64) resp, (u64)ia64_tpa(ssdt),
+			0, 0);
 
 	return (int)ret_stuff.v0;
 }
include/asm-ia64/sn/acpi.h +2 -3
index 7d6cb3b..9ce2801 100644
@@ -11,8 +11,7 @@
 
 #include "acpi/acglobal.h"
 
-#define SN_ACPI_BASE_SUPPORT()   sn_acpi_base_support()
-
-extern int sn_acpi_base_support(void);
+extern int sn_acpi_rev;
+#define SN_ACPI_BASE_SUPPORT()   (sn_acpi_rev >= 0x20101)
 
 #endif /* _ASM_IA64_SN_ACPI_H */
include/asm-ia64/sn/pcibr_provider.h +1 -1
index da3eade..17cb6cc 100644
@@ -142,7 +142,7 @@ extern int 		pcibr_ate_alloc(struct pcibus_info *, int);
 extern void 		pcibr_ate_free(struct pcibus_info *, int);
 extern void 		ate_write(struct pcibus_info *, int, int, u64);
 extern int sal_pcibr_slot_enable(struct pcibus_info *soft, int device,
-				 void *resp);
+				 void *resp, char **ssdt);
 extern int sal_pcibr_slot_disable(struct pcibus_info *soft, int device,
 				  int action, void *resp);
 extern u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus);
include/asm-ia64/sn/pcidev.h +7 -1
index 9fe89a9..1c2382c 100644
@@ -70,10 +70,16 @@ extern void sn_irq_fixup(struct pci_dev *pci_dev,
 			 struct sn_irq_info *sn_irq_info);
 extern void sn_irq_unfixup(struct pci_dev *pci_dev);
 extern struct pcidev_info * sn_pcidev_info_get(struct pci_dev *);
+extern void sn_bus_fixup(struct pci_bus *);
+extern void sn_acpi_bus_fixup(struct pci_bus *);
+extern void sn_common_bus_fixup(struct pci_bus *, struct pcibus_bussoft *);
 extern void sn_bus_store_sysdata(struct pci_dev *dev);
 extern void sn_bus_free_sysdata(void);
 extern void sn_generate_path(struct pci_bus *pci_bus, char *address);
-extern void sn_pci_fixup_slot(struct pci_dev *dev);
+extern void sn_io_slot_fixup(struct pci_dev *);
+extern void sn_acpi_slot_fixup(struct pci_dev *);
+extern void sn_pci_fixup_slot(struct pci_dev *dev, struct pcidev_info *,
+			      struct sn_irq_info *);
 extern void sn_pci_unfixup_slot(struct pci_dev *dev);
 extern void sn_irq_lh_init(void);
 #endif				/* _ASM_IA64_SN_PCI_PCIDEV_H */
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#132 lore raw

PATCH 129/140 Altix: Add ACPI SSDT PCI device support (hotplug)

From: John Keller <[email protected]>

Support for dynamic loading and unloading of ACPI SSDT tables upon slot hotplugs and unplugs.

On SN platforms, we now represent every populated root bus slot with a single ACPI SSDT table containing info for every device and PPB attached to the slot.
These SSDTs are generated by the prom at initial boot and hotplug time. The
info in these SSDT tables is used by the SN kernel IO "fixup" code (which is called at boot and hotplug time).

On hotplugs (i.e. enable_slot()), if running with an ACPI capable prom, attempt to obtain a new ACPI SSDT table for the slot being hotplugged. If successful, add the table to the ACPI namespace (acpi_load_table()) and then walk the new devices and add them to the ACPI infrastructure (acpi_bus_add()).

On hot unplugs (i.e. disable_slot()), if running with an ACPI capable prom, attempt to remove the SSDT table associated with the slot from the ACPI namespace (acpi_unload_table_id()) and infastructure (acpi_bus_trim()).

From: John Keller <[email protected]>

A bug was fixed where the sgi hotplug driver was removing the slot's SSDT table from the ACPI namespace a bit too early in disable_slot(). Also, we now call acpi_bus_start() subsequent to acpi_bus_add().

---
 drivers/pci/hotplug/sgi_hotplug.c |  155 +++++++++++++++++++++++++++++++++++--
 1 files changed, 148 insertions(+), 7 deletions(-)
drivers/pci/hotplug/sgi_hotplug.c +148 -7
index 5d188c5..78cf071 100644
@@ -28,6 +28,8 @@
 #include <asm/sn/sn_feature_sets.h>
 #include <asm/sn/sn_sal.h>
 #include <asm/sn/types.h>
+#include <linux/acpi.h>
+#include <asm/sn/acpi.h>
 
 #include "../pci.h"
 
@@ -35,14 +37,17 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("SGI ([email protected], [email protected], [email protected])");
 MODULE_DESCRIPTION("SGI Altix Hot Plug PCI Controller Driver");
 
-#define PCIIO_ASIC_TYPE_TIOCA		4
+
+/* SAL call error codes. Keep in sync with prom header io/include/pcibr.h */
 #define PCI_SLOT_ALREADY_UP		2	/* slot already up */
 #define PCI_SLOT_ALREADY_DOWN		3	/* slot already down */
 #define PCI_L1_ERR			7	/* L1 console command error */
 #define PCI_EMPTY_33MHZ			15	/* empty 33 MHz bus */
+
+
+#define PCIIO_ASIC_TYPE_TIOCA		4
 #define PCI_L1_QSIZE			128	/* our L1 message buffer size */
 #define SN_MAX_HP_SLOTS			32	/* max hotplug slots */
-#define SGI_HOTPLUG_PROM_REV		0x0430	/* Min. required PROM version */
 #define SN_SLOT_NAME_SIZE		33	/* size of name string */
 
 /* internal list head */
@@ -227,7 +232,7 @@ static void sn_bus_free_data(struct pci_dev *dev)
 }
 
 static int sn_slot_enable(struct hotplug_slot *bss_hotplug_slot,
-			  int device_num)
+			  int device_num, char **ssdt)
 {
 	struct slot *slot = bss_hotplug_slot->private;
 	struct pcibus_info *pcibus_info;
@@ -240,7 +245,8 @@ static int sn_slot_enable(struct hotplug_slot *bss_hotplug_slot,
 	 * Power-on and initialize the slot in the SN
 	 * PCI infrastructure.
 	 */
-	rc = sal_pcibr_slot_enable(pcibus_info, device_num, &resp);
+	rc = sal_pcibr_slot_enable(pcibus_info, device_num, &resp, ssdt);
+
 
 	if (rc == PCI_SLOT_ALREADY_UP) {
 		dev_dbg(slot->pci_bus->self, "is already active\n");
@@ -335,6 +341,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
 	int func, num_funcs;
 	int new_ppb = 0;
 	int rc;
+	char *ssdt = NULL;
 	void pcibios_fixup_device_resources(struct pci_dev *);
 
 	/* Serialize the Linux PCI infrastructure */
@@ -342,14 +349,29 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
 
 	/*
 	 * Power-on and initialize the slot in the SN
-	 * PCI infrastructure.
+	 * PCI infrastructure. Also, retrieve the ACPI SSDT
+	 * table for the slot (if ACPI capable PROM).
 	 */
-	rc = sn_slot_enable(bss_hotplug_slot, slot->device_num);
+	rc = sn_slot_enable(bss_hotplug_slot, slot->device_num, &ssdt);
 	if (rc) {
 		mutex_unlock(&sn_hotplug_mutex);
 		return rc;
 	}
 
+	if (ssdt)
+		ssdt = __va(ssdt);
+	/* Add the new SSDT for the slot to the ACPI namespace */
+	if (SN_ACPI_BASE_SUPPORT() && ssdt) {
+		acpi_status ret;
+
+		ret = acpi_load_table((struct acpi_table_header *)ssdt);
+		if (ACPI_FAILURE(ret)) {
+			printk(KERN_ERR "%s: acpi_load_table failed (0x%x)\n",
+			       __FUNCTION__, ret);
+			/* try to continue on */
+		}
+	}
+
 	num_funcs = pci_scan_slot(slot->pci_bus,
 				  PCI_DEVFN(slot->device_num + 1, 0));
 	if (!num_funcs) {
@@ -374,7 +396,10 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
 			 * pdi_host_pcidev_info).
 			 */
 			pcibios_fixup_device_resources(dev);
-			sn_pci_fixup_slot(dev);
+			if (SN_ACPI_BASE_SUPPORT())
+				sn_acpi_slot_fixup(dev);
+			else
+				sn_io_slot_fixup(dev);
 			if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
 				unsigned char sec_bus;
 				pci_read_config_byte(dev, PCI_SECONDARY_BUS,
@@ -388,6 +413,63 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
 		}
 	}
 
+	/*
+	 * Add the slot's devices to the ACPI infrastructure */
+	if (SN_ACPI_BASE_SUPPORT() && ssdt) {
+		unsigned long adr;
+		struct acpi_device *pdevice;
+		struct acpi_device *device;
+		acpi_handle phandle;
+		acpi_handle chandle = NULL;
+		acpi_handle rethandle;
+		acpi_status ret;
+
+		phandle = PCI_CONTROLLER(slot->pci_bus)->acpi_handle;
+
+		if (acpi_bus_get_device(phandle, &pdevice)) {
+			dev_dbg(slot->pci_bus->self,
+				"no parent device, assuming NULL\n");
+			pdevice = NULL;
+		}
+
+		/*
+		 * Walk the rootbus node's immediate children looking for
+		 * the slot's device node(s). There can be more than
+		 * one for multifunction devices.
+		 */
+		for (;;) {
+			rethandle = NULL;
+			ret = acpi_get_next_object(ACPI_TYPE_DEVICE,
+						   phandle, chandle,
+						   &rethandle);
+
+			if (ret == AE_NOT_FOUND || rethandle == NULL)
+				break;
+
+			chandle = rethandle;
+
+			ret = acpi_evaluate_integer(chandle, METHOD_NAME__ADR,
+						    NULL, &adr);
+
+			if (ACPI_SUCCESS(ret) &&
+			    (adr>>16) == (slot->device_num + 1)) {
+
+				ret = acpi_bus_add(&device, pdevice, chandle,
+						   ACPI_BUS_TYPE_DEVICE);
+				if (ACPI_FAILURE(ret)) {
+					printk(KERN_ERR "%s: acpi_bus_add "
+					       "failed (0x%x) for slot %d "
+					       "func %d\n", __FUNCTION__,
+					       ret, (int)(adr>>16),
+					       (int)(adr&0xffff));
+					/* try to continue on */
+				} else {
+					acpi_bus_start(device);
+				}
+			}
+		}
+	}
+
 	/* Call the driver for the new device */
 	pci_bus_add_devices(slot->pci_bus);
 	/* Call the drivers for the new devices subordinate to PPB */
@@ -412,6 +494,7 @@ static int disable_slot(struct hotplug_slot *bss_hotplug_slot)
 	struct pci_dev *dev;
 	int func;
 	int rc;
+	acpi_owner_id ssdt_id = 0;
 
 	/* Acquire update access to the bus */
 	mutex_lock(&sn_hotplug_mutex);
@@ -422,6 +505,52 @@ static int disable_slot(struct hotplug_slot *bss_hotplug_slot)
 	if (rc)
 		goto leaving;
 
+	/* free the ACPI resources for the slot */
+	if (SN_ACPI_BASE_SUPPORT() &&
+            PCI_CONTROLLER(slot->pci_bus)->acpi_handle) {
+		unsigned long adr;
+		struct acpi_device *device;
+		acpi_handle phandle;
+		acpi_handle chandle = NULL;
+		acpi_handle rethandle;
+		acpi_status ret;
+
+		/* Get the rootbus node pointer */
+		phandle = PCI_CONTROLLER(slot->pci_bus)->acpi_handle;
+
+		/*
+		 * Walk the rootbus node's immediate children looking for
+		 * the slot's device node(s). There can be more than
+		 * one for multifunction devices.
+		 */
+		for (;;) {
+			rethandle = NULL;
+			ret = acpi_get_next_object(ACPI_TYPE_DEVICE,
+						   phandle, chandle,
+						   &rethandle);
+
+			if (ret == AE_NOT_FOUND || rethandle == NULL)
+				break;
+
+			chandle = rethandle;
+
+			ret = acpi_evaluate_integer(chandle,
+						    METHOD_NAME__ADR,
+						    NULL, &adr);
+			if (ACPI_SUCCESS(ret) &&
+			    (adr>>16) == (slot->device_num + 1)) {
+				/* retain the owner id */
+				acpi_get_id(chandle, &ssdt_id);
+
+				ret = acpi_bus_get_device(chandle,
+							  &device);
+				if (ACPI_SUCCESS(ret))
+					acpi_bus_trim(device, 1);
+			}
+		}
+
+	}
+
 	/* Free the SN resources assigned to the Linux device.*/
 	for (func = 0; func < 8;  func++) {
 		dev = pci_get_slot(slot->pci_bus,
@@ -434,6 +563,18 @@ static int disable_slot(struct hotplug_slot *bss_hotplug_slot)
 		}
 	}
 
+	/* Remove the SSDT for the slot from the ACPI namespace */
+	if (SN_ACPI_BASE_SUPPORT() && ssdt_id) {
+		acpi_status ret;
+		ret = acpi_unload_table_id(ssdt_id);
+		if (ACPI_FAILURE(ret)) {
+			printk(KERN_ERR "%s: acpi_unload_table_id "
+			       "failed (0x%x) for id %d\n",
+			       __FUNCTION__, ret, ssdt_id);
+			/* try to continue on */
+		}
+	}
+
 	/* free the collected sysdata pointers */
 	sn_bus_free_sysdata();
 
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#133 lore raw

PATCH 130/140 ACPICA: fix gcc build warnings

From: Alexey Starikovskiy <[email protected]>

drivers/acpi/namespace/nsparse.c:126: warning: int format, different type arg (arg 7) drivers/acpi/tables/tbfadt.c:224: warning: unsigned int format, different type arg (arg 6) drivers/acpi/utilities/utdebug.c:184: warning: cast from pointer to integer of different size drivers/acpi/utilities/utdebug.c:184: warning: cast from pointer to integer of different size drivers/acpi/utilities/utdebug.c:197: warning: cast from pointer to integer of different size drivers/acpi/processor_idle.c:1093: warning: long long unsigned int format, u64 arg (arg 5)

---
 drivers/acpi/namespace/nsparse.c |    2 +-
 drivers/acpi/processor_idle.c    |    2 +-
 drivers/acpi/tables/tbfadt.c     |    4 ++--
 drivers/acpi/utilities/utdebug.c |    6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)
drivers/acpi/namespace/nsparse.c +1 -1
index 0e57cc6..e696aa8 100644
@@ -124,7 +124,7 @@ acpi_ns_one_complete_parse(acpi_native_uint pass_number,
 	/* Parse the AML */
 
 	ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "*PARSE* pass %d parse\n",
-			  pass_number));
+			  (unsigned)pass_number));
 	status = acpi_ps_parse_aml(walk_state);
 
 	acpi_ps_delete_parse_tree(parse_root);
drivers/acpi/processor_idle.c +1 -1
index 1d633f7..6c6751b 100644
@@ -1090,7 +1090,7 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
 		seq_printf(seq, "latency[%03d] usage[%08d] duration[%020llu]\n",
 			   pr->power.states[i].latency,
 			   pr->power.states[i].usage,
-			   pr->power.states[i].time);
+			   (unsigned long long)pr->power.states[i].time);
 	}
 
       end:
drivers/acpi/tables/tbfadt.c +2 -2
index a6723a2..807c711 100644
@@ -222,8 +222,8 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
 	 */
 	if (length > sizeof(struct acpi_table_fadt)) {
 		ACPI_WARNING((AE_INFO,
-			      "FADT (revision %u) is longer than ACPI 2.0 version, truncating length 0x%X to 0x%X",
-			      table->revision, length,
+			      "FADT (revision %u) is longer than ACPI 2.0 version, truncating length 0x%X to 0x%zX",
+			      table->revision, (unsigned)length,
 			      sizeof(struct acpi_table_fadt)));
 	}
 
drivers/acpi/utilities/utdebug.c +3 -3
index 179ad18..61ad4f2 100644
@@ -180,8 +180,8 @@ acpi_ut_debug_print(u32 requested_debug_level,
 	if (thread_id != acpi_gbl_prev_thread_id) {
 		if (ACPI_LV_THREADS & acpi_dbg_level) {
 			acpi_os_printf
-			    ("\n**** Context Switch from TID %X to TID %X ****\n\n",
-			     (unsigned)acpi_gbl_prev_thread_id, (unsigned)thread_id);
+			    ("\n**** Context Switch from TID %lX to TID %lX ****\n\n",
+			     (unsigned long)acpi_gbl_prev_thread_id, (unsigned long)thread_id);
 		}
 
 		acpi_gbl_prev_thread_id = thread_id;
@@ -194,7 +194,7 @@ acpi_ut_debug_print(u32 requested_debug_level,
 	acpi_os_printf("%8s-%04ld ", module_name, line_number);
 
 	if (ACPI_LV_THREADS & acpi_dbg_level) {
-		acpi_os_printf("[%04X] ", (unsigned)thread_id);
+		acpi_os_printf("[%04lX] ", (unsigned long)thread_id);
 	}
 
 	acpi_os_printf("[%02ld] %-22.22s: ",
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#134 lore raw

PATCH 131/140 ACPI: dock: check if parent is on dock

From: Kristen Carlson Accardi <[email protected]>

When determining if a device is on a dock station, we should check the parent of the device as well.

---
 drivers/acpi/dock.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)
drivers/acpi/dock.c +12 -4
index 90990a4..688e83a 100644
@@ -615,20 +615,28 @@ static acpi_status
 find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv)
 {
 	acpi_status status;
-	acpi_handle tmp;
+	acpi_handle tmp, parent;
 	struct dock_station *ds = context;
 	struct dock_dependent_device *dd;
 
 	status = acpi_bus_get_ejd(handle, &tmp);
-	if (ACPI_FAILURE(status))
-		return AE_OK;
+	if (ACPI_FAILURE(status)) {
+		/* try the parent device as well */
+		status = acpi_get_parent(handle, &parent);
+		if (ACPI_FAILURE(status))
+			goto fdd_out;
+		/* see if parent is dependent on dock */
+		status = acpi_bus_get_ejd(parent, &tmp);
+		if (ACPI_FAILURE(status))
+			goto fdd_out;
+	}
 
 	if (tmp == ds->handle) {
 		dd = alloc_dock_dependent_device(handle);
 		if (dd)
 			add_dock_dependent_device(ds, dd);
 	}
-
+fdd_out:
 	return AE_OK;
 }
 
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#135 lore raw

PATCH 132/140 ACPI: bay: new driver adding removable drive bay support

From: Kristen Carlson Accardi <[email protected]>

---
 drivers/acpi/Kconfig  |    7 +
 drivers/acpi/Makefile |    3 +-
 drivers/acpi/bay.c    |  592 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 601 insertions(+), 1 deletions(-)
 create mode 100644 drivers/acpi/bay.c
drivers/acpi/Kconfig +7 -0
index f4f000a..2caef09 100644
@@ -139,6 +139,13 @@ config ACPI_DOCK
 	help
 	  This driver adds support for ACPI controlled docking stations
 
+config ACPI_BAY
+	tristate "Removable Drive Bay"
+	depends on EXPERIMENTAL
+	help
+	  This driver adds support for ACPI controlled removable drive
+	  bays such as the IBM ultrabay or the Dell Module Bay.
+
 config ACPI_PROCESSOR
 	tristate "Processor"
 	default y
drivers/acpi/Makefile +2 -1
index bce7ca2..1a73805 100644
@@ -43,7 +43,8 @@ obj-$(CONFIG_ACPI_BUTTON)	+= button.o
 obj-$(CONFIG_ACPI_EC)		+= ec.o
 obj-$(CONFIG_ACPI_FAN)		+= fan.o
 obj-$(CONFIG_ACPI_DOCK)		+= dock.o
-obj-$(CONFIG_ACPI_VIDEO)	+= video.o 
+obj-$(CONFIG_ACPI_BAY)		+= bay.o
+obj-$(CONFIG_ACPI_VIDEO)	+= video.o
 obj-$(CONFIG_ACPI_HOTKEY)	+= hotkey.o
 obj-y				+= pci_root.o pci_link.o pci_irq.o pci_bind.o
 obj-$(CONFIG_ACPI_POWER)	+= power.o
drivers/acpi/bay.c new file +592 -0

592 lines not on this page · raw message

Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#136 lore raw

PATCH 133/140 ACPI: bay: delete unused variable

From: Len Brown <[email protected]>

drivers/acpi/bay.c: In function ‘bay_notify’:
drivers/acpi/bay.c:491: warning: unused variable ‘bay’

---
 drivers/acpi/bay.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/acpi/bay.c +0 -1
index 1cfc0b7..412590d 100644
@@ -488,7 +488,6 @@ static struct acpi_device * bay_create_acpi_device(acpi_handle handle)
 static void bay_notify(acpi_handle handle, u32 event, void *data)
 {
 	struct acpi_device *dev;
-	struct bay *bay = data;
 
 	bay_dprintk(handle, "Bay event");
 
Signature · 5 lines
1.5.0.rc3.39.gec804
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author reviewer
#137 lore raw

PATCH 134/140 ACPI: bay: remove prototype procfs code

From: Kristen Carlson Accardi <[email protected]>

Remove all the procfs related code.

---
 drivers/acpi/bay.c |  154 +---------------------------------------------------
 1 files changed, 2 insertions(+), 152 deletions(-)
drivers/acpi/bay.c +2 -152
index 412590d..0c0a620 100644
@@ -28,7 +28,6 @@
 #include <linux/notifier.h>
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
-#include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <asm/uaccess.h>
 
@@ -67,12 +66,10 @@ struct bay {
 	acpi_handle handle;
 	char *name;
 	struct list_head list;
-	struct proc_dir_entry *proc;
 };
 
 LIST_HEAD(drive_bays);
 
-static struct proc_dir_entry *acpi_bay_dir;
 
 /*****************************************************************************
  *                         Drive Bay functions                               *
@@ -219,147 +216,16 @@ static int acpi_bay_add(struct acpi_device *device)
 	return 0;
 }
 
-static int acpi_bay_status_seq_show(struct seq_file *seq, void *offset)
-{
-	struct bay *bay = (struct bay *)seq->private;
-
-	if (!bay)
-		return 0;
-
-	if (bay_present(bay))
-		seq_printf(seq, "present\n");
-	else
-		seq_printf(seq, "removed\n");
-
-	return 0;
-}
-
-static ssize_t
-acpi_bay_write_eject(struct file *file,
-		      const char __user * buffer,
-		      size_t count, loff_t * data)
-{
-	struct seq_file *m = (struct seq_file *)file->private_data;
-	struct bay *bay = (struct bay *)m->private;
-	char str[12] = { 0 };
-	u32 state = 0;
-
-	/* FIXME - our only valid value here is 1 */
-	if (!bay || count + 1 > sizeof str)
-		return -EINVAL;
-
-	if (copy_from_user(str, buffer, count))
-		return -EFAULT;
-
-	str[count] = 0;
-	state = simple_strtoul(str, NULL, 0);
-	if (state)
-		eject_device(bay->handle);
-
-	return count;
-}
-
-static int
-acpi_bay_status_open_fs(struct inode *inode, struct file *file)
-{
-	return single_open(file, acpi_bay_status_seq_show,
-			   PDE(inode)->data);
-}
-
-static int
-acpi_bay_eject_open_fs(struct inode *inode, struct file *file)
-{
-	return single_open(file, acpi_bay_status_seq_show,
-			   PDE(inode)->data);
-}
-
-static struct file_operations acpi_bay_status_fops = {
-	.open = acpi_bay_status_open_fs,
-	.read = seq_read,
-	.llseek = seq_lseek,
-	.release = single_release,
-};
-
-static struct file_operations acpi_bay_eject_fops = {
-	.open = acpi_bay_eject_open_fs,
-	.read = seq_read,
-	.write = acpi_bay_write_eject,
-	.llseek = seq_lseek,
-	.release = single_release,
-};
-#if 0
-static struct file_operations acpi_bay_insert_fops = {
-	.open = acpi_bay_insert_open_fs,
-	.read = seq_read,
-	.llseek = seq_lseek,
-	.release = single_release,
-};
-#endif
 static int acpi_bay_add_fs(struct bay *bay)
 {
-	struct proc_dir_entry *entry = NULL;
-
 	if (!bay)
 		return -EINVAL;
-
-	/*
-	 * create a proc entry for this device
-	 * we need to do this a little bit differently than normal
-	 * acpi device drivers because our device may not be present
-	 * at the moment, and therefore we have no acpi_device struct
-	 */
-
-	bay->proc = proc_mkdir(bay->name, acpi_bay_dir);
-
-	/* 'status' [R] */
-	entry = create_proc_entry("status",
-				  S_IRUGO, bay->proc);
-	if (!entry)
-		return -EIO;
-	else {
-		entry->proc_fops = &acpi_bay_status_fops;
-		entry->data = bay;
-		entry->owner = THIS_MODULE;
-	}
-	/* 'eject' [W] */
-	entry = create_proc_entry("eject",
-				  S_IWUGO, bay->proc);
-	if (!entry)
-		return -EIO;
-	else {
-		entry->proc_fops = &acpi_bay_eject_fops;
-		entry->data = bay;
-		entry->owner = THIS_MODULE;
-	}
-#if 0
-	/* 'insert' [W] */
-	entry = create_proc_entry("insert",
-				  S_IWUGO, bay->proc);
-	if (!entry)
-		return -EIO;
-	else {
-		entry->proc_fops = &acpi_bay_insert_fops;
-		entry->data = bay;
-		entry->owner = THIS_MODULE;
-	}
-#endif
-	return 0;
 }
 
 static void acpi_bay_remove_fs(struct bay *bay)
 {
 	if (!bay)
 		return;
-
-	if (bay->proc) {
-		remove_proc_entry("status", bay->proc);
-		remove_proc_entry("eject", bay->proc);
-#if 0
-		remove_proc_entry("insert", bay->proc);
-#endif
-		remove_proc_entry(bay->name, acpi_bay_dir);
-		bay->proc = NULL;
-	}
 }
 
 static int bay_is_dock_device(acpi_handle handle)
@@ -384,13 +250,6 @@ static int bay_add(acpi_handle handle)
 	bay_dprintk(handle, "Adding notify handler");
 
 	/*
-	 * if this is the first bay device found, make the root
-	 * proc entry
-	 */
-	if (acpi_bay_dir == NULL)
-		acpi_bay_dir = proc_mkdir(ACPI_BAY_CLASS, acpi_root_dir);
-
-	/*
 	 * Initialize bay device structure
 	 */
 	new_bay = kmalloc(GFP_ATOMIC, sizeof(*new_bay));
@@ -544,21 +403,15 @@ static int __init bay_init(void)
 {
 	int bays = 0;
 
-	acpi_bay_dir = NULL;
 	INIT_LIST_HEAD(&drive_bays);
 
 	/* look for dockable drive bays */
 	acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
 		ACPI_UINT32_MAX, find_bay, &bays, NULL);
 
-	if (bays) {
-		if ((acpi_bus_register_driver(&acpi_bay_driver) < 0)) {
+	if (bays)
+		if ((acpi_bus_register_driver(&acpi_bay_driver) < 0))
 			printk(KERN_ERR "Unable to register bay driver\n");
-			if (acpi_bay_dir)
-				remove_proc_entry(ACPI_BAY_CLASS,
-					acpi_root_dir);
-		}
-	}
 
 	if (!bays)
 		return -ENODEV;
@@ -580,9 +433,6 @@ static void __exit bay_exit(void)
 		kfree(bay);
 	}
 
-	if (acpi_bay_dir)
-		remove_proc_entry(ACPI_BAY_CLASS, acpi_root_dir);
-
 	acpi_bus_unregister_driver(&acpi_bay_driver);
 }
 
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#138 lore raw

PATCH 135/140 ACPI: bay: make bay a platform driver

From: Kristen Carlson Accardi <[email protected]>

Convert the bay driver to be a platform driver, so that we can have sysfs entries.

---
 drivers/acpi/bay.c |   87 +++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 76 insertions(+), 11 deletions(-)
drivers/acpi/bay.c +76 -11
index 0c0a620..3f0ae7d 100644
@@ -30,6 +30,7 @@
 #include <acpi/acpi_drivers.h>
 #include <linux/seq_file.h>
 #include <asm/uaccess.h>
+#include <linux/platform_device.h>
 
 #define ACPI_BAY_DRIVER_NAME "ACPI Removable Drive Bay Driver"
 
@@ -45,7 +46,6 @@ MODULE_LICENSE("GPL");
 	struct acpi_buffer buffer = {sizeof(prefix), prefix};\
 	acpi_get_name(h, ACPI_FULL_PATHNAME, &buffer);\
 	printk(KERN_DEBUG PREFIX "%s: %s\n", prefix, s); }
-
 static void bay_notify(acpi_handle handle, u32 event, void *data);
 static int acpi_bay_add(struct acpi_device *device);
 static int acpi_bay_remove(struct acpi_device *device, int type);
@@ -66,6 +66,7 @@ struct bay {
 	acpi_handle handle;
 	char *name;
 	struct list_head list;
+	struct platform_device *pdev;
 };
 
 LIST_HEAD(drive_bays);
@@ -133,6 +134,33 @@ static void eject_device(acpi_handle handle)
 		pr_debug("Failed to evaluate _EJ0!\n");
 }
 
+/*
+ * show_present - read method for "present" file in sysfs
+ */
+static ssize_t show_present(struct device *dev,
+			   struct device_attribute *attr, char *buf)
+{
+	struct bay *bay = dev_get_drvdata(dev);
+	return snprintf(buf, PAGE_SIZE, "%d\n", bay_present(bay));
+
+}
+DEVICE_ATTR(present, S_IRUGO, show_present, NULL);
+
+/*
+ * write_eject - write method for "eject" file in sysfs
+ */
+static ssize_t write_eject(struct device *dev, struct device_attribute *attr,
+			   const char *buf, size_t count)
+{
+	struct bay *bay = dev_get_drvdata(dev);
+
+	if (!count)
+		return -EINVAL;
+
+	eject_device(bay->handle);
+	return count;
+}
+DEVICE_ATTR(eject, S_IWUSR, NULL, write_eject);
 
 /**
  * is_ata - see if a device is an ata device
@@ -218,14 +246,31 @@ static int acpi_bay_add(struct acpi_device *device)
 
 static int acpi_bay_add_fs(struct bay *bay)
 {
-	if (!bay)
-		return -EINVAL;
+	int ret;
+	struct device *dev = &bay->pdev->dev;
+
+	ret = device_create_file(dev, &dev_attr_present);
+	if (ret)
+		goto add_fs_err;
+	ret = device_create_file(dev, &dev_attr_eject);
+	if (ret) {
+		device_remove_file(dev, &dev_attr_present);
+		goto add_fs_err;
+	}
+	return 0;
+
+ add_fs_err:
+	bay_dprintk(bay->handle, "Error adding sysfs files\n");
+	return ret;
 }
 
 static void acpi_bay_remove_fs(struct bay *bay)
 {
-	if (!bay)
-		return;
+	struct device *dev = &bay->pdev->dev;
+
+	/* cleanup sysfs */
+	device_remove_file(dev, &dev_attr_present);
+	device_remove_file(dev, &dev_attr_eject);
 }
 
 static int bay_is_dock_device(acpi_handle handle)
@@ -240,10 +285,11 @@ static int bay_is_dock_device(acpi_handle handle)
 	return (is_dock_device(handle) || is_dock_device(parent));
 }
 
-static int bay_add(acpi_handle handle)
+static int bay_add(acpi_handle handle, int id)
 {
 	acpi_status status;
 	struct bay *new_bay;
+	struct platform_device *pdev;
 	struct acpi_buffer nbuffer = {ACPI_ALLOCATE_BUFFER, NULL};
 	acpi_get_name(handle, ACPI_FULL_PATHNAME, &nbuffer);
 
@@ -252,12 +298,24 @@ static int bay_add(acpi_handle handle)
 	/*
 	 * Initialize bay device structure
 	 */
-	new_bay = kmalloc(GFP_ATOMIC, sizeof(*new_bay));
+	new_bay = kzalloc(GFP_ATOMIC, sizeof(*new_bay));
 	INIT_LIST_HEAD(&new_bay->list);
 	new_bay->handle = handle;
 	new_bay->name = (char *)nbuffer.pointer;
-	list_add(&new_bay->list, &drive_bays);
-	acpi_bay_add_fs(new_bay);
+
+	/* initialize platform device stuff */
+	pdev = platform_device_register_simple(ACPI_BAY_CLASS, id, NULL, 0);
+	if (pdev == NULL) {
+		printk(KERN_ERR PREFIX "Error registering bay device\n");
+		goto bay_add_err;
+	}
+	new_bay->pdev = pdev;
+	platform_set_drvdata(pdev, new_bay);
+
+	if (acpi_bay_add_fs(new_bay)) {
+		platform_device_unregister(new_bay->pdev);
+		goto bay_add_err;
+	}
 
 	/* register for events on this device */
 	status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
@@ -273,8 +331,14 @@ static int bay_add(acpi_handle handle)
 		bay_dprintk(handle, "Is dependent on dock\n");
 		register_hotplug_dock_device(handle, bay_notify, new_bay);
 	}
+	list_add(&new_bay->list, &drive_bays);
 	printk(KERN_INFO PREFIX "Bay [%s] Added\n", new_bay->name);
 	return 0;
+
+bay_add_err:
+	kfree(new_bay->name);
+	kfree(new_bay);
+	return -ENODEV;
 }
 
 static int acpi_bay_remove(struct acpi_device *device, int type)
@@ -393,8 +457,8 @@ find_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
 	 */
 	if (is_ejectable_bay(handle)) {
 		bay_dprintk(handle, "found ejectable bay");
-		bay_add(handle);
-		(*count)++;
+		if (!bay_add(handle, *count))
+			(*count)++;
 	}
 	return AE_OK;
 }
@@ -429,6 +493,7 @@ static void __exit bay_exit(void)
 		acpi_bay_remove_fs(bay);
 		acpi_remove_notify_handler(bay->handle, ACPI_SYSTEM_NOTIFY,
 			bay_notify);
+		platform_device_unregister(bay->pdev);
 		kfree(bay->name);
 		kfree(bay);
 	}
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#139 lore raw

PATCH 136/140 ACPI: bay: make drive_bays static

From: Adrian Bunk <[email protected]>

---
 drivers/acpi/bay.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/bay.c +1 -1
index 3f0ae7d..aa1b131 100644
@@ -69,7 +69,7 @@ struct bay {
 	struct platform_device *pdev;
 };
 
-LIST_HEAD(drive_bays);
+static LIST_HEAD(drive_bays);
 
 
 /*****************************************************************************
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#140 lore raw

PATCH 137/140 ACPI: bay: new driver is EXPERIMENTAL

From: Len Brown <[email protected]>

---
 drivers/acpi/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/Kconfig +1 -1
index 2caef09..b4bb000 100644
@@ -140,7 +140,7 @@ config ACPI_DOCK
 	  This driver adds support for ACPI controlled docking stations
 
 config ACPI_BAY
-	tristate "Removable Drive Bay"
+	tristate "Removable Drive Bay (EXPERIMENTAL)"
 	depends on EXPERIMENTAL
 	help
 	  This driver adds support for ACPI controlled removable drive
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#141 lore raw

PATCH 138/140 ACPI: bay: Convert ACPI Bay driver to be compatible with sysfs update.

From: Zhang Rui <[email protected]>

Set fake hid for ejectable drive bay.
Match bay devices by checking the hid.
Remove .match method of Bay driver.

---
 drivers/acpi/bay.c  |   18 +-----------------
 drivers/acpi/scan.c |   40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 17 deletions(-)
drivers/acpi/bay.c +1 -17
index aa1b131..667fa1d 100644
@@ -49,16 +49,14 @@ MODULE_LICENSE("GPL");
 static void bay_notify(acpi_handle handle, u32 event, void *data);
 static int acpi_bay_add(struct acpi_device *device);
 static int acpi_bay_remove(struct acpi_device *device, int type);
-static int acpi_bay_match(struct acpi_device *device,
-				struct acpi_driver *driver);
 
 static struct acpi_driver acpi_bay_driver = {
 	.name = ACPI_BAY_DRIVER_NAME,
 	.class = ACPI_BAY_CLASS,
+	.ids = ACPI_BAY_HID,
 	.ops = {
 		.add = acpi_bay_add,
 		.remove = acpi_bay_remove,
-		.match = acpi_bay_match,
 		},
 };
 
@@ -347,20 +345,6 @@ static int acpi_bay_remove(struct acpi_device *device, int type)
 	return 0;
 }
 
-static int acpi_bay_match(struct acpi_device *device,
-				struct acpi_driver *driver)
-{
-	if (!device || !driver)
-		return -EINVAL;
-
-	if (is_ejectable_bay(device->handle)) {
-		bay_dprintk(device->handle, "matching bay device");
-		return 0;
-	}
-
-	return -ENODEV;
-}
-
 /**
  * bay_create_acpi_device - add new devices to acpi
  * @handle - handle of the device to add
drivers/acpi/scan.c +40 -0
index 5049230..0a13d95 100644
@@ -837,6 +837,42 @@ acpi_video_bus_match(struct acpi_device *device)
 	return -ENODEV;
 }
 
+/*
+ * acpi_bay_match - see if a device is an ejectable driver bay
+ *
+ * If an acpi object is ejectable and has one of the ACPI ATA methods defined,
+ * then we can safely call it an ejectable drive bay
+ */
+static int acpi_bay_match(struct acpi_device *device){
+	acpi_status status;
+	acpi_handle handle;
+	acpi_handle tmp;
+	acpi_handle phandle;
+
+	handle = device->handle;
+
+	status = acpi_get_handle(handle, "_EJ0", &tmp);
+	if (ACPI_FAILURE(status))
+		return -ENODEV;
+
+	if ((ACPI_SUCCESS(acpi_get_handle(handle, "_GTF", &tmp))) ||
+		(ACPI_SUCCESS(acpi_get_handle(handle, "_GTM", &tmp))) ||
+		(ACPI_SUCCESS(acpi_get_handle(handle, "_STM", &tmp))) ||
+		(ACPI_SUCCESS(acpi_get_handle(handle, "_SDD", &tmp))))
+		return 0;
+
+	if (acpi_get_parent(handle, &phandle))
+		return -ENODEV;
+
+        if ((ACPI_SUCCESS(acpi_get_handle(phandle, "_GTF", &tmp))) ||
+                (ACPI_SUCCESS(acpi_get_handle(phandle, "_GTM", &tmp))) ||
+                (ACPI_SUCCESS(acpi_get_handle(phandle, "_STM", &tmp))) ||
+                (ACPI_SUCCESS(acpi_get_handle(phandle, "_SDD", &tmp))))
+                return 0;
+
+	return -ENODEV;
+}
+
 static void acpi_device_set_id(struct acpi_device *device,
 			       struct acpi_device *parent, acpi_handle handle,
 			       int type)
@@ -872,6 +908,10 @@ static void acpi_device_set_id(struct acpi_device *device,
 			status = acpi_video_bus_match(device);
 			if(ACPI_SUCCESS(status))
 				hid = ACPI_VIDEO_HID;
+
+			status = acpi_bay_match(device);
+			if (ACPI_SUCCESS(status))
+				hid = ACPI_BAY_HID;
 		}
 		break;
 	case ACPI_BUS_TYPE_POWER:
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#142 lore raw

PATCH 139/140 asus-laptop: merge with ACPICA table update

From: Len Brown <[email protected]>

No longer need a buffer for a copy of the DSDT,
just a pointer to the mapped table.

---
 drivers/misc/asus-laptop.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
drivers/misc/asus-laptop.c +1 -6
index b624350..861c399 100644
@@ -777,7 +777,6 @@ static int asus_handle_init(char *name, acpi_handle * handle,
 static int asus_hotk_get_info(void)
 {
 	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
-	struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL };
 	union acpi_object *model = NULL;
 	int bsts_result, hwrs_result;
 	char *string = NULL;
@@ -791,11 +790,9 @@ static int asus_hotk_get_info(void)
 	 * HID), this bit will be moved. A global variable asus_info contains
 	 * the DSDT header.
 	 */
-	status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt);
+	status = acpi_get_table(ACPI_SIG_DSDT, 1, &asus_info);
 	if (ACPI_FAILURE(status))
 		printk(ASUS_WARNING "Couldn't get the DSDT table header\n");
-	else
-		asus_info = dsdt.pointer;
 
 	/* We have to write 0 on init this far for all ASUS models */
 	if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) {
@@ -1014,8 +1011,6 @@ static void __exit asus_laptop_exit(void)
 	sysfs_remove_group(&asuspf_device->dev.kobj, &asuspf_attribute_group);
 	platform_device_unregister(asuspf_device);
 	platform_driver_unregister(&asuspf_driver);
-
-	kfree(asus_info);
 }
 
 static int asus_backlight_init(struct device *dev)
Signature · 1 line
1.5.0.rc3.39.gec804
author reviewer
#143 lore raw

PATCH 140/140 ACPICA: reduce table header messages to fit within 80 columns

From: Len Brown <[email protected]>

---
 drivers/acpi/tables/tbutils.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/acpi/tables/tbutils.c +6 -6
index 4a2f99e..1da64b4 100644
@@ -97,15 +97,15 @@ acpi_tb_print_table_header(acpi_physical_address address,
 
 		/* FACS only has signature and length fields of common table header */
 
-		ACPI_INFO((AE_INFO, "%4.4s @ 0x%p/0x%04X",
-			   header->signature, ACPI_CAST_PTR(void, address),
+		ACPI_INFO((AE_INFO, "%4.4s %08lX, %04X",
+			   header->signature, (unsigned long)address,
 			   header->length));
 	} else if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_RSDP)) {
 
 		/* RSDP has no common fields */
 
-		ACPI_INFO((AE_INFO, "RSDP @ 0x%p/0x%04X (v%3.3d %6.6s)",
-			   ACPI_CAST_PTR(void, address),
+		ACPI_INFO((AE_INFO, "RSDP %08lX, %04X (r%d %6.6s)",
+			   (unsigned long)address,
 			   (ACPI_CAST_PTR(struct acpi_table_rsdp, header)->
 			    revision >
 			    0) ? ACPI_CAST_PTR(struct acpi_table_rsdp,
@@ -118,8 +118,8 @@ acpi_tb_print_table_header(acpi_physical_address address,
 		/* Standard ACPI table with full common header */
 
 		ACPI_INFO((AE_INFO,
-			   "%4.4s @ 0x%p/0x%04X (v%3.3d %6.6s %8.8s 0x%08X %4.4s 0x%08X)",
-			   header->signature, ACPI_CAST_PTR(void, address),
+			   "%4.4s %08lX, %04X (r%d %6.6s %8.8s %8X %4.4s %8X)",
+			   header->signature, (unsigned long)address,
 			   header->length, header->revision, header->oem_id,
 			   header->oem_table_id, header->oem_revision,
 			   header->asl_compiler_id,
Signature · 1 line
1.5.0.rc3.39.gec804
#144 lore raw

Re: [PATCH 135/140] ACPI: bay: make bay a platform driver

In reply to Len Brown

drivers/acpi/bay.c static int bay_add(acpi_handle handle) · line 302

Quoted 3 lines · Len Brown
drivers/acpi/bay.c +1 -1
-	new_bay = kmalloc(GFP_ATOMIC, sizeof(*new_bay));
+	new_bay = kzalloc(GFP_ATOMIC, sizeof(*new_bay));
 	INIT_LIST_HEAD(&new_bay->list);

You might want to check for kzalloc failure.

#145 lore raw
In reply to Len Brown
Quoted 9 lines · Len Brown

The following series of patches are
in the acpi release tree for inclusion in 2.6.21.

If you see any problems with them, please speak up now.

Yes, there are more coming for 2.6.21 after this. If you are excited about a patch for 2.6.21 that is not included in this patch, please ping me about it now, to be sure I don't miss it.

May I suggest the sony-acpi/sony-laptop stuff from akpm and me? :)

Thanks

Signature · 2 lines
mattia
:wq!
author reviewer
#146 lore raw
Quoted 4 lines · Mattia Dongili
Quoted 3 lines · Len Brown

The following series of patches are
in the acpi release tree for inclusion in 2.6.21.

Quoted 8 lines
Quoted 6 lines

If you see any problems with them, please speak up now.

Yes, there are more coming for 2.6.21 after this. If you are excited about a patch for 2.6.21 that is not included in this patch, please ping me about it now, to be sure I don't miss it.

May I suggest the sony-acpi/sony-laptop stuff from akpm and me? :)

Yep, I'm sifting through that now.

thanks,
-Len