1. 26 2月, 2013 5 次提交
  2. 22 2月, 2013 2 次提交
  3. 16 2月, 2013 2 次提交
    • J
      IB/mlx4: Adjust duplicate test · 6950a235
      Julia Lawall 提交于
      Delete successive tests to the same location.  The code tested the result
      of a previous allocation, that itself was already tested.  It is changed to
      test the result of the most recent allocation.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @s exists@
      local idexpression y;
      expression x,e;
      @@
      
      *if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
       { ... when forall
         return ...; }
      ... when != \(y = e\|y += e\|y -= e\|y |= e\|y &= e\|y++\|y--\|&y\)
          when != \(XT_GETPAGE(...,y)\|WMI_CMD_BUF(...)\)
      *if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
       { ... when forall
         return ...; }
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      6950a235
    • D
      IB/mlx4: Fix bug unwinding on error in mlx4_ib_init_sriov() · cab66d12
      Dan Carpenter 提交于
      We have to decrement "i" before calling mlx4_ib_free_demux_ctx() or we
      free something that wasn't allocated.  That's fine for free_pv_object()
      but it would lead to a NULL dereference calling mlx4_ib_free_demux_ctx().
      The null dereference is because ->tun is NULL when we check:
      
      	if (!ctx->tun[i])
      
      Also we didn't free ->sriov.demux[0] so it was a small leak.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      cab66d12
  4. 06 2月, 2013 1 次提交
  5. 04 1月, 2013 1 次提交
    • G
      Drivers: infinband: remove __dev* attributes. · 1e6d9abe
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Tom Tucker <tom@opengridcomputing.com>
      Cc: Steve Wise <swise@opengridcomputing.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Sean Hefty <sean.hefty@intel.com>
      Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
      Cc: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
      Cc: Christoph Raisch <raisch@de.ibm.com>
      Cc: Mike Marciniszyn <infinipath@intel.com>
      Cc: Faisal Latif <faisal.latif@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1e6d9abe
  6. 20 12月, 2012 3 次提交
  7. 08 12月, 2012 3 次提交
  8. 30 11月, 2012 1 次提交
  9. 27 11月, 2012 3 次提交
    • J
      RDMA/cxgb3: use WARN · 5107c2a3
      Julia Lawall 提交于
      Use WARN rather than printk followed by WARN_ON(1), for conciseness.
      
      A simplified version of the semantic patch that makes this transformation
      is as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression list es;
      @@
      
      -printk(
      +WARN(1,
        es);
      -WARN_ON(1);
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      5107c2a3
    • J
      RDMA/cxgb4: use WARN · 76f267b7
      Julia Lawall 提交于
      Use WARN rather than printk followed by WARN_ON(1), for conciseness.
      
      A simplified version of the semantic patch that makes this transformation
      is as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression list es;
      @@
      
      -printk(
      +WARN(1,
        es);
      -WARN_ON(1);
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      76f267b7
    • O
      mlx4: 64-byte CQE/EQE support · 08ff3235
      Or Gerlitz 提交于
      ConnectX-3 devices can use either 64- or 32-byte completion queue
      entries (CQEs) and event queue entries (EQEs).  Using 64-byte
      EQEs/CQEs performs better because each entry is aligned to a complete
      cacheline.  This patch queries the HCA's capabilities, and if it
      supports 64-byte CQEs and EQES the driver will configure the HW to
      work in 64-byte mode.
      
      The 32-byte vs 64-byte mode is global per HCA and not per CQ or EQ.
      
      Since this mode is global, userspace (libmlx4) must be updated to work
      with the configured CQE size, and guests using SR-IOV virtual
      functions need to know both EQE and CQE size.
      
      In case one of the 64-byte CQE/EQE capabilities is activated, the
      patch makes sure that older guest drivers that use the QUERY_DEV_FUNC
      command (e.g as done in mlx4_core of Linux 3.3..3.6) will notice that
      they need an update to be able to work with the PPF. This is done by
      changing the returned pf_context_behaviour not to be zero any more. In
      case none of these capabilities is activated that value remains zero
      and older guest drivers can run OK.
      
      The SRIOV related flow is as follows
      
      1. the PPF does the detection of the new capabilities using
         QUERY_DEV_CAP command.
      
      2. the PPF activates the new capabilities using INIT_HCA.
      
      3. the VF detects if the PPF activated the capabilities using
         QUERY_HCA, and if this is the case activates them for itself too.
      
      Note that the VF detects that it must be aware to the new PF behaviour
      using QUERY_FUNC_CAP.  Steps 1 and 2 apply also for native mode.
      
      User space notification is done through a new field introduced in
      struct mlx4_ib_ucontext which holds device capabilities for which user
      space must take action. This changes the binary interface so the ABI
      towards libmlx4 exposed through uverbs is bumped from 3 to 4 but only
      when **needed** i.e. only when the driver does use 64-byte CQEs or
      future device capabilities which must be in sync by user space. This
      practice allows to work with unmodified libmlx4 on older devices (e.g
      A0, B0) which don't support 64-byte CQEs.
      
      In order to keep existing systems functional when they update to a
      newer kernel that contains these changes in VF and userspace ABI, a
      module parameter enable_64b_cqe_eqe must be set to enable 64-byte
      mode; the default is currently false.
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      08ff3235
  10. 22 11月, 2012 7 次提交
  11. 15 11月, 2012 1 次提交
  12. 23 10月, 2012 1 次提交
  13. 19 10月, 2012 3 次提交
    • E
      IB/mlx4: Synchronize cleanup of MCGs in MCG paravirtualization · bef83ed9
      Eli Cohen 提交于
      A client re-register event invokes cleanup of all MCGs.  This is
      required to protect against misbehaved guests leading to corruption of
      join/leave database.  However, since cleaning up the MCGs is a heavy
      operation, it is pushed to a work queue for further processing.
      Client re-register is also propagated to ULPs (e.g IPoIB).
      
      However, since the cleanup is performed in a workqueue, the ULP could
      leave and re-join groups before the cleanup occurs.  In this case,
      when the cleanup takes place, it prunes the (newly-joined) MCGs and
      the ULP is left without actual MCGs while believing it joined them.
      
      Fix this by setting the flushing flag before invoking the cleanup task
      and clearing it after flushing is complete.
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Reviewed-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      bef83ed9
    • J
      IB/mlx4: Fix QP1 P_Key processing in the Primary Physical Function (PPF) · 2c75d2cc
      Jack Morgenstein 提交于
      In the MAD paravirtualization code, one of the checks performed when
      forwarding QP1 (GSI) packets from wire to slave was a P_Key check: the
      P_Key received in the MAD must be present in the guest's paravirtualized
      P_Key table, and at least one of the (packet P_Key, guest P_Key) must
      be a full-membership P_Key.
      
      However, if everyone involved has only limited membership in the
      default P_Key, then packets sent by full-member remote hosts arrive at
      the PPF but are not passed on to the VFs with the current P_Key1 check.
      
      Fix this as follows:
      
      1. Don't care if P_Key received over wire is full or not. If it
         successfully passed HW checks on the real QP1, then simply pass it
         to guest regardless of whether the guest has full or limited
         membership in its P_Key table.
      
      2. If the guest (including paravirtualized master) has both full and
         limited P_Key forms in its table, preferentially pass the
         paravirtualized P_Key index of the full P_Key form in the tunnel
         header.
      
      3. In the multicast join flow (mlx4/mcg.c), use the index for the
         default P_Key (wherever it is located) in replies generated from
         within the mcg module (previously, P_Key index 0 was used in all
         cases).
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      2c75d2cc
    • D
      IB/mlx4: Fix build error on platforms where UL is not 64 bits · 8a095030
      Doug Ledford 提交于
      Line 110 uses UL as a compiler cast for the 0x constant, but it's not
      large enough to hold a 64-bit value on a 32-bit arch.
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      
      [ Use "-1" instead of "FFFFFFFFFFFFFFFFULL".  - Roland ]
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      8a095030
  14. 09 10月, 2012 1 次提交
    • K
      mm: kill vma flag VM_RESERVED and mm->reserved_vm counter · 314e51b9
      Konstantin Khlebnikov 提交于
      A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
      currently it lost original meaning but still has some effects:
      
       | effect                 | alternative flags
      -+------------------------+---------------------------------------------
      1| account as reserved_vm | VM_IO
      2| skip in core dump      | VM_IO, VM_DONTDUMP
      3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
      4| do not mlock           | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
      
      This patch removes reserved_vm counter from mm_struct.  Seems like nobody
      cares about it, it does not exported into userspace directly, it only
      reduces total_vm showed in proc.
      
      Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.
      
      remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
      remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.
      
      [akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Carsten Otte <cotte@de.ibm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Morris <james.l.morris@oracle.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: Venkatesh Pallipadi <venki@google.com>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      314e51b9
  15. 06 10月, 2012 1 次提交
  16. 04 10月, 2012 4 次提交
  17. 02 10月, 2012 1 次提交