Re: [RFC PATCH v2 06/14] m68k: amiga: Convert to clocksource API

2018-11-20 Thread Linus Walleij
On Mon, Nov 19, 2018 at 2:22 AM Finn Thain wrote: > Add a platform clocksource by adapting the existing arch_gettimeoffset > implementation. > > Signed-off-by: Finn Thain > Acked-by: Linus Walleij > --- > Changed since v1: > - Moved clk_total access to within the irq lock. Came to think of

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-20 Thread Linus Walleij
On Mon, Nov 19, 2018 at 2:22 AM Finn Thain wrote: > Add a platform clocksource by adapting the existing arch_gettimeoffset > implementation. > > Normally the MFP timer C interrupt flag would be used to check for > timer counter wrap-around. Unfortunately, that flag gets cleared by the > MFP

Re: [RFC PATCH v2 10/14] m68k: mac: Convert to clocksource API

2018-11-20 Thread Linus Walleij
On Mon, Nov 19, 2018 at 2:22 AM Finn Thain wrote: > Add a platform clocksource by adapting the existing arch_gettimeoffset > implementation. > > Signed-off-by: Finn Thain > Acked-by: Linus Walleij > Tested-by: Stan Johnson As noted for the Amiga CIA (which is pretty much a sibling to this

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-20 Thread Geert Uytterhoeven
Hi Linus, On Tue, Nov 20, 2018 at 9:10 AM Linus Walleij wrote: > As with the Amiga, this chip also has an RTC clock that should > go to the RTC subsystem, naturally. Please note the Amiga CIA is an 8520, not 6526, hence it has a 24-bit TOD instead of a BCD TOD, so it's not suitable for use as

Re: [RFC PATCH v2 10/14] m68k: mac: Convert to clocksource API

2018-11-20 Thread Finn Thain
On Tue, 20 Nov 2018, Linus Walleij wrote: > On Mon, Nov 19, 2018 at 2:22 AM Finn Thain wrote: > > > Add a platform clocksource by adapting the existing arch_gettimeoffset > > implementation. > > > > Signed-off-by: Finn Thain > > Acked-by: Linus Walleij > > Tested-by: Stan Johnson > > As

Re: [RFC PATCH v2 09/14] m68k: hp300: Remove hp300_gettimeoffset()

2018-11-20 Thread Kars de Jong
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. >

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-20 Thread Finn Thain
On Tue, 20 Nov 2018, Linus Walleij wrote: > > Yes you already see the same as I see: this chip MK68901 has no less > than four timers. I bet the kernel is just using one of them, out of > habit. > > By just setting another timer as free-running we get a classic and clean > Linux clocksource

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-20 Thread Linus Walleij
On Tue, Nov 20, 2018 at 10:30 AM Finn Thain wrote: > On Tue, 20 Nov 2018, Linus Walleij wrote: > > As with the Amiga, this chip also has an RTC clock that should go to the > > RTC subsystem, naturally. > > I think some Atari's have an MC146818, which is drivers/rtc/rtc-cmos.c, >

Re: [RFC PATCH v2 10/14] m68k: mac: Convert to clocksource API

2018-11-20 Thread Linus Walleij
On Tue, Nov 20, 2018 at 10:00 AM Finn Thain wrote: > 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? I think so, yes. >

Re: [RFC PATCH v2 07/14] m68k: atari: Convert to clocksource API

2018-11-20 Thread Andreas Schwab
On Nov 20 2018, Linus Walleij wrote: > Yes you already see the same as I see: this chip MK68901 has > no less than four timers. I bet the kernel is just using one of them, > out of habit. Note that not all timers can be used freely. Some of them are hardwired to generate the clock for the

Re: [PATCH] clk: Add (devm_)clk_get_optional() functions

2018-11-20 Thread Andy Shevchenko
On Mon, Nov 19, 2018 at 02:12:59PM +, Phil Edworthy wrote: > This adds clk_get_optional() and devm_clk_get_optional() functions to get > optional clocks. > They behave the same as (devm_)clk_get except where there is no clock > producer. In this case, instead of returning -ENOENT, the function

RE: [PATCH] clk: Add (devm_)clk_get_optional() functions

2018-11-20 Thread Phil Edworthy
Hi Andy, On 20 November 2018 10:39 Andy Shevchenko wrote: > On Mon, Nov 19, 2018 at 02:12:59PM +, Phil Edworthy wrote: > > This adds clk_get_optional() and devm_clk_get_optional() functions to > > get optional clocks. > > They behave the same as (devm_)clk_get except where there is no clock >

Re: [PATCH] clk: Add (devm_)clk_get_optional() functions

2018-11-20 Thread Andy Shevchenko
On Tue, Nov 20, 2018 at 10:53:33AM +, Phil Edworthy wrote: > On 20 November 2018 10:39 Andy Shevchenko wrote: > > On Mon, Nov 19, 2018 at 02:12:59PM +, Phil Edworthy wrote: > > > This adds clk_get_optional() and devm_clk_get_optional() functions to > > > get optional clocks. > > > They

Re: [PATCH] clk: Add (devm_)clk_get_optional() functions

2018-11-20 Thread Uwe Kleine-König
Hello, On Tue, Nov 20, 2018 at 12:38:33PM +0200, Andy Shevchenko wrote: > On Mon, Nov 19, 2018 at 02:12:59PM +, Phil Edworthy wrote: > > + if (clk == ERR_PTR(-ENOENT)) > > + return NULL; > > + else > > + return clk; > > return clk == ERR_PTR(-ENOENT) ? NULL : clk; >

Re: [PATCH] clk: Add (devm_)clk_get_optional() functions

2018-11-20 Thread Andy Shevchenko
On Tue, Nov 20, 2018 at 01:56:52PM +0100, Uwe Kleine-König wrote: > On Tue, Nov 20, 2018 at 12:38:33PM +0200, Andy Shevchenko wrote: > > On Mon, Nov 19, 2018 at 02:12:59PM +, Phil Edworthy wrote: > > > + if (clk == ERR_PTR(-ENOENT)) > > > + return NULL; > > > + else > > > +

Re: [PATCH v2 00/15] Prepare for PTRACE_GET_SYSCALL_INFO

2018-11-20 Thread Paul Moore
On Mon, Nov 19, 2018 at 7:11 PM Dmitry V. Levin wrote: > > syscall_get_arch() is required to be implemented on all architectures > in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO > request. > > The primary intent is that the triple (audit_arch, syscall_nr, arg1..arg6) >

Re: [RFC PATCH v2 09/14] m68k: hp300: Remove hp300_gettimeoffset()

2018-11-20 Thread Finn Thain
On Tue, 20 Nov 2018, Kars de Jong wrote: > 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

[PATCH v2 16/15] syscall_get_arch: add "struct task_struct *" argument

2018-11-20 Thread Dmitry V. Levin
This argument is required to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request: syscall_get_arch() is going to be called from ptrace_request() along with other syscall_get_* functions with a tracee as their argument. This change partially reverts commit 5e937a9ae913