All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] acpi: remove length check for large registers
@ 2013-03-15 19:56 Linn Crosetto
  2013-03-15 20:50 ` Moore, Robert
  2013-03-19 18:48 ` Moore, Robert
  0 siblings, 2 replies; 4+ messages in thread
From: Linn Crosetto @ 2013-03-15 19:56 UTC (permalink / raw)
  To: rjw, robert.moore, ming.m.lin, lv.zheng, linux-acpi
  Cc: linux-kernel, Linn Crosetto

The legacy bit width field in the Generic Address Structure is 1 byte,
limiting the reportable register width to 255 bits. Larger registers
will cause a length mismatch warning to be printed in
acpi_tb_validate_fadt().

To avoid the warning, disable the length mismatch check for registers
larger than 255 bits.

Signed-off-by: Linn Crosetto <linn@hp.com>
---
 drivers/acpi/acpica/tbfadt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c
index 74181bf..e87abcd 100644
--- a/drivers/acpi/acpica/tbfadt.c
+++ b/drivers/acpi/acpica/tbfadt.c
@@ -561,6 +561,7 @@ static void acpi_tb_validate_fadt(void)
 		 * legacy length field and the corresponding 64-bit X length field.
 		 */
 		if (address64->address &&
+		    ACPI_MUL_8(length) <= ACPI_UINT8_MAX &&
 		    (address64->bit_width != ACPI_MUL_8(length))) {
 			ACPI_BIOS_WARNING((AE_INFO,
 					   "32/64X length mismatch in FADT/%s: %u/%u",
-- 
1.7.11.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH] acpi: remove length check for large registers
  2013-03-15 19:56 [PATCH] acpi: remove length check for large registers Linn Crosetto
@ 2013-03-15 20:50 ` Moore, Robert
  2013-03-15 21:18   ` Linn Crosetto
  2013-03-19 18:48 ` Moore, Robert
  1 sibling, 1 reply; 4+ messages in thread
From: Moore, Robert @ 2013-03-15 20:50 UTC (permalink / raw)
  To: Linn Crosetto, rjw, ming.m.lin, Zheng, Lv, linux-acpi; +Cc: linux-kernel

Linn,

Can you explain in a bit more detail what brings this up?

I'm aware of the limitation of the generic address structure, but we are forced by the (current) ACPI specification to use it if it is present for a given register.

Thanks,
Bob


> -----Original Message-----
> From: Linn Crosetto [mailto:linn@hp.com]
> Sent: Friday, March 15, 2013 12:56 PM
> To: rjw@sisk.pl; Moore, Robert; ming.m.lin@intel.com; Zheng, Lv; linux-
> acpi@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; Linn Crosetto
> Subject: [PATCH] acpi: remove length check for large registers
> 
> The legacy bit width field in the Generic Address Structure is 1 byte,
> limiting the reportable register width to 255 bits. Larger registers will
> cause a length mismatch warning to be printed in acpi_tb_validate_fadt().
> 
> To avoid the warning, disable the length mismatch check for registers
> larger than 255 bits.
> 
> Signed-off-by: Linn Crosetto <linn@hp.com>
> ---
>  drivers/acpi/acpica/tbfadt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c
> index 74181bf..e87abcd 100644
> --- a/drivers/acpi/acpica/tbfadt.c
> +++ b/drivers/acpi/acpica/tbfadt.c
> @@ -561,6 +561,7 @@ static void acpi_tb_validate_fadt(void)
>  		 * legacy length field and the corresponding 64-bit X length
> field.
>  		 */
>  		if (address64->address &&
> +		    ACPI_MUL_8(length) <= ACPI_UINT8_MAX &&
>  		    (address64->bit_width != ACPI_MUL_8(length))) {
>  			ACPI_BIOS_WARNING((AE_INFO,
>  					   "32/64X length mismatch in FADT/%s:
> %u/%u",
> --
> 1.7.11.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] acpi: remove length check for large registers
  2013-03-15 20:50 ` Moore, Robert
@ 2013-03-15 21:18   ` Linn Crosetto
  0 siblings, 0 replies; 4+ messages in thread
From: Linn Crosetto @ 2013-03-15 21:18 UTC (permalink / raw)
  To: Moore, Robert; +Cc: rjw, ming.m.lin, Zheng, Lv, linux-acpi, linux-kernel

On Fri, Mar 15, 2013 at 08:50:45PM +0000, Moore, Robert wrote:
> Can you explain in a bit more detail what brings this up?
> 
> I'm aware of the limitation of the generic address structure, but we are forced by the (current) ACPI specification to use it if it is present for a given register.

A system with a GPE block bit_width of 256 triggers it. In this case, the length
check can never succeed.

Thanks,
Linn

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] acpi: remove length check for large registers
  2013-03-15 19:56 [PATCH] acpi: remove length check for large registers Linn Crosetto
  2013-03-15 20:50 ` Moore, Robert
@ 2013-03-19 18:48 ` Moore, Robert
  1 sibling, 0 replies; 4+ messages in thread
From: Moore, Robert @ 2013-03-19 18:48 UTC (permalink / raw)
  To: Linn Crosetto, Zheng, Lv, linux-acpi, Wysocki, Rafael J; +Cc: linux-kernel

Linn,

We will integrate this change into ACPICA for the next release, later in March 2013.
Thanks,
Bob


> -----Original Message-----
> From: Linn Crosetto [mailto:linn@hp.com]
> Sent: Friday, March 15, 2013 12:56 PM
> To: rjw@sisk.pl; Moore, Robert; ming.m.lin@intel.com; Zheng, Lv; linux-
> acpi@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; Linn Crosetto
> Subject: [PATCH] acpi: remove length check for large registers
> 
> The legacy bit width field in the Generic Address Structure is 1 byte,
> limiting the reportable register width to 255 bits. Larger registers will
> cause a length mismatch warning to be printed in acpi_tb_validate_fadt().
> 
> To avoid the warning, disable the length mismatch check for registers
> larger than 255 bits.
> 
> Signed-off-by: Linn Crosetto <linn@hp.com>
> ---
>  drivers/acpi/acpica/tbfadt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c
> index 74181bf..e87abcd 100644
> --- a/drivers/acpi/acpica/tbfadt.c
> +++ b/drivers/acpi/acpica/tbfadt.c
> @@ -561,6 +561,7 @@ static void acpi_tb_validate_fadt(void)
>  		 * legacy length field and the corresponding 64-bit X length
> field.
>  		 */
>  		if (address64->address &&
> +		    ACPI_MUL_8(length) <= ACPI_UINT8_MAX &&
>  		    (address64->bit_width != ACPI_MUL_8(length))) {
>  			ACPI_BIOS_WARNING((AE_INFO,
>  					   "32/64X length mismatch in FADT/%s:
> %u/%u",
> --
> 1.7.11.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-19 18:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-15 19:56 [PATCH] acpi: remove length check for large registers Linn Crosetto
2013-03-15 20:50 ` Moore, Robert
2013-03-15 21:18   ` Linn Crosetto
2013-03-19 18:48 ` Moore, Robert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.