From patchwork Fri Jan 30 22:44:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Myron Stowe X-Patchwork-Id: 4782 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 n0UMipuN008253 for ; Fri, 30 Jan 2009 22:44:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756428AbZA3Wo4 (ORCPT ); Fri, 30 Jan 2009 17:44:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756381AbZA3Wo4 (ORCPT ); Fri, 30 Jan 2009 17:44:56 -0500 Received: from g5t0009.atlanta.hp.com ([15.192.0.46]:2268 "EHLO g5t0009.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756238AbZA3Woy (ORCPT ); Fri, 30 Jan 2009 17:44:54 -0500 Received: from smtp1.fc.hp.com (smtp.fc.hp.com [15.15.136.127]) by g5t0009.atlanta.hp.com (Postfix) with ESMTP id EE03D3001F; Fri, 30 Jan 2009 22:44:53 +0000 (UTC) Received: from localhost.localdomain (lart.fc.hp.com [15.11.146.31]) by smtp1.fc.hp.com (Postfix) with ESMTP id 47C8624E8DA; Fri, 30 Jan 2009 22:20:04 +0000 (UTC) Received: from bob.kio (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 7DE0F2615B; Fri, 30 Jan 2009 15:44:53 -0700 (MST) From: Myron Stowe Subject: [PATCH 1/2] ACPICA: Fix table entry truncation calculation To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, myron.stowe@hp.com, Myron Stowe Date: Fri, 30 Jan 2009 15:44:53 -0700 Message-ID: <20090130224453.24329.32589.stgit@bob.kio> In-Reply-To: <20090130223832.24329.5434.stgit@bob.kio> References: <20090130223832.24329.5434.stgit@bob.kio> User-Agent: StGIT/0.14.3.215.gff3d MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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 --- drivers/acpi/acpica/tbutils.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; } }