From patchwork Sat Feb 7 06:41:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 6007 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n176gAeL018927 for ; Sat, 7 Feb 2009 06:42:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752722AbZBGGmU (ORCPT ); Sat, 7 Feb 2009 01:42:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752834AbZBGGmT (ORCPT ); Sat, 7 Feb 2009 01:42:19 -0500 Received: from vms173009pub.verizon.net ([206.46.173.9]:44724 "EHLO vms173009pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752771AbZBGGmH (ORCPT ); Sat, 7 Feb 2009 01:42:07 -0500 Received: from localhost.localdomain ([96.237.168.40]) by vms173009.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KEO00DVJNPXPV22@vms173009.mailsrvcs.net> for linux-acpi@vger.kernel.org; Sat, 07 Feb 2009 00:37:10 -0600 (CST) Received: from localhost.localdomain (d975xbx2 [127.0.0.1]) by localhost.localdomain (8.14.2/8.14.2) with ESMTP id n176g4Or009921; Sat, 07 Feb 2009 01:42:04 -0500 Received: (from lenb@localhost) by localhost.localdomain (8.14.2/8.14.2/Submit) id n176g3PH009919; Sat, 07 Feb 2009 01:42:03 -0500 From: Len Brown To: linux-acpi@vger.kernel.org Cc: Myron Stowe , Andrew Morton , Len Brown Subject: [PATCH 28/30] ACPICA: Fix table entry truncation calculation Date: Sat, 07 Feb 2009 01:41:36 -0500 Message-id: <386e4a8358239f90275e1f93d5ad11cdc93c6453.1233988827.git.len.brown@intel.com> X-Mailer: git-send-email 1.6.1.2.390.gba743 In-reply-to: <091d71e023557136e96f0e54f301497a3fc95dc3.1233988822.git.len.brown@intel.com> References: <091d71e023557136e96f0e54f301497a3fc95dc3.1233988822.git.len.brown@intel.com> In-reply-to: <091d71e023557136e96f0e54f301497a3fc95dc3.1233988822.git.len.brown@intel.com> References: <091d71e023557136e96f0e54f301497a3fc95dc3.1233988822.git.len.brown@intel.com> Organization: Intel Open Source Technology Center Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Myron Stowe 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 Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- drivers/acpi/acpica/tbutils.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 9684cc8..22ce489 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b/drivers/acpi/acpica/tbutils.c @@ -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; } }