[PATCH] acpi: remove the wrong warning about xpm1a_event_block.bit_width

From: Yinghai Lu
Date: Tue Mar 17 2009 - 17:38:23 EST



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@xxxxxxxxxx>

---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/