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: 18426 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f199.google.com (mail-ye0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D645E25E49 for ; Fri, 19 Jul 2013 11:27:09 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l8sf4729446yen.2 for ; Fri, 19 Jul 2013 04:27:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :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=uKccIcGPxxaqvTBMZP40Mm6gmuqMlt+eGbmPqqLJsPg=; b=dD+NwYl5qHaP3C8FMkl4MOzN9bLAnFppDER0BzmODgDa5KQ+X3KXs7U8j7DC84Ko8F XG7PSOF7aHFtF82Jhs7w3DKvO6oAhqYEawoMT7EKSAGqGCQKJ/ZmhaELKk0hPEK+9tlz K70GY0ZfnMsHV2XheiWSZgbYfWKrzzU14yFlbJZUl9VtEqFqngJqS+G2pQggwW3IGYkX jnDy9P1aYxsdnEtj0/eeyz+C+l9ocv7W6di0csRKHZ8SxgaKdRDo/Abu9Ip1bw/BIBwR fY87QNzxXfmyXgoWD8pMfv/mNt9o9ox2x31ZmyajTKBZDv88W5vCDLheKOxUIxlt9xe+ f6DQ== X-Received: by 10.236.113.197 with SMTP id a45mr8375216yhh.14.1374233229135; Fri, 19 Jul 2013 04:27:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.108.74 with SMTP id hi10ls1722283qeb.50.gmail; Fri, 19 Jul 2013 04:27:09 -0700 (PDT) X-Received: by 10.220.69.71 with SMTP id y7mr5529063vci.40.1374233229007; Fri, 19 Jul 2013 04:27:09 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id jj1si3932431vdb.100.2013.07.19.04.27.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 19 Jul 2013 04:27:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 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.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so1387434vcb.0 for ; Fri, 19 Jul 2013 04:27:08 -0700 (PDT) X-Received: by 10.220.203.197 with SMTP id fj5mr5759582vcb.60.1374233228937; Fri, 19 Jul 2013 04:27:08 -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.165.8 with SMTP id yu8csp19931veb; Fri, 19 Jul 2013 04:27:08 -0700 (PDT) X-Received: by 10.180.36.107 with SMTP id p11mr927712wij.31.1374233227460; Fri, 19 Jul 2013 04:27:07 -0700 (PDT) Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by mx.google.com with ESMTPS id yt6si6115460wjc.136.2013.07.19.04.27.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 19 Jul 2013 04:27:07 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.47 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.82.47; Received: by mail-wg0-f47.google.com with SMTP id l18so3802984wgh.26 for ; Fri, 19 Jul 2013 04:27:07 -0700 (PDT) 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 Cc: ian.campbell@citrix.com, patches@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xen-devel@lists.xen.org, konrad.wilk@oracle.com, Julien Grall 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: ALoCoQnWW5LjzPqaERZiykRcRpaPUnkm9u1nHuimduBphX4KCJcedMoHUoike2fLdLRWXaVxF+sH X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 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: , 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; }