* [PATCH] acpi: remove the wrong warning about xpm1a_event_block.bit_width
@ 2009-03-17 21:36 Yinghai Lu
2009-03-27 21:00 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2009-03-17 21:36 UTC (permalink / raw)
To: Len Brown, Jan Beulich, Andrew Morton, Ingo Molnar
Cc: linux-kernel@vger.kernel.org, ACPI Devel Maling List
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@kernel.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,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] acpi: remove the wrong warning about xpm1a_event_block.bit_width
2009-03-17 21:36 [PATCH] acpi: remove the wrong warning about xpm1a_event_block.bit_width Yinghai Lu
@ 2009-03-27 21:00 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2009-03-27 21:00 UTC (permalink / raw)
To: Yinghai Lu
Cc: Jan Beulich, Andrew Morton, Ingo Molnar,
linux-kernel@vger.kernel.org, ACPI Devel Maling List
This warning is not present in the latest ACPICA branch.
thanks,
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-27 21:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-17 21:36 [PATCH] acpi: remove the wrong warning about xpm1a_event_block.bit_width Yinghai Lu
2009-03-27 21:00 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).