From patchwork Thu Apr 11 20:42:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16052 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-fa0-f70.google.com (mail-fa0-f70.google.com [209.85.161.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9BDC8238FF for ; Thu, 11 Apr 2013 20:43:30 +0000 (UTC) Received: by mail-fa0-f70.google.com with SMTP id m1sf2108668fae.1 for ; Thu, 11 Apr 2013 13:43:07 -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=Ajvk4+zJOMCvzh/2gx1H4bBXsm2IWl27N9vlfOWTlMQpUr/RzHAj+eQS4abTx43SnJ C2eRNpcC5UytUKY0LNxyS+V7GglVbcPKJ8Zvgnz8HDagea/GfRJyxL7QBaTSinoEFJHE W+djARgJ0+enU4kIh0VsJFvKxBmEWO+ZxT/0fwfYK/oRzsmEHaOQrb1ypzlzaXXGCbHh 2iUxfpc8gZONkGbhN3BMn1ZqCTufITzzI/SOxoK29rPHpM4cF/KSObsD8JjlwJCoIilD 7GI8BLl7q86JjMHkX1pf4Wd8ZprOtwQA2BnVYNw6SDNR2Vpt1aaLcIUhkTDmSDPiTya4 oJ6w== X-Received: by 10.180.106.161 with SMTP id gv1mr5619wib.4.1365712987480; Thu, 11 Apr 2013 13:43:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.101.136 with SMTP id fg8ls329989wib.8.canary; Thu, 11 Apr 2013 13:43:07 -0700 (PDT) X-Received: by 10.194.5.196 with SMTP id u4mr13287067wju.54.1365712987275; Thu, 11 Apr 2013 13:43:07 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id bc3si2134233wjc.158.2013.04.11.13.43.06 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:07 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id pb11so1805815veb.6 for ; Thu, 11 Apr 2013 13:43:06 -0700 (PDT) X-Received: by 10.58.181.201 with SMTP id dy9mr6353166vec.34.1365712986037; Thu, 11 Apr 2013 13:43:06 -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.127.98 with SMTP id nf2csp38015veb; Thu, 11 Apr 2013 13:43:05 -0700 (PDT) X-Received: by 10.194.104.137 with SMTP id ge9mr7599442wjb.52.1365712985065; Thu, 11 Apr 2013 13:43:05 -0700 (PDT) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [2a00:1450:400c:c05::235]) by mx.google.com with ESMTPS id gg1si1401561wic.86.2013.04.11.13.43.04 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:05 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::235 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c05::235; Received: by mail-wi0-f181.google.com with SMTP id hj8so990569wib.8 for ; Thu, 11 Apr 2013 13:43:04 -0700 (PDT) X-Received: by 10.194.235.196 with SMTP id uo4mr13298660wjc.30.1365712984621; Thu, 11 Apr 2013 13:43:04 -0700 (PDT) Received: from mai.home (AToulouse-654-1-501-244.w83-205.abo.wanadoo.fr. [83.205.84.244]) by mx.google.com with ESMTPS id fv2sm5794029wib.6.2013.04.11.13.43.02 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 13:43:03 -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: [V2 patch 04/19] ARM: ux500: cpuidle: replace for_each_online_cpu by for_each_possible_cpu Date: Thu, 11 Apr 2013 22:42:34 +0200 Message-Id: <1365712969-7541-5-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365712969-7541-1-git-send-email-daniel.lezcano@linaro.org> References: <1365712969-7541-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQlxbphetIPihLXbWjFsvEj6bdJMYQVpvH3P/9C/0x1z8u0x29Xwf2haI9OQA8SBqu3XphdS X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 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); }