From patchwork Thu Jul 9 18:04:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashwin Chaugule X-Patchwork-Id: 6758101 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA233C05AC for ; Thu, 9 Jul 2015 18:04:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12C6720670 for ; Thu, 9 Jul 2015 18:04:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4060B206DD for ; Thu, 9 Jul 2015 18:04:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754136AbbGISEs (ORCPT ); Thu, 9 Jul 2015 14:04:48 -0400 Received: from mail-qk0-f175.google.com ([209.85.220.175]:33965 "EHLO mail-qk0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754630AbbGISEh (ORCPT ); Thu, 9 Jul 2015 14:04:37 -0400 Received: by qkcl188 with SMTP id l188so7924574qkc.1 for ; Thu, 09 Jul 2015 11:04:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=TEGB+J8Xu5jmLnBtvISqowcGnfCQzvFzapsmj7JYo0A=; b=JynFQesn5bB6IjNXrRNZn/WPj56RETaMphRQAEHd0iLvcuhqoZt4njkMmrYwIaU4Pg 7lFIDchF6fuofM9WT0U/6FlIYwE57cvnS18XJdp6nJDi4nl898XLn5xs9KY4Lw3lch9u mfj4wQttQX1tS4ldYZEpU+VigvdQ56IyDx0YC9lW2NvOqN9cfHqNr4D/xnH6G9KdQZWr mUrh+2F+B0E9poVeeuzahrCAynhkXmLh2Ssysly2raWoGgn8q74ZCcQfkk06eSWk3zHN kex+S3ADlxwkxnP3FTwL9aqONZEGaK+brUr1FcKMOq2JNjbRajp/bel0CqBnE7qDwGEz zI0A== X-Gm-Message-State: ALoCoQlybAaZSpeqghZfsXOmucvLEqizLLo8tiQpa66M/RKIUfozISpjMeTSJJKK7nS5D19zwVxk X-Received: by 10.140.95.204 with SMTP id i70mr26083063qge.51.1436465077228; Thu, 09 Jul 2015 11:04:37 -0700 (PDT) Received: from esagroth.qualcomm.com (rrcs-67-52-130-30.west.biz.rr.com. [67.52.130.30]) by smtp.gmail.com with ESMTPSA id x79sm3969918qha.10.2015.07.09.11.04.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 11:04:36 -0700 (PDT) From: Ashwin Chaugule To: rjw@rjwysocki.net, jaswinder.singh@linaro.org Cc: linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, linaro-acpi@lists.linaro.org, patches@linaro.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, Ashwin Chaugule Subject: [PATCH v7 6/8] ACPI: Add weak routines for ACPI CPU Hotplug Date: Thu, 9 Jul 2015 14:04:22 -0400 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add weak functions for architectures which do not support hot-adding and removing CPUs which aren't detected at bootup. (e.g. via MADT). This helps preserve the Kconfig dependency from: commit cbfc1bae55bb ("[ACPI] ACPI_HOTPLUG_CPU Kconfig dependency update") prevent: HOTPLUG_CPU=y ACPI_PROCESSOR=y ACPI_HOTPLUG_CPU=n Signed-off-by: Ashwin Chaugule --- drivers/acpi/acpi_processor.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 58f335c..1fbf252 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -164,6 +164,24 @@ static int acpi_processor_errata(void) -------------------------------------------------------------------------- */ #ifdef CONFIG_ACPI_HOTPLUG_CPU +int __weak acpi_map_cpu(acpi_handle handle, + phys_cpuid_t physid, int *pcpu) +{ + return -ENODEV; +} + +int __weak acpi_unmap_cpu(int cpu) +{ + return -ENODEV; +} + +int __weak arch_register_cpu(int cpu) +{ + return -ENODEV; +} + +void __weak arch_unregister_cpu(int cpu) {} + static int acpi_processor_hotadd_init(struct acpi_processor *pr) { unsigned long long sta;