Re: [BUG, REGRESSION] ACPI: Set _PDC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Chen Gong <gong.chen@xxxxxxxxxxxxxxx>:
> >On Thursday 17 June 2010 05:24:14 Alex Chiang wrote:
> >>diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
> >>index 5128435..bcf0cf8 100644
> >>--- a/drivers/acpi/processor_core.c
> >>+++ b/drivers/acpi/processor_core.c
> >>@@ -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;
> >>
> I have a puzzle why num_online_cpus is used here, instead of
> num_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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux