From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: Re: [RFC patch 08/18] cnt32_to_63 should use smp_rmb() Date: Fri, 07 Nov 2008 17:10:00 +0000 Message-ID: <8509.1226077800@redhat.com> References: <20081107082926.ee3e1efe.akpm@linux-foundation.org> <20081107075003.fa93ccf4.akpm@linux-foundation.org> <20081107003816.9b0f947a.akpm@linux-foundation.org> <20081107052336.652868737@polymtl.ca> <20081107053349.861709786@polymtl.ca> <20081106220530.5b0e3a96.akpm@linux-foundation.org> <25363.1226056819@redhat.com> <8189.1226074915@redhat.com> Return-path: Received: from mx2.redhat.com ([66.187.237.31]:57685 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752536AbYKGRLH (ORCPT ); Fri, 7 Nov 2008 12:11:07 -0500 In-Reply-To: <20081107082926.ee3e1efe.akpm@linux-foundation.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andrew Morton Cc: dhowells@redhat.com, Nicolas Pitre , Mathieu Desnoyers , Linus Torvalds , Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, Ralf Baechle , benh@kernel.crashing.org, paulus@samba.org, David Miller , Ingo Molnar , Thomas Gleixner , Steven Rostedt , linux-arch@vger.kernel.org Andrew Morton wrote: > I'd expect it to behave in the same way as it would if the function was > implemented out-of-line. > > But it occurs to me that the modrobe-doesnt-work thing would happen if > the function _is_ inlined anyway, so we won't be doing that. > > Whatever. Killing this many puppies because gcc may do something so > bizarrely wrong isn't justifiable. With gcc, you get one instance of the static variable from inside a static (inline or outofline) function per .o file that invokes it, and these do not merge even though they're common symbols. I asked around and the opinion seems to be that this is correct C. I suppose it's the equivalent of cutting and pasting a function between several files - why should the compiler assume it's the same function in each? David