You need to sign in or sign up before continuing.
  1. 08 5月, 2015 2 次提交
    • R
      ARM: optimize memset_io()/memcpy_fromio()/memcpy_toio() · 7ddfe625
      Russell King 提交于
      If we are building for a LE platform, and we haven't overriden the
      MMIO ops, then we can optimize the mem*io operations using the
      standard string functions.
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      7ddfe625
    • P
      ARM: 8341/1: io: Unpessimize relaxed io accessors · 5bb5d66d
      Peter Hurley 提交于
      commit 195bbcac ("ARM: 7500/1: io: avoid writeback addressing
      modes for __raw_ accessors") disables writeback addressing modes for
      raw i/o. However, the "+Q" output constraint forces the compiler to
      disable load hoist optimizations (because the output constraint informs the
      compiler of memory stores which the compiler assumes may alias other memory).
      
      Since the relaxed accessors only guarantee ordering wrt i/o accesses to the
      same device and not to main memory, there's never a possibility of an accessor
      invalidating a hoisted load (because only non-i/o loads would have been hoisted).
      
      The effect is especially noticable with complex address inputs in loops.
      For example, the following code:
      
          #include <linux/kernel.h>
          #include <linux/io.h>
      
          static const int *remap;
      
          void wr_loop(void __iomem *base, int c, int val)
          {
                  int i;
      
                  for (i = 0; i < c; i++)
                          writew_relaxed(val, base + remap[c >> 2]);
          }
      
      generates
      
                 current master             |             this patch
       0: e3510000    cmp     r1, #0        |  0: e3510000    cmp     r1, #0
       4: d12fff1e    bxle    lr            |  4: d12fff1e    bxle    lr
       8: e3003000    movw    r3, #0        |  8: e3c1c003    bic     ip, r1, #3
       c: e3403000    movt    r3, #0        |  c: e6ff2072    uxth    r2, r2
      10: e92d4010    push    {r4, lr}      | 10: e3a03000    mov     r3, #0
      14: e6ff2072    uxth    r2, r2        | 14: e59cc000    ldr     ip, [ip]
      18: e3c14003    bic     r4, r1, #3    | 18: e080000c    add     r0, r0, ip
      1c: e593e000    ldr     lr, [r3]      |
      20: e3a03000    mov     r3, #0        | 1c: e1c020b0    strh    r2, [r0]
                                            | 20: e2833001    add     r3, r3, #1
      24: e79ec004    ldr     ip, [lr, r4]  | 24: e1530001    cmp     r3, r1
      28: e080c00c    add     ip, r0, ip    | 28: 1afffffb    bne     1c
      2c: e1cc20b0    strh    r2, [ip]      | 2c: e12fff1e    bx      lr
      30: e2833001    add     r3, r3, #1    |
      34: e1530001    cmp     r3, r1        |
      38: 1afffff9    bne     24            |
                                            |
      3c: e8bd8010    pop     {r4, pc}      |
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      5bb5d66d
  2. 10 11月, 2014 1 次提交
  3. 01 10月, 2014 1 次提交
  4. 01 6月, 2014 1 次提交
    • T
      ARM: 8060/1: mm: allow sub-architectures to override PCI I/O memory type · 1c8c3cf0
      Thomas Petazzoni 提交于
      Due to a design incompatibility between the PCIe Marvell controller
      and the Cortex-A9, stressing PCIe devices with a lot of traffic
      quickly causes a deadlock.
      
      One part of the workaround for this is to have all PCIe regions mapped
      as strongly-ordered (MT_UNCACHED) instead of the default
      MT_DEVICE. While the arch_ioremap_caller() mechanism allows
      sub-architecture code to override ioremap(), used to map PCIe memory
      regions, there isn't such a mechanism to override the behavior of
      pci_ioremap_io().
      
      This commit adds the arch_pci_ioremap_mem_type variable, initialized
      to MT_DEVICE by default, and that sub-architecture code can
      override. We have chosen to expose a single variable rather than
      offering the possibility of overriding the entire pci_ioremap_io(),
      because implementing pci_ioremap_io() requires calling functions
      (get_mem_type()) that are private to the arch/arm/mm/ code.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      1c8c3cf0
  5. 28 1月, 2014 1 次提交
  6. 05 1月, 2014 1 次提交
  7. 29 12月, 2013 1 次提交
    • R
      ARM: 7896/1: rename ioremap_cached to ioremap_cache · 92341c83
      Rob Herring 提交于
      ioremap_cache is more aligned with other architectures. There are only
      2 users of this in the kernel: pxa2xx-flash and Xen.
      
      This fixes Xen build failures on arm64 caused by commit c04e8e2f (arm64:
      allow ioremap_cache() to use existing RAM mappings)
      
      drivers/tty/hvc/hvc_xen.c:233:2: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]
      drivers/xen/grant-table.c:1174:3: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]
      drivers/xen/xenbus/xenbus_probe.c:778:4: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      92341c83
  8. 09 11月, 2013 1 次提交
  9. 25 10月, 2013 1 次提交
  10. 23 5月, 2013 1 次提交
  11. 29 10月, 2012 1 次提交
  12. 25 10月, 2012 1 次提交
  13. 25 8月, 2012 1 次提交
    • W
      ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors · 195bbcac
      Will Deacon 提交于
      Data aborts taken to hyp mode do not provide a valid instruction
      syndrome field in the HSR if the faulting instruction is a memory
      access using a writeback addressing mode.
      
      For hypervisors emulating MMIO accesses to virtual peripherals, taking
      such an exception requires disassembling the faulting instruction in
      order to determine the behaviour of the access. Since this requires
      manually walking the two stages of translation, the world must be
      stopped to prevent races against page aging in the guest, where the
      first-stage translation is invalidated after the hypervisor has
      translated to an IPA and the physical page is reused for something else.
      
      This patch avoids taking this heavy performance penalty when running
      Linux as a guest by ensuring that our I/O accessors do not make use of
      writeback addressing modes.
      
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      195bbcac
  14. 25 7月, 2012 1 次提交
    • R
      ARM: Add fixed PCI i/o mapping · c2794437
      Rob Herring 提交于
      This adds a fixed virtual mapping for PCI i/o addresses. The mapping is
      located at the last 2MB of vmalloc region (0xfee00000-0xff000000). 2MB
      is used to align with PMD size, but IO_SPACE_LIMIT is 1MB. The space
      is reserved after .map_io and can be mapped at any time later with
      pci_ioremap_io. Platforms which need early i/o mapping (e.g. for vga
      console) can call pci_map_io_early in their .map_io function.
      
      This has changed completely from the 1st implementation which only
      supported creating the static mapping at .map_io.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      c2794437
  15. 25 5月, 2012 1 次提交
  16. 06 4月, 2012 1 次提交
    • R
      ARM: fix __io macro for PCMCIA · 1ac02d79
      Rob Herring 提交于
      With commit c334bc15 (ARM: make mach/io.h include optional), PCMCIA was
      broken. PCMCIA depends on __io() returning a valid i/o address, and most
      ARM platforms require IO_SPACE_LIMIT be set to 0xffffffff for PCMCIA. This
      needs a better fix with a fixed i/o address mapping, but for now we just
      restore things to the previous behavior.
      
      This fixes at91, omap1, pxa and sa11xx. pxa needs io.h if PCI is enabled,
      but PCMCIA is not. sa11xx already has IO_SPACE_LIMIT set to 0xffffffff,
      so it doesn't need an io.h.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Joachim Eastwood <joachim.eastwood@jotron.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Andrew Victor <linux@maxim.org.za>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Tested-by: Paul Parsons <lost.distance@yahoo.com> (pxa270)
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      1ac02d79
  17. 29 3月, 2012 1 次提交
  18. 14 3月, 2012 1 次提交
  19. 07 3月, 2012 4 次提交
  20. 29 11月, 2011 1 次提交
  21. 23 10月, 2011 1 次提交
  22. 17 10月, 2011 1 次提交
  23. 02 10月, 2011 1 次提交
  24. 28 9月, 2011 1 次提交
    • P
      doc: fix broken references · 395cf969
      Paul Bolle 提交于
      There are numerous broken references to Documentation files (in other
      Documentation files, in comments, etc.). These broken references are
      caused by typo's in the references, and by renames or removals of the
      Documentation files. Some broken references are simply odd.
      
      Fix these broken references, sometimes by dropping the irrelevant text
      they were part of.
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      395cf969
  25. 17 8月, 2011 1 次提交
  26. 31 1月, 2011 1 次提交
  27. 08 12月, 2010 2 次提交
  28. 02 10月, 2010 1 次提交
  29. 29 7月, 2010 3 次提交
  30. 16 2月, 2010 1 次提交
  31. 30 11月, 2008 1 次提交
  32. 01 10月, 2008 1 次提交
  33. 06 9月, 2008 1 次提交
    • L
      [ARM] 5241/1: provide ioremap_wc() · 1ad77a87
      Lennert Buytenhek 提交于
      This patch provides an ARM implementation of ioremap_wc().
      
      We use different page table attributes depending on which CPU we
      are running on:
      
      - Non-XScale ARMv5 and earlier systems: The ARMv5 ARM documents four
        possible mapping types (CB=00/01/10/11).  We can't use any of the
        cached memory types (CB=10/11), since that breaks coherency with
        peripheral devices.  Both CB=00 and CB=01 are suitable for _wc, and
        CB=01 (Uncached/Buffered) allows the hardware more freedom than
        CB=00, so we'll use that.
      
        (The ARMv5 ARM seems to suggest that CB=01 is allowed to delay stores
        but isn't allowed to merge them, but there is no other mapping type
        we can use that allows the hardware to delay and merge stores, so
        we'll go with CB=01.)
      
      - XScale v1/v2 (ARMv5): same as the ARMv5 case above, with the slight
        difference that on these platforms, CB=01 actually _does_ allow
        merging stores.  (If you want noncoalescing bufferable behavior
        on Xscale v1/v2, you need to use XCB=101.)
      
      - Xscale v3 (ARMv5) and ARMv6+: on these systems, we use TEXCB=00100
        mappings (Inner/Outer Uncacheable in xsc3 parlance, Uncached Normal
        in ARMv6 parlance).
      
        The ARMv6 ARM explicitly says that any accesses to Normal memory can
        be merged, which makes Normal memory more suitable for _wc mappings
        than Device or Strongly Ordered memory, as the latter two mapping
        types are guaranteed to maintain transaction number, size and order.
        We use the Uncached variety of Normal mappings for the same reason
        that we can't use C=1 mappings on ARMv5.
      
        The xsc3 Architecture Specification documents TEXCB=00100 as being
        Uncacheable and allowing coalescing of writes, which is also just
        what we need.
      Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      1ad77a87