]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ACPI / Processor: Drop setup_max_cpus check from acpi_processor_add()
authorPrakash, Prashanth <pprakash@codeaurora.org>
Thu, 23 Mar 2017 21:21:53 +0000 (15:21 -0600)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 18 Apr 2017 14:50:24 +0000 (16:50 +0200)
When maxcpus=X kernel argument is used, we parse the ACPI tables only
for the first X cpus. The per-cpu ACPI data include the _PSD tables
which gives information about related cpus.

cppc_cpufreq and acpi-cpufreq parses the table once during init to
deduce the related cpus. If a user brings a new cpu online after boot
the related cpu data becomes incorrect.

acpi_get_psd_map() in acpi_cppc.c returns error if it fails to find
the parsed ACPI data for possible CPU resulting in cppc_cpufreq
initialization failure.

With this change we will probe all possible CPUs prior to cpufreq
initialization, but will bring only setup_max_cpus online. nr_cpus
kernel parameter can be used to restict even parsing per-cpu ACPI
tables.

Signed-off-by: Prashanth Prakash <pprakash@codeaurora.org>
[ rjw: Subject ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_processor.c

index 0143135b3abe3749d8a3bab492eb67b2e63a5d01..f098e25b6b41142d2711d7d40dafe26c3b8ff4f3 100644 (file)
@@ -388,11 +388,6 @@ static int acpi_processor_add(struct acpi_device *device,
        if (result) /* Processor is not physically present or unavailable */
                return 0;
 
-#ifdef CONFIG_SMP
-       if (pr->id >= setup_max_cpus && pr->id != 0)
-               return 0;
-#endif
-
        BUG_ON(pr->id >= nr_cpu_ids);
 
        /*