From patchwork Fri Jul 19 11:27:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 2830454 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A1B68C0319 for ; Fri, 19 Jul 2013 11:34:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B919F201EF for ; Fri, 19 Jul 2013 11:34:48 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF957201BA for ; Fri, 19 Jul 2013 11:34:47 +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 1V08wh-0000rM-O9; Fri, 19 Jul 2013 11:33:59 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V08wO-0005L7-O6; Fri, 19 Jul 2013 11:33:40 +0000 Received: from mail-wg0-f43.google.com ([74.125.82.43]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V08wM-0005Kc-23 for linux-arm-kernel@lists.infradead.org; Fri, 19 Jul 2013 11:33:38 +0000 Received: by mail-wg0-f43.google.com with SMTP id z11so3808079wgg.34 for ; Fri, 19 Jul 2013 04:33:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=uKccIcGPxxaqvTBMZP40Mm6gmuqMlt+eGbmPqqLJsPg=; b=XTOSazQQR5uRmFqn/NiYIrUoDBq/RIyh5SJ4FNrrQHYxqwPup9X09YV7rlDdB73Qeh fzbkPPZ8EjLi/w6KHHE7k6DC1jifJVtfSP58tGl3cCBsqZMIxAU7hNoPK3MVqA8Z0KeZ GFe5J30JHVXTD9TAQhdnHqP9PnuyEBHradoK8EPcMyx05XP0ynhXGREHO7A8XvQx5hM+ WFXrNrpVew2+5mNLexAGznGfbNVk7iO9j2lV20rMf5qu2gKHPlWuMBbLDndxPEJB1Avb hOk/jcsM42FFTt4Au7AuZESebaD0VZwIcbhn28Zf01vAEfrMq0qbxSUQ/Z90IdrX7+gP EB9g== X-Received: by 10.180.73.68 with SMTP id j4mr22473547wiv.10.1374233226930; Fri, 19 Jul 2013 04:27:06 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id o10sm22414762wiz.5.2013.07.19.04.27.05 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 19 Jul 2013 04:27:05 -0700 (PDT) From: Julien Grall To: stefano.stabellini@eu.citrix.com Subject: [PATCH v2] xen/arm: disable cpuidle and cpufreq when linux is running as dom0 Date: Fri, 19 Jul 2013 12:27:00 +0100 Message-Id: <1374233220-13770-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQlYbuHZK2yPa4AyEBiTOLGsUIQQveL+Fil1zyPqJn83uNZ1LhkMueqaDot3suqCcoa20wv+ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130719_073338_225846_4746F762 X-CRM114-Status: GOOD ( 12.32 ) X-Spam-Score: -2.6 (--) Cc: Julien Grall , ian.campbell@citrix.com, konrad.wilk@oracle.com, patches@linaro.org, linux-kernel@vger.kernel.org, xen-devel@lists.xen.org, 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 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When linux is running as dom0, Xen doesn't show the physical cpu but a virtual CPU. On some ARM SOC (for instance the exynos 5250), linux registers callbacks for cpuidle and cpufreq. When these callbacks are called, they will modify directly the physical cpu not the virtual one. It can impact the whole board instead of only dom0. Signed-off-by: Julien Grall Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Stefano Stabellini --- Changes in v2: - Disable cpufreq --- arch/arm/xen/enlighten.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 49839d8..af82792 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include @@ -292,6 +294,12 @@ static int __init xen_pm_init(void) { pm_power_off = xen_power_off; arm_pm_restart = xen_restart; + /* + * Making sure board specific code will not set up ops for + * cpu idle and cpu freq. + */ + disable_cpuidle(); + disable_cpufreq(); return 0; }