From patchwork Tue Nov 17 22:37:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 7643381 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 A92A29F2EC for ; Tue, 17 Nov 2015 22:53:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8A93205B5 for ; Tue, 17 Nov 2015 22:53:05 +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 0A4D62058A for ; Tue, 17 Nov 2015 22:53:05 +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 1Zyp5f-0003Nh-IM; Tue, 17 Nov 2015 22:51:07 +0000 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zyotv-0005Y1-Gi for linux-arm-kernel@lists.infradead.org; Tue, 17 Nov 2015 22:39:02 +0000 Received: by pacdm15 with SMTP id dm15so22078078pac.3 for ; Tue, 17 Nov 2015 14:38:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=O9vCgxw4SWshprEBMti/AApHHsL6LNStAW4+4dbixk4=; b=OeUyIiZXuLd7Q0hhzFNJ560vN2kEb24WhdyROlmFS0D15vCUtJrdsC/YaC1BHrI0To LIoz7KICQvtAnZn8k1X7q6GfPZoWdPOHKTVCdJqr5AFcdPdz0fdNI8xoqdO8no8jCIt/ +AvTbg+8/GyaMzwnr5pGhKndUHEBGZRmPzXFylOfTIRR8teVyIu6OPzdVMHZ9fSCW9aa 3I85wNXWWY0fOI5FgIHWbINMTWdmgBYfJhXhJkDfP0QKldDHtexIarqKhQy7GNOidZ0f XNg1d8RlaVrC10WzPWSxz5C/+PMBhE1tjEdj7o0vVAIm38Yfd/YMdoci0DQER1cIsWD9 G7HA== 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=O9vCgxw4SWshprEBMti/AApHHsL6LNStAW4+4dbixk4=; b=aeYpv3uula1wHk86bdUmhFt3l2VvrQcYiR41fLWdtoeWmKYQI+O09rCnTaMxcadjvH +FGDW7eEdYZuznpziEsimTXC7fBohWeNOznnfByhUq9XP/ww1NNKLGp7ApYSzUDeKMsS 476FyUqU5YkThkeCKNw2gmvZ2wAV+wxdByMSpqmPMyKO2tmta4Kn/cIapxP0lGCTtIOw NF9rHbLPFyTcoo+8fM3ga2oHZUpHtBaJLxc/T2KBn5mDVA5pTLQR9fR8+Os32vampGiy g1jxdopNIHmOXX6nL+MEWG4GgvWIDsJuwqHJ/Y10zN7y6uMOFtgko/TPk8TCtx8pL779 OLPw== X-Gm-Message-State: ALoCoQmfwpiKJ3X0DSZiC0iXSvpXoGUPO/4eADWYfs6H9LeAqpBS6OQHEy9jqZH8bwFa6WcqvgkV X-Received: by 10.68.65.6 with SMTP id t6mr66829180pbs.90.1447799918639; Tue, 17 Nov 2015 14:38:38 -0800 (PST) Received: from ubuntu.localdomain ([8.42.77.226]) by smtp.gmail.com with ESMTPSA id hy1sm14875199pbb.63.2015.11.17.14.38.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Nov 2015 14:38:37 -0800 (PST) From: Lina Iyer To: ulf.hansson@linaro.org, khilman@linaro.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH RFC 11/27] drivers: cpu: Define CPU devices as IRQ safe Date: Tue, 17 Nov 2015 15:37:35 -0700 Message-Id: <1447799871-56374-12-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447799871-56374-1-git-send-email-lina.iyer@linaro.org> References: <1447799871-56374-1-git-send-email-lina.iyer@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151117_143859_764147_39D1587E X-CRM114-Status: GOOD ( 12.13 ) 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, lorenzo.pieralisi@arm.com, ahaslam@baylibre.com, linux-arm-msm@vger.kernel.org, sboyd@codeaurora.org, msivasub@codeaurora.org, geert@linux-m68k.org, Lina Iyer , agross@codeaurora.org, mtitinger@baylibre.com 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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 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. Reviewed-by: Stephen Boyd Signed-off-by: Lina Iyer --- 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 91bbb19..6633210 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; }