Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1825906imu; Wed, 21 Nov 2018 02:32:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/X4BYFkfYt5XrObG0uRk44sGTiXQbyQ7IDIRXOL2JFwRf1h/pNgnwQbq0sXk0qHlcTnbGiE X-Received: by 2002:a17:902:d905:: with SMTP id c5mr6071026plz.43.1542796355998; Wed, 21 Nov 2018 02:32:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542796355; cv=none; d=google.com; s=arc-20160816; b=YzhMwYGjsx4Di3oG2ZNSkAiRaQLQOkOJkfwHZLZMm4nl5psdDhox5ar4eOJ7B9q6hd mbi8oWxp+CW+46Ylk6/iFmKuqFtTBtydvpxvUUUga2W48xEPIqcp7RIkvds+LPwaKf98 dIneHMDpxYIk2Wyb+2UUW/Kmf2Ec9gHLxDhGW+fxvG3RrmmLq88mI9FDQaT6YExNUO+3 W+Tr8t/sypYfdc6fx+tSu1abiAeKCOStmOwtB6IIGWGoRQbI1UqrJpTi4K+P4Cqc1vAS F9Cb+humc0lnf+vMkmbVc8iwy0OVsR7S0XoKEYC9rXxRtaj/RNYRAqAGQ7s3grBuCAva GBHA== 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=y12dPRT0FgIiV1LBI8Bf3+h/yCRZUDj82GOHtCzcJGs=; b=gd5iWB/OeqikhKDKQqAac2II5f6OcDwmO7jcYeeVv8QMef0a58cH5MDORbfzcGz6Bq yGf6bsUZZqAJbU7Z94S06yx9/Iy7WsZ2FKGeMwc3AEkEcT+OWP+tFqo5GeAe/X5e7Wtg B/YuLOdenq0a+DRgYnpHEttEmjWsemMjLLGTA/83Q4BP0hRDsMsWnTacWd91cWVj/2lW 3JbO7SbCmdPPhwsLiHUKxVhYSR2IHQSo2AtluDIy55nsbg3nDcsEV73Rf/lQz5cfXsMp L+rZz9djUA/469qkQP2YB+BW6L2WPN8kZ0WJEzHoaT11ml/aKAD2COk8pOflN9VVMKVc fHuA== 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 l81si16765557pfj.230.2018.11.21.02.32.19; Wed, 21 Nov 2018 02:32:35 -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 S1729243AbeKUUgQ (ORCPT + 99 others); Wed, 21 Nov 2018 15:36:16 -0500 Received: from mail-vs1-f68.google.com ([209.85.217.68]:35574 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727981AbeKUUgQ (ORCPT ); Wed, 21 Nov 2018 15:36:16 -0500 Received: by mail-vs1-f68.google.com with SMTP id e7so2902633vsc.2 for ; Wed, 21 Nov 2018 02:02:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y12dPRT0FgIiV1LBI8Bf3+h/yCRZUDj82GOHtCzcJGs=; b=OJyj5groDVVMsS3kvx/IroFnj1zqlT1bCJ8a3wTVfK20CnsCiK0yOpNJegBzc6XZb2 SEPz1v3tx2ofXNBHu40AtdB53Ltw8h3hM2lXyKnOkEck0cAj/X1TcrqRAl96bZ4PqqK+ aq+SDxDDKjuD817SVtDQb0Yac4lGHBrDqZ1DP2kv1gxp0Fsozgn0rzRapJvXktf92UfQ xf+BAKL9fzRq6uKYSW7rArSB1B+wtbJasN5J1itJBfyJdanmOqZUWsabfq27E5Eo51It 0PAlHsYORdfsjHBQCipfxqj34pN9VVsP6iypa1i3WrU06sTI/qirX6a4sfnVKn+ZIqD3 Iipg== X-Gm-Message-State: AGRZ1gIczFGLcQicU9PQcrif2iCIPJJyGZqF8D0om/CRUKNPXBg5kikm 5HNp8R+DvewXq6sdXMQE/5o1po3Oha2LlUujPe8= X-Received: by 2002:a67:f43:: with SMTP id 64mr2481901vsp.166.1542794548022; Wed, 21 Nov 2018 02:02:28 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Geert Uytterhoeven Date: Wed, 21 Nov 2018 11:02:14 +0100 Message-ID: Subject: Re: [RFC PATCH v2 09/14] m68k: hp300: Remove hp300_gettimeoffset() To: Finn Thain Cc: Kars de Jong , Philip Blundell , Andreas Schwab , Arnd Bergmann , Stephen N Chivers , Thomas Gleixner , Daniel Lezcano , Michael Schmitz , John Stultz , Linus Walleij , linux-m68k , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Finn, On Wed, Nov 21, 2018 at 10:47 AM Finn Thain wrote: > On Wed, 21 Nov 2018, Geert Uytterhoeven wrote: > > The 8520 CIA is almost identical to the 6526 CIA, as used in the C64... > > The 6526 CIA datasheet says, "In continuous mode, the timer will count > from the latched value to zero, generate and interrupt, reload the latched > value and repeat the procedure continuously." I stand corrected... > This suggests that either 0 or N (the latched value) would result from a > read from the counter immediately following an interrupt. Who can say > which? Just have to try it. The answer should allow us to avoid the risk > of a clocksource that jumps forwards and backwards. The code in amiga_gettimeoffset() does: ticks = hi << 8 | lo; if (ticks > jiffy_ticks / 2) /* check for pending interrupt */ if (cia_set_irq(&ciab_base, 0) & CIA_ICR_TA) offset = 10000; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds