public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] ACPI: ignore processors that doesn't support hot plug
@ 2008-02-22  7:17 zhangrui
  2008-02-23  6:53 ` Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: zhangrui @ 2008-02-22  7:17 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi

Hi, Len,
will you please consider this patch as the fix for bug 8570,
rather than the one at http://bugzilla.kernel.org/show_bug.cgi?id=8570#c21 ?


is_processor_present is only called in the processor hotplug case,
and _STA method is mandatory at this time.

We should ignore those processors that are disabled in the MADT
and don't have _STA methods.
Because they will never exist in this system.
For the processors that don't physically exist but can be
hot plugged later, we still need this debug info.

http://bugzilla.kernel.org/show_bug.cgi?id=8570

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
---
 drivers/acpi/processor_core.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

Index: linux-2.6/drivers/acpi/processor_core.c
===================================================================
--- linux-2.6.orig/drivers/acpi/processor_core.c
+++ linux-2.6/drivers/acpi/processor_core.c
@@ -812,11 +812,20 @@ static int is_processor_present(acpi_han
 
 
 	status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
-	if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT)) {
-		ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
-		return 0;
-	}
-	return 1;
+
+	if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_PRESENT))
+		return 1;
+
+	/*
+	 * _STA is mandatory for a processor that supports hot plug
+	 */
+	if (status == AE_NOT_FOUND)
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+				"Processor does not support hot plug\n"));
+	else
+		ACPI_EXCEPTION((AE_INFO, status,
+				"Processor Device is not present"));
+	return 0;
 }
 
 static



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

* Re: [Patch] ACPI: ignore processors that doesn't support hot plug
  2008-02-22  7:17 [Patch] ACPI: ignore processors that doesn't support hot plug zhangrui
@ 2008-02-23  6:53 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2008-02-23  6:53 UTC (permalink / raw)
  To: zhangrui; +Cc: linux-acpi

On Friday 22 February 2008 02:17, zhangrui wrote:
> is_processor_present is only called in the processor hotplug case,
> and _STA method is mandatory at this time.
> 
> We should ignore those processors that are disabled in the MADT
> and don't have _STA methods.
> Because they will never exist in this system.
> For the processors that don't physically exist but can be
> hot plugged later, we still need this debug info.
> 
> http://bugzilla.kernel.org/show_bug.cgi?id=8570
> 
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>

Okay.  As the original patch shipped in rc1,
below is the incremental.

thanks,
-Len

Subject: ACPI Exception (): AE_NOT_FOUND, Processor Device is not present (update)
From: Zhang Rui <rui.zhang@intel.com>

update cfaf3747ff3d431fba33f75083b7f50f58ae22ff
ACPI: ACPI Exception (): AE_NOT_FOUND, Processor Device is not present

is_processor_present is only called in the processor hotplug case,
and _STA method is mandatory at this time.

We should ignore those processors that are disabled in the MADT
and don't have _STA methods.
Because they will never exist in this system.
For the processors that don't physically exist but can be
hot plugged later, we still need this debug info.

http://bugzilla.kernel.org/show_bug.cgi?id=8570

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index a3cc8a9..d9316ab 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -840,17 +840,19 @@ static int is_processor_present(acpi_handle handle)
 
 
 	status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
-	/*
-	 * if a processor object does not have an _STA object,
-	 * OSPM assumes that the processor is present.
-	 */
-	if (status == AE_NOT_FOUND)
-		return 1;
 
 	if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_PRESENT))
 		return 1;
 
-	ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
+	/*
+	 * _STA is mandatory for a processor that supports hot plug
+	 */
+	if (status == AE_NOT_FOUND)
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+				"Processor does not support hot plug\n"));
+	else
+		ACPI_EXCEPTION((AE_INFO, status,
+				"Processor Device is not present"));
 	return 0;
 }
 

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

end of thread, other threads:[~2008-02-23  6:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-22  7:17 [Patch] ACPI: ignore processors that doesn't support hot plug zhangrui
2008-02-23  6:53 ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox