1. 17 2月, 2013 2 次提交
    • J
      ARM: 7646/1: mm: use static_vm for managing static mapped areas · 101eeda3
      Joonsoo Kim 提交于
      A static mapped area is ARM-specific, so it is better not to use
      generic vmalloc data structure, that is, vmlist and vmlist_lock
      for managing static mapped area. And it causes some needless overhead and
      reducing this overhead is better idea.
      
      Now, we have newly introduced static_vm infrastructure.
      With it, we don't need to iterate all mapped areas. Instead, we just
      iterate static mapped areas. It helps to reduce an overhead of finding
      matched area. And architecture dependency on vmalloc layer is removed,
      so it will help to maintainability for vmalloc layer.
      Reviewed-by: NNicolas Pitre <nico@linaro.org>
      Acked-by: NRob Herring <rob.herring@calxeda.com>
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NJoonsoo Kim <iamjoonsoo.kim@lge.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      101eeda3
    • J
      ARM: 7645/1: ioremap: introduce an infrastructure for static mapped area · ed8fd218
      Joonsoo Kim 提交于
      In current implementation, we used ARM-specific flag, that is,
      VM_ARM_STATIC_MAPPING, for distinguishing ARM specific static mapped area.
      The purpose of static mapped area is to re-use static mapped area when
      entire physical address range of the ioremap request can be covered
      by this area.
      
      This implementation causes needless overhead for some cases.
      For example, assume that there is only one static mapped area and
      vmlist has 300 areas. Every time we call ioremap, we check 300 areas for
      deciding whether it is matched or not. Moreover, even if there is
      no static mapped area and vmlist has 300 areas, every time we call
      ioremap, we check 300 areas in now.
      
      If we construct a extra list for static mapped area, we can eliminate
      above mentioned overhead.
      With a extra list, if there is one static mapped area,
      we just check only one area and proceed next operation quickly.
      
      In fact, it is not a critical problem, because ioremap is not frequently
      used. But reducing overhead is better idea.
      
      Another reason for doing this work is for removing architecture dependency
      on vmalloc layer. I think that vmlist and vmlist_lock is internal data
      structure for vmalloc layer. Some codes for debugging and stat inevitably
      use vmlist and vmlist_lock. But it is preferable that they are used
      as least as possible in outside of vmalloc.c
      
      Now, I introduce an ARM-specific infrastructure for static mapped area. In
      the following patch, we will use this and resolve above mentioned problem.
      Reviewed-by: NNicolas Pitre <nico@linaro.org>
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NJoonsoo Kim <iamjoonsoo.kim@lge.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      ed8fd218
  2. 26 11月, 2012 1 次提交
  3. 28 9月, 2012 1 次提交
  4. 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
  5. 29 6月, 2012 1 次提交
  6. 29 3月, 2012 2 次提交
  7. 24 3月, 2012 1 次提交
  8. 07 3月, 2012 1 次提交
  9. 03 2月, 2012 1 次提交
    • R
      Revert "ARM: 7304/1: ioremap: fix boundary check when reusing static mapping" · 97f10409
      Russell King 提交于
      This reverts commit 3c424f35.
      
      Joachim Eastwood reports:
      | "ARM: 7304/1: ioremap: fix boundary check when reusing static mapping"
      | Commit: 3c424f35 in Linus master
      |
      | Breaks booting on my custom AT91RM9200 board.
      | There isn't any error messages or anything that indicates what goes
      | wrong it just stops after; Uncompressing Linux... done, booting the
      | kernel.
      |
      | Reverting it makes my board boot again.
      
      and further debugging reveals:
      
      ioremap: pfn=fffff phys=fffff000 offset=400 size=1000
      ioremap: area c3ffdfc0: phys_addr=200000 pfn=200 size=4000
      ioremap: found: addr fef74000 => fed73000 => fed73400
      
      Clearly, an area for pfn 0x200, 16K can't ever satisfy a request for pfn
      0xfffff.  This happens because the changed if statement becomes:
      
                      if (0x00200 > 0xfffff ||
                          0xfffff000 + 0x400 + 0x1000-1 > 0x00200000 + 0x4000-1)
      and therefore:
                      if (0x00200 > 0xfffff ||
                          0x000003ff > 0x00203fff)
      
      The if condition fails, and so we _believe_ that the SRAM mapping fits
      our request.  Clearly that's totally bogus.
      
      Moreover, the original premise of the 'fix' patch was wrong:
      |    The condition checking boundaries of the requested and existing
      |    mappings didn't take in-page offset into consideration though,
      |    which lead to obscure and hard to debug problems when requested
      |    mapping crossed end of the static one.
      
      as the code immediately above this loop does:
      
              size = PAGE_ALIGN(offset + size);
      
      so 'size' already contains the requested offset into the page.
      
      So, revert the broken 'fix'.
      Acked-by: NNicolas Pitre <nico@linaro.org>
      97f10409
  10. 28 1月, 2012 1 次提交
  11. 08 12月, 2011 2 次提交
    • C
      ARM: LPAE: Page table maintenance for the 3-level format · da028779
      Catalin Marinas 提交于
      This patch modifies the pgd/pmd/pte manipulation functions to support
      the 3-level page table format. Since there is no need for an 'ext'
      argument to cpu_set_pte_ext(), this patch conditionally defines a
      different prototype for this function when CONFIG_ARM_LPAE.
      
      The patch also introduces the L_PGD_SWAPPER flag to mark pgd entries
      pointing to pmd tables pre-allocated in the swapper_pg_dir and avoid
      trying to free them at run-time. This flag is 0 with the classic page
      table format.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      da028779
    • C
      ARM: pgtable: Fix compiler warning in ioremap.c introduced by nopud · 03a6b827
      Catalin Marinas 提交于
      With the arch/arm code conversion to pgtable-nopud.h, the section and
      supersection (un|re)map code triggers compiler warnings on UP systems.
      This is caused by pmd_offset() being given a pgd_t argument rather than
      a pud_t one. This patch makes the necessary conversion with the
      assumption that the pud is folded into the pgd. The page table setting
      code only loops over the pmd which is enough with the classic page
      tables. This code is not compiled when LPAE is enabled.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      03a6b827
  12. 27 11月, 2011 2 次提交
  13. 23 10月, 2011 1 次提交
  14. 24 12月, 2010 1 次提交
  15. 24 11月, 2010 1 次提交
  16. 13 10月, 2010 1 次提交
  17. 27 7月, 2010 1 次提交
  18. 22 6月, 2010 1 次提交
    • R
      ARM: Prohibit ioremap() on kernel managed RAM · 309caa9c
      Russell King 提交于
      ARMv6 and above have a restriction whereby aliasing virtual:physical
      mappings must not have differing memory type and sharability
      attributes.  Strictly, this covers the memory type (strongly ordered,
      device, memory), cache attributes (uncached, write combine, write
      through, write back read alloc, write back write alloc) and the
      shared bit.
      
      However, using ioremap() and its variants on system RAM results in
      mappings which differ in these attributes from the main system RAM
      mapping.  Other architectures which similar restrictions approch this
      problem in the same way - they do not permit ioremap on main system
      RAM.
      
      Make ARM behave in the same way, with a WARN_ON() such that users can
      be traced and an alternative approach found.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      309caa9c
  19. 16 2月, 2010 1 次提交
  20. 19 5月, 2009 1 次提交
    • H
      omap iommu: simple virtual address space management · 69d3a84a
      Hiroshi DOYU 提交于
      This patch provides a device drivers, which has a omap iommu, with
      address mapping APIs between device virtual address(iommu), physical
      address and MPU virtual address.
      
      There are 4 possible patterns for iommu virtual address(iova/da) mapping.
      
          |iova/			  mapping		iommu_		page
          | da	pa	va	(d)-(p)-(v)		function	type
        ---------------------------------------------------------------------------
        1 | c		c	c	 1 - 1 - 1	  _kmap() / _kunmap()	s
        2 | c		c,a	c	 1 - 1 - 1	_kmalloc()/ _kfree()	s
        3 | c		d	c	 1 - n - 1	  _vmap() / _vunmap()	s
        4 | c		d,a	c	 1 - n - 1	_vmalloc()/ _vfree()	n*
      
          'iova':	device iommu virtual address
          'da':	alias of 'iova'
          'pa':	physical address
          'va':	mpu virtual address
      
          'c':	contiguous memory area
          'd':	dicontiguous memory area
          'a':	anonymous memory allocation
          '()':	optional feature
      
          'n':	a normal page(4KB) size is used.
          's':	multiple iommu superpage(16MB, 1MB, 64KB, 4KB) size is used.
      
          '*':	not yet, but feasible.
      Signed-off-by: NHiroshi DOYU <Hiroshi.DOYU@nokia.com>
      69d3a84a
  21. 26 1月, 2009 1 次提交
  22. 01 10月, 2008 1 次提交
  23. 06 9月, 2008 1 次提交
  24. 05 9月, 2008 1 次提交
    • R
      [ARM] sparse: fix several warnings · 09d9bae0
      Russell King 提交于
      arch/arm/kernel/process.c:270:6: warning: symbol 'show_fpregs' was not declared. Should it be static?
      
      This function isn't used, so can be removed.
      
      arch/arm/kernel/setup.c:532:9: warning: symbol 'len' shadows an earlier one
      arch/arm/kernel/setup.c:524:6: originally declared here
      
      A function containing two 'len's.
      
      arch/arm/mm/fault-armv.c:188:13: warning: symbol 'check_writebuffer_bugs' was not declared. Should it be static?
      arch/arm/mm/mmap.c:122:5: warning: symbol 'valid_phys_addr_range' was not declared. Should it be static?
      arch/arm/mm/mmap.c:137:5: warning: symbol 'valid_mmap_phys_addr_range' was not declared. Should it be static?
      
      Missing includes.
      
      arch/arm/kernel/traps.c:71:77: warning: Using plain integer as NULL pointer
      arch/arm/mm/ioremap.c:355:46: error: incompatible types in comparison expression (different address spaces)
      
      Sillies.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      09d9bae0
  25. 01 9月, 2008 1 次提交
  26. 03 8月, 2008 1 次提交
  27. 06 2月, 2008 1 次提交
  28. 12 7月, 2007 1 次提交
  29. 21 5月, 2007 1 次提交
  30. 06 5月, 2007 1 次提交
    • R
      [ARM] mm 10: allow memory type to be specified with ioremap · 3603ab2b
      Russell King 提交于
      __ioremap() took a set of page table flags (specifically the cacheable
      and bufferable bits) to control the mapping type.  However, with
      the advent of ARMv6, this is far too limited.
      
      Replace the page table flags with a memory type index, so that the
      desired attributes can be selected from the mem_type table.
      
      Finally, to prevent silent miscompilation due to the differing
      arguments, rename the __ioremap() and __ioremap_pfn() functions.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      3603ab2b
  31. 22 4月, 2007 3 次提交
  32. 26 1月, 2007 1 次提交
  33. 18 12月, 2006 1 次提交
  34. 13 12月, 2006 1 次提交