From patchwork Tue Apr 23 08:54:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2476521 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 9FE953FCA5 for ; Tue, 23 Apr 2013 08:55:55 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UUZ0Y-0003ix-1p; Tue, 23 Apr 2013 08:55:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UUZ0L-000366-7x; Tue, 23 Apr 2013 08:55:13 +0000 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UUZ03-000331-5A for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2013 08:54:57 +0000 Received: by mail-wi0-f178.google.com with SMTP id hm14so428632wib.5 for ; Tue, 23 Apr 2013 01:54:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=5A0Od3ysJTNS7HDHkxkHhrctskWl6lY01Iup9n2pWeo=; b=XGN+pXX7PTxPJboDq3SMHWEIMXpzsmRbxuewZxIC4jqe8jl+jIDaH45KwyLjBVSlvR +riVcduOvkoy0SZM/z3ivIak9NGnG2aDAQI6epW1ZQbyokUleRntEgQ94Z7xYRZuzkX9 AIvNZcoo9UVm6zdt7iLXKHGZeJQ92hmCfg3JOnmHkWBEXP06IJJFwmwmdnV4tCQdfxNd KaafY6REK7G0d0yh8fW9FK/DSPteiIPLr1yBUn2X74pcAs0749DlJF0W4oYZxZlvBoeg BOVRTypWDxr8n5pMp/ptc31EV4LZA/gaMXTqk2wz6nwwpUWjgrw42MN6H/d6o8ECHMzj Jbtw== X-Received: by 10.180.93.134 with SMTP id cu6mr58070780wib.8.1366707293893; Tue, 23 Apr 2013 01:54:53 -0700 (PDT) Received: from mai.home (AToulouse-654-1-479-219.w86-201.abo.wanadoo.fr. [86.201.194.219]) by mx.google.com with ESMTPS id q13sm27358775wie.8.2013.04.23.01.54.51 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 01:54:53 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl Subject: [V4 patch 02/15] ARM: ux500: cpuidle: replace for_each_online_cpu by for_each_possible_cpu Date: Tue, 23 Apr 2013 10:54:32 +0200 Message-Id: <1366707285-12179-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366707285-12179-1-git-send-email-daniel.lezcano@linaro.org> References: <1366707285-12179-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQnaFccUeVT2lAX38YKkJXfEl/hM794AprCum3Hk2ZNznoi94oU3aR33SAObVczSzvQQ6aod X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130423_045455_370603_1B14F06A X-CRM114-Status: GOOD ( 12.90 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: andrew@lunn.ch, kgene.kim@samsung.com, jason@lakedaemon.net, horms@verge.net.au, patches@linaro.org, khilman@deeprootsystems.com, magnus.damm@gmail.com, linux-pm@vger.kernel.org, swarren@wwwdotorg.org, nsekhar@ti.com, rob.herring@calxeda.com, deepthi@linux.vnet.ibm.com, tony@atomide.com, lethal@linux-sh.org, linaro-kernel@lists.linaro.org, kernel@pengutronix.de, josephl@nvidia.com, jkosina@suse.cz, plagnioj@jcrosoft.com, linux@maxim.org.za, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org All the drivers are using, in their initialization function, the for_each_possible_cpu macro. Using for_each_online_cpu means the driver must handle the initialization of the cpuidle device when a cpu is up which is not the case here. Change the macro to for_each_possible_cpu as that fix the hotplug initialization and make the initialization routine consistent with the rest of the code in the different drivers. Signed-off-by: Daniel Lezcano Acked-by: Linus Walleij --- arch/arm/mach-ux500/cpuidle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c index c29c1bf..5657d4a 100644 --- a/arch/arm/mach-ux500/cpuidle.c +++ b/arch/arm/mach-ux500/cpuidle.c @@ -125,7 +125,7 @@ int __init ux500_idle_init(void) return ret; } - for_each_online_cpu(cpu) { + for_each_possible(cpu) { device = &per_cpu(ux500_cpuidle_device, cpu); device->cpu = cpu; ret = cpuidle_register_device(device); @@ -139,7 +139,7 @@ out: return ret; out_unregister: - for_each_online_cpu(cpu) { + for_each_possible_cpu(cpu) { device = &per_cpu(ux500_cpuidle_device, cpu); cpuidle_unregister_device(device); }