1. 21 1月, 2010 4 次提交
    • P
      sh: Kill off the special uncached section and fixmap. · 2dc2f8e0
      Paul Mundt 提交于
      Now that cached_to_uncached works as advertized in 32-bit mode and we're
      never going to be able to map < 16MB anyways, there's no need for the
      special uncached section. Kill it off.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      2dc2f8e0
    • P
      sh: Track the uncached mapping size. · 3125ee72
      Paul Mundt 提交于
      This provides a variable for tracking the uncached mapping size, and uses
      it for pretty printing the uncached lowmem range. Beyond this, we'll also
      be building on top of this for figuring out from where the remainder of
      P2 becomes usable when constructing unrelated mappings.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      3125ee72
    • P
      sh: Rework P2 to only include kernel text. · 2023b843
      Paul Mundt 提交于
      This effectively neutralizes P2 by getting rid of P1 identity mapping
      for all available memory and instead only establishes a single unbuffered
      PMB entry (16MB -- the smallest available) that covers the kernel.
      
      As using segmentation for abusing caching attributes in drivers is no
      longer supported (and there are no drivers that can be enabled in 32-bit
      mode that do this), this provides us with all of the uncached access
      needs by the kernel itself.
      
      Drivers and their ilk need to specify their caching attributes when
      remapping through page tables, as usual.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      2023b843
    • P
      sh: initial PMB mapping iteration by helper macro. · 77c2019f
      Paul Mundt 提交于
      All of the cached/uncached mapping setup is duplicated for each size, and
      also misses out on the 16MB case. Rather than duplicating the same iter
      code for that we just consolidate it in to a helper macro that builds an
      iter for each size. The 16MB case is then trivially bolted on at the end.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      77c2019f
  2. 20 1月, 2010 2 次提交
  3. 19 1月, 2010 5 次提交
  4. 18 1月, 2010 2 次提交
    • P
      sh: Need IRQs enabled for init_fpu(). · 4291b730
      Paul Mundt 提交于
      This tosses in a local_irq_enable()/disable() pair around the init_fpu()
      callsite in the FPU state restore exception handler. Fixes up a slab BUG
      triggered by making a slab cache allocation that can sleep whilst
      irqs_disabled(). This follows the behaviour undertaken by the x86
      implementation.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      4291b730
    • M
      sh: Setup early PMB mappings. · 3d467676
      Matt Fleming 提交于
      More and more boards are going to start shipping that boot with the MMU
      in 32BIT mode by default. Previously we relied on the bootloader to
      setup PMB mappings for use by the kernel but we also need to cater for
      boards whose bootloaders don't set them up.
      
      If CONFIG_PMB_LEGACY is not enabled we have full control over our PMB
      mappings and can compress our address space. Usually, the distance
      between the the cached and uncached mappings of RAM is always 512MB,
      however we can compress the distance to be the amount of RAM on the
      board.
      
      pmb_init() now becomes much simpler. It no longer has to calculate any
      mappings, it just has to synchronise the software PMB table with the
      hardware.
      
      Tested on SDK7786 and SH7785LCR.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      3d467676
  5. 16 1月, 2010 1 次提交
    • M
      sh: Add fixed ioremap support · 4d35b93a
      Matt Fleming 提交于
      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: NMatt Fleming <matt@console-pimps.org>
      4d35b93a
  6. 15 1月, 2010 1 次提交
  7. 13 1月, 2010 4 次提交
    • P
      sh: Fix up L2 cache comment typo. · 88f73d22
      Paul Mundt 提交于
      Valid sizes include 256kB, not 258kB.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      88f73d22
    • P
      sh: fixed PMB mode refactoring. · a0ab3668
      Paul Mundt 提交于
      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: NPaul Mundt <lethal@linux-sh.org>
      a0ab3668
    • M
      sh: PVR detection for 2nd cut SH7786. · 7f33306e
      Matt Fleming 提交于
      The mass produced cuts use an updated PVR value, add them to the list.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      7f33306e
    • P
      sh: Move over to dynamically allocated FPU context. · 0ea820cf
      Paul Mundt 提交于
      This follows the x86 xstate changes and implements a task_xstate slab
      cache that is dynamically sized to match one of hard FP/soft FP/FPU-less.
      
      This also tidies up and consolidates some of the SH-2A/SH-4 FPU
      fragmentation. Now fpu state restorers are commonly defined, with the
      init_fpu()/fpu_init() mess reworked to follow the x86 convention.
      The fpu_init() register initialization has been replaced by xstate setup
      followed by writing out to hardware via the standard restore path.
      
      As init_fpu() now performs a slab allocation a secondary lighterweight
      restorer is also introduced for the context switch.
      
      In the future the DSP state will be rolled in here, too.
      
      More work remains for math emulation and the SH-5 FPU, which presently
      uses its own special (UP-only) interfaces.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      0ea820cf
  8. 12 1月, 2010 9 次提交
  9. 05 1月, 2010 3 次提交
    • P
      sh: Kill off dead UBC headers. · 7025bec9
      Paul Mundt 提交于
      Nothing is using these now, so kill them all off.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      7025bec9
    • P
      sh: Abstracted SH-4A UBC support on hw-breakpoint core. · 4352fc1b
      Paul Mundt 提交于
      This is the next big chunk of hw_breakpoint support. This decouples
      the SH-4A support from the core and moves it out in to its own stub,
      following many of the conventions established with the perf events
      layering.
      
      In addition to extending SH-4A support to encapsulate the remainder
      of the UBC channels, clock framework support for handling the UBC
      interface clock is added as well, allowing for dynamic clock gating.
      
      This also fixes up a regression introduced by the SIGTRAP handling that
      broke the ksym_tracer, to the extent that the current support works well
      with all of the ksym_tracer/ptrace/kgdb. The kprobes singlestep code will
      follow in turn.
      
      With this in place, the remaining UBC variants (SH-2A and SH-4) can now
      be trivially plugged in.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      4352fc1b
    • P
      sh: Fix up breakpoint trap handler patching on SH-2A. · c4761815
      Paul Mundt 提交于
      SH-2A was referencing the old handler that no longer exists, fix it up.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      c4761815
  10. 28 12月, 2009 1 次提交
  11. 22 12月, 2009 2 次提交
  12. 21 12月, 2009 3 次提交
  13. 17 12月, 2009 2 次提交
  14. 15 12月, 2009 1 次提交