From: Keir Fraser Subject: Re: RFC: 32 bits as smallest atomic size. Date: Fri, 25 Mar 2005 21:43:23 +0000 Message-ID: <74f362598b4e1a0d46aacb1a514706ac@cl.cam.ac.uk> References: <16964.33214.921809.324278@kitch0.watson.ibm.com> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: <16964.33214.921809.324278@kitch0.watson.ibm.com> Sender: xen-devel-admin@lists.sourceforge.net Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Jimi Xenidis Cc: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org 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. -- Keir On 25 Mar 2005, at 21:25, Jimi Xenidis wrote: > > In PPC land we have an issue where cmpxchg operations can only be > applied to strictly aligned 32 and 64 bit quantities. > > We understand on x86 the use of the packed attribute has certain > benefits, but in the common areas we believe that portability should > be the primary concern in the common code. > > I can only assume that much debate will come from this as we find > alignment and size issues all over. > > The particular offender at the moment is: > include/public/grant_table.h flags 76 u16 flags; > > It is used with atomic methods such as cmpxchg_user() and clear_bit(). > > Any thoughts on how to proceed with this would be appreciated. > > -JX > > BTW: is clear_bit() as implemeted for x86 have soem alignment issues? > My expertise in this space is limited. > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xen-devel ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click