Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752808AbbBYO2M (ORCPT ); Wed, 25 Feb 2015 09:28:12 -0500 Received: from mail-wi0-f180.google.com ([209.85.212.180]:51555 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751497AbbBYO2K (ORCPT ); Wed, 25 Feb 2015 09:28:10 -0500 Date: Wed, 25 Feb 2015 14:28:06 +0000 From: Peter Griffin To: Russell King - ARM Linux Cc: Lee Jones , devicetree@vger.kernel.org, kernel@stlinux.com, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, wim@iguana.be, linux@roeck-us.net, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org Subject: Re: [STLinux Kernel] [PATCH v3 7/8] rtc: st: add new driver for ST's LPC RTC Message-ID: <20150225142806.GA2160@griffinp-ThinkPad-X1-Carbon-2nd> References: <1424260154-12868-1-git-send-email-lee.jones@linaro.org> <1424260154-12868-8-git-send-email-lee.jones@linaro.org> <20150223101223.GA14142@griffinp-ThinkPad-X1-Carbon-2nd> <20150225111910.GX8656@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150225111910.GX8656@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1349 Lines: 35 Hi Russell, On Wed, 25 Feb 2015, Russell King - ARM Linux wrote: > On Mon, Feb 23, 2015 at 10:12:23AM +0000, Peter Griffin wrote: > > I think all the writel IO accessors in this driver can be replaced > > with the *_relaxed variant. This will avoid the overhead of taking a > > spinlock in the l2 outer cache part of writel. > > You're really operating on old information. With much improved L2 cache > support code which went in a year or so ago, for the popular L2 cache > controllers, we don't take a spinlock anymore - we just write to the > register directly. > > The spinlock is only present for L2C-220 controllers, which are rare. > > Moreover, taking the spinlock is only expensive if you have things like > lockdep enabled, otherwise it should be inline and will be fast. > > However, using the _relaxed variants where we can get away with weaker > ordering of the writes to the device is a good thing nevertheless. I'm > just pointing out that your reasoning above is wrong. Thanks for pointing this out, I wasn't aware until now that the spinlock had been removed. regards Peter. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/