From patchwork Wed Sep 9 20:27:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashwin Chaugule X-Patchwork-Id: 7148621 X-Patchwork-Delegate: rjw@sisk.pl 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 C6BACBEEC1 for ; Wed, 9 Sep 2015 20:27:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0E864209D1 for ; Wed, 9 Sep 2015 20:27:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 334122066C for ; Wed, 9 Sep 2015 20:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754573AbbIIU12 (ORCPT ); Wed, 9 Sep 2015 16:27:28 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:33045 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754565AbbIIU1Y (ORCPT ); Wed, 9 Sep 2015 16:27:24 -0400 Received: by pacex6 with SMTP id ex6so20026537pac.0 for ; Wed, 09 Sep 2015 13:27:24 -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=c2CobRqVaDqRnMkob1SEQCRa13MkrU/ABAPyOJlArK4=; b=ioItg5JnuvfAPXoPFJ+SukVO+6Q2keYcm/RthAyZKgB2ULEEDoNztGEBlsX8UmUQDr PrY/V95alAK3oh2UlbEIxxl52HKexojUa2YTy1u6SMrskHKiEWtlBcU2H3g1rw0SMbac K+JvgqgnjlbivnCnSH0HV/MBXRoyc5yuv8C5e2i8yxLVKZ45yBipQiU+QH6YBZH/NwWf NNY/0UXvobzZ0+YzBa1rjJo4PiZeNgWewbONJmO+qNOgaTFsXuLM2JR8WxmLScz/nixI odAIb+ivXd59TNJn62tQ4sTQ1Xx6S2DOUp/Q1qWvZBdg+yDMVrN5fs3bN5ld8zvqBxSe FcEQ== X-Gm-Message-State: ALoCoQk+HqAjRZMiWYX7zYiRCRRsi4XFNJIYIH649HEacZBsFdiQWDRZRRf21cbQq/hVY9jPyBoq X-Received: by 10.66.65.234 with SMTP id a10mr65259931pat.2.1441830444107; Wed, 09 Sep 2015 13:27:24 -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 md10sm7992049pdb.0.2015.09.09.13.27.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Sep 2015 13:27:23 -0700 (PDT) From: Ashwin Chaugule To: rjw@rjwysocki.net Cc: sudeep.holla@arm.com, linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, linaro-acpi@lists.linaro.org, patches@linaro.org, viresh.kumar@linaro.org, rwells@codeaurora.org, Ashwin Chaugule Subject: [PATCH v9 3/5] ACPI: Add weak routines for ACPI CPU Hotplug Date: Wed, 9 Sep 2015 16:27:06 -0400 Message-Id: <9ecb979df2c7c5aea84e5670a5620110ddcf21c5.1441830300.git.ashwin.chaugule@linaro.org> 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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 92a5f73..e1e0285 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;