1. 24 8月, 2009 8 次提交
    • P
      sh: Allow for kernel command line concatenation. · d724a9c9
      Pawel Moll 提交于
      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: NPawel Moll <pawel.moll@st.com>
      Signed-off-by: NStuart Menefy <stuart.menefy@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      d724a9c9
    • J
      sh: Use internal watchdog timer to perform reset · b46373e0
      Jon Frosdick 提交于
      This patches will trigger a reboot using the watchdog
      timer instead of double fault.  Unlike the previous
      method, this one actually works in 32 bit mode.
      
      Reset should also be cleaner.
      Signed-off-by: NJon Frosdick <jon.frosdick@st.com>
      Signed-off-by: NCarl Shaw <carl.shaw@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      b46373e0
    • G
      sh: kgdb: do not reload VBR while handling debugger breackpoint · 27a30f53
      Giuseppe Cavallaro 提交于
      Save the VBR allowing GDB to dump full registers set but do not reload it
      as soon as the kgdb_handle_exception is invoked.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NStuart Menefy <stuart.menefy@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      27a30f53
    • D
      sh: Allow use of GENERIC_IOMAP · 15444a89
      David McKay 提交于
      The synopsys PCI cell used in the later STMicro chips requires code to
      be run in order to do IO cycles, rather than just memory mapping the IO
      space. Rather than extending the existing SH infrastructure to allow
      this, use the GENERIC_IOMAP implmentation to save re-inventing the
      wheel.
      
      This set of changes allows the SH to be built with GENERIC_IOMAP
      enabled, it just ifdef's out the functions provided by the GENERIC_IOMAP
      implementation, and provides a few required missing functions.
      Signed-off-by: NDavid McKay <david.mckay@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      15444a89
    • C
      sh: Improve unwind info for signals · 2fc742f8
      Carl Shaw 提交于
      GCC does not issue unwind information for function epilogues.
      Unfortunately we can catch a signal during an epilogue.  The signal
      handler writes the current context and signal return code onto the stack
      overwriting previous contents.  During unwinding, libgcc can try to
      restore registers from the stack and restores corrupted ones. This can
      lead to segmentation, misaligned access and sigbus faults.
      
      For example, consider the following code:
      
          mov.l   r12,@-r15
          mov.l   r14,@-r15
          sts.l   pr,@-r15
          mov     r15,r14
      
          <do stuff>
      
          mov r14, r15
          lds.l @r15+, pr
      	<<< SIGNAL HERE
          mov.l @r15+, r14
          mov.l @r15+, r12
          rts
      
      Unwind is aware that pr was pushed to stack in prolog, so tries to
      restore it.  Unfortunately it restores the last word of the signal
      handler code placed on the stack by the kernel.
      
      This patch tries to avoid the problem by adding a guard region on the
      stack between where the function pushes data and where the signal handler
      pushes its return code.  We probably don't see this problem often because
      exception handling unwinding in an epilogue only occurs due to a pthread
      cancel signal.  Also the kernel signal stack handler alignment of 8 bytes
      could hide the occurance of this problem sometimes as the stack may not
      be trampled at a particular required word.
      
      This is not guaranteed to always work.  It relies on a frame pointer
      existing for the function (so it can get the correct sp value) which is
      not always the case for the SH4.
      
      Modifications will also be made to libgcc for the case where there is no
      fp.
      Signed-off-by: NCarl Shaw <carl.shaw@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      2fc742f8
    • A
      sh: cleanup of do_address_error() · 5a0ab35e
      Andre Draszik 提交于
      This patch fixes a few problems with the existing code in do_address_error().
      
      a) the variable used to printk()d the offending instruction wasn't
         initialized correctly. This is a fix to bug 5727
      
      b) behaviour for CONFIG_CPU_SH2A wasn't correct
      
      c) the 'ignore address error' behaviour didn't update the PC, causing an
         infinite loop.
      Signed-off-by: NAndre Draszik <andre.draszik@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      5a0ab35e
    • A
      sh: Allow user control over misaligned fixup handling · 7436cde6
      Andre Draszik 提交于
      This patch brings the SH4 misaligned trap handler in line with what
      happens on ARM:
      Add a /proc/cpu/alignment which can be read from to get alignment
      trap statistics and written to to influence the behaviour of the
      alignment trap handling. The value to write is a bitfield, which
      has the following meaning: 1 warn, 2 fixup, 4 signal
      In addition, we add a /proc/cpu/kernel_alignment, to enable or
      disable warnings in case of kernel code causing alignment errors.
      
      Signed-off by: Andre Draszik <andre.draszik@st.com>
      Signed-off-by: NStuart Menefy <stuart.menefy@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      7436cde6
    • A
      sh: ratelimit unaligned fixups · 9a4af027
      Andre Draszik 提交于
      This patch makes sure we see messages about unaligned access fixups
      every now and then. Else especially userspace apps suffering from
      bad programming won't ever be noticed...
      
      Signed-off by: Andre Draszik <andre.draszik@st.com>
      Signed-off-by: NStuart Menefy <stuart.menefy@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      9a4af027
  2. 23 8月, 2009 4 次提交
    • M
      sh: drop static UIO clocks for sh7722, sh7723 and sh7724 · cc58f597
      Magnus Damm 提交于
      The Runtime PM patch for UIO driver implements coarse grained
      dynamic power management for UIO devices. With that patch in
      place we can get rid of the static clock configuration. Which
      in turn makes it possible for cpuidle to enter deeper sleep.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      cc58f597
    • M
      sh: let ARCH_SHMOBILE select PM and PM_RUNTIME · ac2c596b
      Magnus Damm 提交于
      With the Runtime PM driver changes in place, we must have
      Runtime PM support in place. Otherwise there is no way to
      enable clocks to the Runtime PM enabled hardware blocks.
      This patch makes Runtime PM mandatory on SuperH Mobile.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      ac2c596b
    • P
      sh: Fix section mismatch in platform bus notifier. · a62926fe
      Paul Mundt 提交于
      The runtime PM for SH-Mobile code had platform_bus_notify() as __devinit,
      which is rather bogus. Kill off the annotation, which subsequently
      silences the section mismatch warnings.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      a62926fe
    • M
      sh: Runtime PM for SuperH Mobile platform bus devices · 6a93dde1
      Magnus Damm 提交于
      This patch is V3 of the SuperH Mobile Runtime PM platform bus
      implentation matching Rafael's Runtime PM v16.
      
      The code gets invoked from the SuperH specific Runtime PM
      platform bus functions that override the weak symbols for:
       - platform_pm_runtime_suspend()
       - platform_pm_runtime_resume()
       - platform_pm_runtime_idle()
      
      This Runtime PM implementation performs two levels of power
      management. At the time of platform bus runtime suspend the
      clock to the device is stopped instantly. Later on if all
      devices within the power domain has their clocks stopped
      then the device driver ->runtime_suspend() callbacks are
      used to save hardware register state for each device.
      
      Device driver ->runtime_suspend() calls are scheduled from
      cpuidle context using platform_pm_runtime_suspend_idle().
      When all devices have been fully suspended the processor
      is allowed to enter deep sleep from cpuidle.
      
      The runtime resume operation turns on clocks and also
      restores registers if needed. It is worth noting that the
      devices start in a suspended state and the device driver
      is responsible for calling runtime resume before accessing
      the actual hardware.
      
      In this particular platform bus implementation runtime
      resume is not allowed from interrupt context. Runtime
      suspend is however allowed from interrupt context as
      long as the synchronous functions are avoided.
      
      [ updated for v17 -- PFM. ]
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      6a93dde1
  3. 22 8月, 2009 4 次提交
  4. 21 8月, 2009 12 次提交
  5. 20 8月, 2009 8 次提交
  6. 19 8月, 2009 2 次提交
  7. 18 8月, 2009 2 次提交