From patchwork Thu Jun 4 16:32:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashwin Chaugule X-Patchwork-Id: 6548051 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2DC659F326 for ; Thu, 4 Jun 2015 16:33:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD79C2074E for ; Thu, 4 Jun 2015 16:33:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 78C8A206FA for ; Thu, 4 Jun 2015 16:33:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753450AbbFDQdD (ORCPT ); Thu, 4 Jun 2015 12:33:03 -0400 Received: from mail-yk0-f181.google.com ([209.85.160.181]:33162 "EHLO mail-yk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753328AbbFDQdC (ORCPT ); Thu, 4 Jun 2015 12:33:02 -0400 Received: by ykfr66 with SMTP id r66so15808700ykf.0 for ; Thu, 04 Jun 2015 09:33:01 -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; bh=TEGB+J8Xu5jmLnBtvISqowcGnfCQzvFzapsmj7JYo0A=; b=iIfzu2Zfx9V5sfsGhbleOFROH0Wn++EpqPImM9UZNr2PaqwkZyV6JjTdRi//UXeBfA L2OxeMVuYqK90rN1Be9dWX/cMsuD/dkDiStHl9tF8lb4FXuvn7FJ8w+9pKr3vd46S6bE TCuq+Y5mppxvRYDVSwyvRqyRPDVrfFsX2iapkqOWLQSjqKYSWpovepZUd1YbicQ3iC7G SUoCMiIhIU+qeH3pEW2wtoAj6/alTU+hrOxh5OQv348xTns/qz6v0uISuOav0N8DxFj3 HQPWihEx02mBBMuYyQg2Jcoy/VZPvwT8LuxbHMOdFrPMp1aZPYYUZOuVrRU31eW/5qB3 i4Ag== X-Gm-Message-State: ALoCoQlPqdrYzO/aQnJtqWVoM0LWovVH04K4C25A6RTrtIS/LWhBZyc90j1fJ8kQcTKnwe+WGaSf X-Received: by 10.170.34.4 with SMTP id 4mr46708105ykc.62.1433435581254; Thu, 04 Jun 2015 09:33:01 -0700 (PDT) Received: from esagroth.lan ([98.122.160.202]) by mx.google.com with ESMTPSA id k8sm3739947yha.18.2015.06.04.09.33.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Jun 2015 09:33:00 -0700 (PDT) From: Ashwin Chaugule To: rjw@rjwysocki.net Cc: linux-pm@vger.kernel.org, linaro-acpi@lists.linaro.org, patches@linaro.org, Ashwin Chaugule Subject: [RFC PATCH 1/1] ACPI: Add weak routines for ACPI CPU Hotplug Date: Thu, 4 Jun 2015 12:32:51 -0400 Message-Id: <1433435571-6763-1-git-send-email-ashwin.chaugule@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 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;