From: Hollis Blanchard Subject: Re: RFC: 32 bits as smallest atomic size. Date: Tue, 29 Mar 2005 15:39:17 -0600 Message-ID: <1112132357.9860.25.camel@localhost.localdomain> References: <16964.33214.921809.324278@kitch0.watson.ibm.com> <74f362598b4e1a0d46aacb1a514706ac@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <74f362598b4e1a0d46aacb1a514706ac@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Jimi Xenidis , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org [Resending to really correct list this time.] On Fri, 2005-03-25 at 21:43 +0000, Keir Fraser wrote: > I expect we can fix that up in the ppc macros: if the atomic access is > sub-32-bit aligned then round the address down to 32-bit boundary and > do a 32-bit cmpxchg. >From a quick survey of Linux headers, it seems at least the following architectures only support 4/8-byte atomic instructions: ppc(64), sparc(64), parisc, mips, alpha. The following architectures support 1/2-byte atomic instructions: x86(64), ia64. Since so many architectures don't allow non-word-sized accesses (a link error is triggered), common Linux code does not make such calls. Could we please have the same policy? Right now there is a single problematic cmpxchg user, grant_entry_t, and the impact of the fix is tiny (make the 'flags' member 4 bytes). Is that too large an inconvenience? -- Hollis Blanchard IBM Linux Technology Center