1. 28 10月, 2015 5 次提交
    • V
      ARC: mm: HIGHMEM: kmap API implementation · 45890f6d
      Vineet Gupta 提交于
      Implement kmap* API for ARC.
      
      This enables
       - permanent kernel maps (pkmaps): :kmap() API
       - fixmap : kmap_atomic()
      
      We use a very simple/uniform approach for both (unlike some of the other
      arches). So fixmap doesn't use the customary compile time address stuff.
      The important semantic is sleep'ability (pkmap) vs. not (fixmap) which
      the API guarantees.
      
      Note that this patch only enables highmem for subsequent PAE40 support
      as there is no real highmem for ARC in pure 32-bit paradigm as explained
      below.
      
      ARC has 2:2 address split of the 32-bit address space with lower half
      being translated (virtual) while upper half unstranslated
      (0x8000_0000 to 0xFFFF_FFFF). kernel itself is linked at base of
      unstranslated space (i.e. 0x8000_0000 onwards), which is mapped to say
      DDR 0x0 by external Bus Glue logic (outside the core). So kernel can
      potentially access 1.75G worth of memory directly w/o need for highmem.
      (the top 256M is taken by uncached peripheral space from 0xF000_0000 to
      0xFFFF_FFFF)
      
      In PAE40, hardware can address memory beyond 4G (0x1_0000_0000) while
      the logical/virtual addresses remain 32-bits. Thus highmem is required
      for kernel proper to be able to access these pages for it's own purposes
      (user space is agnostic to this anyways).
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      45890f6d
    • V
      ARC: mm: preps ahead of HIGHMEM support #2 · 6101be5a
      Vineet Gupta 提交于
      Explicit'ify that all memory added so far is low memory
      Nothing semantical
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      6101be5a
    • V
      ARC: mm: preps ahead of HIGHMEM support · 336e2136
      Vineet Gupta 提交于
      Before we plug in highmem support, some of code needs to be ready for it
       - copy_user_highpage() needs to be using the kmap_atomic API
       - mk_pte() can't assume page_address()
       - do_page_fault() can't assume VMALLOC_END is end of kernel vaddr space
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      336e2136
    • V
      ARC: mm: Improve Duplicate PD Fault handler · 8840e14c
      Vineet Gupta 提交于
       - Move the verbosity knob from .data to .bss by using inverted logic
       - No need to readout PD1 descriptor
       - clip the non pfn bits of PD0 to avoid clipping inside the loop
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      8840e14c
    • V
      f759ee57
  2. 17 10月, 2015 7 次提交
  3. 09 10月, 2015 1 次提交
  4. 21 8月, 2015 1 次提交
  5. 20 8月, 2015 3 次提交
  6. 06 7月, 2015 2 次提交
    • V
      ARC: Don't memzero twice in dma_alloc_coherent for __GFP_ZERO · f718c2ef
      Vineet Gupta 提交于
      alloc_pages_exact() get gfp flags and handle zero'ing already
      
      And while it, fix the case where ioremap fails: return rightaway.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      f718c2ef
    • A
      ARCv2: guard SLC DMA ops with spinlock · b607eddd
      Alexey Brodkin 提交于
      SLC maintenance ops need to be serialized by software as there is no
      inherent buffering / quequing of aux commands. It can silently ignore a
      new aux operation if previous one is still ongoing (SLC_CTRL_BUSY)
      
      So gaurd the SLC op using a spin lock
      
      The spin lock doesn't seem to be contended even in heavy workloads such
      as iperf. On FPGA @ 75 MHz.
      
       [1] Before this change:
       ============================================================
        # iperf -c 10.42.0.1
       ------------------------------------------------------------
       Client connecting to 10.42.0.1, TCP port 5001
       TCP window size: 43.8 KByte (default)
       ------------------------------------------------------------
       [  3] local 10.42.0.110 port 38935 connected with 10.42.0.1 port 5001
       [ ID] Interval       Transfer     Bandwidth
       [  3]  0.0-10.0 sec  48.4 MBytes  40.6 Mbits/sec
       ============================================================
      
       [2] After this change:
       ============================================================
       # iperf -c 10.42.0.1
       ------------------------------------------------------------
       Client connecting to 10.42.0.1, TCP port 5001
       TCP window size: 43.8 KByte (default)
       ------------------------------------------------------------
       [  3] local 10.42.0.243 port 60248 connected with 10.42.0.1 port 5001
       [ ID] Interval       Transfer     Bandwidth
       [  3]  0.0-10.0 sec  47.5 MBytes  39.8 Mbits/sec
       # iperf -c 10.42.0.1
       ------------------------------------------------------------
       Client connecting to 10.42.0.1, TCP port 5001
       TCP window size: 43.8 KByte (default)
       ------------------------------------------------------------
       [  3] local 10.42.0.243 port 60249 connected with 10.42.0.1 port 5001
       [ ID] Interval       Transfer     Bandwidth
       [  3]  0.0-10.0 sec  54.9 MBytes  46.0 Mbits/sec
       ============================================================
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      Cc: arc-linux-dev@synopsys.com
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      b607eddd
  7. 25 6月, 2015 2 次提交
  8. 22 6月, 2015 4 次提交
  9. 19 6月, 2015 7 次提交
  10. 19 5月, 2015 2 次提交
  11. 11 5月, 2015 1 次提交
  12. 13 4月, 2015 1 次提交
  13. 27 2月, 2015 1 次提交
  14. 31 1月, 2015 1 次提交
  15. 30 1月, 2015 1 次提交
    • L
      vm: add VM_FAULT_SIGSEGV handling support · 33692f27
      Linus Torvalds 提交于
      The core VM already knows about VM_FAULT_SIGBUS, but cannot return a
      "you should SIGSEGV" error, because the SIGSEGV case was generally
      handled by the caller - usually the architecture fault handler.
      
      That results in lots of duplication - all the architecture fault
      handlers end up doing very similar "look up vma, check permissions, do
      retries etc" - but it generally works.  However, there are cases where
      the VM actually wants to SIGSEGV, and applications _expect_ SIGSEGV.
      
      In particular, when accessing the stack guard page, libsigsegv expects a
      SIGSEGV.  And it usually got one, because the stack growth is handled by
      that duplicated architecture fault handler.
      
      However, when the generic VM layer started propagating the error return
      from the stack expansion in commit fee7e49d ("mm: propagate error
      from stack expansion even for guard page"), that now exposed the
      existing VM_FAULT_SIGBUS result to user space.  And user space really
      expected SIGSEGV, not SIGBUS.
      
      To fix that case, we need to add a VM_FAULT_SIGSEGV, and teach all those
      duplicate architecture fault handlers about it.  They all already have
      the code to handle SIGSEGV, so it's about just tying that new return
      value to the existing code, but it's all a bit annoying.
      
      This is the mindless minimal patch to do this.  A more extensive patch
      would be to try to gather up the mostly shared fault handling logic into
      one generic helper routine, and long-term we really should do that
      cleanup.
      
      Just from this patch, you can generally see that most architectures just
      copied (directly or indirectly) the old x86 way of doing things, but in
      the meantime that original x86 model has been improved to hold the VM
      semaphore for shorter times etc and to handle VM_FAULT_RETRY and other
      "newer" things, so it would be a good idea to bring all those
      improvements to the generic case and teach other architectures about
      them too.
      Reported-and-tested-by: NTakashi Iwai <tiwai@suse.de>
      Tested-by: NJan Engelhardt <jengelh@inai.de>
      Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # "s390 still compiles and boots"
      Cc: linux-arch@vger.kernel.org
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      33692f27
  16. 13 10月, 2014 1 次提交