From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3403CC4332F for ; Thu, 3 Nov 2022 12:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=IyjUNhIAr8ffXiTNz6nRMxUCccLeDQaTjWxowWoCgkQ=; b=kdvuTX7ODweluaCCR+9Xaq46K8 yM0bbNkrTgJMEB14LxZ/MTEYWA22AQNbD+9qU3ykNUWzlboqrejXEQrk/YtWR3yr49FVjA+uvPLNG 9cNdNb7pPZvLFJ5VHQAfXx1zSOTJPJ6XU15RqwgM3SxBCl0RM3PciLZIDHDVsxsnuS/Ken4Mp/sZa yvxNy0+dOD1LkxA4Fyk+GfGwATbSkPQo+VRJnUYrr93Wdy/QwDXSbpCnNecHo+I0fRjd94q2LSjjz 2Tbvvhau1hTz92JzNd16pkGmZ1KeIjFAMv0MXm9fun2u52HwG7wFPJ7m74V0JV+lW+QlCVd+4bFZk OL1LJU5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqZ6z-00HI9y-LY; Thu, 03 Nov 2022 12:14:21 +0000 Received: from smtp-4.b-tu.de ([141.43.208.14]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqZ6v-00HI5A-Sv for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2022 12:14:20 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp-4.b-tu.de (Postfix) with ESMTP id 4N32WB2hDNzGsZY3; Thu, 3 Nov 2022 13:04:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=b-tu.de; h= content-type:content-type:mime-version:x-mailer:message-id :subject:subject:from:from:date:date:received:received; s=smtp; t=1667477092; x=1668341093; bh=mSzH0lAdEA+Oz3JDPreyHN1mpNcptAYo 8txtWOE9mFk=; b=yGjt+Z81Nhh/k7cjwwegB6vWnRbqoSLULoXbZhiqWIH8zQei RgjlgrlgRL0xVaUqrd2x4CLlpq13TuHQDir+YkWGQBGDZ72xbk+BCIMYThP7OhAF QT3yYpnTFb+f+fjfOgODjv/xyqdkUkCv+YuBa35Ej0rziRwwXogWhYlYuxs= X-Virus-Scanned: by AMaViS (at smtp-4.b-tu.de) Received: from smtp-4.b-tu.de ([127.0.0.1]) by localhost (smtp-4.b-tu.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qLk4MR64z03z; Thu, 3 Nov 2022 13:04:52 +0100 (CET) Received: from rosh (ipsec249.vpn.tu-cottbus.de [141.43.177.249]) (Authenticated sender: dikarill@b-tu.de) by smtp-4.b-tu.de (Postfix) with ESMTPSA id 4N32W300RNzGsZXQ; Thu, 3 Nov 2022 13:04:46 +0100 (CET) Date: Thu, 3 Nov 2022 13:04:44 +0100 From: Ilya Dikariev To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-arm-kernel@lists.infradead.org Subject: timer unit of Allwinner A64 UNKNOWN1 bug Message-ID: <20221103130444.5ace902c@rosh> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/oA5D8l6xgbpyE4VEzYJi6ls" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221103_051418_588856_B9ED3C01 X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --MP_/oA5D8l6xgbpyE4VEzYJi6ls Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello all, owned a Pinephone and it turns out, that the genmask(8,0) is not sufficient to get a workaround in this particular case. The phone get freezed pretty often, and after some 10-15 minutes unfreezes. Time jumps too. Did the test https://github.com/smaeul/timer-tools that resulted in https://pastebin.com/xbTeksJN After applying the patch (changing to genmask(7,0)) the test passed. No errors within hours and no freezes/time jumps. Could you implement this into a mainline? Best regards, Ilya --MP_/oA5D8l6xgbpyE4VEzYJi6ls Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=rcu.patch --- a/drivers/clocksource/arm_arch_timer.c 2022-11-03 12:55:50.149533030 +0100 +++ b/drivers/clocksource/arm_arch_timer.c 2022-11-03 12:56:25.309720213 +0100 @@ -371,7 +371,7 @@ do { \ _val = read_sysreg(reg); \ _retries--; \ - } while (((_val + 1) & GENMASK(8, 0)) <= 1 && _retries); \ + } while (((_val + 1) & GENMASK(7, 0)) <= 1 && _retries); \ \ WARN_ON_ONCE(!_retries); \ _val; \ --MP_/oA5D8l6xgbpyE4VEzYJi6ls Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --MP_/oA5D8l6xgbpyE4VEzYJi6ls--