1. 10 11月, 2014 2 次提交
    • T
      asm-generic/io.h: Implement generic {read,write}s*() · 9ab3a7a0
      Thierry Reding 提交于
      Currently driver writers need to use io{read,write}{8,16,32}_rep() when
      accessing FIFO registers portably. This is bad for two reasons: it is
      inconsistent with how other registers are accessed using the standard
      {read,write}{b,w,l}() functions, which can lead to confusion. On some
      architectures the io{read,write}*() functions also need to perform some
      extra checks to determine whether an address is memory-mapped or refers
      to I/O space. Drivers which can be expected to never use I/O can safely
      use the {read,write}s{b,w,l,q}(), just like they use their non-string
      variants and there's no need for these extra checks.
      
      This patch implements generic versions of readsb(), readsw(), readsl(),
      readsq(), writesb(), writesw(), writesl() and writesq(). Variants of
      these string functions for I/O accesses (ins*() and outs*() as well as
      ioread*_rep() and iowrite*_rep()) are now implemented in terms of the
      new functions.
      
      Going forward, {read,write}{,s}{b,w,l,q}() should be used consistently
      by drivers for devices that will only ever be memory-mapped and hence
      don't need to access I/O space, whereas io{read,write}{8,16,32}_rep()
      should be used by drivers for devices that can be either memory-mapped
      or I/O-mapped.
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      9ab3a7a0
    • T
      asm-generic/io.h: Reconcile I/O accessor overrides · 9216efaf
      Thierry Reding 提交于
      Overriding I/O accessors and helpers is currently very inconsistent.
      This commit introduces a homogeneous way to override functions by
      checking for the existence of a macro with the same of the function.
      Architectures can provide their own implementations and communicate this
      to the generic header by defining the appropriate macro. Doing this will
      also help prevent the implementations from being subsequently
      overridden.
      
      While at it, also turn a lot of macros into static inline functions for
      better type checking and to provide a canonical signature for overriding
      architectures to copy. Also reorder functions by logical groups.
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      9216efaf
  2. 30 9月, 2014 1 次提交
  3. 08 4月, 2014 1 次提交
  4. 22 5月, 2013 1 次提交
    • M
      kernel: Fix s390 absolute memory access for /dev/mem · 576ebd74
      Michael Holzheu 提交于
      On s390 the prefix page and absolute zero pages are not correctly
      returned when reading /dev/mem. The reason is that the s390 asm/io.h
      file includes the asm-generic/io.h file which then defines
      xlate_dev_mem_ptr() and therefore overwrites the s390 specific
      version that does the correct swap operation for prefix and absolute
      zero pages. The problem is a regression that was introduced with git
      commit cd248341 (s390/pci: base support).
      
      To fix the problem add "#ifndef xlate_dev_mem_ptr" in asm-generic/io.h
      and "#define xlate_dev_mem_ptr" in asm/io.h. This ensures that the
      s390 version is used. For completeness also add the "#ifndef"
      construct for xlate_dev_kmem_ptr().
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      576ebd74
  5. 03 3月, 2013 1 次提交
  6. 14 2月, 2013 1 次提交
  7. 12 2月, 2013 1 次提交
  8. 18 12月, 2012 1 次提交
  9. 30 11月, 2012 1 次提交
    • J
      s390/pci: base support · cd248341
      Jan Glauber 提交于
      Add PCI support for s390, (only 64 bit mode is supported by hardware):
      - PCI facility tests
      - PCI instructions: pcilg, pcistg, pcistb, stpcifc, mpcifc, rpcit
      - map readb/w/l/q and writeb/w/l/q to pcilg and pcistg instructions
      - pci_iomap implementation
      - memcpy_fromio/toio
      - pci_root_ops using special pcilg/pcistg
      - device, bus and domain allocation
      Signed-off-by: NJan Glauber <jang@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      cd248341
  10. 26 10月, 2012 1 次提交
    • W
      asm-generic: io: remove {read,write} string functions · b2656a13
      Will Deacon 提交于
      The {read,write}s{b,w,l} functions are not defined across all
      architectures and therefore shouldn't be used by portable drivers. We
      should encourage driver writers to use the io{read,write}{8,16,32}_rep
      functions instead.
      
      This patch removes the {read,write} string functions for the generic IO
      header as they have no place in a new architecture port.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Ben Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      b2656a13
  11. 25 10月, 2012 1 次提交
    • J
      asm-generic/io.h: remove asm/cacheflush.h include · 9b04ebd1
      James Hogan 提交于
      Including <asm/cacheflush.h> from <asm-generic/io.h> prevents
      cacheflush.h being able to use I/O functions like readl and writel due
      to circular include dependencies. It doesn't appear as if anything from
      cacheflush.h is actually used by the generic io.h, so remove the
      include.
      
      I've compile tested a defconfig compilation of blackfin, openrisc (which
      needed <asm/pgtable.h> including from it's <asm/io.h> to get the PAGE_*
      definitions), and xtensa.
      
      Other architectures which use asm-generic/io.h are score and unicore32,
      and looking at their io.h I don't see any obvious problems.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Acked-by: NJonas Bonn <jonas@southpole.se>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Chen Liqin <liqin.chen@sunplusct.com>
      Cc: Lennox Wu <lennox.wu@gmail.com>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      9b04ebd1
  12. 29 11月, 2011 1 次提交
  13. 07 10月, 2011 1 次提交
  14. 23 7月, 2011 2 次提交
  15. 17 3月, 2011 1 次提交
  16. 10 1月, 2011 1 次提交
  17. 18 10月, 2010 1 次提交
  18. 10 8月, 2010 1 次提交
  19. 12 6月, 2009 1 次提交
  20. 10 4月, 2009 1 次提交
  21. 21 8月, 2008 1 次提交
  22. 09 2月, 2008 1 次提交