lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <49C017D0.6030502@kernel.org>
Date:	Tue, 17 Mar 2009 14:36:16 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Len Brown <lenb@...nel.org>, Jan Beulich <jbeulich@...ell.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>
Subject: [PATCH] acpi: remove the wrong warning about xpm1a_event_block.bit_width


Impact: fix warning

it seems there are some merging problems.

that bit_width is already divided by 2. so I got warning from all servers.

also in that case do try to the fallback like comments saying.

Signed-off-by: Yinghai Lu <yinghai@...nel.org>

---
 drivers/acpi/acpica/tbfadt.c |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

Index: linux-2.6/drivers/acpi/acpica/tbfadt.c
===================================================================
--- linux-2.6.orig/drivers/acpi/acpica/tbfadt.c
+++ linux-2.6/drivers/acpi/acpica/tbfadt.c
@@ -447,13 +447,16 @@ static void acpi_tb_convert_fadt(void)
 	 * cannot be relied upon, though. Hence resort to using the v1 length
 	 * here (and warn about the inconsistency).
 	 */
-	if (acpi_gbl_FADT.xpm1a_event_block.bit_width
-	    != acpi_gbl_FADT.pm1_event_length * 8)
+	if (acpi_gbl_FADT.xpm1a_event_block.bit_width * 2
+	    != acpi_gbl_FADT.pm1_event_length * 8) {
 		printk(KERN_WARNING "FADT: "
 		       "X_PM1a_EVT_BLK.bit_width (%u) does not match"
 		       " PM1_EVT_LEN (%u)\n",
-		       acpi_gbl_FADT.xpm1a_event_block.bit_width,
+		       acpi_gbl_FADT.xpm1a_event_block.bit_width * 2,
 		       acpi_gbl_FADT.pm1_event_length);
+		pm1_register_byte_width = (u8) ACPI_DIV_2(acpi_gbl_FADT.pm1_event_length);
+		acpi_gbl_FADT.xpm1a_event_block.bit_width = pm1_register_byte_width * 8;
+	}
 
 	/* The PM1A register block is required */
 
@@ -469,13 +472,16 @@ static void acpi_tb_convert_fadt(void)
 	/* The PM1B register block is optional, ignore if not present */
 
 	if (acpi_gbl_FADT.xpm1b_event_block.address) {
-		if (acpi_gbl_FADT.xpm1b_event_block.bit_width
-		    != acpi_gbl_FADT.pm1_event_length * 8)
+		if (acpi_gbl_FADT.xpm1b_event_block.bit_width * 2
+		    != acpi_gbl_FADT.pm1_event_length * 8) {
 			printk(KERN_WARNING "FADT: "
 			       "X_PM1b_EVT_BLK.bit_width (%u) does not match"
 			       " PM1_EVT_LEN (%u)\n",
-			       acpi_gbl_FADT.xpm1b_event_block.bit_width,
+			       acpi_gbl_FADT.xpm1b_event_block.bit_width * 2,
 			       acpi_gbl_FADT.pm1_event_length);
+			pm1_register_byte_width = (u8) ACPI_DIV_2(acpi_gbl_FADT.pm1_event_length);
+			acpi_gbl_FADT.xpm1b_event_block.bit_width = pm1_register_byte_width * 8;
+		}
 		acpi_tb_init_generic_address(&acpi_gbl_xpm1b_enable,
 					     acpi_gbl_FADT.xpm1b_event_block.space_id,
 					     pm1_register_byte_width,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ