Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753396AbbBYLTe (ORCPT ); Wed, 25 Feb 2015 06:19:34 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:34051 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753367AbbBYLT3 (ORCPT ); Wed, 25 Feb 2015 06:19:29 -0500 Date: Wed, 25 Feb 2015 11:19:11 +0000 From: Russell King - ARM Linux To: Peter Griffin 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: <20150225111910.GX8656@n2100.arm.linux.org.uk> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150223101223.GA14142@griffinp-ThinkPad-X1-Carbon-2nd> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1240 Lines: 27 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. -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. -- 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/