1. 22 6月, 2015 1 次提交
    • V
      ARCv2: MMUv4: cache programming model changes · d1f317d8
      Vineet Gupta 提交于
      Caveats about cache flush on ARCv2 based cores
      
      - dcache is PIPT so paddr is sufficient for cache maintenance ops (no
        need to setup PTAG reg
      
      - icache is still VIPT but only aliasing configs need PTAG setup
      
      So basically this is departure from MMU-v3 which always need vaddr in
      line ops registers (DC_IVDL, DC_FLDL, IC_IVIL) but paddr in DC_PTAG,
      IC_PTAG respectively.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      d1f317d8
  2. 19 6月, 2015 4 次提交
  3. 19 5月, 2015 1 次提交
  4. 11 5月, 2015 1 次提交
  5. 13 10月, 2014 1 次提交
  6. 04 9月, 2014 1 次提交
  7. 30 8月, 2014 1 次提交
  8. 23 7月, 2014 3 次提交
  9. 26 6月, 2014 1 次提交
    • V
      ARC: [SMP] Enable icache coherency · 2328af0c
      Vineet Gupta 提交于
      icaches are not snooped hence not cohrent in SMP setups which means
      kernel has to do cross core calls to ensure the same.
      
      The leaf routine __ic_line_inv_vaddr() now does cross core calls.
      
      __sync_icache_dcache() is affected due to this:
      
      * local dcache line flushed ahead of remote icache inv requests
      * can't disable interrupts anymore, since
            __ic_line_inv_vaddr()->on_each_cpu() can deadlock.
      
      | WARNING: CPU: 0 PID: 1 at kernel/smp.c:374
      | smp_call_function_many+0x25a/0x2c4()
      |
      |  init_kprobes+0x90/0xc8
      |     register_kprobe+0x1d6/0x510
      |	__sync_icache_dcache+0x28/0x80
      |
      |	    DISABLE IRQ
      |
      |	    __ic_line_inv_vaddr
      |		on_each_cpu
      |		     smp_call_function_many+0x25a/0x2c4   --> WARN
      |			__ic_line_inv_vaddr_local
      |	    __dc_line_op
      
      * TODO: Needs to use mask of relevant CPUs to avoid broadcasting
      Signed-off-by: NNoam Camus <noamc@ezchip.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      2328af0c
  10. 03 6月, 2014 1 次提交
  11. 05 5月, 2014 1 次提交
  12. 05 4月, 2014 1 次提交
    • V
      ARC: [SMP] General Fixes · c3441edd
      Vineet Gupta 提交于
      -Pass the expected arg to non-boot park'ing routine
       (It worked so far because existing SMP backends don't use the arg)
      
      -CONFIG_DEBUG_PREEMPT warning
      c3441edd
  13. 08 3月, 2014 1 次提交
  14. 06 11月, 2013 4 次提交
  15. 29 8月, 2013 1 次提交
  16. 27 6月, 2013 1 次提交
    • P
      arc: delete __cpuinit usage from all arc files · ce759956
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      are flagged as __cpuinit  -- so if we remove the __cpuinit from
      arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      content into no-ops as early as possible, since that will get rid
      of these warnings.  In any case, they are temporary and harmless.
      
      This removes all the arch/arc uses of the __cpuinit macros from
      all C files.  Currently arc does not have any __CPUINIT used in
      assembly files.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      ce759956
  17. 22 6月, 2013 7 次提交
  18. 25 5月, 2013 1 次提交
    • V
      ARC: lazy dcache flush broke gdb in non-aliasing configs · 7bb66f6e
      Vineet Gupta 提交于
      gdbserver inserting a breakpoint ends up calling copy_user_page() for a
      code page. The generic version of which (non-aliasing config) didn't set
      the PG_arch_1 bit hence update_mmu_cache() didn't sync dcache/icache for
      corresponding dynamic loader code page - causing garbade to be executed.
      
      So now aliasing versions of copy_user_highpage()/clear_page() are made
      default. There is no significant overhead since all of special alias
      handling code is compiled out for non-aliasing build
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      7bb66f6e
  19. 23 5月, 2013 1 次提交
  20. 10 5月, 2013 3 次提交
    • V
      ARC: [mm] Aliasing VIPT dcache support 3/4 · de2a852c
      Vineet Gupta 提交于
      Fix the one zillion warnings
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      de2a852c
    • V
      ARC: [mm] Aliasing VIPT dcache support 2/4 · 4102b533
      Vineet Gupta 提交于
      This is the meat of the series which prevents any dcache alias creation
      by always keeping the U and K mapping of a page congruent.
      If a mapping already exists, and other tries to access the page, prev
      one is flushed to physical page (wback+inv)
      
      Essentially flush_dcache_page()/copy_user_highpage() create K-mapping
      of a page, but try to defer flushing, unless U-mapping exist.
      When page is actually mapped to userspace, update_mmu_cache() flushes
      the K-mapping (in certain cases this can be optimised out)
      
      Additonally flush_cache_mm(), flush_cache_range(), flush_cache_page()
      handle the puring of stale userspace mappings on exit/munmap...
      
      flush_anon_page() handles the existing U-mapping for anon page before
      kernel reads it via the GUP path.
      
      Note that while not complete, this is enough to boot a simple
      dynamically linked Busybox based rootfs
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      4102b533
    • V
      ARC: [mm] Aliasing VIPT dcache support 1/4 · 6ec18a81
      Vineet Gupta 提交于
      This preps the low level dcache flush helpers to take vaddr argument in
      addition to the existing paddr to properly flush the VIPT dcache
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      6ec18a81
  21. 09 5月, 2013 2 次提交
  22. 07 5月, 2013 2 次提交
    • V
      ARC: [mm] Lazy D-cache flush (non aliasing VIPT) · eacd0e95
      Vineet Gupta 提交于
      flush_dcache_page( ) is MM hook to ensure that a page has consistent
      views between kernel and userspace. Thus it is called when
      
      * kernel writes to a page which at some later point could get mapped to
        userspace (so kernel mapping needs to be flushed-n-inv)
      * kernel is about to read from a page with possible userspace mappings
        (so userspace mappings needs to be made coherent with kernel ones)
      
      However for Non aliasing VIPT dcache, any userspace mapping will always
      be congruent to kernel mapping. Thus d-cache need need not be flushed at
      all (or delayed indefinitely).
      
      The only reason it does need to be flushed is when mapping code pages.
      Since icache doesn't snoop dcache, those dirty dcache lines need to be
      written back to memory and icache line invalidated so that icache lines
      fetch will get the right data.
      
      Decent gains on LMBench fork/exec/sh and File I/O micro-benchmarks.
      
      (1) FPGA @ 80 MHZ
      
      Processor, Processes - times in microseconds - smaller is better
      ------------------------------------------------------------------------------
      Host                 OS  Mhz null null      open slct sig  sig  fork exec sh
                                   call  I/O stat clos TCP  inst hndl proc proc proc
      --------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
      3.9-rc6-a Linux 3.9.0-r   80 4.79 8.72 66.7 116. 239. 8.39 30.4 4798 14.K 34.K
      3.9-rc6-b Linux 3.9.0-r   80 4.79 8.62 65.4 111. 239. 8.35 29.0 3995 12.K 30.K
      3.9-rc7-c Linux 3.9.0-r   80 4.79 9.00 66.1 106. 239. 8.61 30.4 2858 10.K 24.K
                                                                      ^^^^ ^^^^ ^^^
      
      File & VM system latencies in microseconds - smaller is better
      -------------------------------------------------------------------------------
      Host                 OS   0K File      10K File     Mmap    Prot   Page 100fd
                              Create Delete Create Delete Latency Fault  Fault selct
      --------- ------------- ------ ------ ------ ------ ------- ----- ------- -----
      3.9-rc6-a Linux 3.9.0-r  317.8  204.2 1122.3  375.1 3522.0 4.288     20.7 126.8
      3.9-rc6-b Linux 3.9.0-r  298.7  223.0 1141.6  367.8 3531.0 4.866     20.9 126.4
      3.9-rc7-c Linux 3.9.0-r  278.4  179.2  862.1  339.3 3705.0 3.223     20.3 126.6
                               ^^^^^  ^^^^^  ^^^^^  ^^^^
      
      (2) Customer Silicon @ 500 MHz (166 MHz mem)
      
      ------------------------------------------------------------------------------
      Host                 OS  Mhz null null      open slct sig  sig  fork exec sh
                                   call  I/O stat clos TCP  inst hndl proc proc proc
      --------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
      abilis-ba Linux 3.9.0-r  497 0.71 1.38 4.58 12.0 35.5 1.40 3.89 2070 5525 13.K
      abilis-ca Linux 3.9.0-r  497 0.71 1.40 4.61 11.8 35.6 1.37 3.92 1411 4317 10.K
                                                                      ^^^^ ^^^^ ^^^
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      eacd0e95
    • V
      ARC: [mm] micro-optimize page size icache invalidate · 764531cc
      Vineet Gupta 提交于
      start address is already page aligned and size is const PAGE_SIZE,
      thus fixups for alignment not needed in generated code.
      
      bloat-o-meter vmlinux-mm5 vmlinux
      add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-32 (-32)
      function                                     old     new   delta
      __inv_icache_page                             82      50     -32
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      764531cc