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: 56903 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2220187lbb; Tue, 17 Nov 2015 14:44:13 -0800 (PST) X-Received: by 10.66.66.166 with SMTP id g6mr66017021pat.152.1447799921133; Tue, 17 Nov 2015 14:38:41 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ax2si60766904pbd.123.2015.11.17.14.38.40; Tue, 17 Nov 2015 14:38:41 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932413AbbKQWij (ORCPT + 11 others); Tue, 17 Nov 2015 17:38:39 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:34928 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932543AbbKQWij (ORCPT ); Tue, 17 Nov 2015 17:38:39 -0500 Received: by pacej9 with SMTP id ej9so22071903pac.2 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=QA75TlcJca5HzkGrT3r1exedx8qpHizbWQnW/4DEi/mcYeWG+uiF93h02zQZV9wM3D txNnoPeElZUnAEzq5LThl/H49U1OLNlyMdrJ7pOJ8fKdMGbgyPjByfnI94ScHYIOKsSu ZAKJmIfP5HSqwg5EGgIFqMH7F4Yk9sI+ccqYspYa1nAXOZuLzznduHnr1F/2ksTJvFRK +J3MbcDdDOUCGYqdfrlj5HsnU13TV7rWwLDLIeS+mu7nBRxdW0S51ZIHeENTWeclzbPR SXWGiv3j7YYwPkTZjZ5mrBinYmn9sz1vmimjY252gMsGWEersjT8/4hIHr09carvEnSb oO+Q== X-Gm-Message-State: ALoCoQnBd1ViVbJXU8y1SRhAckJxksL7l+5cx5gobpz9pvyQDdcD252pmh7E+TmHx8imemrmC4Ik 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 Cc: geert@linux-m68k.org, k.kozlowski@samsung.com, msivasub@codeaurora.org, agross@codeaurora.org, sboyd@codeaurora.org, linux-arm-msm@vger.kernel.org, lorenzo.pieralisi@arm.com, ahaslam@baylibre.com, mtitinger@baylibre.com, Lina Iyer 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> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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(-) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }