From patchwork Tue Mar 17 21:36:16 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 12669 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2HLcDlD015141 for ; Tue, 17 Mar 2009 21:38:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754317AbZCQViN (ORCPT ); Tue, 17 Mar 2009 17:38:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754558AbZCQViN (ORCPT ); Tue, 17 Mar 2009 17:38:13 -0400 Received: from hera.kernel.org ([140.211.167.34]:33295 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754317AbZCQViM (ORCPT ); Tue, 17 Mar 2009 17:38:12 -0400 Received: from [10.6.77.144] (sca-ea-fw-1.Sun.COM [192.18.43.225]) (authenticated bits=0) by hera.kernel.org (8.14.2/8.13.8) with ESMTP id n2HLaop4004853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Mar 2009 21:36:51 GMT Message-ID: <49C017D0.6030502@kernel.org> Date: Tue, 17 Mar 2009 14:36:16 -0700 From: Yinghai Lu User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: Len Brown , Jan Beulich , Andrew Morton , Ingo Molnar CC: "linux-kernel@vger.kernel.org" , ACPI Devel Maling List Subject: [PATCH] acpi: remove the wrong warning about xpm1a_event_block.bit_width X-Virus-Scanned: ClamAV 0.93.3/9124/Tue Mar 17 17:48:04 2009 on hera.kernel.org X-Virus-Status: Clean Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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 --- drivers/acpi/acpica/tbfadt.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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,