Message ID | a8770022-a437-9b8c-0b2e-cd6bdc0764ef@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, 2018-03-14 at 12:11 +0800, Dou Liyang wrote: > > At 03/13/2018 05:35 PM, Rafael J. Wysocki wrote: > > > On Tue, Mar 13, 2018 at 9:39 AM, Artem Bityutskiy > > > > Longer term, yeah, I agree. Kernel's notion of possible CPU > > > > count > > > > should be realistic. > > > > I did a patch for that, Artem, could you help me to test it. > > > > I didn't consider the nr_cpu_ids before. please ignore the old patch > and > try the following RFC patch. Sure I can help with testing a patch, could we please: 1. Start a new thread for this 2. Include ACPI forum/folks Thanks, Artem.
Hi Artern, At 03/14/2018 05:07 PM, Artem Bityutskiy wrote: > On Wed, 2018-03-14 at 12:11 +0800, Dou Liyang wrote: >>> At 03/13/2018 05:35 PM, Rafael J. Wysocki wrote: >>>> On Tue, Mar 13, 2018 at 9:39 AM, Artem Bityutskiy >>>>> Longer term, yeah, I agree. Kernel's notion of possible CPU >>>>> count >>>>> should be realistic. >>> >>> I did a patch for that, Artem, could you help me to test it. >>> >> >> I didn't consider the nr_cpu_ids before. please ignore the old patch >> and >> try the following RFC patch. > > Sure I can help with testing a patch, could we please: > > 1. Start a new thread for this > 2. Include ACPI forum/folks > OK, I will do that right now. Thanks, dou > Thanks, > Artem. > > >
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 449d86d39965..96d568408515 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -671,6 +671,23 @@ static acpi_status __init acpi_processor_ids_walk(acpi_handle handle, } +static void __init acpi_refill_possible_map(void) +{ + unsigned int cpu, nr = 0; + + if (nr_cpu_ids <= nr_unique_ids) + return; + + for_each_possible_cpu(cpu) { + if (nr >= nr_unique_ids) + set_cpu_possible(cpu, false); + nr++; + } + + nr_cpu_ids = nr_unique_ids; + pr_info("Allowing %d possible CPUs\n", nr_cpu_ids); +} + static void __init acpi_processor_check_duplicates(void) {