From patchwork Thu Mar 23 21:21:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Prakash, Prashanth" X-Patchwork-Id: 9642067 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C79AF602D6 for ; Thu, 23 Mar 2017 21:22:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6CBC24DA2 for ; Thu, 23 Mar 2017 21:22:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7BF0275A2; Thu, 23 Mar 2017 21:22:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FB3D24DA2 for ; Thu, 23 Mar 2017 21:22:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752243AbdCWVWJ (ORCPT ); Thu, 23 Mar 2017 17:22:09 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:60942 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105AbdCWVWI (ORCPT ); Thu, 23 Mar 2017 17:22:08 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7371660A36; Thu, 23 Mar 2017 21:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1490304127; bh=RLDWbqI6A7EM6PB9qy85Yl41a4djYOmRksADl+sJmVk=; h=From:To:Cc:Subject:Date:From; b=VH0nwMxtlK9C/At6iItDksdAFhvv/W7+41bVjFEquC3MiCRaxfuP63E/Zz8jBDVh1 1SRjvJk5K76atRRxY3zXpwgBTQzWNJ6D3gMz1N7wSPa4+rdl8WiUwmewtXdmi8D9Jc 2qbrOla8a5iH8R3Z0woU8fGh7F4clMh2z1nBAKr0= Received: from pprakash-lnx.qualcomm.com (unknown [129.46.15.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: pprakash@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7FB08607E0; Thu, 23 Mar 2017 21:22:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1490304123; bh=RLDWbqI6A7EM6PB9qy85Yl41a4djYOmRksADl+sJmVk=; h=From:To:Cc:Subject:Date:From; b=Nn+kofSqo9YmpYFgptV6VTMeeliF6rSViauN6uK6LmF6iI2LZdP77LUsxt1ATLdXd Yu6VavTtSZFCyy4vzKe/okM9dnw6VAzvngTxUpGYhgOAAaFYRyOHr4heoUx7lVTdL8 0aqKTUVVOwCXLmH6v25SoM7onKHnNfhcJ5hRQRAY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7FB08607E0 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=pprakash@codeaurora.org From: Prashanth Prakash To: linux-acpi@vger.kernel.org Cc: rjw@rjwysocki.net, lenb@kernel.org, Prashanth Prakash Subject: [PATCH] ACPI / Processor: Remove setup_max_cpus check in acpi_processor_add Date: Thu, 23 Mar 2017 15:21:53 -0600 Message-Id: <1490304113-18264-1-git-send-email-pprakash@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/acpi/acpi_processor.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 0143135..f098e25 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -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); /*