[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110326132348.GB23260@riccoc20.at.omicron.at>
Date: Sat, 26 Mar 2011 14:23:48 +0100
From: Richard Cochran <richardcochran@...il.com>
To: John Stultz <john.stultz@...aro.org>
Cc: linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
netdev@...r.kernel.org, devicetree-discuss@...ts.ozlabs.org,
linux-arm-kernel@...ts.infradead.org,
linuxppc-dev@...ts.ozlabs.org, Alan Cox <alan@...rguk.ukuu.org.uk>,
Arnd Bergmann <arnd@...db.de>,
Christoph Lameter <cl@...ux.com>,
David Miller <davem@...emloft.net>,
Krzysztof Halasa <khc@...waw.pl>,
Peter Zijlstra <peterz@...radead.org>,
Rodolfo Giometti <giometti@...ux.it>,
Thomas Gleixner <tglx@...utronix.de>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Mike Frysinger <vapier@...too.org>,
Paul Mackerras <paulus@...ba.org>,
Russell King <linux@....linux.org.uk>
Subject: Re: [PATCH V12 2/4] ptp: Added a clock that uses the eTSEC found
on the MPC85xx.
On Wed, Mar 23, 2011 at 02:30:04PM -0700, John Stultz wrote:
> On Mon, 2011-02-28 at 08:57 +0100, Richard Cochran wrote:
> > +/*
> > + * Register access functions
> > + */
>
> So what are the locking rules on the functions below? I assume the
> etsects->lock needs to be held prior to calling, so that should be made
> explicit in a comment.
Yes, you are right. I'll add comments.
> > + gfar_write(&etsects->regs->tmr_ctrl, tmr_ctrl);
> > + gfar_write(&etsects->regs->tmr_add, etsects->tmr_add);
> > + gfar_write(&etsects->regs->tmr_prsc, etsects->tmr_prsc);
> > + gfar_write(&etsects->regs->tmr_fiper1, etsects->tmr_fiper1);
> > + gfar_write(&etsects->regs->tmr_fiper2, etsects->tmr_fiper2);
> > + set_alarm(etsects);
> > + gfar_write(&etsects->regs->tmr_ctrl, tmr_ctrl|FS|RTPE|TE);
>
> Does any of the above need a lock should an irq land in the middle of
> the writes?
Since these interrupts first must be enabled, I think it unlikely that
an IRQ could occur. However, it can't hurt to add the lock, either.
Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists