public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: "Andrew Paprocki" <andrew@ishiboo.com>
Cc: <robert.moore@intel.com>, "Len Brown" <lenb@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Andi Kleen" <ak@linux.intel.com>,
	"LKML" <linux-kernel@vger.kernel.org>
Subject: Re: ACPI WARNING: at drivers/acpi/tables/tbfadt.c:348 acpi_tb_create_local_fadt+0x147/0x2f4()
Date: Thu, 17 Jul 2008 09:59:53 +0100	[thread overview]
Message-ID: <487F2629.76E4.0078.0@novell.com> (raw)
In-Reply-To: <76366b180807162034y1e725b15t7658c331bb89b52@mail.gmail.com>

>I added printk()s and this is what is reported here:
>
>        printk(KERN_INFO
>               "xpm1a_event_block bit_width=%d pm1_register_length=%d\n",
>               acpi_gbl_FADT.xpm1a_event_block.bit_width, pm1_register_length);
>        acpi_tb_init_generic_address(&acpi_gbl_xpm1a_enable,
>                                     pm1_register_length,
>                                     (acpi_gbl_FADT.xpm1a_event_block.address +
>                                      pm1_register_length));
>
>[    0.000000] xpm1a_event_block bit_width=8 pm1_register_length=0
>
>The bit width is not % 16, so the following patch addition a few lines
>earlier fails:
>
>        WARN_ON(ACPI_MOD_16(acpi_gbl_FADT.xpm1a_event_block.bit_width));

So it's a firmware bug in the system you saw this on. The specification
is clear about the width being at least 16 bits, and the warning was added
to indicate the problem you now got: Dividing 8 by 16 yields zero for
pm1_register_length, which results in acpi_gbl_xpm1a_enable aliasing
the address of the respective status register. That won't work, hence
the warning.

I'd be hesitant to fix this (as I think we should be allowed to expect
ACPI tables to not be that fundamentally flawed these days), but of
course Len (or others) might be of a different opinion.

>Also, I noticed that the patch changed the definition of
>acpi_tb_init_generic_address to name the parameter byte_width instead
>of bit_width. The declaration at the top of the file and the
>documentation still refer to it as bit_width.
>
>I also added printk()s to the first call to
>acpi_tb_init_generic_address ~ line 326 and the lengths passed to the
>function at that point are:
>[    0.000000] fadt_info_table[i].length=88
>[    0.000000] fadt_info_table[i].length=89
>[    0.000000] fadt_info_table[i].length=93

Hmm, indeed, I didn't notice the (pointless) earlier declaration, I realize
I failed to update the function description. Bob, could you fix this in
ACPICA without the need for me to send a patch against it (assuming
the base patch went into ACPICA)?

Jan


  reply	other threads:[~2008-07-17  8:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17  2:29 ACPI WARNING: at drivers/acpi/tables/tbfadt.c:348 acpi_tb_create_local_fadt+0x147/0x2f4() Andrew Paprocki
2008-07-17  3:34 ` Andrew Paprocki
2008-07-17  8:59   ` Jan Beulich [this message]
2008-07-17  9:06     ` Andi Kleen
2008-07-17  9:14       ` Jan Beulich
2008-07-17 12:28         ` Andi Kleen
2008-07-17 13:03           ` Andrew Paprocki
2008-07-17 13:58             ` Jan Beulich
2008-07-17 14:32               ` Andrew Paprocki
2008-07-17 15:30                 ` Jan Beulich
2008-07-17 17:20                   ` ACPI WARNING: at drivers/acpi/tables/tbfadt.c:348acpi_tb_create_local_fadt+0x147/0x2f4() Moore, Robert
2008-07-17 17:40                     ` Andi Kleen
2008-07-18  7:53                       ` Jan Beulich
2008-07-18  8:43                     ` Jan Beulich
2008-07-18 16:52                       ` ACPI WARNING: atdrivers/acpi/tables/tbfadt.c:348acpi_tb_create_local_fadt+0x147/0x2f4() Moore, Robert
2008-07-18  9:48                     ` ACPI WARNING: at drivers/acpi/tables/tbfadt.c:348acpi_tb_create_local_fadt+0x147/0x2f4() Jan Beulich
2008-07-17  9:00   ` ACPI WARNING: at drivers/acpi/tables/tbfadt.c:348 acpi_tb_create_local_fadt+0x147/0x2f4() Andi Kleen

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=487F2629.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrew@ishiboo.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robert.moore@intel.com \
    /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