1. 10 2月, 2016 1 次提交
    • P
      MIPS: Fix early CM probing · 3af5a67c
      Paul Burton 提交于
      Commit c014d164 ("MIPS: Add platform callback before initializing
      the L2 cache") added a platform_early_l2_init function in order to allow
      platforms to probe for the CM before L2 initialisation is performed, so
      that CM GCRs are available to mips_sc_probe.
      
      That commit actually fails to do anything useful, since it checks
      mips_cm_revision to determine whether it should call mips_cm_probe but
      the result of mips_cm_revision will always be 0 until mips_cm_probe has
      been called. Thus the "early" mips_cm_probe call never occurs.
      
      Fix this & drop the useless weak platform_early_l2_init function by
      simply calling mips_cm_probe from setup_arch. For platforms that don't
      select CONFIG_MIPS_CM this will be a no-op, and for those that do it
      removes the requirement for them to call mips_cm_probe manually
      (although doing so isn't harmful for now).
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Reviewed-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Jaedon Shin <jaedon.shin@gmail.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Jonas Gorski <jogo@openwrt.org>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/12475/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      3af5a67c
  2. 30 1月, 2016 1 次提交
    • T
      arch: Set IORESOURCE_SYSTEM_RAM flag for System RAM · 35d98e93
      Toshi Kani 提交于
      Set IORESOURCE_SYSTEM_RAM in flags of resource ranges with
      "System RAM", "Kernel code", "Kernel data", and "Kernel bss".
      
      Note that:
      
       - IORESOURCE_SYSRAM (i.e. modifier bit) is set in flags when
         IORESOURCE_MEM is already set. IORESOURCE_SYSTEM_RAM is defined
         as (IORESOURCE_MEM|IORESOURCE_SYSRAM).
      
       - Some archs do not set 'flags' for children nodes, such as
         "Kernel code".  This patch does not change 'flags' in this
         case.
      Signed-off-by: NToshi Kani <toshi.kani@hpe.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: linux-arch@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-mips@linux-mips.org
      Cc: linux-mm <linux-mm@kvack.org>
      Cc: linux-parisc@vger.kernel.org
      Cc: linux-s390@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: sparclinux@vger.kernel.org
      Link: http://lkml.kernel.org/r/1453841853-11383-7-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      35d98e93
  3. 24 1月, 2016 1 次提交
  4. 12 11月, 2015 1 次提交
  5. 11 11月, 2015 1 次提交
    • J
      MIPS: Make the kernel arguments from dtb available · 2024972e
      Jonas Gorski 提交于
      Similar to how arm allows using selecting between bootloader arguments,
      dtb arguments and both, allow to select them on mips. But since we have
      less control over the place of the dtb do not modify it but instead use
      the boot_command_line for merging them.
      
      The default is "use bootloader arguments" to keep the current behaviour
      as default.
      Signed-off-by: NJonas Gorski <jogo@openwrt.org>
      Cc: linux-mips@linux-mips.org
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: John Crispin <blogic@openwrt.org>
      Cc: Ganesan Ramalingam <ganesanr@broadcom.com>
      Cc: Jayachandran C <jchandra@broadcom.com>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: James Hartley <james.hartley@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11284/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      2024972e
  6. 26 10月, 2015 1 次提交
    • P
      MIPS: Declare mips_debugfs_dir in a header · 75dcfc1d
      Paul Burton 提交于
      We have many extern declarations of mips_debugfs_dir through arch/mips/
      in various C files. Unify them by declaring mips_debugfs_dir in a
      header, including it in each affected C file & removing the duplicate
      declarations.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Alexander Sverdlin <alexander.sverdlin@nokia.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: Joe Perches <joe@perches.com>
      Cc: Jaedon Shin <jaedon.shin@gmail.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: David Daney <david.daney@cavium.com>
      Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: James Cowgill <James.Cowgill@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11181/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      75dcfc1d
  7. 22 9月, 2015 1 次提交
  8. 07 8月, 2015 1 次提交
  9. 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
  10. 31 3月, 2015 1 次提交
  11. 13 12月, 2014 1 次提交
  12. 25 11月, 2014 1 次提交
  13. 24 11月, 2014 3 次提交
  14. 29 10月, 2014 1 次提交
  15. 22 9月, 2014 1 次提交
  16. 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
  17. 30 10月, 2013 1 次提交
  18. 06 9月, 2013 1 次提交
  19. 08 5月, 2013 1 次提交
  20. 19 2月, 2013 2 次提交
  21. 01 2月, 2013 1 次提交
  22. 13 12月, 2012 1 次提交
  23. 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
  24. 17 5月, 2012 1 次提交
  25. 29 3月, 2012 1 次提交
  26. 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
  27. 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
  28. 01 11月, 2011 1 次提交
  29. 19 1月, 2011 1 次提交
  30. 30 10月, 2010 1 次提交
  31. 22 10月, 2010 1 次提交
  32. 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
  33. 17 12月, 2009 3 次提交
  34. 18 9月, 2009 1 次提交