From: Yinghai Lu <yinghai@kernel.org>
To: Len Brown <lenb@kernel.org>, Jan Beulich <jbeulich@novell.com>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: [PATCH] acpi: remove the wrong warning about xpm1a_event_block.bit_width
Date: Tue, 17 Mar 2009 14:36:16 -0700 [thread overview]
Message-ID: <49C017D0.6030502@kernel.org> (raw)
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,
next reply other threads:[~2009-03-17 21:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-17 21:36 Yinghai Lu [this message]
2009-03-27 21:00 ` [PATCH] acpi: remove the wrong warning about xpm1a_event_block.bit_width Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49C017D0.6030502@kernel.org \
--to=yinghai@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=jbeulich@novell.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox