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: 2476461 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0740E3FCA5 for ; Tue, 23 Apr 2013 08:55:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756510Ab3DWIy5 (ORCPT ); Tue, 23 Apr 2013 04:54:57 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:61145 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755633Ab3DWIyz (ORCPT ); Tue, 23 Apr 2013 04:54:55 -0400 Received: by mail-wi0-f182.google.com with SMTP id m6so425861wiv.15 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=AxCt8Fh9j0vjCU+ccovqHnIPQa0OkWLzFJ35NuRr4piFFtWAayv9DigaFH/1CDbbnN h7200zggH77s0DTlKVBXBeFoSj30OFj2Q/EiP35ZEWN/nmxz1JIxHGnq8KL0P1PZ0WP8 3301ViLQPQDjkslk08SChbC6mcPZCrHBSI5o4A9G+hvL0I0KN3TFkLaHSfVgcMrtMihA woEyx5ZUmFWI3kctrx5oFT68WYA+bbHMcgxMRS+6lV9LyUzdy8lJDVQYOfOGR4m1ViTD zOvaz8py0MCnLNYjA/kjt71Fx3gerzJatTcDGuk/pf9M7A7iU3u1Hiaevu0dt8mM1vZk j4ew== 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 Cc: andrew@lunn.ch, khilman@deeprootsystems.com, nsekhar@ti.com, josephl@nvidia.com, kgene.kim@samsung.com, patches@linaro.org, magnus.damm@gmail.com, tony@atomide.com, plagnioj@jcrosoft.com, linaro-kernel@lists.linaro.org, jason@lakedaemon.net, swarren@wwwdotorg.org, rob.herring@calxeda.com, horms@verge.net.au, linux@maxim.org.za, linux-arm-kernel@lists.infradead.org, deepthi@linux.vnet.ibm.com, jkosina@suse.cz, linux-pm@vger.kernel.org, lethal@linux-sh.org, kernel@pengutronix.de 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: ALoCoQnEW78Cn0gFtvQfcoxrRXMZ6lm7DVFPLTxKhu0hvh31oJhK84vFLZ7x9Bdpv/9ot2GqUm8e Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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); }