1. 16 4月, 2016 4 次提交
  2. 14 4月, 2016 5 次提交
  3. 13 4月, 2016 1 次提交
  4. 31 3月, 2016 1 次提交
  5. 29 3月, 2016 2 次提交
    • S
      arm64: perf: Move PMU register related defines to asm/perf_event.h · b8cfadfc
      Shannon Zhao 提交于
      To use the ARMv8 PMU related register defines from the KVM code, we move
      the relevant definitions to asm/perf_event.h header file and rename them
      with prefix ARMV8_PMU_. This allows us to get rid of kvm_perf_event.h.
      Signed-off-by: NAnup Patel <anup.patel@linaro.org>
      Signed-off-by: NShannon Zhao <shannon.zhao@linaro.org>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      b8cfadfc
    • J
      arm64: opcodes.h: Add arm big-endian config options before including arm header · a6002ec5
      James Morse 提交于
      arm and arm64 use different config options to specify big endian. This
      needs taking into account when including code/headers between the two
      architectures.
      
      A case in point is PAN, which uses the __instr_arm() macro to output
      instructions. The macro comes from opcodes.h, which lives under arch/arm.
      On a big-endian build the mismatched config options mean the instruction
      isn't byte swapped correctly, resulting in undefined instruction exceptions
      during boot:
      
      | alternatives: patching kernel code
      | kdevtmpfs[87]: undefined instruction: pc=ffffffc0004505b4
      | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c
      | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c
      | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c
      | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c
      | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c
      | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c
      | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c
      | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c
      | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c
      | Internal error: Oops - undefined instruction: 0 [#1] SMP
      | Modules linked in:
      | CPU: 0 PID: 87 Comm: kdevtmpfs Not tainted 4.1.16+ #5
      | Hardware name: Hisilicon PhosphorHi1382 EVB (DT)
      | task: ffffffc336591700 ti: ffffffc3365a4000 task.ti: ffffffc3365a4000
      | PC is at dump_instr+0x68/0x100
      | LR is at do_undefinstr+0x1d4/0x2a4
      | pc : [<ffffffc00076231c>] lr : [<ffffffc0000811d4>] pstate: 604001c5
      | sp : ffffffc3365a6450
      
      Cc: <stable@vger.kernel.org> #4.3.x-
      Reported-by: NHanjun Guo <guohanjun@huawei.com>
      Tested-by: NXuefeng Wang <wxf.wang@hisilicon.com>
      Signed-off-by: NJames Morse <james.morse@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      a6002ec5
  6. 26 3月, 2016 1 次提交
  7. 21 3月, 2016 2 次提交
  8. 11 3月, 2016 1 次提交
    • C
      arm64: Update PTE_RDONLY in set_pte_at() for PROT_NONE permission · fdc69e7d
      Catalin Marinas 提交于
      The set_pte_at() function must update the hardware PTE_RDONLY bit
      depending on the state of the PTE_WRITE and PTE_DIRTY bits of the given
      entry value. However, it currently only performs this for pte_valid()
      entries, ignoring PTE_PROT_NONE. The side-effect is that PROT_NONE
      mappings would not have the PTE_RDONLY bit set. Without
      CONFIG_ARM64_HW_AFDBM, this is not an issue since such PROT_NONE pages
      are not accessible anyway.
      
      With commit 2f4b829c ("arm64: Add support for hardware updates of
      the access and dirty pte bits"), the ptep_set_wrprotect() function was
      re-written to cope with automatic hardware updates of the dirty state.
      As an optimisation, only PTE_RDONLY is checked to assess the "dirty"
      status. Since set_pte_at() does not set this bit for PROT_NONE mappings,
      such pages may be considered "dirty" as a result of
      ptep_set_wrprotect().
      
      This patch updates the pte_valid() check to pte_present() in
      set_pte_at(). It also adds PTE_PROT_NONE to the swap entry bits comment.
      
      Fixes: 2f4b829c ("arm64: Add support for hardware updates of the access and dirty pte bits")
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Reported-by: NGanapatrao Kulkarni <gkulkarni@caviumnetworks.com>
      Tested-by: NGanapatrao Kulkarni <gkulkarni@cavium.com>
      Cc: <stable@vger.kernel.org>
      fdc69e7d
  9. 09 3月, 2016 2 次提交
  10. 08 3月, 2016 1 次提交
  11. 05 3月, 2016 1 次提交
  12. 04 3月, 2016 1 次提交
    • M
      arm64: make mrs_s prefixing implicit in read_cpuid · 1cc6ed90
      Mark Rutland 提交于
      Commit 0f54b14e ("arm64: cpufeature: Change read_cpuid() to use
      sysreg's mrs_s macro") changed read_cpuid to require a SYS_ prefix on
      register names, to allow manual assembly of registers unknown by the
      toolchain, using tables in sysreg.h.
      
      This interacts poorly with commit 42b55734 ("efi/arm64: Check
      for h/w support before booting a >4 KB granular kernel"), which is
      curretly queued via the tip tree, and uses read_cpuid without a SYS_
      prefix. Due to this, a build of next-20160304 fails if EFI and 64K pages
      are selected.
      
      To avoid this issue when trees are merged, move the required SYS_
      prefixing into read_cpuid, and revert all of the updated callsites to
      pass plain register names. This effectively reverts the bulk of commit
      0f54b14e.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      1cc6ed90
  13. 02 3月, 2016 1 次提交
    • M
      arm64: Rework valid_user_regs · dbd4d7ca
      Mark Rutland 提交于
      We validate pstate using PSR_MODE32_BIT, which is part of the
      user-provided pstate (and cannot be trusted). Also, we conflate
      validation of AArch32 and AArch64 pstate values, making the code
      difficult to reason about.
      
      Instead, validate the pstate value based on the associated task. The
      task may or may not be current (e.g. when using ptrace), so this must be
      passed explicitly by callers. To avoid circular header dependencies via
      sched.h, is_compat_task is pulled out of asm/ptrace.h.
      
      To make the code possible to reason about, the AArch64 and AArch32
      validation is split into separate functions. Software must respect the
      RES0 policy for SPSR bits, and thus the kernel mirrors the hardware
      policy (RAZ/WI) for bits as-yet unallocated. When these acquire an
      architected meaning writes may be permitted (potentially with additional
      validation).
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: Dave Martin <dave.martin@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      dbd4d7ca
  14. 01 3月, 2016 17 次提交