1. 28 1月, 2017 1 次提交
  2. 30 12月, 2016 1 次提交
  3. 26 10月, 2016 1 次提交
  4. 19 10月, 2016 1 次提交
  5. 19 9月, 2016 1 次提交
  6. 20 8月, 2016 1 次提交
  7. 08 8月, 2016 3 次提交
  8. 06 8月, 2016 1 次提交
  9. 08 7月, 2016 3 次提交
  10. 05 5月, 2016 1 次提交
  11. 22 4月, 2016 1 次提交
  12. 05 4月, 2016 1 次提交
    • K
      mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros · 09cbfeaf
      Kirill A. Shutemov 提交于
      PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
      ago with promise that one day it will be possible to implement page
      cache with bigger chunks than PAGE_SIZE.
      
      This promise never materialized.  And unlikely will.
      
      We have many places where PAGE_CACHE_SIZE assumed to be equal to
      PAGE_SIZE.  And it's constant source of confusion on whether
      PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
      especially on the border between fs and mm.
      
      Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
      breakage to be doable.
      
      Let's stop pretending that pages in page cache are special.  They are
      not.
      
      The changes are pretty straight-forward:
      
       - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
      
       - page_cache_get() -> get_page();
      
       - page_cache_release() -> put_page();
      
      This patch contains automated changes generated with coccinelle using
      script below.  For some reason, coccinelle doesn't patch header files.
      I've called spatch for them manually.
      
      The only adjustment after coccinelle is revert of changes to
      PAGE_CAHCE_ALIGN definition: we are going to drop it later.
      
      There are few places in the code where coccinelle didn't reach.  I'll
      fix them manually in a separate patch.  Comments and documentation also
      will be addressed with the separate patch.
      
      virtual patch
      
      @@
      expression E;
      @@
      - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      expression E;
      @@
      - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      @@
      - PAGE_CACHE_SHIFT
      + PAGE_SHIFT
      
      @@
      @@
      - PAGE_CACHE_SIZE
      + PAGE_SIZE
      
      @@
      @@
      - PAGE_CACHE_MASK
      + PAGE_MASK
      
      @@
      expression E;
      @@
      - PAGE_CACHE_ALIGN(E)
      + PAGE_ALIGN(E)
      
      @@
      expression E;
      @@
      - page_cache_get(E)
      + get_page(E)
      
      @@
      expression E;
      @@
      - page_cache_release(E)
      + put_page(E)
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      09cbfeaf
  13. 28 3月, 2016 1 次提交
  14. 16 2月, 2016 2 次提交
  15. 30 9月, 2015 1 次提交
  16. 29 6月, 2015 1 次提交
  17. 07 5月, 2015 1 次提交
  18. 02 4月, 2015 1 次提交
  19. 04 12月, 2014 1 次提交
  20. 13 11月, 2014 1 次提交
  21. 03 10月, 2014 1 次提交
  22. 24 9月, 2014 1 次提交
  23. 19 9月, 2014 1 次提交
  24. 11 9月, 2014 1 次提交
  25. 02 9月, 2014 1 次提交
  26. 27 8月, 2014 1 次提交
  27. 11 8月, 2014 2 次提交
    • C
      drm/radeon: add userptr flag to limit it to anonymous memory v2 · ddd00e33
      Christian König 提交于
      Avoid problems with writeback by limiting userptr to anonymous memory.
      
      v2: add commit and code comments
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      ddd00e33
    • C
      drm/radeon: add userptr support v8 · f72a113a
      Christian König 提交于
      This patch adds an IOCTL for turning a pointer supplied by
      userspace into a buffer object.
      
      It imposes several restrictions upon the memory being mapped:
      
      1. It must be page aligned (both start/end addresses, i.e ptr and size).
      
      2. It must be normal system memory, not a pointer into another map of IO
      space (e.g. it must not be a GTT mmapping of another object).
      
      3. The BO is mapped into GTT, so the maximum amount of memory mapped at
      all times is still the GTT limit.
      
      4. The BO is only mapped readonly for now, so no write support.
      
      5. List of backing pages is only acquired once, so they represent a
      snapshot of the first use.
      
      Exporting and sharing as well as mapping of buffer objects created by
      this function is forbidden and results in an -EPERM.
      
      v2: squash all previous changes into first public version
      v3: fix tabs, map readonly, don't use MM callback any more
      v4: set TTM_PAGE_FLAG_SG so that TTM never messes with the pages,
          pin/unpin pages on bind/unbind instead of populate/unpopulate
      v5: rebased on 3.17-wip, IOCTL renamed to userptr, reject any unknown
          flags, better handle READONLY flag, improve permission check
      v6: fix ptr cast warning, use set_page_dirty/mark_page_accessed on unpin
      v7: add warning about it's availability in the API definition
      v8: drop access_ok check, fix VM mapping bits
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v4)
      Reviewed-by: Jérôme Glisse <jglisse@redhat.com> (v4)
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      f72a113a
  28. 05 8月, 2014 2 次提交
  29. 16 3月, 2014 2 次提交
    • D
      drm: init TTM dev_mapping in ttm_bo_device_init() · 44d847b7
      David Herrmann 提交于
      With dev->anon_inode we have a global address_space ready for operation
      right from the beginning. Therefore, there is no need to do a delayed
      setup with TTM. Instead, set dev_mapping during initialization in
      ttm_bo_device_init() and remove any "if (dev_mapping)" conditions.
      
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      44d847b7
    • D
      drm: use anon-inode instead of relying on cdevs · 6796cb16
      David Herrmann 提交于
      DRM drivers share a common address_space across all character-devices of a
      single DRM device. This allows simple buffer eviction and mapping-control.
      However, DRM core currently waits for the first ->open() on any char-dev
      to mark the underlying inode as backing inode of the device. This delayed
      initialization causes ugly conditions all over the place:
        if (dev->dev_mapping)
          do_sth();
      
      To avoid delayed initialization and to stop reusing the inode of the
      char-dev, we allocate an anonymous inode for each DRM device and reset
      filp->f_mapping to it on ->open().
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      6796cb16
  30. 07 3月, 2014 2 次提交
    • P
      drm/radeon: silence GCC warning on 32 bit · 0d997b68
      Paul Bolle 提交于
      Building radeon_ttm.o on 32 bit x86 triggers a warning:
          In file included from include/asm-generic/bug.h:13:0,
                           from [...]/arch/x86/include/asm/bug.h:38,
                           from include/linux/bug.h:4,
                           from include/drm/drm_mm.h:39,
                           from include/drm/drm_vma_manager.h:26,
                           from include/drm/ttm/ttm_bo_api.h:35,
                           from drivers/gpu/drm/radeon/radeon_ttm.c:32:
          drivers/gpu/drm/radeon/radeon_ttm.c: In function 'radeon_ttm_gtt_read':
          include/linux/kernel.h:712:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
            (void) (&_min1 == &_min2);  \
                           ^
          drivers/gpu/drm/radeon/radeon_ttm.c:938:22: note: in expansion of macro 'min'
             ssize_t cur_size = min(size, PAGE_SIZE - off);
                                ^
      
      Silence this warning by using min_t(). Since cur_size will never be
      negative and its upper bound is PAGE_SIZE, we can change its type to
      size_t and use min_t(size_t, [...]) here.
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      0d997b68
    • L
      drm/radeon: TTM must be init with cpu-visible VRAM, v2 · 14eedc32
      Lauri Kasanen 提交于
      Without this, a bo may get created in the cpu-inaccessible vram.
      Before the CP engines get setup, all copies are done via cpu memcpy.
      
      This means that the cpu tries to read from inaccessible memory, fails,
      and the radeon module proceeds to disable acceleration.
      
      Doing this has no downsides, as the real VRAM size gets set as soon as the
      CP engines get init.
      
      This is a candidate for 3.14 fixes.
      
      v2: Add comment on why the function is used
      Signed-off-by: NLauri Kasanen <cand@gmx.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Cc: stable@vger.kernel.org
      14eedc32
  31. 03 3月, 2014 1 次提交