1. 17 1月, 2019 1 次提交
  2. 13 1月, 2019 3 次提交
  3. 10 1月, 2019 3 次提交
  4. 20 12月, 2018 1 次提交
  5. 17 12月, 2018 1 次提交
  6. 13 12月, 2018 2 次提交
  7. 08 12月, 2018 1 次提交
  8. 06 12月, 2018 2 次提交
  9. 27 11月, 2018 4 次提交
  10. 21 11月, 2018 2 次提交
  11. 14 11月, 2018 5 次提交
  12. 12 10月, 2018 2 次提交
    • W
      arm64: perf: Reject stand-alone CHAIN events for PMUv3 · ca2b4972
      Will Deacon 提交于
      It doesn't make sense for a perf event to be configured as a CHAIN event
      in isolation, so extend the arm_pmu structure with a ->filter_match()
      function to allow the backend PMU implementation to reject CHAIN events
      early.
      
      Cc: <stable@vger.kernel.org>
      Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      ca2b4972
    • W
      arm64: Fix /proc/iomem for reserved but not memory regions · d91680e6
      Will Deacon 提交于
      We describe ranges of 'reserved' memory to userspace via /proc/iomem.
      Commit 50d7ba36 ("arm64: export memblock_reserve()d regions via
      /proc/iomem") updated the logic to export regions that were reserved
      because their contents should be preserved. This allowed kexec-tools
      to tell the difference between 'reserved' memory that must be
      preserved and not overwritten, (e.g. the ACPI tables), and 'nomap'
      memory that must not be touched without knowing the memory-attributes
      (e.g. RAS CPER regions).
      
      The above commit wrongly assumed that memblock_reserve() would not
      be used to reserve regions that aren't memory. It turns out this is
      exactly what early_init_dt_reserve_memory_arch() will do if it finds
      a DT reserved-memory that was also carved out of the memory node, which
      results in a WARN_ON_ONCE() and the region being reserved instead of
      ignored. The ramoops description on hikey and dragonboard-410c both do
      this, so we can't simply write this configuration off as "buggy firmware".
      
      Avoid this issue by rewriting reserve_memblock_reserved_regions() so
      that only the portions of reserved regions which overlap with mapped
      memory are actually reserved.
      
      Fixes: 50d7ba36 ("arm64: export memblock_reserve()d regions via /proc/iomem")
      Reported-by: NJohn Stultz <john.stultz@linaro.org>
      Reported-by: NPaolo Pisati <p.pisati@gmail.com>
      CC: Akashi Takahiro <takahiro.akashi@linaro.org>
      CC: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Reviewed-by: NJames Morse <james.morse@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      d91680e6
  13. 01 10月, 2018 2 次提交
  14. 25 9月, 2018 2 次提交
    • S
      arm64: hugetlb: Avoid unnecessary clearing in huge_ptep_set_access_flags · 031e6e6b
      Steve Capper 提交于
      For contiguous hugetlb, huge_ptep_set_access_flags performs a
      get_clear_flush (which then flushes the TLBs) even when no change of ptes
      is necessary.
      
      Unfortunately, this behaviour can lead to back-to-back page faults being
      generated when running with multiple threads that access the same
      contiguous huge page.
      
      Thread 1                     |  Thread 2
      -----------------------------+------------------------------
      hugetlb_fault                |
      huge_ptep_set_access_flags   |
        -> invalidate pte range    | hugetlb_fault
      continue processing          | wait for hugetlb_fault_mutex
      release mutex and return     | huge_ptep_set_access_flags
                                   |   -> invalidate pte range
      hugetlb_fault
      ...
      
      This patch changes huge_ptep_set_access_flags s.t. we first read the
      contiguous range of ptes (whilst preserving dirty information); the pte
      range is only then invalidated where necessary and this prevents further
      spurious page faults.
      
      Fixes: d8bdcff2 ("arm64: hugetlb: Add break-before-make logic for contiguous entries")
      Reported-by: NLei Zhang <zhang.lei@jp.fujitsu.com>
      Signed-off-by: NSteve Capper <steve.capper@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      031e6e6b
    • S
      arm64: hugetlb: Fix handling of young ptes · 469ed9d8
      Steve Capper 提交于
      In the contiguous bit hugetlb break-before-make code we assume that all
      hugetlb pages are young.
      
      In fact, remove_migration_pte is able to place an old hugetlb pte so
      this assumption is not valid.
      
      This patch fixes the contiguous hugetlb scanning code to preserve young
      ptes.
      
      Fixes: d8bdcff2 ("arm64: hugetlb: Add break-before-make logic for contiguous entries")
      Signed-off-by: NSteve Capper <steve.capper@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      469ed9d8
  15. 11 9月, 2018 2 次提交
  16. 07 9月, 2018 4 次提交
  17. 31 8月, 2018 1 次提交
    • J
      arm64: mm: always enable CONFIG_HOLES_IN_ZONE · f52bb98f
      James Morse 提交于
      Commit 6d526ee2 ("arm64: mm: enable CONFIG_HOLES_IN_ZONE for NUMA")
      only enabled HOLES_IN_ZONE for NUMA systems because the NUMA code was
      choking on the missing zone for nomap pages. This problem doesn't just
      apply to NUMA systems.
      
      If the architecture doesn't set HAVE_ARCH_PFN_VALID, pfn_valid() will
      return true if the pfn is part of a valid sparsemem section.
      
      When working with multiple pages, the mm code uses pfn_valid_within()
      to test each page it uses within the sparsemem section is valid. On
      most systems memory comes in MAX_ORDER_NR_PAGES chunks which all
      have valid/initialised struct pages. In this case pfn_valid_within()
      is optimised out.
      
      Systems where this isn't true (e.g. due to nomap) should set
      HOLES_IN_ZONE and provide HAVE_ARCH_PFN_VALID so that mm tests each
      page as it works with it.
      
      Currently non-NUMA arm64 systems can't enable HOLES_IN_ZONE, leading to
      a VM_BUG_ON():
      
      | page:fffffdff802e1780 is uninitialized and poisoned
      | raw: ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff
      | raw: ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff
      | page dumped because: VM_BUG_ON_PAGE(PagePoisoned(p))
      | ------------[ cut here ]------------
      | kernel BUG at include/linux/mm.h:978!
      | Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
      [...]
      | CPU: 1 PID: 25236 Comm: dd Not tainted 4.18.0 #7
      | Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
      | pstate: 40000085 (nZcv daIf -PAN -UAO)
      | pc : move_freepages_block+0x144/0x248
      | lr : move_freepages_block+0x144/0x248
      | sp : fffffe0071177680
      [...]
      | Process dd (pid: 25236, stack limit = 0x0000000094cc07fb)
      | Call trace:
      |  move_freepages_block+0x144/0x248
      |  steal_suitable_fallback+0x100/0x16c
      |  get_page_from_freelist+0x440/0xb20
      |  __alloc_pages_nodemask+0xe8/0x838
      |  new_slab+0xd4/0x418
      |  ___slab_alloc.constprop.27+0x380/0x4a8
      |  __slab_alloc.isra.21.constprop.26+0x24/0x34
      |  kmem_cache_alloc+0xa8/0x180
      |  alloc_buffer_head+0x1c/0x90
      |  alloc_page_buffers+0x68/0xb0
      |  create_empty_buffers+0x20/0x1ec
      |  create_page_buffers+0xb0/0xf0
      |  __block_write_begin_int+0xc4/0x564
      |  __block_write_begin+0x10/0x18
      |  block_write_begin+0x48/0xd0
      |  blkdev_write_begin+0x28/0x30
      |  generic_perform_write+0x98/0x16c
      |  __generic_file_write_iter+0x138/0x168
      |  blkdev_write_iter+0x80/0xf0
      |  __vfs_write+0xe4/0x10c
      |  vfs_write+0xb4/0x168
      |  ksys_write+0x44/0x88
      |  sys_write+0xc/0x14
      |  el0_svc_naked+0x30/0x34
      | Code: aa1303e0 90001a01 91296421 94008902 (d4210000)
      | ---[ end trace 1601ba47f6e883fe ]---
      
      Remove the NUMA dependency.
      
      Link: https://www.spinics.net/lists/arm-kernel/msg671851.html
      Cc: <stable@vger.kernel.org>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Reported-by: NMikulas Patocka <mpatocka@redhat.com>
      Reviewed-by: NPavel Tatashin <pavel.tatashin@microsoft.com>
      Tested-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NJames Morse <james.morse@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      f52bb98f
  18. 30 8月, 2018 1 次提交
  19. 27 8月, 2018 1 次提交