1. 17 Mar, 2016 1 commit
    • Rich Felker's avatar
      sh: add device tree support and generic board using device tree · 7480e0aa
      Rich Felker authored
      
      
      Add a new pseudo-board, within the existing SH boards/machine-vectors
      framework, which does not represent any actual hardware but instead
      requires all hardware to be described by the device tree blob provided
      by the boot loader. Changes made are thus non-invasive and do not risk
      breaking support for legacy boards.
      
      New hardware, including the open-hardware J2 and associated SoC
      devices, will use device free from the outset. Legacy SH boards can
      transition to device tree once all their hardware has device tree
      bindings, driver support for device tree, and a dts file for the
      board.
      
      It is intented that, once all boards are supported in the new
      framework, the existing machine-vectors framework should be removed
      and the new device tree setup code integrated directly.
      Signed-off-by: default avatarRich Felker <dalias@libc.org>
      7480e0aa
  2. 30 Jan, 2016 1 commit
    • Toshi Kani's avatar
      arch: Set IORESOURCE_SYSTEM_RAM flag for System RAM · 35d98e93
      Toshi Kani authored
      
      
      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: default avatarToshi Kani <toshi.kani@hpe.com>
      Signed-off-by: default avatarBorislav 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.de
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      35d98e93
  3. 21 Jan, 2014 1 commit
    • Tang Chen's avatar
      memblock: make memblock_set_node() support different memblock_type · e7e8de59
      Tang Chen authored
      
      
      [sfr@canb.auug.org.au: fix powerpc build]
      Signed-off-by: default avatarTang Chen <tangchen@cn.fujitsu.com>
      Reviewed-by: default avatarZhang Yanfei <zhangyanfei@cn.fujitsu.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Rafael J . Wysocki" <rjw@sisk.pl>
      Cc: Chen Tang <imtangchen@gmail.com>
      Cc: Gong Chen <gong.chen@linux.intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jiang Liu <jiang.liu@huawei.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Liu Jiang <jiang.liu@huawei.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Michal Nazarewicz <mina86@mina86.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Taku Izumi <izumi.taku@jp.fujitsu.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Renninger <trenn@suse.de>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
      Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e7e8de59
  4. 14 Jul, 2013 1 commit
    • Paul Gortmaker's avatar
      sh: delete __cpuinit usage from all sh files · 4603f53a
      Paul Gortmaker authored
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      are flagged as __cpuinit  -- so if we remove the __cpuinit from
      arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      content into no-ops as early as possible, since that will get rid
      of these warnings.  In any case, they are temporary and harmless.
      
      This removes all the arch/sh uses of the __cpuinit macros from
      all C files.  Currently sh does not have any __CPUINIT used in
      assembly files.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      
      
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: linux-sh@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      4603f53a
  5. 27 Jun, 2012 1 commit
  6. 08 Dec, 2011 1 commit
    • Tejun Heo's avatar
      SuperH: Use HAVE_MEMBLOCK_NODE_MAP · 534cfbee
      Tejun Heo authored
      
      
      sh doesn't access early_node_map[] directly and enabling
      HAVE_MEMBLOCK_NODE_MAP is trivial - replacing add_active_range() calls
      with memblock_set_node() and selecting HAVE_MEMBLOCK_NODE_MAP is
      enough.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: linux-sh@vger.kernel.org
      534cfbee
  7. 04 Sep, 2011 1 commit
    • Simon Horman's avatar
      sh: kexec: Register crashk_res · 41309b7a
      Simon Horman authored
      
      
      Register crashk_res so that it can be used by kexec-tools
      via /proc/iomem.
      
      The crash kernel resource needs to be requested the same as the
      other kernel resources due to the fact that it's handled during
      the common path for adding new memory ranges, so it's added in to
      __add_active_range() with the others. This ensures that the crash
      kernel is properly reserved regardless of which memory range it's
      placed in.
      Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      41309b7a
  8. 31 Mar, 2011 1 commit
  9. 09 Nov, 2010 1 commit
  10. 26 Oct, 2010 1 commit
  11. 25 Oct, 2010 1 commit
    • Paul Mundt's avatar
      sh: Expose physical addressing mode through cpuinfo. · 2f98492c
      Paul Mundt authored
      
      
      CPUs can be in either the legacy 29-bit or 32-bit physical addressing
      modes. This follows the x86 approach of tracking the phys bits in cpuinfo
      and exposing it to userspace through procfs.
      
      This change was requested to permit kexec-tools to detect the physical
      addressing mode in order to determine the appropriate address mangling.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      2f98492c
  12. 06 Oct, 2010 1 commit
  13. 23 Sep, 2010 1 commit
    • Paul Mundt's avatar
      sh: provide generic arch_debugfs_dir. · 3f224f4e
      Paul Mundt authored
      
      
      While sh previously had its own debugfs root, there now exists a
      common arch_debugfs_dir prototype, so we switch everything over to
      that.  Presumably once more architectures start making use of this
      we'll be able to just kill off the stub kdebugfs wrapper.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      3f224f4e
  14. 14 Jul, 2010 1 commit
  15. 10 May, 2010 4 commits
    • Paul Mundt's avatar
      sh: Ensure active regions have a backing PMB entry. · 21823259
      Paul Mundt authored
      
      
      In the NUMA or memory hot-add case where system memory has been
      partitioned up, we immediately run in to a situation where the existing
      PMB entry doesn't cover the new range (primarily as a result of the entry
      size being shrunk to match the node size early in the initialization). In
      order to fix this up it's necessary to preload a PMB mapping for the new
      range prior to activation in order to circumvent reset by MMU.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      21823259
    • Paul Mundt's avatar
      sh: bootmem refactoring. · 4bc277ac
      Paul Mundt authored
      
      
      This reworks much of the bootmem setup and initialization code allowing
      us to get rid of duplicate work between the NUMA and non-NUMA cases. The
      end result is that we end up with a much more flexible interface for
      supporting more complex topologies (fake NUMA, highmem, etc, etc.) which
      is entirely LMB backed. This is an incremental step for more NUMA work as
      well as gradually enabling migration off of bootmem entirely.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      4bc277ac
    • Paul Mundt's avatar
      sh: rework memory limits to work with LMB. · 5e2ff328
      Paul Mundt authored
      
      
      This reworks the memory limit handling to tie in through the available
      LMB infrastructure. This requires a bit of reordering as we need to have
      all of the LMB reservations taken care of prior to establishing the
      limits.
      
      While we're at it, the crash kernel reservation semantics are reworked
      so that we allocate from the bottom up and reduce the risk of having
      to disable the memory limit due to a clash with the crash kernel
      reservation.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      5e2ff328
    • Paul Mundt's avatar
      sh: enable LMB region setup via machvec. · 19d8f84f
      Paul Mundt authored
      
      
      This plugs in a memory init callback in the machvec to permit boards to
      wire up various bits of memory directly in to LMB. A generic machvec
      implementation is provided that simply wraps around the normal
      Kconfig-derived memory start/size.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      19d8f84f
  16. 07 May, 2010 3 commits
  17. 06 May, 2010 2 commits
  18. 26 Apr, 2010 1 commit
  19. 20 Apr, 2010 1 commit
  20. 02 Mar, 2010 1 commit
  21. 18 Feb, 2010 1 commit
    • Paul Mundt's avatar
      sh: Merge legacy and dynamic PMB modes. · d01447b3
      Paul Mundt authored
      
      
      This implements a bit of rework for the PMB code, which permits us to
      kill off the legacy PMB mode completely. Rather than trusting the boot
      loader to do the right thing, we do a quick verification of the PMB
      contents to determine whether to have the kernel setup the initial
      mappings or whether it needs to mangle them later on instead.
      
      If we're booting from legacy mappings, the kernel will now take control
      of them and make them match the kernel's initial mapping configuration.
      This is accomplished by breaking the initialization phase out in to
      multiple steps: synchronization, merging, and resizing. With the recent
      rework, the synchronization code establishes page links for compound
      mappings already, so we build on top of this for promoting mappings and
      reclaiming unused slots.
      
      At the same time, the changes introduced for the uncached helpers also
      permit us to dynamically resize the uncached mapping without any
      particular headaches. The smallest page size is more than sufficient for
      mapping all of kernel text, and as we're careful not to jump to any far
      off locations in the setup code the mapping can safely be resized
      regardless of whether we are executing from it or not.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      d01447b3
  22. 16 Jan, 2010 1 commit
    • Matt Fleming's avatar
      sh: Add fixed ioremap support · 4d35b93a
      Matt Fleming authored
      
      
      Some devices need to be ioremap'd and accessed very early in the boot
      process. It is not possible to use the standard ioremap() function in
      this case because that requires kmalloc()'ing some virtual address space
      and kmalloc() may not be available so early in boot.
      
      This patch provides fixmap mappings that allow physical address ranges
      to be remapped into the kernel address space during the early boot
      stages.
      Signed-off-by: default avatarMatt Fleming <matt@console-pimps.org>
      4d35b93a
  23. 13 Jan, 2010 1 commit
    • Paul Mundt's avatar
      sh: fixed PMB mode refactoring. · a0ab3668
      Paul Mundt authored
      
      
      This introduces some much overdue chainsawing of the fixed PMB support.
      fixed PMB was introduced initially to work around the fact that dynamic
      PMB mode was relatively broken, though they were never intended to
      converge. The main areas where there are differences are whether the
      system is booted in 29-bit mode or 32-bit mode, and whether legacy
      mappings are to be preserved. Any system booting in true 32-bit mode will
      not care about legacy mappings, so these are roughly decoupled.
      
      Regardless of the entry point, PMB and 32BIT are directly related as far
      as the kernel is concerned, so we also switch back to having one select
      the other.
      
      With legacy mappings iterated through and applied in the initialization
      path it's now possible to finally merge the two implementations and
      permit dynamic remapping overtop of remaining entries regardless of
      whether boot mappings are crafted by hand or inherited from the boot
      loader.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      a0ab3668
  24. 14 Dec, 2009 1 commit
  25. 14 Oct, 2009 1 commit
  26. 10 Oct, 2009 2 commits
  27. 24 Aug, 2009 1 commit
    • Pawel Moll's avatar
      sh: Allow for kernel command line concatenation. · d724a9c9
      Pawel Moll authored
      
      
      So far kernel command line arguments could be passed in by a bootloader
      or defined as CONFIG_CMDLINE, which completely overwriting the first one.
      
      This change allows a developer to declare selected kernel parameters in
      a kernel configuration (eg. project-specific defconfig), retaining
      possibility of passing others by a bootloader.
      
      The obvious examples of the first type are MTD partition or
      bigphysarea-like region definitions, while "debug" option or network
      configuration should be given by a bootloader or a JTAG boot script.
      Signed-off-by: default avatarPawel Moll <pawel.moll@st.com>
      Signed-off-by: default avatarStuart Menefy <stuart.menefy@st.com>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      d724a9c9
  28. 21 Aug, 2009 1 commit
  29. 14 Aug, 2009 1 commit
    • Paul Mundt's avatar
      sh: Track the CPU family in sh_cpuinfo. · e82da214
      Paul Mundt authored
      
      
      This adds a family member to struct sh_cpuinfo, which allows us to fall
      back more on the probe routines to work out what sort of subtype we are
      running on. This will be used by the CPU cache initialization code in
      order to first do family-level initialization, followed by subtype-level
      optimizations.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      e82da214
  30. 03 Jul, 2009 1 commit
  31. 11 Jun, 2009 1 commit
    • Magnus Damm's avatar
      sh: rework mode pin code · 0d4fdbb6
      Magnus Damm authored
      
      
      This patch reworks the mode pin code to keep the pin
      definitions in one place. The mode pins values are now
      the value of the bit instead of bit number.
      
      With this patch in place the sh7785 header file contains
      mode pin comments. The sh7785 clock code and the sh7785lcr
      board code are updated to reflect the new shared mode pins.
      Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      0d4fdbb6
  32. 01 Jun, 2009 1 commit
    • Magnus Damm's avatar
      sh: boot word / mode pin support V2 · eb9b9b56
      Magnus Damm authored
      
      
      Add mode pin support for the SuperH architecture V2.
      
      With this patch applied the board code can add their
      own function to export the cpu mode pin configuration.
      In most cases this will be a constant bitmap, but
      boards that allow reading this from a register can
      instead read out the pin state from hardware.
      
      The code warns if a pin is tested but no board specific
      mode pin function has been provided.
      Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      eb9b9b56
  33. 08 May, 2009 1 commit