Skip to content

Commit

Permalink
ACPICA: Fix table entry truncation calculation
Browse files Browse the repository at this point in the history
During early boot, ACPI RSDT/XSDT table entries are gathered into the
'initial_tables[]' array.  This array is currently statically defined (see
./drivers/acpi/tables.c).  When there are more table entries than can be
held in the 'initial_tables[]' array, the message "Truncating N table
entries!" is output.  As currently implemented, this message will always
erroneously calculate N as 0.

This patch fixes the calculation that determines how many table entries
will be missing (truncated).

This modification may be used under either the GPL or the BSD-style
license used for Intel ACPI CA code.

Signed-off-by: Myron Stowe <myron.stowe@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Myron Stowe authored and Len Brown committed Feb 7, 2009
1 parent d96f94c commit 386e4a8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/acpi/acpica/tbutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,10 +538,9 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags)
if (ACPI_FAILURE(status)) {
ACPI_WARNING((AE_INFO,
"Truncating %u table entries!",
(unsigned)
(acpi_gbl_root_table_list.size -
acpi_gbl_root_table_list.
count)));
(unsigned) (table_count -
(acpi_gbl_root_table_list.
count - 2))));
break;
}
}
Expand Down

0 comments on commit 386e4a8

Please sign in to comment.