From patchwork Fri Dec 29 10:55:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mylene Josserand X-Patchwork-Id: 853860 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Zb6XDUDH"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z7Nqd4vwrz9s74 for ; Fri, 29 Dec 2017 21:58:37 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9ma4f4wROtbzGTzZPnxvaI6ljg4DdgkNfMo/g9fs6eE=; b=Zb6XDUDHIHkIUL vYn/k6Zmz0iWtbp8Eyv0pL8XkaXVksEv8ODjSsusDWTPoZFDtN2vfOVpIlljbPAPrq5exFZNmDARE VEkNb0fAN4ZxXQ1i4PF7+9bIymuQ1WbvoORSZA9SUGP8aewkzXrRAII2PkEY+KBGlkUnVi84P4iIV GkVz98dMyK0UAy+U1dcyLvQuLyiMfje/l2iHhFcEVO1ODsROP6J+Ujs/6mJHJtQ4v5dvGNvTK7QOS WNRzlLMjBRpWsPj4/JWTXkMvlPiWNAMWj0cYbOBOoG3cyzuguWtX8VkLNj1Avg8wouX0/G1nv2IWx 2S7xQjpLZQKFukVaYc+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eUsMw-0000DE-Vb; Fri, 29 Dec 2017 10:58:31 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eUsKU-0006zF-3s for linux-arm-kernel@lists.infradead.org; Fri, 29 Dec 2017 10:56:04 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id A2B6F20740; Fri, 29 Dec 2017 11:55:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from dell-desktop.lan (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 808BB20748; Fri, 29 Dec 2017 11:55:24 +0100 (CET) From: =?utf-8?q?Myl=C3=A8ne_Josserand?= To: maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH v2 5/5] arm: dts: sun8i: a83t: Fix undefined offset with virtual timer Date: Fri, 29 Dec 2017 11:55:06 +0100 Message-Id: <20171229105506.24851-6-mylene.josserand@free-electrons.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171229105506.24851-1-mylene.josserand@free-electrons.com> References: <20171229105506.24851-1-mylene.josserand@free-electrons.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171229_025558_831985_BD54ED16 X-CRM114-Status: GOOD ( 11.53 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.petazzoni@free-electrons.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, quentin.schulz@free-electrons.com, clabbe.montjoie@gmail.com, mylene.josserand@free-electrons.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org The ARM architected timers use an offset between their physical and virtual counters. That offset should be configured by the bootloader in CNTVOFF. However, the A83t bootloader fails to do so, and we end up with an undefined offset (which in our case is random), meaning that each CPU will have a different time, which isn't working very well. Fix that by setting the arm,cpu-registers-not-fw-configured that will make Linux use the physical timers instead of the virtual ones. One possible side effect would be that the virtualization features would be disabled. However, due to the way the GIC has been integrated in the system, it is already unusable so we're effectively not losing any feature. Signed-off-by: Mylène Josserand --- arch/arm/boot/dts/sun8i-a83t.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi index aa27ffb7db81..ddcd90ae3a73 100644 --- a/arch/arm/boot/dts/sun8i-a83t.dtsi +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi @@ -121,6 +121,7 @@ , , ; + arm,cpu-registers-not-fw-configured; }; clocks {