lkml.org 
[lkml]   [2008]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 18 of 38] x86: unify pci iommu setup and allow swiotlb to compile for 32 bit
    From
    Date
    On Wed, 2008-11-26 at 11:53 +0900, FUJITA Tomonori wrote:
    >
    > > + BUG_ON(max_slots > 1UL << (BITS_PER_LONG - IO_TLB_SHIFT));
    >
    > How can this BUG_ON happen? Using u64 for the mask is fine though.

    It covers the cases where the previous code would have overflowed. It
    can't happen right now because although mask is 64 bits the value
    assigned to it is currently sizeof(unsigned long). If someone changes
    the type of that field then we would start seeing unexpected values.

    Ian.



    \
     
     \ /
      Last update: 2008-11-26 10:39    [W:5.402 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site