09 Dec, 2006

2 commits

  • This facility provides three entry points:

    ilog2() Log base 2 of unsigned long
    ilog2_u32() Log base 2 of u32
    ilog2_u64() Log base 2 of u64

    These facilities can either be used inside functions on dynamic data:

    int do_something(long q)
    {
    ...;
    y = ilog2(x)
    ...;
    }

    Or can be used to statically initialise global variables with constant values:

    unsigned n = ilog2(27);

    When performing static initialisation, the compiler will report "error:
    initializer element is not constant" if asked to take a log of zero or of
    something not reducible to a constant. They treat negative numbers as
    unsigned.

    When not dealing with a constant, they fall back to using fls() which permits
    them to use arch-specific log calculation instructions - such as BSR on
    x86/x86_64 or SCAN on FRV - if available.

    [akpm@osdl.org: MMC fix]
    Signed-off-by: David Howells
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Herbert Xu
    Cc: David Howells
    Cc: Wojtek Kaniewski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Signed-off-by: Josef Sipek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef Sipek
     

08 Dec, 2006

2 commits


06 Dec, 2006

1 commit


05 Dec, 2006

1 commit


04 Dec, 2006

1 commit


30 Nov, 2006

25 commits


22 Nov, 2006

1 commit


21 Nov, 2006

2 commits


17 Nov, 2006

2 commits

  • IPoIB assumes that high (reserved) octet in the hardware address is 0,
    and copies it into the QPN. This violates RFC 4391 (which requires
    that the high 8 bits are ignored on receive), and will result in an
    invalid QPN being used when interoperating with IPoIB connected mode.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Roland Dreier

    Michael S. Tsirkin
     
  • The PCI Express and Hypertransport chip-specific source files should only
    be built when the kernel has the capability of actually compiling them.

    This fixes the driver build on, for example, ia64.

    Signed-off-by: Bryan O'Sullivan
    Cc: "Eric W. Biederman"
    Cc: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bryan O'Sullivan
     

14 Nov, 2006

3 commits

  • * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
    IB/mad: Fix race between cancel and receive completion
    RDMA/amso1100: Fix && typo
    RDMA/amso1100: Fix unitialized pseudo_netdev accessed in c2_register_device
    IB/ehca: Activate scaling code by default
    IB/ehca: Use named constant for max mtu
    IB/ehca: Assure 4K alignment for firmware control blocks

    Linus Torvalds
     
  • When ib_cancel_mad() is called, it puts the canceled send on a list
    and schedules a "flushed" callback from process context. However,
    this leaves a window where a receive completion could be processed
    before the send is fully flushed.

    This is fine, except that ib_find_send_mad() will find the MAD and
    return it to the receive processing, which results in the sender
    getting both a successful receive and a "flushed" send completion for
    the same request. Understandably, this confuses the sender, which is
    expecting only one of these two callbacks, and leads to grief such as
    a use-after-free in IPoIB.

    Fix this by changing ib_find_send_mad() to return a send struct only
    if the status is still successful (and not "flushed"). The search of
    the send_list already had this check, so this patch just adds the same
    check to the search of the wait_list.

    Signed-off-by: Roland Dreier

    Roland Dreier
     
  • Fix the AMSO1100 firmware version computation, which was broken
    due to "&&" being used where "&" should have.

    Signed-off-by: Jean Delvare
    Signed-off-by: Roland Dreier

    Jean Delvare