1. 28 7月, 2015 6 次提交
    • W
      arm64: spinlock: fix ll/sc unlock on big-endian systems · c1d7cd22
      Will Deacon 提交于
      When unlocking a spinlock, we perform a read-modify-write on the owner
      ticket in order to increment it and store it back with release
      semantics.
      
      In the LL/SC case, we load the 16-bit ticket using a 32-bit load and
      therefore store back the wrong halfword on a big-endian system,
      corrupting the lock after the first unlock and killing the system dead.
      
      This patch fixes the unlock code to use 16-bit accessors consistently.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      c1d7cd22
    • C
      arm64: Use last level TLBI for user pte changes · 4150e50b
      Catalin Marinas 提交于
      The flush_tlb_page() function is used on user address ranges when PTEs
      (or PMDs/PUDs for huge pages) were changed (attributes or clearing). For
      such cases, it is more efficient to invalidate only the last level of
      the TLB with the "tlbi vale1is" instruction.
      
      In the TLB shoot-down case, the TLB caching of the intermediate page
      table levels (pmd, pud, pgd) is handled by __flush_tlb_pgtable() via the
      __(pte|pmd|pud)_free_tlb() functions and it is not deferred to
      tlb_finish_mmu() (as of commit 285994a6 - "arm64: Invalidate the TLB
      corresponding to intermediate page table levels"). The tlb_flush()
      function only needs to invalidate the TLB for the last level of page
      tables; the __flush_tlb_range() function gains a fourth argument for
      last level TLBI.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      4150e50b
    • C
      arm64: Clean up __flush_tlb(_kernel)_range functions · da4e7330
      Catalin Marinas 提交于
      This patch moves the MAX_TLB_RANGE check into the
      flush_tlb(_kernel)_range functions directly to avoid the
      undescore-prefixed definitions (and for consistency with a subsequent
      patch).
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      da4e7330
    • M
      arm64: mm: mark create_mapping as __init · c53e0baa
      Mark Rutland 提交于
      Currently create_mapping is marked with __ref, apparently because it
      refers to early_alloc. However, create_mapping has no logic to prevent
      erroneous use of early_alloc after it has been freed, and is only ever
      called by __init functions anyway. Thus the __ref marker is misleading
      and unnecessary.
      
      Instead, this patch marks create_mapping as __init, resulting in
      warnings if it is used from a a non __init functions, and allowing its
      memory to be reclaimed.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      c53e0baa
    • W
      arm64: debug: rename enum debug_el to avoid symbol collision · 6f883d10
      Will Deacon 提交于
      lib/list_sort.c defines a 'struct debug_el', where "el" is assumedly a
      a contraction of "element". This conflicts with 'enum debug_el' in our
      asm/debug-monitors.h header file, where "el" stands for Exception Level.
      
      The result is build failure when targetting allmodconfig, so rename our
      enum to 'dbg_active_el' to be slightly more explicit about what it is.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      6f883d10
    • W
      arm64: mm: add __init section marker to free_initrd_mem · 662ba3db
      Wang Long 提交于
      It is not needed after booting, this patch moves the
      free_initrd_mem() function to the __init section.
      
      This patch also make keep_initrd __initdata, to reduce kernel
      size.
      Signed-off-by: NWang Long <long.wanglong@huawei.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      662ba3db
  2. 27 7月, 2015 34 次提交