1. 18 5月, 2018 3 次提交
  2. 07 12月, 2017 1 次提交
  3. 02 11月, 2017 7 次提交
  4. 09 5月, 2017 1 次提交
    • M
      treewide: use kv[mz]alloc* rather than opencoded variants · 752ade68
      Michal Hocko 提交于
      There are many code paths opencoding kvmalloc.  Let's use the helper
      instead.  The main difference to kvmalloc is that those users are
      usually not considering all the aspects of the memory allocator.  E.g.
      allocation requests <= 32kB (with 4kB pages) are basically never failing
      and invoke OOM killer to satisfy the allocation.  This sounds too
      disruptive for something that has a reasonable fallback - the vmalloc.
      On the other hand those requests might fallback to vmalloc even when the
      memory allocator would succeed after several more reclaim/compaction
      attempts previously.  There is no guarantee something like that happens
      though.
      
      This patch converts many of those places to kv[mz]alloc* helpers because
      they are more conservative.
      
      Link: http://lkml.kernel.org/r/20170306103327.2766-2-mhocko@kernel.orgSigned-off-by: NMichal Hocko <mhocko@suse.com>
      Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> # Xen bits
      Acked-by: NKees Cook <keescook@chromium.org>
      Acked-by: NVlastimil Babka <vbabka@suse.cz>
      Acked-by: Andreas Dilger <andreas.dilger@intel.com> # Lustre
      Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> # KVM/s390
      Acked-by: Dan Williams <dan.j.williams@intel.com> # nvdim
      Acked-by: David Sterba <dsterba@suse.com> # btrfs
      Acked-by: Ilya Dryomov <idryomov@gmail.com> # Ceph
      Acked-by: Tariq Toukan <tariqt@mellanox.com> # mlx4
      Acked-by: Leon Romanovsky <leonro@mellanox.com> # mlx5
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Anton Vorontsov <anton@enomsg.org>
      Cc: Colin Cross <ccross@android.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Kent Overstreet <kent.overstreet@gmail.com>
      Cc: Santosh Raspatur <santosh@chelsio.com>
      Cc: Hariprasad S <hariprasad@chelsio.com>
      Cc: Yishai Hadas <yishaih@mellanox.com>
      Cc: Oleg Drokin <oleg.drokin@intel.com>
      Cc: "Yan, Zheng" <zyan@redhat.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      752ade68
  5. 17 2月, 2017 4 次提交
  6. 07 11月, 2016 1 次提交
    • A
      drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized · b74c0a99
      Arnd Bergmann 提交于
      gcc-4.9 notices that the validate_init() function returns unintialized
      data when called with a zero 'nr_buffers' argument, when called with the
      -Wmaybe-uninitialized flag:
      
      drivers/gpu/drm/nouveau/nouveau_gem.c: In function ‘validate_init.isra.6’:
      drivers/gpu/drm/nouveau/nouveau_gem.c:457:5: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      However, the only caller of this function always passes a nonzero
      argument, and gcc-6 is clever enough to take this into account and
      not warn about it any more.
      
      Adding an explicit initialization to -EINVAL here is correct even if
      the caller changed, and it avoids the warning on gcc-4.9 as well.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-By: NKarol Herbst <karolherbst@gmail.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      b74c0a99
  7. 25 10月, 2016 1 次提交
    • C
      dma-buf: Rename struct fence to dma_fence · f54d1867
      Chris Wilson 提交于
      I plan to usurp the short name of struct fence for a core kernel struct,
      and so I need to rename the specialised fence/timeline for DMA
      operations to make room.
      
      A consensus was reached in
      https://lists.freedesktop.org/archives/dri-devel/2016-July/113083.html
      that making clear this fence applies to DMA operations was a good thing.
      Since then the patch has grown a bit as usage increases, so hopefully it
      remains a good thing!
      
      (v2...: rebase, rerun spatch)
      v3: Compile on msm, spotted a manual fixup that I broke.
      v4: Try again for msm, sorry Daniel
      
      coccinelle script:
      @@
      
      @@
      - struct fence
      + struct dma_fence
      @@
      
      @@
      - struct fence_ops
      + struct dma_fence_ops
      @@
      
      @@
      - struct fence_cb
      + struct dma_fence_cb
      @@
      
      @@
      - struct fence_array
      + struct dma_fence_array
      @@
      
      @@
      - enum fence_flag_bits
      + enum dma_fence_flag_bits
      @@
      
      @@
      (
      - fence_init
      + dma_fence_init
      |
      - fence_release
      + dma_fence_release
      |
      - fence_free
      + dma_fence_free
      |
      - fence_get
      + dma_fence_get
      |
      - fence_get_rcu
      + dma_fence_get_rcu
      |
      - fence_put
      + dma_fence_put
      |
      - fence_signal
      + dma_fence_signal
      |
      - fence_signal_locked
      + dma_fence_signal_locked
      |
      - fence_default_wait
      + dma_fence_default_wait
      |
      - fence_add_callback
      + dma_fence_add_callback
      |
      - fence_remove_callback
      + dma_fence_remove_callback
      |
      - fence_enable_sw_signaling
      + dma_fence_enable_sw_signaling
      |
      - fence_is_signaled_locked
      + dma_fence_is_signaled_locked
      |
      - fence_is_signaled
      + dma_fence_is_signaled
      |
      - fence_is_later
      + dma_fence_is_later
      |
      - fence_later
      + dma_fence_later
      |
      - fence_wait_timeout
      + dma_fence_wait_timeout
      |
      - fence_wait_any_timeout
      + dma_fence_wait_any_timeout
      |
      - fence_wait
      + dma_fence_wait
      |
      - fence_context_alloc
      + dma_fence_context_alloc
      |
      - fence_array_create
      + dma_fence_array_create
      |
      - to_fence_array
      + to_dma_fence_array
      |
      - fence_is_array
      + dma_fence_is_array
      |
      - trace_fence_emit
      + trace_dma_fence_emit
      |
      - FENCE_TRACE
      + DMA_FENCE_TRACE
      |
      - FENCE_WARN
      + DMA_FENCE_WARN
      |
      - FENCE_ERR
      + DMA_FENCE_ERR
      )
       (
       ...
       )
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Acked-by: NSumit Semwal <sumit.semwal@linaro.org>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161025120045.28839-1-chris@chris-wilson.co.uk
      f54d1867
  8. 12 10月, 2016 1 次提交
  9. 20 5月, 2016 1 次提交
  10. 19 5月, 2016 1 次提交
    • A
      drm: remove unused dev variables · c6740c9c
      Arnd Bergmann 提交于
      After drm_gem_object_lookup() was changed along with all its callers,
      we have several drivers that have unused variables:
      
      drm/armada/armada_crtc.c: In function 'armada_drm_crtc_cursor_set':
      drm/armada/armada_crtc.c:900:21: error: unused variable 'dev' [-Werror=unused-variable]
      drm/nouveau/nouveau_gem.c: In function 'validate_init':
      drm/nouveau/nouveau_gem.c:371:21: error: unused variable 'dev' [-Werror=unused-variable]
      drm/nouveau/nv50_display.c: In function 'nv50_crtc_cursor_set':
      drm/nouveau/nv50_display.c:1308:21: error: unused variable 'dev' [-Werror=unused-variable]
      drm/radeon/radeon_cs.c: In function 'radeon_cs_parser_relocs':
      drm/radeon/radeon_cs.c:77:21: error: unused variable 'ddev' [-Werror=unused-variable]
      
      This fixes all the instances I found with ARM randconfig builds so far.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: a8ad0bd8 ("drm: Remove unused drm_device from drm_gem_object_lookup()")
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1463587653-3035181-6-git-send-email-arnd@arndb.de
      c6740c9c
  11. 17 5月, 2016 1 次提交
  12. 05 5月, 2016 2 次提交
  13. 03 11月, 2015 4 次提交
  14. 22 10月, 2015 1 次提交
  15. 28 8月, 2015 4 次提交
  16. 01 7月, 2015 1 次提交
  17. 14 4月, 2015 1 次提交
    • A
      drm/nouveau/gem: allow user-space to specify an object should be coherent · 996f545f
      Alexandre Courbot 提交于
      User-space use mappable BOs notably for fences, and expects that a
      value update by the GPU will be immediatly visible through the
      user-space mapping.
      
      ARM has a property that may prevent this from happening though: memory
      can be mapped multiple times only if the different mappings share the
      same caching properties. However all the lowmem memory is already
      identity-mapped into the kernel with cache enabled, so when user-space
      requests an uncached mapping, we actually get an "undefined caching
      policy" one and this has strange side-effects described on Freedesktop
      bug 86690.
      
      To prevent this from happening, allow user-space to explicitly specify
      which objects should be coherent, and create such objects with the
      TTM_PL_FLAG_UNCACHED flag. This will make TTM allocate memory using the
      DMA API, which will fix the identify mapping and allow us to safely map
      the objects to user-space uncached.
      Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com>
      Reviewed-by: NLucas Stach <dev@lynxeye.de>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      996f545f
  18. 22 1月, 2015 3 次提交
  19. 24 12月, 2014 1 次提交
  20. 22 12月, 2014 1 次提交