1. 28 11月, 2014 3 次提交
  2. 26 11月, 2014 1 次提交
    • L
      arm64: Add FIX_HOLE to permanent fixed addresses · dab78b6d
      Laura Abbott 提交于
      Every other architecture with permanent fixed addresses has
      FIX_HOLE as the first entry. This seems to be designed as a
      debugging aid but there are a couple of side effects of not
      having FIX_HOLE:
      
      - If the first fixed address is 0, fix_to_virt -> virt_to_fix
      triggers a BUG_ON for the virtual address being equal to
      FIXADDR_TOP
      - fix_to_virt may return a value outside of FIXADDR_START
      and FIXADDR_TOP which may look like a bug to a developer.
      
      Match up with other architectures and make everything clearer
      by adding FIX_HOLE.
      Signed-off-by: NLaura Abbott <lauraa@codeaurora.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      dab78b6d
  3. 25 11月, 2014 8 次提交
  4. 21 11月, 2014 4 次提交
  5. 20 11月, 2014 2 次提交
    • S
      arm64: percpu: Implement this_cpu operations · f97fc810
      Steve Capper 提交于
      The generic this_cpu operations disable interrupts to ensure that the
      requested operation is protected from pre-emption. For arm64, this is
      overkill and can hurt throughput and latency.
      
      This patch provides arm64 specific implementations for the this_cpu
      operations. Rather than disable interrupts, we use the exclusive
      monitor or atomic operations as appropriate.
      
      The following operations are implemented: add, add_return, and, or,
      read, write, xchg. We also wire up a cmpxchg implementation from
      cmpxchg.h.
      
      Testing was performed using the percpu_test module and hackbench on a
      Juno board running 3.18-rc4.
      Signed-off-by: NSteve Capper <steve.capper@linaro.org>
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      f97fc810
    • M
      arm64: pgalloc: consistently use PGALLOC_GFP · 15670ef1
      Mark Rutland 提交于
      We currently allocate different levels of page tables with a variety of
      differing flags, and the PGALLOC_GFP flags, intended for use when
      allocating any level of page table, are only used for ptes in
      pte_alloc_one. On x86, PGALLOC_GFP is used for all page table
      allocations.
      
      Currently the major differences are:
      
      * __GFP_NOTRACK -- Needed to ensure page tables are always accessible in
        the presence of kmemcheck to prevent recursive faults. Currently
        kmemcheck cannot be selected for arm64.
      
      * __GFP_REPEAT -- Causes the allocator to try to reclaim pages and retry
        upon a failure to allocate.
      
      * __GFP_ZERO -- Sometimes passed explicitly, sometimes zalloc variants
        are used.
      
      While we've no encountered issues so far, it would be preferable to be
      consistent. This patch ensures all levels of table are allocated in the
      same manner, with PGALLOC_GFP.
      
      Cc: Steve Capper <steve.capper@arm.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      15670ef1
  6. 17 11月, 2014 2 次提交
    • C
      arm64: Add COMPAT_HWCAP_LPAE · 7d57511d
      Catalin Marinas 提交于
      Commit a469abd0 (ARM: elf: add new hwcap for identifying atomic
      ldrd/strd instructions) introduces HWCAP_ELF for 32-bit ARM
      applications. As LPAE is always present on arm64, report the
      corresponding compat HWCAP to user space.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: <stable@vger.kernel.org> # 3.11+
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      7d57511d
    • W
      mmu_gather: move minimal range calculations into generic code · fb7332a9
      Will Deacon 提交于
      On architectures with hardware broadcasting of TLB invalidation messages
      , it makes sense to reduce the range of the mmu_gather structure when
      unmapping page ranges based on the dirty address information passed to
      tlb_remove_tlb_entry.
      
      arm64 already does this by directly manipulating the start/end fields
      of the gather structure, but this confuses the generic code which
      does not expect these fields to change and can end up calculating
      invalid, negative ranges when forcing a flush in zap_pte_range.
      
      This patch moves the minimal range calculation out of the arm64 code
      and into the generic implementation, simplifying zap_pte_range in the
      process (which no longer needs to care about start/end, since they will
      point to the appropriate ranges already). With the range being tracked
      by core code, the need_flush flag is dropped in favour of checking that
      the end of the range has actually been set.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Cc: Michal Simek <monstr@monstr.eu>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      fb7332a9
  7. 07 11月, 2014 2 次提交
    • G
      arm64/kvm: Fix assembler compatibility of macros · 286fb1cc
      Geoff Levand 提交于
      Some of the macros defined in kvm_arm.h are useful in assembly files, but are
      not compatible with the assembler.  Change any C language integer constant
      definitions using appended U, UL, or ULL to the UL() preprocessor macro.  Also,
      add a preprocessor include of the asm/memory.h file which defines the UL()
      macro.
      
      Fixes build errors like these when using kvm_arm.h in assembly
      source files:
      
        Error: unexpected characters following instruction at operand 3 -- `and x0,x1,#((1U<<25)-1)'
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NGeoff Levand <geoff@infradead.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      286fb1cc
    • S
      arm64: xchg: Implement cmpxchg_double · 5284e1b4
      Steve Capper 提交于
      The arm64 architecture has the ability to exclusively load and store
      a pair of registers from an address (ldxp/stxp). Also the SLUB can take
      advantage of a cmpxchg_double implementation to avoid taking some
      locks.
      
      This patch provides an implementation of cmpxchg_double for 64-bit
      pairs, and activates the logic required for the SLUB to use these
      functions (HAVE_ALIGNED_STRUCT_PAGE and HAVE_CMPXCHG_DOUBLE).
      
      Also definitions of this_cpu_cmpxchg_8 and this_cpu_cmpxchg_double_8
      are wired up to cmpxchg_local and cmpxchg_double_local (rather than the
      stock implementations that perform non-atomic operations with
      interrupts disabled) as they are used by the SLUB.
      
      On a Juno platform running on only the A57s I get quite a noticeable
      performance improvement with 5 runs of hackbench on v3.17:
      
               Baseline | With Patch
       -----------------+-----------
       Mean    119.2312 | 106.1782
       StdDev    0.4919 |   0.4494
      
      (times taken to complete `./hackbench 100 process 1000', in seconds)
      Signed-off-by: NSteve Capper <steve.capper@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      5284e1b4
  8. 05 11月, 2014 1 次提交
  9. 24 10月, 2014 1 次提交
  10. 22 10月, 2014 1 次提交
  11. 21 10月, 2014 1 次提交
  12. 14 10月, 2014 1 次提交
    • C
      arm64: KVM: Implement 48 VA support for KVM EL2 and Stage-2 · 38f791a4
      Christoffer Dall 提交于
      This patch adds the necessary support for all host kernel PGSIZE and
      VA_SPACE configuration options for both EL2 and the Stage-2 page tables.
      
      However, for 40bit and 42bit PARange systems, the architecture mandates
      that VTCR_EL2.SL0 is maximum 1, resulting in fewer levels of stage-2
      pagge tables than levels of host kernel page tables.  At the same time,
      systems with a PARange > 42bit, we limit the IPA range by always setting
      VTCR_EL2.T0SZ to 24.
      
      To solve the situation with different levels of page tables for Stage-2
      translation than the host kernel page tables, we allocate a dummy PGD
      with pointers to our actual inital level Stage-2 page table, in order
      for us to reuse the kernel pgtable manipulation primitives.  Reproducing
      all these in KVM does not look pretty and unnecessarily complicates the
      32-bit side.
      
      Systems with a PARange < 40bits are not yet supported.
      
       [ I have reworked this patch from its original form submitted by
         Jungseok to take the architecture constraints into consideration.
         There were too many changes from the original patch for me to
         preserve the authorship.  Thanks to Catalin Marinas for his help in
         figuring out a good solution to this challenge.  I have also fixed
         various bugs and missing error code handling from the original
         patch. - Christoffer ]
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NJungseok Lee <jungseoklee85@gmail.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      38f791a4
  13. 10 10月, 2014 4 次提交
  14. 03 10月, 2014 3 次提交
  15. 01 10月, 2014 1 次提交
  16. 29 9月, 2014 2 次提交
  17. 26 9月, 2014 2 次提交
  18. 25 9月, 2014 1 次提交