1. 14 1月, 2016 1 次提交
  2. 15 8月, 2015 1 次提交
    • D
      arch: introduce memremap() · 92281dee
      Dan Williams 提交于
      Existing users of ioremap_cache() are mapping memory that is known in
      advance to not have i/o side effects.  These users are forced to cast
      away the __iomem annotation, or otherwise neglect to fix the sparse
      errors thrown when dereferencing pointers to this memory.  Provide
      memremap() as a non __iomem annotated ioremap_*() in the case when
      ioremap is otherwise a pointer to cacheable memory. Empirically,
      ioremap_<cacheable-type>() call sites are seeking memory-like semantics
      (e.g.  speculative reads, and prefetching permitted).
      
      memremap() is a break from the ioremap implementation pattern of adding
      a new memremap_<type>() for each mapping type and having silent
      compatibility fall backs.  Instead, the implementation defines flags
      that are passed to the central memremap() and if a mapping type is not
      supported by an arch memremap returns NULL.
      
      We introduce a memremap prototype as a trivial wrapper of
      ioremap_cache() and ioremap_wt().  Later, once all ioremap_cache() and
      ioremap_wt() usage has been removed from drivers we teach archs to
      implement arch_memremap() with the ability to strictly enforce the
      mapping type.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      92281dee
  3. 21 10月, 2014 1 次提交
    • W
      ia64: io: implement dummy relaxed accessor macros for writes · f6b3b7a9
      Will Deacon 提交于
      write{b,w,l,q}_relaxed are implemented by some architectures in order to
      permit memory-mapped I/O accesses with weaker barrier semantics than the
      non-relaxed variants.
      
      This patch adds dummy macros for the write accessors to ia64, which may
      be able to be optimised in a similar manner to the relaxed read
      accessors at a later date.
      
      Cc: Tony Luck <tony.luck@intel.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      f6b3b7a9
  4. 19 7月, 2014 1 次提交
    • D
      arch/ia64: Define early_memunmap() · 4fa62481
      Daniel Kiper 提交于
      This is odd to use early_iounmap() function do tear down mapping
      created by early_memremap() function, even if it works right now,
      because they belong to different set of functions. The former is
      I/O related function and the later is memory related. So, create
      early_memunmap() macro which in real is early_iounmap(). This
      thing will help to not confuse code readers longer by mixing
      functions from different classes.
      
      EFI patches following this patch uses that functionality.
      Signed-off-by: NDaniel Kiper <daniel.kiper@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      4fa62481
  5. 05 9月, 2013 1 次提交
  6. 25 10月, 2012 1 次提交
  7. 29 3月, 2012 1 次提交
  8. 07 1月, 2011 1 次提交
    • L
      ACPI: Use ioremap_cache() · 6d5bbf00
      Len Brown 提交于
      Although the temporary boot-time ACPI table mappings
      were set up with CPU caching enabled, the permanent table
      mappings and AML run-time region memory accesses were
      set up with ioremap(), which on x86 is a synonym for
      ioremap_nocache().
      
      Changing this to ioremap_cache() improves performance as
      seen when accessing the tables via acpidump,
      or /sys/firmware/acpi/tables.  It should also improve
      AML run-time performance.
      
      No change on ia64.
      Reported-by: NJack Steiner <steiner@sgi.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      6d5bbf00
  9. 16 12月, 2009 1 次提交
  10. 15 12月, 2009 1 次提交
  11. 05 11月, 2008 1 次提交
  12. 26 8月, 2008 1 次提交
  13. 02 8月, 2008 1 次提交
    • T
      [IA64] Move include/asm-ia64 to arch/ia64/include/asm · 7f30491c
      Tony Luck 提交于
      After moving the the include files there were a few clean-ups:
      
      1) Some files used #include <asm-ia64/xyz.h>, changed to <asm/xyz.h>
      
      2) Some comments alerted maintainers to look at various header files to
      make matching updates if certain code were to be changed. Updated these
      comments to use the new include paths.
      
      3) Some header files mentioned their own names in initial comments. Just
      deleted these self references.
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      7f30491c
  14. 01 5月, 2008 1 次提交
  15. 17 10月, 2007 1 次提交
  16. 31 3月, 2007 1 次提交
    • B
      [IA64] make ioremap avoid unsupported attributes · 9b50ffb0
      Bjorn Helgaas 提交于
      Example memory map (from HP sx1000 with VGA enabled):
          0x00000 - 0x9FFFF supports only WB (cacheable) access
          0xA0000 - 0xBFFFF supports only UC (uncacheable) access
          0xC0000 - 0xFFFFF supports only WB (cacheable) access
      
      pci_read_rom() indirectly uses ioremap(0xC0000) to read the shadow VGA option
      ROM.  ioremap() used to default to a 16MB or 64MB UC kernel identity mapping,
      which would cause an MCA when reading 0xC0000 since only WB is supported there.
      
      X uses reads the option ROM to initialize devices.  A smaller test case is:
        # echo 1 > /sys/bus/pci/devices/0000:aa:03.0/rom
        # cp /sys/bus/pci/devices/0000:aa:03.0/rom x
      
      To avoid this, we can use the same ioremap_page_range() strategy that most
      architectures use for all ioremaps.  These page table mappings come out of the
      vmalloc area.  On ia64, these are in region 5 (0xA... addresses) and typically
      use 16KB or 64KB mappings instead of 16MB or 64MB mappings.  The smaller
      mappings give more flexibility to use the correct attributes.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      9b50ffb0
  17. 02 12月, 2006 1 次提交
    • J
      Altix: Add initial ACPI IO support · 8ea6091f
      John Keller 提交于
      First phase in introducing ACPI support to SN.
      In this phase, when running with an ACPI capable PROM,
      the DSDT will define the root busses and all SN nodes
      (SGIHUB, SGITIO). An ACPI bus driver will be registered
      for the node devices, with the acpi_pci_root_driver being
      used for the root busses. An ACPI vendor descriptor is
      now used to pass platform specific information for both
      nodes and busses, eliminating the need for the current
      SAL calls. Also, with ACPI support, SN fixup code is no longer
      needed to initiate the PCI bus scans, as the acpi_pci_root_driver
      does that.
      
      However, to maintain backward compatibility with non-ACPI capable
      PROMs, none of the current 'fixup' code can been deleted, though
      much restructuring has been done. For example, the bulk of the code
      in io_common.c is relocated code that is now common regardless
      of what PROM is running, while io_acpi_init.c and io_init.c contain
      routines specific to an ACPI or non ACPI capable PROM respectively.
      
      A new pci bus fixup platform vector has been created to provide
      a hook for invoking platform specific bus fixup from pcibios_fixup_bus().
      
      The size of io_space[] has been increased to support systems with
      large IO configurations.
      Signed-off-by: NJohn Keller <jpk@sgi.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      8ea6091f
  18. 18 10月, 2006 1 次提交
  19. 11 7月, 2006 1 次提交
    • L
      [PATCH] make valid_mmap_phys_addr_range() take a pfn · 06c67bef
      Lennert Buytenhek 提交于
      Newer ARMs have a 40 bit physical address space, but mapping physical
      memory above 4G needs a special page table format which we (currently?) do
      not use for userspace mappings, so what happens instead is that mapping an
      address >= 4G will happily discard the upper bits and wrap.
      
      There is a valid_mmap_phys_addr_range() arch hook where we could check for
      >= 4G addresses and deny the mapping, but this hook takes an unsigned long
      address:
      
      	static inline int valid_mmap_phys_addr_range(unsigned long addr, size_t size);
      
      And drivers/char/mem.c:mmap_mem() calls it like this:
      
      	static int mmap_mem(struct file * file, struct vm_area_struct * vma)
      	{
      		size_t size = vma->vm_end - vma->vm_start;
      
      		if (!valid_mmap_phys_addr_range(vma->vm_pgoff << PAGE_SHIFT, size))
      
      So that's not much help either.
      
      This patch makes the hook take a pfn instead of a phys address.
      Signed-off-by: NLennert Buytenhek <buytenh@wantstofly.org>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      06c67bef
  20. 09 5月, 2006 1 次提交
    • B
      [IA64] rework memory attribute aliasing · 32e62c63
      Bjorn Helgaas 提交于
      This closes a couple holes in our attribute aliasing avoidance scheme:
      
        - The current kernel fails mmaps of some /dev/mem MMIO regions because
          they don't appear in the EFI memory map.  This keeps X from working
          on the Intel Tiger box.
      
        - The current kernel allows UC mmap of the 0-1MB region of
          /sys/.../legacy_mem even when the chipset doesn't support UC
          access.  This causes an MCA when starting X on HP rx7620 and rx8620
          boxes in the default configuration.
      
      There's more detail in the Documentation/ia64/aliasing.txt file this
      adds, but the general idea is that if a region might be covered by
      a granule-sized kernel identity mapping, any access via /dev/mem or
      mmap must use the same attribute as the identity mapping.
      
      Otherwise, we fall back to using an attribute that is supported
      according to the EFI memory map, or to using UC if the EFI memory
      map doesn't mention the region.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      32e62c63
  21. 27 3月, 2006 3 次提交
  22. 09 1月, 2006 1 次提交
    • B
      [PATCH] /dev/mem: validate mmap requests · 80851ef2
      Bjorn Helgaas 提交于
      Add a hook so architectures can validate /dev/mem mmap requests.
      
      This is analogous to validation we already perform in the read/write
      paths.
      
      The identity mapping scheme used on ia64 requires that each 16MB or
      64MB granule be accessed with exactly one attribute (write-back or
      uncacheable).  This avoids "attribute aliasing", which can cause a
      machine check.
      
      Sample problem scenario:
        - Machine supports VGA, so it has uncacheable (UC) MMIO at 640K-768K
        - efi_memmap_init() discards any write-back (WB) memory in the first granule
        - Application (e.g., "hwinfo") mmaps /dev/mem, offset 0
        - hwinfo receives UC mapping (the default, since memmap says "no WB here")
        - Machine check abort (on chipsets that don't support UC access to WB
          memory, e.g., sx1000)
      
      In the scenario above, the only choices are
        - Use WB for hwinfo mmap.  Can't do this because it causes attribute
          aliasing with the UC mapping for the VGA MMIO space.
        - Use UC for hwinfo mmap.  Can't do this because the chipset may not
          support UC for that region.
        - Disallow the hwinfo mmap with -EINVAL.  That's what this patch does.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      80851ef2
  23. 25 8月, 2005 2 次提交
    • P
      [IA64] Rationalise Region Definitions · 0a41e250
      Peter Chubb 提交于
      Currently, region numbers are defined in several files, with several 
      names.  For example, we have REGION_KERNEL in asm/page.h and 
      RGN_KERNEL in pgtable.h 
       
      We also have address definitions that should depend on the 
      RGN_XXX macros, but are currently just long constants. 
       
      The following patch reorganises all the definitions so that they have 
      the same form (RGN_XXX), are in one place, and that addresses that 
      depend on RGN_XXX are derived from them. 
      
      (This is a necessary but not sufficient patch to allow UML-like 
      operation on IA64). 
      
      Thanks to David Mosberger for catching the change I missed in mmu_context.h.
       
      Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au> 
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      0a41e250
    • B
      [IA64] fix IO_SPACE_SPARSE_ENCODING macro ambiguity · b5f3616b
      Bjorn Helgaas 提交于
      Parenthesize "p" to avoid ambiguity.  No callers have a problem today;
      this is just to clean up the bad form.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      b5f3616b
  24. 19 8月, 2005 1 次提交
  25. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4