linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Ilya Dikariev <dikarill@b-tu.de>
To: Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>
Cc: linux-arm-kernel@lists.infradead.org
Subject: timer unit of Allwinner A64 UNKNOWN1 bug
Date: Thu, 3 Nov 2022 13:04:44 +0100	[thread overview]
Message-ID: <20221103130444.5ace902c@rosh> (raw)

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

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


[-- Attachment #2: rcu.patch --]
[-- Type: text/x-patch, Size: 433 bytes --]

--- 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;								\

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

                 reply	other threads:[~2022-11-03 12:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221103130444.5ace902c@rosh \
    --to=dikarill@b-tu.de \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=samuel@sholland.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).