Re: [PATCH] net: gianfar_ptp: move set_fipers() to spinlock protecting area
On Mon, Jan 08, 2018 at 10:53:40AM -0200, Fabio Estevam wrote: > On Mon, Jan 8, 2018 at 8:13 AM, Yangbo Luwrote: > > set_fipers() calling should be protected by spinlock. > > This patch is to move set_fipers() to spinlock protecting > > area in ptp_gianfar_adjtime() function. > > It would be nice to explay why. Maybe this is important? /* Caller must hold etsects->lock. */ static void set_fipers(struct etsects *etsects) { set_alarm(etsects); gfar_write(>regs->tmr_fiper1, etsects->tmr_fiper1); gfar_write(>regs->tmr_fiper2, etsects->tmr_fiper2); } Thanks, Richard
RE: [PATCH] net: gianfar_ptp: move set_fipers() to spinlock protecting area
> -Original Message- > From: Fabio Estevam [mailto:feste...@gmail.com] > Sent: 2018年1月8日 20:54 > To: Y.b. Lu <yangbo...@nxp.com> > Cc: Claudiu Manoil <claudiu.man...@nxp.com>; Richard Cochran > <richardcoch...@gmail.com>; netdev@vger.kernel.org; linux-kernel > <linux-ker...@vger.kernel.org> > Subject: Re: [PATCH] net: gianfar_ptp: move set_fipers() to spinlock > protecting > area > > On Mon, Jan 8, 2018 at 8:13 AM, Yangbo Lu <yangbo...@nxp.com> wrote: > > set_fipers() calling should be protected by spinlock. > > This patch is to move set_fipers() to spinlock protecting area in > > ptp_gianfar_adjtime() function. > > It would be nice to explay why. [Y.b. Lu] Sent out v2 patch and explained in commit message :) Thanks. > > Thanks
Re: [PATCH] net: gianfar_ptp: move set_fipers() to spinlock protecting area
On Mon, Jan 8, 2018 at 8:13 AM, Yangbo Luwrote: > set_fipers() calling should be protected by spinlock. > This patch is to move set_fipers() to spinlock protecting > area in ptp_gianfar_adjtime() function. It would be nice to explay why. Thanks