ACPI: Set _PDC
Hi,
with commit commit 5d554a7bb0643a6151a84319bfeba8270bf5269e (ACPI: processor:
add internal processor_physically_present()) a new function got introduced which always fails on machines with CONFIG_SMP disabled. Thus _PDC will never be initialized? set?.
The problem of the processor_physically_present() is, that it calls the acpi_get_cpuid(...) function which returns on NON-SMP machines always -1.
Note that i don't have any real knowledge what _PDC actualy realy do, all i gatherd so far is that its for switching C-Stats. I Stumbled across this by bisecting the problem, that the undervolting patches from linux-phc.org aren't working anymore with 2.6.34 (2.6.35-rc3). Whereas they worked fine with 2.6.33 on my Samsung X20 Notebook with a Pentium M precossor. The acpi-cpufreq is now using System-IO instead of MSR Registers.
Since i don't know what should be the correct behaviour here i can't provide any patches. But i doub't it's the correct behaviour of processor_physically_present() to always fail on non-SMP machines.
Deleting the function call, to this new function in early_init_pdc(...), and i get back the old behaviour.
cheers,
jan
Hi Jan,
* Jan Pogadl <[email protected]>:
Quoted 6 lines
Hi,
with commit commit
5d554a7bb0643a6151a84319bfeba8270bf5269e(ACPI: processor:
add internalprocessor_physically_present()) a new function got introduced which always fails on machines withCONFIG_SMPdisabled. Thus_PDCwill never be initialized? set?.
My apologies for the regression and the slow response. Please note my new email address.
Does this patch fix it?
---
drivers/acpi/processor_core.c +1 -1
@@ -223,7 +223,7 @@ static bool processor_physically_present(acpi_handle handle) type = (acpi_type ==ACPI_TYPE_DEVICE ) ?1 :0 ; cpuid =acpi_get_cpuid (handle, type, acpi_id); -if (cpuid ==-1 ) +if ((cpuid ==-1 ) && (num_online_cpus () >1 ))return false;return true;
Quoted 6 lines · On Thursday 17 June 2010 05:24:14 Alex Chiang wrote:
Quoted 4 lines
with commit commit
5d554a7bb0643a6151a84319bfeba8270bf5269e(ACPI: processor:
add internalprocessor_physically_present()) a new function got introduced which always fails on machines withCONFIG_SMPdisabled. Thus_PDCwill never be initialized? set?.Does this patch fix it?
works great
thanks
Quoted 15 lines
---
drivers/acpi/processor_core.c +1
-1@@ -223,7 +223,7 @@ static bool processor_physically_present(acpi_handle handle) type = (acpi_type ==ACPI_TYPE_DEVICE ) ?1 :0 ; cpuid =acpi_get_cpuid (handle, type, acpi_id); -if (cpuid ==-1 ) +if ((cpuid ==-1 ) && (num_online_cpus () >1 ))return false;return true;
Quoted 21 lines · Jan Pogadl
Quoted 6 lines · On Thursday 17 June 2010 05:24:14 Alex Chiang wrote:
Quoted 4 lines
with commit commit
5d554a7bb0643a6151a84319bfeba8270bf5269e(ACPI: processor:
add internalprocessor_physically_present()) a new function got introduced which always fails on machines withCONFIG_SMPdisabled. Thus_PDCwill never be initialized? set?.Does this patch fix it?
works great
thanksQuoted 9 lines
---
drivers/acpi/processor_core.c +0
-0@@ -223,7 +223,7 @@ static bool processor_physically_present(acpi_handle handle) type = (acpi_type ==ACPI_TYPE_DEVICE ) ?1 :0 ; cpuid =acpi_get_cpuid (handle, type, acpi_id);
Quoted 6 lines
drivers/acpi/processor_core.c static bool processor_physically_present(acpi_handle handle) · line 229
Quoted 6 lines
drivers/acpi/processor_core.c +1
-1-if (cpuid ==-1 ) +if ((cpuid ==-1 )&& (num_online_cpus ()>1 ))return false;return true;
I have a puzzle why num_online_cpus is used here, instead of num_possible_cpus. It will be possible under a hotplug scenario. --
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
* Chen Gong <[email protected]>:
Quoted 9 lines
Quoted 9 lines · On Thursday 17 June 2010 05:24:14 Alex Chiang wrote:
Quoted 8 lines
drivers/acpi/processor_core.c +0
-0@@ -223,7 +223,7 @@ static bool processor_physically_present(acpi_handle handle) type = (acpi_type ==ACPI_TYPE_DEVICE ) ?1 :0 ; cpuid =acpi_get_cpuid (handle, type, acpi_id);
Quoted 8 lines
Quoted 6 lines
drivers/acpi/processor_core.c static bool processor_physically_present(acpi_handle handle) · line 229
Quoted 6 lines
drivers/acpi/processor_core.c +1
-1-if (cpuid ==-1 ) +if ((cpuid ==-1 )&& (num_online_cpus ()>1 ))return false;return true;I have a puzzle why
num_online_cpusis used here, instead ofnum_possible_cpus. It will be possible under a hotplug scenario.
Hm, you're probably right.
I was following the example of the other usage of acpi_get_cpuid() in acpi_processor_get_info(), but based on your observation, it's probably better to use num_possible_cpus.
I'll change it when I submit a proper patch.
Thanks for the review.
/ac