[PATCH] check xpm2_control_block while setting bm_control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check both pm2_control_block and cpm2_control_block for bm_control. It should
be better to do this with checking of address from consolidated
fadt_info_table[]. But, that will need some changes in acpica tables code.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@xxxxxxxxx>

Index: linux-2.6.22-rc-mm/drivers/acpi/processor_core.c
===================================================================
--- linux-2.6.22-rc-mm.orig/drivers/acpi/processor_core.c	2007-06-07 11:03:56.000000000 -0700
+++ linux-2.6.22-rc-mm/drivers/acpi/processor_core.c	2007-06-07 11:20:53.000000000 -0700
@@ -521,11 +521,22 @@
 
 	acpi_processor_errata(pr);
 
+	if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) {
+		/* FADT rev. 2 */
+		if (acpi_gbl_FADT.xpm_timer_block.space_id !=
+		    ACPI_ADR_SPACE_SYSTEM_IO)
 	/*
 	 * Check to see if we have bus mastering arbitration control.  This
 	 * is required for proper C3 usage (to maintain cache coherency).
+	 * Check both pm2_control_block and xpm2_control_block
 	 */
-	if (acpi_gbl_FADT.pm2_control_block && acpi_gbl_FADT.pm2_control_length) {
+	if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
+	     acpi_gbl_FADT.xpm2_control_block.space_id ==
+						 ACPI_ADR_SPACE_SYSTEM_IO &&
+	     acpi_gbl_FADT.xpm2_control_block.address &&
+	     acpi_gbl_FADT.xpm2_control_block.bit_width) ||
+	    (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"));
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux