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: 7119061 Return-Path: X-Original-To: patchwork-linux-arm@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 77DB39F1CD for ; Thu, 3 Sep 2015 20:01:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AF32204F6 for ; Thu, 3 Sep 2015 20:01:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BAA55203AB for ; Thu, 3 Sep 2015 20:01:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZXafR-0008OC-74; Thu, 03 Sep 2015 19:59:29 +0000 Received: from mail-pa0-f54.google.com ([209.85.220.54]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZXaf8-00089K-1E for linux-arm-kernel@lists.infradead.org; Thu, 03 Sep 2015 19:59:10 +0000 Received: by pacex6 with SMTP id ex6so313015pac.0 for ; Thu, 03 Sep 2015 12:58:49 -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; bh=UJwc4lE5F1JjtWbe78CLG40Xk+K/RezWIsnGCYPgdD8=; b=MDxa/vJTuOIDL2IyxxhzZiVBWbOXfUjt4foPp3K0fA0EMDy3v/myW9I5huX1lk918f 6Pr0k8nssyH92MkUEv8b7XjHlbbKR7eQsJDMPMHy+E1di+Syu0fKmopQvkXKtwJUGN2I 6bz78K/wjoBXpzFS7aA6K6IsA0uGH6yV9jmbQEKllyE56LkiKXYguCircsVU94H1xVG/ BoyeE5nd7towp7cIrGaeyIXccdNyU+8ZinVvaVHZPfcFSJbW2ya+DpTgcpC5oDmUuSr4 Qmw619ZgSOqOa/ntMO6pzITS1+Vg5W8cl7FJbBuUsZvgTolR5elG8/vjEW1Pq1GjZyGI KH5A== X-Gm-Message-State: ALoCoQkNAZO+wQ/Pi4duxPRx4idqnGoXB3GlGhS5VutiYF16d0p/oi8Kah4/mGvBAVL3K5An3W73 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150903_125910_146408_0A1F4D74 X-CRM114-Status: GOOD ( 11.35 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: k.kozlowski@samsung.com, sboyd@codeaurora.org, rjw@rjwysocki.net, msivasub@codeaurora.org, geert@linux-m68k.org, Lina Iyer , agross@codeaurora.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 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; }