1. 23 1月, 2012 1 次提交
    • R
      ARM: add dma coherent region reporting via procfs · 45cd5290
      Russell King 提交于
      Add a new seqfile for reporting coherent DMA allocations.  This contains
      the address range, size and the function which was used to allocate
      each region, allowing these allocations to be viewed in much the same
      way as /proc/vmallocinfo.
      
      The DMA coherent region has limited space, so this allows allocation
      failures to be viewed, as well as finding out how much space is being
      used.
      
      Make sure this file is only readable by root - same as vmallocinfo - to
      prevent information leakage.
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      45cd5290
  2. 13 1月, 2012 1 次提交
    • R
      ARM: Add arm_memblock_steal() to allocate memory away from the kernel · 716a3dc2
      Russell King 提交于
      Several platforms are now using the memblock_alloc+memblock_free+
      memblock_remove trick to obtain memory which won't be mapped in the
      kernel's page tables.  Most platforms do this (correctly) in the
      ->reserve callback.  However, OMAP has started to call these functions
      outside of this callback, and this is extremely unsafe - memory will
      not be unmapped, and could well be given out after memblock is no
      longer responsible for its management.
      
      So, provide arm_memblock_steal() to perform this function, and ensure
      that it panic()s if it is used inappropriately.  Convert everyone
      over, including OMAP.
      
      As a result, OMAP with OMAP4_ERRATA_I688 enabled will panic on boot
      with this change.  Mark this option as BROKEN and make it depend on
      BROKEN.  OMAP needs to be fixed, or 137d105d (ARM: OMAP4: Fix
      errata i688 with MPU interconnect barriers.) reverted until such
      time it can be fixed correctly.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      716a3dc2
  3. 24 12月, 2011 1 次提交
    • D
      ARM: 7197/1: errata: Remove SMP dependency for erratum 751472 · ba90c516
      Dave Martin 提交于
      Activation conditions for a workaround should not be encoded in the
      workaround's direct dependencies if this makes otherwise reasonable
      configuration choices impossible.
      
      This patches uses the SMP/UP patching facilities instead to compile
      out the workaround if the configuration means that it is definitely
      not needed.
      
      This means that configs for buggy silicon can simply select
      ARM_ERRATA_751472, without preventing a UP kernel from being built
      or duplicatiing knowledge about when to activate the workaround.
      This seems the correct way to do things, because the erratum is a
      property of the silicon, irrespective of what the kernel config
      happens to be.
      Signed-off-by: NDave Martin <dave.martin@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      ba90c516
  4. 19 12月, 2011 1 次提交
  5. 11 12月, 2011 1 次提交
  6. 09 12月, 2011 3 次提交
    • T
      memblock: s/memblock_analyze()/memblock_allow_resize()/ and update users · 1aadc056
      Tejun Heo 提交于
      The only function of memblock_analyze() is now allowing resize of
      memblock region arrays.  Rename it to memblock_allow_resize() and
      update its users.
      
      * The following users remain the same other than renaming.
      
        arm/mm/init.c::arm_memblock_init()
        microblaze/kernel/prom.c::early_init_devtree()
        powerpc/kernel/prom.c::early_init_devtree()
        openrisc/kernel/prom.c::early_init_devtree()
        sh/mm/init.c::paging_init()
        sparc/mm/init_64.c::paging_init()
        unicore32/mm/init.c::uc32_memblock_init()
      
      * In the following users, analyze was used to update total size which
        is no longer necessary.
      
        powerpc/kernel/machine_kexec.c::reserve_crashkernel()
        powerpc/kernel/prom.c::early_init_devtree()
        powerpc/mm/init_32.c::MMU_init()
        powerpc/mm/tlb_nohash.c::__early_init_mmu()  
        powerpc/platforms/ps3/mm.c::ps3_mm_add_memory()
        powerpc/platforms/embedded6xx/wii.c::wii_memory_fixups()
        sh/kernel/machine_kexec.c::reserve_crashkernel()
      
      * x86/kernel/e820.c::memblock_x86_fill() was directly setting
        memblock_can_resize before populating memblock and calling analyze
        afterwards.  Call memblock_allow_resize() before start populating.
      
      memblock_can_resize is now static inside memblock.c.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      1aadc056
    • T
      memblock: Kill memblock_init() · fe091c20
      Tejun Heo 提交于
      memblock_init() initializes arrays for regions and memblock itself;
      however, all these can be done with struct initializers and
      memblock_init() can be removed.  This patch kills memblock_init() and
      initializes memblock with struct initializer.
      
      The only difference is that the first dummy entries don't have .nid
      set to MAX_NUMNODES initially.  This doesn't cause any behavior
      difference.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      fe091c20
    • T
      memblock: Fix include breakages caused by 24aa0788 · 1c16d242
      Tejun Heo 提交于
      24aa0788 (memblock, x86: Replace memblock_x86_reserve/free_range()
      with generic ones) removed arch/x86/include/asm/memblock.h and dropped
      its inclusion from include/linux/memblock.h which breaks other
      architectures which depended on the generic memblock.h pulling in the
      arch specific one.
      
      However, the proper fix isn't adding back the asm inclusion.  memblock
      doesn't have any arch dependent part and doesn't need arch specific
      header file and asm/memblock.h files are either practically empty or
      contain mostly unrelated arch specific stuff.
      
      * In microblaze, sh, powerpc, sparc and openrisc, asm/memblock.h is
        either empty or just contains unused MEMBLOCK_DBG() macro.  Remove
        them.
      
      * In arm and unicore32, asm/memblock.h contains arch specific stuff.
        Include it directly from its users.  It might be a good idea to
        rename the header file to avoid confusion.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: N"H. Peter Anvin" <hpa@zytor.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      1c16d242
  7. 08 12月, 2011 10 次提交
  8. 06 12月, 2011 6 次提交
  9. 29 11月, 2011 1 次提交
  10. 27 11月, 2011 5 次提交
  11. 21 11月, 2011 2 次提交
  12. 19 11月, 2011 2 次提交
    • N
      ARM: move initialization of the high_memory variable earlier · 55a8173c
      Nicolas Pitre 提交于
      Some upcoming changes must know the VMALLOC_START value, which is based
      on high_memory, before bootmem_init() is called.
      
      The best location to set it is in sanity_check_meminfo() where the needed
      computation is already done, and in the non MMU case it is trivial to do
      now that the meminfo array is already sorted at that point.
      Signed-off-by: NNicolas Pitre <nicolas.pitre@linaro.org>
      55a8173c
    • N
      ARM: sort the meminfo array earlier · 27a3f0e9
      Nicolas Pitre 提交于
      The meminfo array has to be sorted before sanity_check_meminfo() in
      arch/arm/mm/mmu.c is called for it to work properly.  This also allows
      for a simpler find_limits() in arch/arm/mm/init.c.
      
      The sort is moved to arch/arm/kernel/setup.c because that's where the
      meminfo array is populated.  Eventually this should be improved upon
      to make the memory bank parser a bit more robust against problems
      such as overlapping memory ranges.
      Signed-off-by: NNicolas Pitre <nicolas.pitre@linaro.org>
      27a3f0e9
  13. 11 11月, 2011 1 次提交
  14. 01 11月, 2011 2 次提交
  15. 31 10月, 2011 3 次提交