diff options
author | Steve Capper <steve.capper@linaro.org> | 2013-10-07 10:47:28 +0100 |
---|---|---|
committer | Kim Phillips <kim.phillips@linaro.org> | 2013-10-10 11:19:41 -0500 |
commit | 4da2c19b694dd0e5932cee3eeb40df3e637628cc (patch) | |
tree | d9c50fb6eba74e591f3e55deb1d26382cb78958d /drivers/gpu/drm/i915/i915_reg.h | |
parent | d8e6b150fd495189b4185962fd10f2b2164dd942 (diff) |
arm: mm: implement get_user_pages_fastlinux-lng-v3.10.14-finallinux-lng-v3.10.14linux-lng-3.10.14-2013.10
An implementation of get_user_pages_fast for ARM. It is based loosely
on the PowerPC implementation, but has a few subtle differences.
Under other architectures, the get_user_pages_fast implementations
disable the IRQs in the critical section. This protects against pages
backing page tables from being freed and from THP splits occurring as
these both call TLB invalidations which trigger an IPI which blocks
until the IRQs are re-enabled in get_user_page_fast.
Under ARM, TLB invalidations are usually broadcast in hardware thus
obviating the need for an IPI. After some discussion with Will Deacon:
http://marc.info/?l=linux-mm&m=138089480306901&w=2
It was decided that atomics should be used to protect the critical
section in get_user_pages_fast.
Calls to get_user_pages_fast, cause an atomic, gup_readers, to be
incremented. This guarantees that pages backing page tables won't be
freed from under it as both pte_free and tlb_flush_mmu will block on
non-zero values of gup_readers. Also, this guarantees that THPs will
not split, as an implementation of pmdp_splitting_flush is provided
that also blocks on non-zero values of gup_readers.
Signed-off-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Kim Phillips <kim.phillips@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_reg.h')
0 files changed, 0 insertions, 0 deletions