1. 21 5月, 2012 1 次提交
  2. 28 4月, 2012 1 次提交
    • S
      ARM: 7401/1: mm: Fix section mismatches · 14904927
      Stephen Boyd 提交于
      WARNING: vmlinux.o(.text+0x111b8): Section mismatch in reference
      from the function arm_memory_present() to the function
      .init.text:memory_present()
      The function arm_memory_present() references
      the function __init memory_present().
      This is often because arm_memory_present lacks a __init
      annotation or the annotation of memory_present is wrong.
      
      WARNING: arch/arm/mm/built-in.o(.text+0x1edc): Section mismatch
      in reference from the function alloc_init_pud() to the function
      .init.text:alloc_init_section()
      The function alloc_init_pud() references
      the function __init alloc_init_section().
      This is often because alloc_init_pud lacks a __init
      annotation or the annotation of alloc_init_section is wrong.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      14904927
  3. 24 3月, 2012 1 次提交
  4. 10 2月, 2012 1 次提交
  5. 20 1月, 2012 1 次提交
  6. 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
  7. 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
  8. 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
  9. 01 11月, 2011 1 次提交
  10. 02 10月, 2011 1 次提交
  11. 04 9月, 2011 1 次提交
  12. 22 8月, 2011 1 次提交
  13. 09 8月, 2011 1 次提交
  14. 19 7月, 2011 2 次提交
  15. 12 7月, 2011 1 次提交
  16. 08 7月, 2011 2 次提交
  17. 11 6月, 2011 1 次提交
  18. 06 6月, 2011 1 次提交
  19. 26 5月, 2011 1 次提交
    • W
      ARM: 6913/1: sparsemem: allow pfn_valid to be overridden when using SPARSEMEM · 7b7bf499
      Will Deacon 提交于
      In commit eb33575c ("[ARM] Double check memmap is actually valid with a
      memmap has unexpected holes V2"), a new function, memmap_valid_within,
      was introduced to mmzone.h so that holes in the memmap which pass
      pfn_valid in SPARSEMEM configurations can be detected and avoided.
      
      The fix to this problem checks that the pfn <-> page linkages are
      correct by calculating the page for the pfn and then checking that
      page_to_pfn on that page returns the original pfn. Unfortunately, in
      SPARSEMEM configurations, this results in reading from the page flags to
      determine the correct section. Since the memmap here has been freed,
      junk is read from memory and the check is no longer robust.
      
      In the best case, reading from /proc/pagetypeinfo will give you the
      wrong answer. In the worst case, you get SEGVs, Kernel OOPses and hung
      CPUs. Furthermore, ioremap implementations that use pfn_valid to
      disallow the remapping of normal memory will break.
      
      This patch allows architectures to provide their own pfn_valid function
      instead of using the default implementation used by sparsemem. The
      architecture-specific version is aware of the memmap state and will
      return false when passed a pfn for a freed page within a valid section.
      Acked-by: NMel Gorman <mgorman@suse.de>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Tested-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      7b7bf499
  20. 25 5月, 2011 1 次提交
    • D
      arch, mm: filter disallowed nodes from arch specific show_mem functions · 7bf02ea2
      David Rientjes 提交于
      Architectures that implement their own show_mem() function did not pass
      the filter argument to show_free_areas() to appropriately avoid emitting
      the state of nodes that are disallowed in the current context.  This patch
      now passes the filter argument to show_free_areas() so those nodes are now
      avoided.
      
      This patch also removes the show_free_areas() wrapper around
      __show_free_areas() and converts existing callers to pass an empty filter.
      
      ia64 emits additional information for each node, so skip_free_areas_zone()
      must be made global to filter disallowed nodes and it is converted to use
      a nid argument rather than a zone for this use case.
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Bottomley <jejb@parisc-linux.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7bf02ea2
  21. 23 5月, 2011 1 次提交
    • G
      arm/dt: probe for platforms via the device tree · 93c02ab4
      Grant Likely 提交于
      If a dtb is passed to the kernel then the kernel needs to iterate
      through compiled-in mdescs looking for one that matches and move the
      dtb data to a safe location before it gets accidentally overwritten by
      the kernel.
      
      This patch creates a new function, setup_machine_fdt() which is
      analogous to the setup_machine_atags() created in the previous patch.
      It does all the early setup needed to use a device tree machine
      description.
      
      v5: - Print warning with neither dtb nor atags are passed to the kernel
          - Fix bug in setting of __machine_arch_type to the selected machine,
            not just the last machine in the list.
      Reported-by: NTixy <tixy@yxit.co.uk>
          - Copy command line directly into boot_command_line instead of cmd_line
      v4: - Dump some output when a matching machine_desc cannot be found
      v3: - Added processing of reserved list.
          - Backed out the v2 change that copied instead of reserved the
            dtb.  dtb is reserved again and the real problem was fixed by
            using alloc_bootmem_align() for early allocation of RAM for
            unflattening the tree.
          - Moved cmd_line and initrd changes to earlier patch to make series
            bisectable.
      v2: Changed to save the dtb by copying into an allocated buffer.
          - Since the dtb will very likely be passed in the first 16k of ram
            where the interrupt vectors live, memblock_reserve() is
            insufficient to protect the dtb data.
      
      [based on work originally written by Jeremy Kerr <jeremy.kerr@canonical.com>]
      Tested-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NNicolas Pitre <nicolas.pitre@linaro.org>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      93c02ab4
  22. 12 5月, 2011 2 次提交
  23. 11 5月, 2011 1 次提交
  24. 25 3月, 2011 1 次提交
  25. 15 2月, 2011 1 次提交
  26. 31 1月, 2011 1 次提交
  27. 28 10月, 2010 7 次提交
  28. 13 10月, 2010 1 次提交
    • Y
      memblock, bootmem: Round pfn properly for memory and reserved regions · c7fc2de0
      Yinghai Lu 提交于
      We need to round memory regions correctly -- specifically, we need to
      round reserved region in the more expansive direction (lower limit
      down, upper limit up) whereas usable memory regions need to be rounded
      in the more restrictive direction (lower limit up, upper limit down).
      
      This introduces two set of inlines:
      
      	memblock_region_memory_base_pfn()
      	memblock_region_memory_end_pfn()
      	memblock_region_reserved_base_pfn()
      	memblock_region_reserved_end_pfn()
      
      Although they are antisymmetric (and therefore are technically
      duplicates) the use of the different inlines explicitly documents the
      programmer's intention.
      
      The lack of proper rounding caused a bug on ARM, which was then found
      to also affect other architectures.
      Reported-by: NRussell King <rmk@arm.linux.org.uk>
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <4CB4CDFD.4020105@kernel.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      c7fc2de0