From patchwork Wed Jan 20 07:06:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Chiang X-Patchwork-Id: 74005 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0K77L6Z024766 for ; Wed, 20 Jan 2010 07:07:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752854Ab0ATHGq (ORCPT ); Wed, 20 Jan 2010 02:06:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756021Ab0ATHGi (ORCPT ); Wed, 20 Jan 2010 02:06:38 -0500 Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:38600 "EHLO g5t0007.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751324Ab0ATHGg (ORCPT ); Wed, 20 Jan 2010 02:06:36 -0500 Received: from g5t0030.atlanta.hp.com (g5t0030.atlanta.hp.com [16.228.8.142]) by g5t0007.atlanta.hp.com (Postfix) with ESMTP id EA6B314287; Wed, 20 Jan 2010 07:06:35 +0000 (UTC) Received: from ldl (ldl.fc.hp.com [15.11.146.30]) by g5t0030.atlanta.hp.com (Postfix) with ESMTP id CC203140F9; Wed, 20 Jan 2010 07:06:35 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id 98964CF0019; Wed, 20 Jan 2010 00:06:35 -0700 (MST) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d-kohmPGvOYl; Wed, 20 Jan 2010 00:06:35 -0700 (MST) Received: from eh.fc.hp.com (eh.fc.hp.com [15.11.146.105]) by ldl (Postfix) with ESMTP id 84936CF0012; Wed, 20 Jan 2010 00:06:35 -0700 (MST) Received: from bob.kio (localhost [127.0.0.1]) by eh.fc.hp.com (Postfix) with ESMTP id 819E4261F0; Wed, 20 Jan 2010 00:06:35 -0700 (MST) Subject: [PATCH 2/2] ACPI: processor: only evaluate _PDC once per processor To: lenb@kernel.org From: Alex Chiang Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Venkatesh Pallipadi Date: Wed, 20 Jan 2010 00:06:35 -0700 Message-ID: <20100120070635.19777.51848.stgit@bob.kio> In-Reply-To: <20100120070403.19777.31978.stgit@bob.kio> References: <20100120070403.19777.31978.stgit@bob.kio> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c index 2944e7d..54f0214 100644 --- a/drivers/acpi/processor_pdc.c +++ b/drivers/acpi/processor_pdc.c @@ -125,6 +125,8 @@ acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in) return status; } +static int early_pdc_done; + void acpi_processor_set_pdc(acpi_handle handle) { struct acpi_object_list *obj_list; @@ -132,6 +134,9 @@ void acpi_processor_set_pdc(acpi_handle handle) if (arch_has_acpi_pdc() == false) return; + if (early_pdc_done) + return; + obj_list = acpi_processor_alloc_pdc(); if (!obj_list) return; @@ -199,4 +204,6 @@ void acpi_early_processor_set_pdc(void) acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, early_init_pdc, NULL, NULL, NULL); + + early_pdc_done = 1; }