Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756136AbeAIDjX (ORCPT + 1 other); Mon, 8 Jan 2018 22:39:23 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:40378 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755544AbeAIDjV (ORCPT ); Mon, 8 Jan 2018 22:39:21 -0500 X-Google-Smtp-Source: ACJfBouC1g/NwrF0MpbvEiEtOdd16qWGJOJdspGVWOrGp1F8B2zATrH2DpeIoWQXCWtpk5z+M+u1qw== Date: Mon, 8 Jan 2018 19:39:18 -0800 From: Richard Cochran To: Fabio Estevam Cc: Yangbo Lu , Claudiu Manoil , netdev@vger.kernel.org, linux-kernel Subject: Re: [PATCH] net: gianfar_ptp: move set_fipers() to spinlock protecting area Message-ID: <20180109033918.gi2m6khssnddiat3@localhost> References: <20180108101311.23581-1-yangbo.lu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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