lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.21.1811201925020.258@nippy.intranet>
Date:   Tue, 20 Nov 2018 20:00:32 +1100 (AEDT)
From:   Finn Thain <fthain@...egraphics.com.au>
To:     Linus Walleij <linus.walleij@...aro.org>
cc:     Geert Uytterhoeven <geert@...ux-m68k.org>, funaho@...ai.org,
        schwab@...ux-m68k.org, Arnd Bergmann <arnd@...db.de>,
        schivers@....com.au, Thomas Gleixner <tglx@...utronix.de>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        schmitzmic@...il.com, John Stultz <john.stultz@...aro.org>,
        linux-m68k@...ts.linux-m68k.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v2 10/14] m68k: mac: Convert to clocksource API

On Tue, 20 Nov 2018, Linus Walleij wrote:

> On Mon, Nov 19, 2018 at 2:22 AM Finn Thain <fthain@...egraphics.com.au> wrote:
> 
> > Add a platform clocksource by adapting the existing arch_gettimeoffset
> > implementation.
> >
> > Signed-off-by: Finn Thain <fthain@...egraphics.com.au>
> > Acked-by: Linus Walleij <linus.walleij@...aro.org>
> > Tested-by: Stan Johnson <userm57@...oo.com>
> 
> As noted for the Amiga CIA (which is pretty much a sibling to this MOS 
> 6522 VIA) this chip also has two counters and could use one as 
> clocksource and the other as clock event.
> 
> Again I bet this is just using one timer out of habit.
> 
> It will be an easy feat to make a clean clocksource+clock event for this 
> hardware as well once this refactoring is complete.
> 

Right. Both timer 1 and timer 2 have a timed interrupt mode, and either 
could probably serve as a clock event device or a clocksource. Some Mac 
models have a second VIA with two more timers, but not all.

(As clock event devices, the longest interval you can program is about 83 
ms. As 783360 Hz, 16-bit clocksources, they wrap about 12 times every 
second.)

If you use one timer as a clock event device and the other as a 
clocksource, there are no timers left to run the existing 
timer_interrupt() handler. So this arrangement would require 
GENERIC_CLOCKEVENTS=y, right?

Then, wouldn't all relevant platforms have to support 
GENERIC_CLOCKEVENTS=y, if a single binary was to support all of those 
platforms?

-- 

> Yours,
> Linus Walleij
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ