1. 09 5月, 2017 1 次提交
  2. 06 5月, 2017 2 次提交
    • A
      Revert "ARCv2: Allow enabling PAE40 w/o HIGHMEM" · cf4100d1
      Alexey Brodkin 提交于
      This reverts commit 7cab91b8.
      
      Now when we have a real hardware platform with PAE40 enabled
      (here I mean axs103 with firmware v1.2) and 1 Gb of DDR mapped to
      0x1_a000_0000-0x1_ffff_ffff we're really targeting memory above 4Gb
      when PAE40 is enabled. This in its turn requires HIGHMEM to be enabled
      otherwise user won't see any difference with enabling PAE in
      kernel configuration as only lowmem will be used anyways.
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      cf4100d1
    • V
      ARC: mm: fix build failure in linux-next for UP builds · 868a6530
      Vineet Gupta 提交于
      kisskb build service reported ARC defconfig build failures in linux-next
      
      | arch/arc/include/asm/mmu.h:75:21: error: 'NR_CPUS' undeclared here (not in a function)
      | make[3]: *** [arch/arc/mm/ioremap.o] Error 1
      | make[2]: *** [arch/arc/mm] Error 2
      | make[1]: *** [arch/arc] Error 2
      
      which I bisected to a subtle side-effect of a totally benign mm patch
      ("mm, vmalloc: properly track vmalloc users") which caused a header
      include chain deviation - asm/mmu.h using NR_CPUS before including
      linux/threads.h
      
      Fix that by adding the dependnet header and while it at fix a related
      header to include linux headers aheads of asm headers as sometimes that
      slso triggers such issues !
      
      Reported-by: noreply@ellerman.id.au
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      868a6530
  3. 04 5月, 2017 1 次提交
  4. 03 5月, 2017 4 次提交
    • V
      ARCv2: mm: micro-optimize region flush generated code · f734a310
      Vineet Gupta 提交于
      DC_CTRL.RGN_OP is 3 bits wide, however only 1 bit is used in current
      programming model (0: flush, 1: invalidate)
      
      The current code targetting 3 bits leads to additional 8 byte AND
      operation which can be elided given that only 1 bit is ever set by
      software and/or looked at by hardware
      
      before
      ------
      
      | 80b63324 <__dma_cache_wback_inv_l1>:
      | 80b63324:	clri	r3
      | 80b63328:	lr	r2,[dc_ctrl]
      | 80b6332c:	and	r2,r2,0xfffff1ff	<--- 8 bytes insn
      | 80b63334:	or	r2,r2,576
      | 80b63338:	sr	r2,[dc_ctrl]
      | ...
      | ...
      | 80b63360 <__dma_cache_inv_l1>:
      | 80b63360:	clri	r3
      | 80b63364:	lr	r2,[dc_ctrl]
      | 80b63368:	and	r2,r2,0xfffff1ff	<--- 8 bytes insn
      | 80b63370:	bset_s	r2,r2,0x9
      | 80b63372:	sr	r2,[dc_ctrl]
      | ...
      | ...
      | 80b6338c <__dma_cache_wback_l1>:
      | 80b6338c:	clri	r3
      | 80b63390:	lr	r2,[dc_ctrl]
      | 80b63394:	and	r2,r2,0xfffff1ff	<--- 8 bytes insn
      | 80b6339c:	sr	r2,[dc_ctrl]
      
      after (AND elided totally in 2 cases, replaced with 2 byte BCLR in 3rd)
      -----
      
      | 80b63324 <__dma_cache_wback_inv_l1>:
      | 80b63324:	clri	r3
      | 80b63328:	lr	r2,[dc_ctrl]
      | 80b6332c:	or	r2,r2,576
      | 80b63330:	sr	r2,[dc_ctrl]
      | ...
      | ...
      | 80b63358 <__dma_cache_inv_l1>:
      | 80b63358:	clri	r3
      | 80b6335c:	lr	r2,[dc_ctrl]
      | 80b63360:	bset_s	r2,r2,0x9
      | 80b63362:	sr	r2,[dc_ctrl]
      | ...
      | ...
      | 80b6337c <__dma_cache_wback_l1>:
      | 80b6337c:	clri	r3
      | 80b63380:	lr	r2,[dc_ctrl]
      | 80b63384:	bclr_s	r2,r2,0x9
      | 80b63386:	sr	r2,[dc_ctrl]
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      f734a310
    • V
      ARCv2: mm: Merge 2 updates to DC_CTRL for region flush · ee40bd1e
      Vineet Gupta 提交于
      Region Flush has a weird programming model.
      
       1. Flush or Invalidate is selected by DC_CTRL.RGN_OP
       2 Flush-n-Invalidate is done by DC_CTRL.IM
      
      Given the code structuring before, case #2 above was generating two
      seperate updates to DC_CTRL which was pointless.
      
      | 80a342b0 <__dma_cache_wback_inv_l1>:
      | 80a342b0:	clri	r4
      | 80a342b4:	lr	r2,[dc_ctrl]
      | 80a342b8:	bset_s	r2,r2,0x6
      | 80a342ba:	sr	r2,[dc_ctrl]	<-- FIRST
      |
      | 80a342be:	bmskn	r3,r0,0x5
      |
      | 80a342c2:	lr	r2,[dc_ctrl]
      | 80a342c6:	and	r2,r2,0xfffff1ff
      | 80a342ce:	bset_s	r2,r2,0x9
      | 80a342d0:	sr	r2,[dc_ctrl]	<-- SECOND
      |
      | 80a342d4:	add_s	r1,r1,0x3f
      | 80a342d6:	bmsk_s	r0,r0,0x5
      | 80a342d8:	add_s	r0,r0,r1
      | 80a342da:	add_s	r0,r0,r3
      | 80a342dc:	sr	r0,[78]
      | 80a342e0:	sr	r3,[77]
      |...
      |...
      
      So move setting of DC_CTRL.RGN_OP into __before_dc_op() and combine with
      any other update.
      
      | 80b63324 <__dma_cache_wback_inv_l1>:
      | 80b63324:	clri	r3
      | 80b63328:	lr	r2,[dc_ctrl]
      | 80b6332c:	and	r2,r2,0xfffff1ff
      | 80b63334:	or	r2,r2,576
      | 80b63338:	sr	r2,[dc_ctrl]
      |
      | 80b6333c:	add_s	r1,r1,0x3f
      | 80b6333e:	bmskn	r2,r0,0x5
      | 80b63342:	add_s	r0,r0,r1
      | 80b63344:	sr	r0,[78]
      | 80b63348:	sr	r2,[77]
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      ee40bd1e
    • V
      ARCv2: mm: Implement cache region flush operations · 0d77117f
      Vineet Gupta 提交于
      These are more efficient than the per-line ops
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      0d77117f
    • V
      ARC: mm: Move full_page computation into cache version agnostic wrapper · 7d3d162b
      Vineet Gupta 提交于
      This reduces code duplication in each of cache version specific handlers
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      7d3d162b
  5. 28 4月, 2017 2 次提交
  6. 27 4月, 2017 1 次提交
  7. 21 4月, 2017 1 次提交
    • V
      ARCv2: entry: save Accumulator register pair (r58:59) if present · 3d5e8012
      Vineet Gupta 提交于
      Accumulator is present in configs with FPU and/or DSP MPY (mpy > 6)
      
      Instead of doing this in pt_regs (and thus every kernel entry/exit),
      this could have been done in context switch (and for user task only) as
      currently kernel doesn't clobber these registers for its own accord.
      However we will soon start using 64-bit multiply instructions for kernel
      which can clobber these. Also gcc folks also plan to start using these
      as GPRs, hence better to always save/restore them
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      3d5e8012
  8. 15 4月, 2017 1 次提交
  9. 31 3月, 2017 2 次提交
    • V
      ARC: fix build warnings with !CONFIG_KPROBES · 4c6fabda
      Vineet Gupta 提交于
      |   CC      lib/nmi_backtrace.o
      | In file included from ../include/linux/kprobes.h:43:0,
      |                  from ../lib/nmi_backtrace.c:17:
      | ../arch/arc/include/asm/kprobes.h:57:13: warning: 'trap_is_kprobe' defined but not used [-Wunused-function]
      |  static void trap_is_kprobe(unsigned long address, struct pt_regs *regs)
      |              ^~~~~~~~~~~~~~
      
      The warning started with 7d134b2c ("kprobes: move kprobe declarations
      to asm-generic/kprobes.h") which started including <asm/kprobes.h>
      unconditionally into <linux/kprobes.h> exposing a stub function for
      !CONFIG_KPROBES to rest of world. Fix that by making the stub a macro
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      4c6fabda
    • A
      ARCv2: SLC: Make sure busy bit is set properly on SLC flushing · c70c4733
      Alexey Brodkin 提交于
      As reported in STAR 9001165532, an SLC control reg read (for checking
      busy state) right after SLC invalidate command may incorrectly return
      NOT busy causing software to NOT spin-wait while operation is underway.
      (and for some reason this only happens if L1 cache is also disabled - as
      required by IOC programming model)
      
      Suggested workaround is to do an additional Control Reg read, which
      ensures the 2nd read gets the right status.
      
      Cc: stable@vger.kernel.org  #4.10
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      [vgupta: reworte changelog a bit]
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      c70c4733
  10. 30 3月, 2017 1 次提交
  11. 29 3月, 2017 3 次提交
  12. 28 3月, 2017 1 次提交
  13. 25 3月, 2017 1 次提交
  14. 21 3月, 2017 1 次提交
  15. 10 3月, 2017 1 次提交
  16. 06 3月, 2017 4 次提交
  17. 03 3月, 2017 1 次提交
    • I
      sched/headers: Move task->mm handling methods to <linux/sched/mm.h> · 68e21be2
      Ingo Molnar 提交于
      Move the following task->mm helper APIs into a new header file,
      <linux/sched/mm.h>, to further reduce the size and complexity
      of <linux/sched.h>.
      
      Here are how the APIs are used in various kernel files:
      
        # mm_alloc():
        arch/arm/mach-rpc/ecard.c
        fs/exec.c
        include/linux/sched/mm.h
        kernel/fork.c
      
        # __mmdrop():
        arch/arc/include/asm/mmu_context.h
        include/linux/sched/mm.h
        kernel/fork.c
      
        # mmdrop():
        arch/arm/mach-rpc/ecard.c
        arch/m68k/sun3/mmu_emu.c
        arch/x86/mm/tlb.c
        drivers/gpu/drm/amd/amdkfd/kfd_process.c
        drivers/gpu/drm/i915/i915_gem_userptr.c
        drivers/infiniband/hw/hfi1/file_ops.c
        drivers/vfio/vfio_iommu_spapr_tce.c
        fs/exec.c
        fs/proc/base.c
        fs/proc/task_mmu.c
        fs/proc/task_nommu.c
        fs/userfaultfd.c
        include/linux/mmu_notifier.h
        include/linux/sched/mm.h
        kernel/fork.c
        kernel/futex.c
        kernel/sched/core.c
        mm/khugepaged.c
        mm/ksm.c
        mm/mmu_context.c
        mm/mmu_notifier.c
        mm/oom_kill.c
        virt/kvm/kvm_main.c
      
        # mmdrop_async_fn():
        include/linux/sched/mm.h
      
        # mmdrop_async():
        include/linux/sched/mm.h
        kernel/fork.c
      
        # mmget_not_zero():
        fs/userfaultfd.c
        include/linux/sched/mm.h
        mm/oom_kill.c
      
        # mmput():
        arch/arc/include/asm/mmu_context.h
        arch/arc/kernel/troubleshoot.c
        arch/frv/mm/mmu-context.c
        arch/powerpc/platforms/cell/spufs/context.c
        arch/sparc/include/asm/mmu_context_32.h
        drivers/android/binder.c
        drivers/gpu/drm/etnaviv/etnaviv_gem.c
        drivers/gpu/drm/i915/i915_gem_userptr.c
        drivers/infiniband/core/umem.c
        drivers/infiniband/core/umem_odp.c
        drivers/infiniband/core/uverbs_main.c
        drivers/infiniband/hw/mlx4/main.c
        drivers/infiniband/hw/mlx5/main.c
        drivers/infiniband/hw/usnic/usnic_uiom.c
        drivers/iommu/amd_iommu_v2.c
        drivers/iommu/intel-svm.c
        drivers/lguest/lguest_user.c
        drivers/misc/cxl/fault.c
        drivers/misc/mic/scif/scif_rma.c
        drivers/oprofile/buffer_sync.c
        drivers/vfio/vfio_iommu_type1.c
        drivers/vhost/vhost.c
        drivers/xen/gntdev.c
        fs/exec.c
        fs/proc/array.c
        fs/proc/base.c
        fs/proc/task_mmu.c
        fs/proc/task_nommu.c
        fs/userfaultfd.c
        include/linux/sched/mm.h
        kernel/cpuset.c
        kernel/events/core.c
        kernel/events/uprobes.c
        kernel/exit.c
        kernel/fork.c
        kernel/ptrace.c
        kernel/sys.c
        kernel/trace/trace_output.c
        kernel/tsacct.c
        mm/memcontrol.c
        mm/memory.c
        mm/mempolicy.c
        mm/migrate.c
        mm/mmu_notifier.c
        mm/nommu.c
        mm/oom_kill.c
        mm/process_vm_access.c
        mm/rmap.c
        mm/swapfile.c
        mm/util.c
        virt/kvm/async_pf.c
      
        # mmput_async():
        include/linux/sched/mm.h
        kernel/fork.c
        mm/oom_kill.c
      
        # get_task_mm():
        arch/arc/kernel/troubleshoot.c
        arch/powerpc/platforms/cell/spufs/context.c
        drivers/android/binder.c
        drivers/gpu/drm/etnaviv/etnaviv_gem.c
        drivers/infiniband/core/umem.c
        drivers/infiniband/core/umem_odp.c
        drivers/infiniband/hw/mlx4/main.c
        drivers/infiniband/hw/mlx5/main.c
        drivers/infiniband/hw/usnic/usnic_uiom.c
        drivers/iommu/amd_iommu_v2.c
        drivers/iommu/intel-svm.c
        drivers/lguest/lguest_user.c
        drivers/misc/cxl/fault.c
        drivers/misc/mic/scif/scif_rma.c
        drivers/oprofile/buffer_sync.c
        drivers/vfio/vfio_iommu_type1.c
        drivers/vhost/vhost.c
        drivers/xen/gntdev.c
        fs/proc/array.c
        fs/proc/base.c
        fs/proc/task_mmu.c
        include/linux/sched/mm.h
        kernel/cpuset.c
        kernel/events/core.c
        kernel/exit.c
        kernel/fork.c
        kernel/ptrace.c
        kernel/sys.c
        kernel/trace/trace_output.c
        kernel/tsacct.c
        mm/memcontrol.c
        mm/memory.c
        mm/mempolicy.c
        mm/migrate.c
        mm/mmu_notifier.c
        mm/nommu.c
        mm/util.c
      
        # mm_access():
        fs/proc/base.c
        include/linux/sched/mm.h
        kernel/fork.c
        mm/process_vm_access.c
      
        # mm_release():
        arch/arc/include/asm/mmu_context.h
        fs/exec.c
        include/linux/sched/mm.h
        include/uapi/linux/sched.h
        kernel/exit.c
        kernel/fork.c
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      68e21be2
  18. 02 3月, 2017 7 次提交
  19. 28 2月, 2017 4 次提交
  20. 08 2月, 2017 1 次提交