From: Espen Skoglund Subject: Re: [PATCH] msix: revoke correct amount of msi-x related iomem Date: Tue, 6 May 2008 17:49:21 +0100 Message-ID: <18464.35857.954706.990303@gargle.gargle.HOWL> References: <18459.22471.351306.107348@gargle.gargle.HOWL> <482087F5.1030903@solarflare.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <482087F5.1030903@solarflare.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Neil Turton Cc: xen-devel@lists.xensource.com, Espen Skoglund List-Id: xen-devel@lists.xenproject.org Very true. Not being all that experienced with Python I simply believed that the previous code was correct. Checking the reference manual now I do see that the '<<' operator does indeed precedence over '+'. Also, the table size field is actually 11 bits rather than 10. MSIX_SIZE_MASK should therefore be 0x7ff. eSk [Neil Turton] > Espen Skoglund wrote: >> + self.msix_entries = (message_cont_lo + \ >> + message_cont_hi << 8) \ >> + & MSIX_SIZE_MASK > That still doesn't look right to me since "+" binds tighter than > "<<". I think it needs some more parentheses around > "message_cont_hi << 8", at least if I've understood what the code's > supposed to do.