From patchwork Wed Apr 10 14:22:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16019 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B25EE23912 for ; Wed, 10 Apr 2013 14:22:58 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id gf11sf805248vcb.8 for ; Wed, 10 Apr 2013 07:22:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=sOZnfayO/LuSWeMMOiwRGLES0JNKfQvUJq/LsL7jyjI=; b=GMjap++GvpQyq46O8ExqGZp/CyiIRHbkjDwf3A75jH6kCZpcmClvIxxEqJSHlptXKn 9FHBOWigck35trWmWDUA4BI8lG8KrFop9aEWkpuGz9exfKVJZexsEgfTqdFWW4V5bw64 pbqCE1fuvWmZTpBtU+lFW2AwyT4WMGfXQkEol6RM/yOGcveAeeRNrvbRBP831eo9p0vN ee9aP9Mp8cf7kL0BR/AkREfb0fTvE/hGm8kgdL9iVF1zdQpwTFtNLSc3sr+8TGifIcOU 65UvY2+XXC8kSRie9RlyegEjuDZqfwTaHQ2wM2nkBmRnKhpgqAJAnb0BbrbAs4KzCErJ WZjA== X-Received: by 10.224.219.146 with SMTP id hu18mr1565826qab.3.1365603759543; Wed, 10 Apr 2013 07:22:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.212 with SMTP id 20ls308258qeg.12.gmail; Wed, 10 Apr 2013 07:22:39 -0700 (PDT) X-Received: by 10.220.115.135 with SMTP id i7mr1630965vcq.30.1365603759227; Wed, 10 Apr 2013 07:22:39 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id kn11si71330veb.34.2013.04.10.07.22.39 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 07:22:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id hv10so418065vcb.9 for ; Wed, 10 Apr 2013 07:22:39 -0700 (PDT) X-Received: by 10.58.238.65 with SMTP id vi1mr1650227vec.31.1365603758935; Wed, 10 Apr 2013 07:22:38 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.85.136 with SMTP id h8csp107458vez; Wed, 10 Apr 2013 07:22:38 -0700 (PDT) X-Received: by 10.180.13.233 with SMTP id k9mr4262789wic.6.1365603757918; Wed, 10 Apr 2013 07:22:37 -0700 (PDT) Received: from mail-we0-x22b.google.com (mail-we0-x22b.google.com [2a00:1450:400c:c03::22b]) by mx.google.com with ESMTPS id b1si64038wiy.4.2013.04.10.07.22.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 07:22:37 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22b is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c03::22b; Received: by mail-we0-f171.google.com with SMTP id d46so416408wer.30 for ; Wed, 10 Apr 2013 07:22:37 -0700 (PDT) X-Received: by 10.180.76.84 with SMTP id i20mr3900338wiw.9.1365603757406; Wed, 10 Apr 2013 07:22:37 -0700 (PDT) Received: from mai.home (AToulouse-654-1-413-119.w82-125.abo.wanadoo.fr. [82.125.160.119]) by mx.google.com with ESMTPS id dp5sm32126938wib.1.2013.04.10.07.22.34 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 07:22:36 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl Cc: linus.walleij@linaro.org, jason@lakedaemon.net, andrew@lunn.ch, kernel@pengutronix.de, swarren@wwwdotorg.org, santosh.shilimkar@ti.com, nicolas.ferre@atmel.com, plagnioj@jcrosoft.com, linux@maxim.org.za, rob.herring@calxeda.com, nsekhar@ti.com, horms@verge.net.au, magnus.damm@gmail.com, deepthi@linux.vnet.ibm.com, lethal@linux-sh.org, jkosina@suse.cz, kgene.kim@samsung.com, khilman@deeprootsystems.com, tony@atomide.com, linux-pm@vger.kernel.org, patches@linaro.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, josephl@nvidia.com Subject: [PATCH 03/18] ARM: ux500: cpuidle: replace for_each_online_cpu by for_each_possible_cpu Date: Wed, 10 Apr 2013 16:22:08 +0200 Message-Id: <1365603743-5618-4-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365603743-5618-1-git-send-email-daniel.lezcano@linaro.org> References: <1365603743-5618-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQlDYnkrQd8DlEG0aylN72HnwCEG/UTWoDEsNNk4XfI7/EgojGoe0ucNWM989MjwwzmFdmDV X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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); }