From patchwork Thu Sep 3 19:58:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 53055 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id 50B4D22E23 for ; Thu, 3 Sep 2015 19:58:55 +0000 (UTC) Received: by wisv5 with SMTP id v5sf113880wis.0 for ; Thu, 03 Sep 2015 12:58:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=Pq7D2AaejeYNtF1W4IIs4mbXrA2kaliFK4yYxqwfRjA=; b=E4kTnS7/uUq/uneZBgja5Q4sYURwviktsQwpNXJXuoFGJXwhR8ugPUMRFcvZnev2M/ sVO+9eb+CERuh/MmGk35uXeMJhuYkP94FxdLZk+jyApmgkMZBYWg4Zd1d72Xbk5DLIhn 5GB3mvUDkwAjivBfEliTA8Z+xliV1k9H9dgJHDR0aX975RlqYLiZbb6slJgWw+F6MVtZ Rqg/SAdeqPBlYl/NGQpcd/+QpwMPc+XjI95QXXnPMof3HnDPEtF2IAmc67VJilzJ9Oj+ PlwZ5uS9Uoa4mWjLc3cn4KoUxrcMKlTHLI5EFZ/KeIwgJS3E6EB4ZsVTJJwkDtJ47rTx ePCg== X-Gm-Message-State: ALoCoQlddn4EGjLZ45D2IBwiZ6D0jK6NoIGRrA8SIecH10hpoL+xWyArnHkBRn4AWpSH4ybMbQlL X-Received: by 10.152.224.129 with SMTP id rc1mr1215894lac.10.1441310334569; Thu, 03 Sep 2015 12:58:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.8.133 with SMTP id dk5ls244022lad.75.gmail; Thu, 03 Sep 2015 12:58:54 -0700 (PDT) X-Received: by 10.112.13.166 with SMTP id i6mr23896706lbc.50.1441310334418; Thu, 03 Sep 2015 12:58:54 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id c5si3272036lbp.10.2015.09.03.12.58.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Sep 2015 12:58:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbcao8 with SMTP id ao8so153618lbc.3 for ; Thu, 03 Sep 2015 12:58:54 -0700 (PDT) X-Received: by 10.152.178.165 with SMTP id cz5mr17032574lac.29.1441310334306; Thu, 03 Sep 2015 12:58:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.164.42 with SMTP id yn10csp1491242lbb; Thu, 3 Sep 2015 12:58:53 -0700 (PDT) X-Received: by 10.50.33.52 with SMTP id o20mr1855080igi.8.1441310331761; Thu, 03 Sep 2015 12:58:51 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hn3si43263170pdb.66.2015.09.03.12.58.50; Thu, 03 Sep 2015 12:58:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752881AbbICT6u (ORCPT + 13 others); Thu, 3 Sep 2015 15:58:50 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35749 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752837AbbICT6t (ORCPT ); Thu, 3 Sep 2015 15:58:49 -0400 Received: by pacfv12 with SMTP id fv12so245510pac.2 for ; Thu, 03 Sep 2015 12:58:49 -0700 (PDT) X-Received: by 10.68.107.100 with SMTP id hb4mr49377108pbb.93.1441310329280; Thu, 03 Sep 2015 12:58:49 -0700 (PDT) Received: from ubuntu.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id a17sm13396430pbu.55.2015.09.03.12.58.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Sep 2015 12:58:48 -0700 (PDT) From: Lina Iyer To: ulf.hansson@linaro.org, khilman@linaro.org, linux-pm@vger.kernel.org Cc: rjw@rjwysocki.net, geert@linux-m68k.org, k.kozlowski@samsung.com, linux-arm-kernel@lists.infradead.org, msivasub@codeaurora.org, agross@codeaurora.org, sboyd@codeaurora.org, Lina Iyer Subject: [PATCH v2 3/7] drivers: cpu: Define CPU devices as IRQ safe Date: Thu, 3 Sep 2015 13:58:30 -0600 Message-Id: <1441310314-8857-4-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1441310314-8857-1-git-send-email-lina.iyer@linaro.org> References: <1441310314-8857-1-git-send-email-lina.iyer@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lina.iyer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , CPUs may be powered off from CPUIdle or hotplug and are called with IRQ's disabled. Define CPU devices as IRQ safe, so they may be runtime suspended/resumed. Signed-off-by: Lina Iyer Reviewed-by: Stephen Boyd --- drivers/base/cpu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 78720e7..56cb1d2 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "base.h" @@ -371,10 +372,11 @@ int register_cpu(struct cpu *cpu, int num) if (cpu->hotpluggable) cpu->dev.groups = hotplugable_cpu_attr_groups; error = device_register(&cpu->dev); - if (!error) + if (!error) { + pm_runtime_irq_safe(&cpu->dev); per_cpu(cpu_sys_devices, num) = &cpu->dev; - if (!error) register_cpu_under_node(num, cpu_to_node(num)); + } return error; }