Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp626905imu; Tue, 20 Nov 2018 04:34:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wncujhe+4toxsnKkwJmJeU+Xef08Ig9N+ezwcCt17P0nGipV1J4AE1o7C6y+sZ+XO7l+t6 X-Received: by 2002:a63:7418:: with SMTP id p24mr1773917pgc.196.1542717287389; Tue, 20 Nov 2018 04:34:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542717287; cv=none; d=google.com; s=arc-20160816; b=CtODJWvQv5MBOjE8m+yygRTiaKmbhY1PHMWMCfdMBoM++l+qsu3PjMkx09WYbTe7pd xVte+bdVd68xYr9i80TiczzhPLmxkat53W2JS3HfWcew/Ovv+/CGC+Nkxx+AY0tifatZ TtbzFkOdq5yLXa803zopHwcaicQnD9a+zs9CGSypYhexSsDglpr7TJ2SyXCIyDgzxTof eM7cJ+KmHZjnhTbRmK9Kb8qgQA7BDuaji05OxfvL+Xxj3Xr19rEWrZG3hMLPoPz9SSoU fCM5GGJMGjMH2VUOIIViM3gYXdy9Bm7s2MZwqAu62+eJ8ihZu00Da/vMRvYs1Z4KTxpH SB3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=rzUYX+L9JT9Eco+UhsIOaVCXzB4HXo2aHY7LPip+EB0=; b=Grxp4BdUMHx6o55BHRzETAWrMFcHc4QP9swYG9eWILQJ0cZaOf+tmrGNNTYetNAxj0 L+gW0poozfEY1xCMbtOKtcWTajir3CplcqETh3sEOimkZocOROqirx+CrDiUaSP8OVYy OZlxMP9jw1LdqHT8xHTJhEnHZEQEsdofuZGKyaxpE5UAzgej67zkeRmY1ky8iffQmRnL 6ptf4ZB4odTQBICetdWMILplZ7YEFHDrASUjgcwZ4PbY7ZMHss9dDwaDMEfZdSybvwdg 8RNKyOJRSMpEN/Z4bnWG5Pf0wj7V/iZjSksWP9ZdDmWODd2LNZ0uWMclUct5OAMJVZIm xh4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ba9si5115954plb.109.2018.11.20.04.34.31; Tue, 20 Nov 2018 04:34:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727538AbeKTTxd (ORCPT + 99 others); Tue, 20 Nov 2018 14:53:33 -0500 Received: from smtpq3.tb.mail.iss.as9143.net ([212.54.42.166]:51204 "EHLO smtpq3.tb.mail.iss.as9143.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726549AbeKTTxc (ORCPT ); Tue, 20 Nov 2018 14:53:32 -0500 X-Greylist: delayed 961 seconds by postgrey-1.27 at vger.kernel.org; Tue, 20 Nov 2018 14:53:31 EST Received: from [212.54.42.132] (helo=smtp8.tb.mail.iss.as9143.net) by smtpq3.tb.mail.iss.as9143.net with esmtp (Exim 4.86_2) (envelope-from ) id 1gP229-0002Gi-Ki for linux-kernel@vger.kernel.org; Tue, 20 Nov 2018 10:09:25 +0100 Received: from mail-lj1-f175.google.com ([209.85.208.175]) by smtp8.tb.mail.iss.as9143.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1gP229-000216-IS for linux-kernel@vger.kernel.org; Tue, 20 Nov 2018 10:09:25 +0100 Received: by mail-lj1-f175.google.com with SMTP id z80-v6so961074ljb.8 for ; Tue, 20 Nov 2018 01:09:25 -0800 (PST) X-Gm-Message-State: AA+aEWYBhNnwrCD1HbEkfhpmGetyGWnmvHJKK72yhz7AwP5vQ4g0gnAU G9nfgeFHXwy6hMXM1NosXdjw5amRXfFw9zUUuUU= X-Received: by 2002:a2e:63cd:: with SMTP id s74-v6mr665076lje.117.1542704964978; Tue, 20 Nov 2018 01:09:24 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Kars de Jong Date: Tue, 20 Nov 2018 10:09:13 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 09/14] m68k: hp300: Remove hp300_gettimeoffset() To: fthain@telegraphics.com.au Cc: geert@linux-m68k.org, philb@gnu.org, schwab@linux-m68k.org, arnd@arndb.de, schivers@csc.com.au, tglx@linutronix.de, daniel.lezcano@linaro.org, schmitzmic@gmail.com, john.stultz@linaro.org, linus.walleij@linaro.org, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-SourceIP: 209.85.208.175 X-Authenticated-Sender: karsdejong@home.nl (via SMTP) X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.3 cv=aNtEVo1m c=1 sm=1 tr=0 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=IkcTkHD0fZMA:10 a=JHtHm7312UAA:10 a=8981fWPbAAAA:8 a=WtWjpamJeDu0b-qHKIQA:9 a=QEXdDO2ut3YA:10 a=o72u2rHnfW5qNJ_4I8LD:22 X-Ziggo-Spam-Status: No X-Spam-Status: No X-Spam-Flag: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Op ma 19 nov. 2018 om 02:10 schreef Finn Thain : > > hp300_gettimeoffset() never checks the timer interrupt flag and will > fail to notice when the timer counter gets reloaded. That means the > clock could jump backwards. > > Remove this code and leave this platform on the 'jiffies' clocksource. > Note that this amounts to a regression in clock precision. However, > adopting the 'jiffies' clocksource does resolve the monotonicity issue. > > Signed-off-by: Finn Thain > --- > hp300_gettimeoffset() cannot be used in a clocksource conversion > unless it can be made monotonic. I can't fix this without knowing the > details of the timer implementation, such as the relationship between > the timer count and the interrupt flag. I don't really like this regression... According to NetBSD sources, there are 3 timers in the chip (originally an MC6840 PTM). Timer 1 is used as the system timer, timer 3 runs at the same rate and is unused on Linux (on NetBSD it is used as the statistics/profiling timer), and timer 3 is connected to timer 2 so you can make a 32-bit timer out of the two timers together (also unused on Linux). Timers 1 counts down at 25 MHz. The interrupt flag is set when the counter reaches 0 after which it is automatically reloaded and starts counting down again. > --- > arch/m68k/hp300/time.c | 19 ------------------- > 1 file changed, 19 deletions(-)