1. 09 7月, 2015 1 次提交
    • A
      MIPS: bootmem: Don't use memory holes for page bitmap · a6335fa1
      Alexander Sverdlin 提交于
      Commit f9a7febd leads to a fact that mapstart and therefore a page bitmap for
      bootmem allocator immediately follows initrd_end. This doesn't always work
      well on Octeon, where there are holes in PFN ranges (refer to 5b3b1688 and
      4MB-aligned PFN allocation). Depending on the inird location it could happen,
      that mapstart would be in an area not allocated by plat_mem_setup() in
      arch/mips/cavium-octeon/setup.c, but in the alignment hole between initrd and
      the next PFN area. Later on this memory will be unconditionally made available
      to buddy allocator at the end of free_all_bootmem_core() (mm/bootmem.c).
      All of this results in Linux using the memory not designated for Linux in
      Octeon's plat_mem_setup(), which in turn means corruption of the memory used
      by another OS/baremetal code on the same SoC.
      
      It doesn't look to me as a problem of Octeon platform code, but rather as an
      inability of f9a7febd to deal correctly with the fragmented memory-mappings.
      Proposed fix moves the check for initrd address to the same calculation-loop
      in bootmem_init() (arch/mips/kernel/setup.c), which also accounts for kernel
      code location. This should result in mapstart located starting from the first
      PFN area after kernel code AND initrd.
      Signed-off-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com>
      Cc: linux-mips@linux-mips.org
      Cc: David Daney <david.daney@cavium.com>
      Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Yusuf Khan <yusuf.khan@nokia.com>
      Cc: Michael Kreuzer <michael.kreuzer@nokia.com>
      Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
      Patchwork: https://patchwork.linux-mips.org/patch/10594/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a6335fa1
  2. 31 3月, 2015 1 次提交
  3. 13 12月, 2014 1 次提交
  4. 25 11月, 2014 1 次提交
  5. 24 11月, 2014 3 次提交
  6. 29 10月, 2014 1 次提交
  7. 22 9月, 2014 1 次提交
  8. 31 7月, 2014 2 次提交
    • H
      MIPS: Add NUMA support for Loongson-3 · c4617318
      Huacai Chen 提交于
      Multiple Loongson-3A chips can be interconnected with HT0-bus. This is
      a CC-NUMA system that every chip (node) has its own local memory and
      cache coherency is maintained by hardware. The 64-bit physical memory
      address format is as follows:
      
      0x-0000-YZZZ-ZZZZ-ZZZZ
      
      The high 16 bits should be 0, which means the real physical address
      supported by Loongson-3 is 48-bit. The "Y" bits is the base address of
      each node, which can be also considered as the node-id. The "Z" bits is
      the address offset within a node, which means every node has a 44 bits
      address space.
      
      Macros XPHYSADDR and MAX_PHYSMEM_BITS are modified unconditionally,
      because many other MIPS CPUs have also extended their address spaces.
      Signed-off-by: NHuacai Chen <chenhc@lemote.com>
      Cc: John Crispin <john@phrozen.org>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: linux-mips@linux-mips.org
      Cc: Fuxin Zhang <zhangfx@lemote.com>
      Cc: Zhangjin Wu <wuzhangjin@gmail.com>
      Patchwork: https://patchwork.linux-mips.org/patch/7187/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c4617318
    • H
      MIPS: Support hard limit of cpu count (nr_cpu_ids) · 0f3f506b
      Huacai Chen 提交于
      On MIPS currently, only the soft limit of cpu count (maxcpus) has its
      effect, this patch enable the hard limit (nr_cpus) as well. Processor
      cores which greater than maxcpus and less than nr_cpus can be taken up
      via cpu hotplug. The code is borrowed from X86.
      Signed-off-by: NHuacai Chen <chenhc@lemote.com>
      Reviewed-by: NAndreas Herrmann <andreas.herrmann@caviumnetworks.com>
      Cc: John Crispin <john@phrozen.org>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: linux-mips@linux-mips.org
      Cc: Fuxin Zhang <zhangfx@lemote.com>
      Cc: Zhangjin Wu <wuzhangjin@gmail.com>
      Patchwork: https://patchwork.linux-mips.org/patch/7183/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0f3f506b
  9. 30 10月, 2013 1 次提交
  10. 06 9月, 2013 1 次提交
  11. 08 5月, 2013 1 次提交
  12. 19 2月, 2013 2 次提交
  13. 01 2月, 2013 1 次提交
  14. 13 12月, 2012 1 次提交
  15. 24 11月, 2012 1 次提交
    • R
      MIPS: Merge overlapping bootmem ranges · 0ec7ec75
      Ralf Baechle 提交于
      Without this, we may end up with something like this in /proc/iomem:
      
      01100000-014fffff : System RAM
        01100000-013bf48f : Kernel code
        013bf490-0149e01f : Kernel data
      01500000-0c0fffff : System RAM
      
      but the two System RAM ranges should be one single range.  This particular
      case will result in kexec failure on Octeon systems if the kernel being
      loaded by kexec is bigger than the already running kernel.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0ec7ec75
  16. 17 5月, 2012 1 次提交
  17. 29 3月, 2012 1 次提交
  18. 09 12月, 2011 1 次提交
    • T
      mips: Use HAVE_MEMBLOCK_NODE_MAP · 9d15ffc8
      Tejun Heo 提交于
      mips used early_node_map[] just to prime free_area_init_nodes().  Now
      memblock can be used for the same purpose and early_node_map[] is
      scheduled to be dropped.  Use memblock instead.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: linux-mips@linux-mips.org
      9d15ffc8
  19. 08 12月, 2011 1 次提交
    • D
      MIPS: Handle initmem in systems with kernel not in add_memory_region() mem · 43064c0c
      David Daney 提交于
      This patch addresses a couple of related problems:
      
      1) The kernel may reside in physical memory outside of the ranges set
         by plat_mem_setup().  If this is the case, init mem cannot be
         reused as it resides outside of the range of pages that the kernel
         memory allocators control.
      
      2) initrd images might be loaded in physical memory outside of the
         ranges set by plat_mem_setup().  The memory likewise cannot be
         reused.  The patch doesn't handle this specific case, but the
         infrastructure is useful for future patches that do.
      
      The crux of the problem is that there are memory regions that need be
      memory_present(), but that cannot be free_bootmem() at the time of
      arch_mem_init().  We create a new type of memory (BOOT_MEM_INIT_RAM)
      for use with add_memory_region().  Then arch_mem_init() adds the init
      mem with this type if the init mem is not already covered by existing
      ranges.
      
      When memory is being freed into the bootmem allocator, we skip the
      BOOT_MEM_INIT_RAM ranges so they are not clobbered, but we do signal
      them as memory_present().  This way when they are later freed, the
      necessary memory manager structures have initialized and the Sparse
      allocater is prevented from crashing.
      
      The Octeon specific code that handled this case is removed, because
      the new general purpose code handles the case.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      To: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/1988/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      43064c0c
  20. 01 11月, 2011 1 次提交
  21. 19 1月, 2011 1 次提交
  22. 30 10月, 2010 1 次提交
  23. 22 10月, 2010 1 次提交
  24. 22 5月, 2010 1 次提交
    • K
      MIPS: nofpu and nodsp only affect CPU0 · 0103d23f
      Kevin Cernekee 提交于
      The "nofpu" and "nodsp" kernel command line options currently do not
      affect CPUs that are brought online later in the boot process or
      hotplugged at runtime.  It is desirable to apply the nofpu/nodsp options
      to all CPUs in the system, so that surprising results are not seen when
      a process migrates from one CPU to another.
      
      [Ralf: Moved definitions of mips_fpu_disabled, fpu_disable,
      mips_dsp_disabled and dsp_disable from setup.c to cpu-probe.c to allow
      making mips_fpu_disabled and mips_dsp_disabled static.]
      Signed-off-by: NKevin Cernekee <cernekee@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: http://patchwork.linux-mips.org/patch/1169/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0103d23f
  25. 17 12月, 2009 3 次提交
  26. 18 9月, 2009 1 次提交
  27. 30 3月, 2009 1 次提交
  28. 28 10月, 2008 1 次提交
  29. 06 9月, 2008 1 次提交
  30. 26 8月, 2008 1 次提交
  31. 16 7月, 2008 2 次提交
  32. 12 5月, 2008 1 次提交
  33. 08 2月, 2008 1 次提交
    • B
      Introduce flags for reserve_bootmem() · 72a7fe39
      Bernhard Walle 提交于
      This patchset adds a flags variable to reserve_bootmem() and uses the
      BOOTMEM_EXCLUSIVE flag in crashkernel reservation code to detect collisions
      between crashkernel area and already used memory.
      
      This patch:
      
      Change the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE.
      If that flag is set, the function returns with -EBUSY if the memory already
      has been reserved in the past.  This is to avoid conflicts.
      
      Because that code runs before SMP initialisation, there's no race condition
      inside reserve_bootmem_core().
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: fix powerpc build]
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Cc: <linux-arch@vger.kernel.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Vivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      72a7fe39