From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Cochran Subject: Re: [PATCH] net: gianfar_ptp: move set_fipers() to spinlock protecting area Date: Mon, 8 Jan 2018 19:39:18 -0800 Message-ID: <20180109033918.gi2m6khssnddiat3@localhost> References: <20180108101311.23581-1-yangbo.lu@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Yangbo Lu , Claudiu Manoil , netdev@vger.kernel.org, linux-kernel To: Fabio Estevam Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Mon, Jan 08, 2018 at 10:53:40AM -0200, Fabio Estevam wrote: > On Mon, Jan 8, 2018 at 8:13 AM, Yangbo Lu 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. Maybe this is important? /* Caller must hold etsects->lock. */ static void set_fipers(struct etsects *etsects) { set_alarm(etsects); gfar_write(&etsects->regs->tmr_fiper1, etsects->tmr_fiper1); gfar_write(&etsects->regs->tmr_fiper2, etsects->tmr_fiper2); } Thanks, Richard