1. 18 Aug, 2009 6 commits
  2. 16 Aug, 2009 2 commits
    • Matt Fleming's avatar
      sh: Add support for DWARF GNU extensions · cd7246f0
      Matt Fleming authored
      Also, remove the "fix" to DW_CFA_def_cfa_register where we reset the
      frame's cfa_offset to 0. This action is incorrect when handling
      DW_CFA_def_cfa_register as the DWARF spec specifically states that the
      previous contents of cfa_offset should be used with the new
      register. The reason that I thought cfa_offset should be reset to 0 was
      because it was being assigned a bogus value prior to executing the
      DW_CFA_def_cfa_register op. It turns out that the bogus cfa_offset value
      came from interpreting .cfi_escape pseudo-ops (those used by the GNU
      extensions) as CFA_DW_def_cfa ops.
      Signed-off-by: default avatarMatt Fleming <matt@console-pimps.org>
      cd7246f0
    • Matt Fleming's avatar
      sh: Try again at getting the initial return address for an unwind · b955873b
      Matt Fleming authored
      The previous hack for calculating the return address for the first frame
      we unwind (dwarf_unwinder_dump) didn't always work. The problem was that
      it assumed once it read the rule for calculating the return address,
      there would be no new rules for calculating it. This isn't true because
      the way in which the CFA is calculated can change as you progress
      through a function and the return address is figured out using the
      CFA. Therefore, the way to calculate the return address can change.
      
      So, instead of using some offset from the beginning of
      dwarf_unwind_stack which is just a flakey approach, and instead of
      executing instructions from the FDE until the return address is setup,
      we now figure out the pc in dwarf_unwind_stack() just before we call
      dwarf_cfa_execute_insns().
      Signed-off-by: default avatarMatt Fleming <matt@console-pimps.org>
      b955873b
  3. 15 Aug, 2009 6 commits
    • Paul Mundt's avatar
      sh: Merge the _32/_64 variants of arch/sh/kernel/Makefile. · 38f9ddf4
      Paul Mundt authored
      This uses the BITS export as per x86 in order to allow the same Makefile
      to be used.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      38f9ddf4
    • Paul Mundt's avatar
      Merge branch 'sh/stable-updates' · 60e0a4c7
      Paul Mundt authored
      60e0a4c7
    • Magnus Damm's avatar
      sh: sh7724 ddr self-refresh changes · 237674e0
      Magnus Damm authored
      This patch updates the SuperH Mobile sleep assembly code with
      support for DBSC memory controller found in the sh7724 processor.
      
      Without this fix the memory hooked up to the sh7724 processor
      will never enter self-refresh mode before suspending to ram. The
      effect of this is that the memory contents most likeley will be
      lost upon resume which may or may not be what you want.
      Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      237674e0
    • Magnus Damm's avatar
      sh: use in-soc KEYSC on se7724 · 9747e78b
      Magnus Damm authored
      This patch updates the Solution Engine 7724 board code to use
      in-SoC KEYSC resources for the keyboard platform device. Using
      the in-SoC key scan controller fixes a crash-during-resume issue.
      
      Without this patch the KEYSC hardware block located in the board
      specific FPGA is used together with an external IRQ which is
      routed through the FPGA and handled by some board specific demux
      code. This board specific FPGA interrupt code does not implement
      desc->set_wake() so the enable_irq_wake() call in the sh_keysc
      driver will fail at suspend-to-ram time and the disable_irq_wake()
      will bomb out when resuming.
      
      Changing the platform data to use the in-SoC KEYSC hardware makes
      the se7724 board support code less special which is a good thing.
      Also, the board specific KEYSC pin setup code selects in-SoC pin
      functions already which makes the current FPGA platform device data
      look like a typo.
      Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      9747e78b
    • Magnus Damm's avatar
      sh: CMT suspend/resume · f6431732
      Magnus Damm authored
      This patch updates the SuperH CMT driver with suspend and resume
      callbacks for the suspend-to-ram case. This patch stops the CMT
      channel at suspend time to avoid unwanted wake up events.
      Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      f6431732
    • Magnus Damm's avatar
      sh: skip disabled LCDC channels · 21bc1f02
      Magnus Damm authored
      This patch updates the SuperH Mobile LCDC driver to skip
      over disabled channels. Without this patch suspend-to-ram
      operation will crash if deferred io is enabled.
      Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      21bc1f02
  4. 14 Aug, 2009 7 commits
  5. 13 Aug, 2009 19 commits
    • Linus Torvalds's avatar
      Linux 2.6.31-rc6 · 64f1607f
      Linus Torvalds authored
      64f1607f
    • Linus Torvalds's avatar
      genirq: prevent wakeup of freed irq thread · 2d860ad7
      Linus Torvalds authored
      free_irq() can remove an irqaction while the corresponding interrupt
      is in progress, but free_irq() sets action->thread to NULL
      unconditionally, which might lead to a NULL pointer dereference in
      handle_IRQ_event() when the hard interrupt context tries to wake up
      the handler thread.
      
      Prevent this by moving the thread stop after synchronize_irq(). No
      need to set action->thread to NULL either as action is going to be
      freed anyway.
      
      This fixes a boot crash reported against preempt-rt which uses the
      mainline irq threads code to implement full irq threading.
      
      [ tglx: removed local irqthread variable ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      2d860ad7
    • Paul Mundt's avatar
      Merge branch 'sh/dwarf-unwinder' · 718dbf37
      Paul Mundt authored
      718dbf37
    • Matt Fleming's avatar
      sh: Delete DWARF_ARCH_UNWIND_OFFSET · f8264667
      Matt Fleming authored
      Trying to figure out the best value for DWARF_ARCH_UNWIND_OFFSET is
      tricky at best. Various things can change the size (and offset from the
      beginning of the function) of the prologue. Notably, turning on ftrace
      adds calls to mcount at the beginning of functions, thereby pushing the
      prologue further into the function.
      
      So replace DWARF_ARCH_UNWIND_OFFSET with some code that continues to
      execute CFA instructions until the value of return address register is
      defined. This is safe to do because we know that the return address must
      have been pushed onto the frame before our first function call; we just
      can't figure out where at compile-time.
      Signed-off-by: default avatarMatt Fleming <matt@console-pimps.org>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      f8264667
    • Paul Mundt's avatar
      sh: oprofile: Kill off dead valid_kernel_stack(). · f54aab4a
      Paul Mundt authored
      This is no longer used, kill it off.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      f54aab4a
    • Linus Torvalds's avatar
      Merge branch 'perfcounters-fixes-for-linus' of... · 3493e84d
      Linus Torvalds authored
      Merge branch 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        perf_counter: Report the cloning task as parent on perf_counter_fork()
        perf_counter: Fix an ipi-deadlock
        perf: Rework/fix the whole read vs group stuff
        perf_counter: Fix swcounter context invariance
        perf report: Don't show unresolved DSOs and symbols when -S/-d is used
        perf tools: Add a general option to enable raw sample records
        perf tools: Add a per tracepoint counter attribute to get raw sample
        perf_counter: Provide hw_perf_counter_setup_online() APIs
        perf list: Fix large list output by using the pager
        perf_counter, x86: Fix/improve apic fallback
        perf record: Add missing -C option support for specifying profile cpu
        perf tools: Fix dso__new handle() to handle deleted DSOs
        perf tools: Fix fallback to cplus_demangle() when bfd_demangle() is not available
        perf report: Show the tid too in -D
        perf record: Fix .tid and .pid fill-in when synthesizing events
        perf_counter, x86: Fix generic cache events on P6-mobile CPUs
        perf_counter, x86: Fix lapic printk message
      3493e84d
    • Linus Torvalds's avatar
      Merge branch 'core-fixes-for-linus' of... · 919aa96a
      Linus Torvalds authored
      Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        futex: Fix handling of bad requeue syscall pairing
        futex: Fix compat_futex to be same as futex for REQUEUE_PI
        locking, sched: Give waitqueue spinlocks their own lockdep classes
        futex: Update futex_q lock_ptr on requeue proxy lock
      919aa96a
    • Linus Torvalds's avatar
      Merge branch 'x86-fixes-for-linus' of... · 1c2ffff4
      Linus Torvalds authored
      Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86: Fix oops in identify_cpu() on CPUs without CPUID
        x86: Clear incorrectly forced X86_FEATURE_LAHF_LM flag
        x86, mce: therm_throt - change when we print messages
        x86: Add reboot quirk for every 5 series MacBook/Pro
      1c2ffff4
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 · bc7af9ba
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (22 commits)
        ocfs2: Fix possible deadlock when extending quota file
        ocfs2: keep index within status_map[]
        ocfs2: Initialize the cluster we're writing to in a non-sparse extend
        ocfs2: Remove redundant BUG_ON in __dlm_queue_ast()
        ocfs2/quota: Release lock for error in ocfs2_quota_write.
        ocfs2: Define credit counts for quota operations
        ocfs2: Remove syncjiff field from quota info
        ocfs2: Fix initialization of blockcheck stats
        ocfs2: Zero out padding of on disk dquot structure
        ocfs2: Initialize blocks allocated to local quota file
        ocfs2: Mark buffer uptodate before calling ocfs2_journal_access_dq()
        ocfs2: Make global quota files blocksize aligned
        ocfs2: Use ocfs2_rec_clusters in ocfs2_adjust_adjacent_records.
        ocfs2: Fix deadlock on umount
        ocfs2: Add extra credits and access the modified bh in update_edge_lengths.
        ocfs2: Fail ocfs2_get_block() immediately when a block needs allocation
        ocfs2: Fix error return in ocfs2_write_cluster()
        ocfs2: Fix compilation warning for fs/ocfs2/xattr.c
        ocfs2: Initialize count in aio_write before generic_write_checks
        ocfs2: log the actual return value of ocfs2_file_aio_write()
        ...
      bc7af9ba
    • Paul Mundt's avatar
      sh: unwinder: Restore put_unaligned() for an unaligned destination. · bf43a160
      Paul Mundt authored
      The destination address might be unaligned, so set it with
      put_unaligned() for safety. This restores the previous behaviour, albeit
      through the proper API.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      bf43a160
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://neil.brown.name/md · d58d2d1a
      Linus Torvalds authored
      * 'for-linus' of git://neil.brown.name/md:
        md: allow upper limit for resync/reshape to be set when array is read-only
        md/raid5: Properly remove excess drives after shrinking a raid5/6
        md/raid5: make sure a reshape restarts at the correct address.
        md/raid5: allow new reshape modes to be restarted in the middle.
        md: never advance 'events' counter by more than 1.
        Remove deadlock potential in md_open
      d58d2d1a
    • Linus Torvalds's avatar
      Merge branch 'sh/for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 · 7334219c
      Linus Torvalds authored
      * 'sh/for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
        sh: fix i2c init order on ap325rxa V2
        sh: fix i2c init order on Migo-R V2
        sh: convert processor device setup functions to arch_initcall()
      7334219c
    • Linus Torvalds's avatar
      Make sock_sendpage() use kernel_sendpage() · e6949583
      Linus Torvalds authored
      kernel_sendpage() does the proper default case handling for when the
      socket doesn't have a native sendpage implementation.
      
      Now, arguably this might be something that we could instead solve by
      just specifying that all protocols should do it themselves at the
      protocol level, but we really only care about the common protocols.
      Does anybody really care about sendpage on something like Appletalk? Not
      likely.
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Acked-by: default avatarJulien TINNES <julien@cr0.org>
      Acked-by: default avatarTavis Ormandy <taviso@sdf.lonestar.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e6949583
    • Paul Mundt's avatar
      sh: unwinder: Fix up usage of unaligned accessors. · 3497447f
      Paul Mundt authored
      This was using internal symbols for unaligned accesses, bypassing the
      exposed interface for variable sized safe accesses. This converts all of
      the __get_unaligned_cpuXX() users over to get_unaligned() directly,
      relying on the cast to select the proper internal routine.
      
      Additionally, the __put_unaligned_cpuXX() case is superfluous given that
      the destination address is aligned in all of the current cases, so just
      drop that outright.
      
      Furthermore, this switches to the asm/unaligned.h header instead of the
      asm-generic version, which was silently bypassing the SH-4A optimized
      unaligned ops.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      3497447f
    • Matt Fleming's avatar
      sh: Add CFI annotations for exception return. · cafb0dda
      Matt Fleming authored
      Annotate various assembly code paths with CFI assembler directives so
      that DWARF unwind info is available for the unwinder.
      Signed-off-by: default avatarMatt Fleming <matt@console-pimps.org>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      cafb0dda
    • Matt Fleming's avatar
      sh: Setup the frame register in asm code · 0b930489
      Matt Fleming authored
      In order to use DWARF unwinder info the frame register has to contain a
      valid value. Whilst GCC takes care of this for C code, we have to do it
      ourselves for assembly.
      Signed-off-by: default avatarMatt Fleming <matt@console-pimps.org>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      0b930489
    • Matt Fleming's avatar
      sh: dwarf unwinder support. · bd353861
      Matt Fleming authored
      This is a first cut at a generic DWARF unwinder for the kernel. It's
      still lacking DWARF64 support and the DWARF expression support hasn't
      been tested very well but it is generating proper stacktraces on SH for
      WARN_ON() and NULL dereferences.
      Signed-off-by: default avatarMatt Fleming <matt@console-pimps.org>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      bd353861
    • Peter Zijlstra's avatar
      perf_counter: Report the cloning task as parent on perf_counter_fork() · 94d5d1b2
      Peter Zijlstra authored
      A bug in (9f498cc5: perf_counter: Full task tracing) makes
      profiling multi-threaded apps it go belly up.
      
      [ output as: (PID:TID):(PPID:PTID) ]
      
       # ./perf report -D | grep FORK
      0x4b0 [0x18]: PERF_EVENT_FORK: (3237:3237):(3236:3236)
      0xa10 [0x18]: PERF_EVENT_FORK: (3237:3238):(3236:3236)
      0xa70 [0x18]: PERF_EVENT_FORK: (3237:3239):(3236:3236)
      0xad0 [0x18]: PERF_EVENT_FORK: (3237:3240):(3236:3236)
      0xb18 [0x18]: PERF_EVENT_FORK: (3237:3241):(3236:3236)
      
      Shows us that the test (27d028de perf report: Update for the new
      FORK/EXIT events) in builtin-report.c:
      
              /*
               * A thread clone will have the same PID for both
               * parent and child.
               */
              if (thread == parent)
                      return 0;
      
      Will clearly fail.
      
      The problem is that perf_counter_fork() reports the actual
      parent, instead of the cloning thread.
      
      Fixing that (with the below patch), yields:
      
       # ./perf report -D | grep FORK
      0x4c8 [0x18]: PERF_EVENT_FORK: (1590:1590):(1589:1589)
      0xbd8 [0x18]: PERF_EVENT_FORK: (1590:1591):(1590:1590)
      0xc80 [0x18]: PERF_EVENT_FORK: (1590:1592):(1590:1590)
      0x3338 [0x18]: PERF_EVENT_FORK: (1590:1593):(1590:1590)
      0x66b0 [0x18]: PERF_EVENT_FORK: (1590:1594):(1590:1590)
      
      Which both makes more sense and doesn't confuse perf report
      anymore.
      Reported-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: paulus@samba.org
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Arjan van de Ven <arjan@infradead.org>
      LKML-Reference: <1250172882.5241.62.camel@twins>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      94d5d1b2
    • Peter Zijlstra's avatar
      perf_counter: Fix an ipi-deadlock · 970892a9
      Peter Zijlstra authored
      perf_pending_counter() is called from IRQ context and will call
      perf_counter_disable(), however perf_counter_disable() uses
      smp_call_function_single() which doesn't fancy being used with
      IRQs disabled due to IPI deadlocks.
      
      Fix this by making it use the local __perf_counter_disable()
      call and teaching the counter_sched_out() code about pending
      disables as well.
      
      This should cover the case where a counter migrates before the
      pending queue gets processed.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Corey J Ashford <cjashfor@us.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: stephane eranian <eranian@googlemail.com>
      LKML-Reference: <20090813103655.244097721@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      970892a9