From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] x86: fix variable_test_bit()asmconstraints Date: Sun, 16 Mar 2008 14:08:46 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 14/3/08 17:08, "Keir Fraser" wrote: >> Actually, just trying it out with set_bit() results in a number of cases >> where the field used is neither 32- nor 64-bit. The very first one I >> looked at even has only a byte-aligned (leaving out internal knowledge >> of the allocator) allocation that it accesses (domid_bitmap in >> xen/drivers/passthrough/vtd/iommu.c). > > How did you find that one? It's void* so I would have thought you'd miss that > one as the compiler will happily cast void*. I hope there aren't too many > lurkers like that! Perhaps you were trying to do your automatic field-width > detection approach. I think that's not needed, but it would conveniently find > these void* callers. Perhaps we should wrap the bitops in a macro that will > fail on void*? > > I'm happy to do this change (void* -> long*) myself, by the way, as it's the > kind of thing that's as much work to review as it is to do in the first place. Done, as changeset 17194. -- Keir