public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: ACPI: Rename ACPI processor device bus ID
@ 2009-05-25  6:48 yakui_zhao
  2009-05-27  5:28 ` yakui_zhao
  0 siblings, 1 reply; 4+ messages in thread
From: yakui_zhao @ 2009-05-25  6:48 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi

On some boxes several processors use the same processor bus id.
But they are located in different scope. For example:
	\_SB.SCK0.CPU0
	\_SB.SCK1.CPU0
This follows the ACPI spec.

	As they use the same bus id, it can't be registered when
registering proc I/F. It causes that the ACPI processor driver can't
be bound with the processor device.
	
Rename the processor device bus id. And the new bus id will be 
generated as the following format:
	CPU+ CPU ID
	
For example: If the cpu ID is 5, then the bus ID will be "CPU5".
	If the CPU ID is 10, then the bus ID will be "CPUA".


Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
---
 drivers/acpi/processor_core.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/processor_core.c
===================================================================
--- linux-2.6.orig/drivers/acpi/processor_core.c	2009-05-21 14:44:18.000000000 +0800
+++ linux-2.6/drivers/acpi/processor_core.c	2009-05-21 15:55:13.000000000 +0800
@@ -649,7 +649,16 @@
 			return -ENODEV;
 		}
 	}
-
+	/*
+	 * On some boxes several processors use the same processor bus id.
+	 * But they are located in different scope. For example:
+	 * \_SB.SCK0.CPU0
+	 * \_SB.SCK1.CPU0
+	 * Rename the processor device bus id. And the new bus id will be
+	 * generated as the following format:
+	 * CPU+CPU ID.
+	 */
+	sprintf(acpi_device_bid(device), "CPU%X", pr->id);
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id,
 			  pr->acpi_id));
 



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

* Re: [PATCH]: ACPI: Rename ACPI processor device bus ID
  2009-05-25  6:48 yakui_zhao
@ 2009-05-27  5:28 ` yakui_zhao
  0 siblings, 0 replies; 4+ messages in thread
From: yakui_zhao @ 2009-05-27  5:28 UTC (permalink / raw)
  To: lenb@kernel.org; +Cc: linux-acpi@vger.kernel.org

On Mon, 2009-05-25 at 14:48 +0800, yakui_zhao wrote:
> On some boxes several processors use the same processor bus id.
> But they are located in different scope. For example:
> 	\_SB.SCK0.CPU0
> 	\_SB.SCK1.CPU0
> This follows the ACPI spec.
> 
> 	As they use the same bus id, it can't be registered when
> registering proc I/F. It causes that the ACPI processor driver can't
> be bound with the processor device.
> 	
> Rename the processor device bus id. And the new bus id will be 
> generated as the following format:
> 	CPU+ CPU ID
> 	
> For example: If the cpu ID is 5, then the bus ID will be "CPU5".
> 	If the CPU ID is 10, then the bus ID will be "CPUA".
> 
> 
HI, Len
    How about this patch?

After renaming the bus id, it will be similar with the CPU sys I/F. Of
course the difference is that the decimal mode is used in CPU sys I/F.
And in my patch the hex mode is used.
> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
> ---
>  drivers/acpi/processor_core.c |   11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6/drivers/acpi/processor_core.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/processor_core.c	2009-05-21 14:44:18.000000000 +0800
> +++ linux-2.6/drivers/acpi/processor_core.c	2009-05-21 15:55:13.000000000 +0800
> @@ -649,7 +649,16 @@
>  			return -ENODEV;
>  		}
>  	}
> -
> +	/*
> +	 * On some boxes several processors use the same processor bus id.
> +	 * But they are located in different scope. For example:
> +	 * \_SB.SCK0.CPU0
> +	 * \_SB.SCK1.CPU0
> +	 * Rename the processor device bus id. And the new bus id will be
> +	 * generated as the following format:
> +	 * CPU+CPU ID.
> +	 */
> +	sprintf(acpi_device_bid(device), "CPU%X", pr->id);
>  	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id,
>  			  pr->acpi_id));
>  
> 
> 
> --
> 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


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

* [PATCH]: ACPI: Rename ACPI processor device bus ID
@ 2009-06-24  3:46 yakui_zhao
  2009-06-24  5:18 ` Len Brown
  0 siblings, 1 reply; 4+ messages in thread
From: yakui_zhao @ 2009-06-24  3:46 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi

From: Zhao Yakui <yakui.zhao@intel.com

On some boxes several processors use the same processor bus id.
But they are located in different scope. For example:
	\_SB.SCK0.CPU0
	\_SB.SCK1.CPU0
As they use the same bus id, OS will complain the following kernel OOPS 
when registering proc I/F.
    >------------[ cut here ]------------
WARNING: at fs/proc/generic.c:590 proc_register+0x148/0x180()
Hardware name: Sunrise Ridge
proc_dir_entry 'processor/CPU0' already registered
Modules linked in: processor(+) thermal_sys hwmon
Pid: 255, comm: modprobe Tainted: G        W  2.6.30-rc3MASHLEY #1
Call Trace:
 [<ffffffff8023f7ef>] warn_slowpath+0xb1/0xe5
 [<ffffffff8036243b>] ? ida_get_new_above+0x190/0x1b1
 [<ffffffff803625a8>] ? idr_pre_get+0x5f/0x75
 [<ffffffff8030b2f6>] proc_register+0x148/0x180
 [<ffffffff8030b4ff>] proc_mkdir_mode+0x3d/0x52
 [<ffffffff8030b525>] proc_mkdir+0x11/0x13
 [<ffffffffa0014b89>] acpi_processor_start+0x755/0x9bc [processor]

	
Rename the processor device bus id. And the new bus id will be 
generated as the following format:
	CPU+ CPU ID
	
For example: If the cpu ID is 5, then the bus ID will be "CPU5".
	If the CPU ID is 10, then the bus ID will be "CPUA".

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

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
---
 drivers/acpi/processor_core.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/processor_core.c
===================================================================
--- linux-2.6.orig/drivers/acpi/processor_core.c	2009-06-24 11:24:53.000000000 +0800
+++ linux-2.6/drivers/acpi/processor_core.c	2009-06-24 11:25:06.000000000 +0800
@@ -649,7 +649,16 @@
 			return -ENODEV;
 		}
 	}
-
+	/*
+	 * On some boxes several processors use the same processor bus id.
+	 * But they are located in different scope. For example:
+	 * \_SB.SCK0.CPU0
+	 * \_SB.SCK1.CPU0
+	 * Rename the processor device bus id. And the new bus id will be
+	 * generated as the following format:
+	 * CPU+CPU ID.
+	 */
+	sprintf(acpi_device_bid(device), "CPU%X", pr->id);
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id,
 			  pr->acpi_id));
 



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

* Re: [PATCH]: ACPI: Rename ACPI processor device bus ID
  2009-06-24  3:46 [PATCH]: ACPI: Rename ACPI processor device bus ID yakui_zhao
@ 2009-06-24  5:18 ` Len Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Len Brown @ 2009-06-24  5:18 UTC (permalink / raw)
  To: yakui_zhao; +Cc: linux-acpi

applied

thanks,
Len Brown, Intel Open Source Technology Center


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

end of thread, other threads:[~2009-06-24  5:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-24  3:46 [PATCH]: ACPI: Rename ACPI processor device bus ID yakui_zhao
2009-06-24  5:18 ` Len Brown
  -- strict thread matches above, loose matches on Subject: below --
2009-05-25  6:48 yakui_zhao
2009-05-27  5:28 ` yakui_zhao

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