15 Apr, 2010

2 commits

  • This implements support for hardware-managed IRQ balancing as implemented
    by SH-X3 cores (presently only hooked up for SH7786, but can probably be
    carried over to other SH-X3 cores, too).

    CPUs need to specify their distribution register along with the mask
    definitions, as these follow the same format. Peripheral IRQs that don't
    opt out of balancing will be automatically distributed at the whim of the
    hardware block, while each CPU needs to verify whether it is handling the
    IRQ or not, especially before clearing the mask.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Make sure that the timer IRQs and IPIs aren't enabled for IRQ balancing.
    IPIs are disabled as a result of being percpu while the timers simply
    disable balancing outright.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

13 Apr, 2010

4 commits


07 Apr, 2010

1 commit

  • Presently address translation is default-enabled regardless of whether
    CONFIG_MMU is set or not in the SH-4 case, this fixes it up, and also
    makes the control init word a bit more readable in the process.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

05 Apr, 2010

6 commits

  • Paul Mundt
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sunxvr500: Ignore secondary output PCI devices.
    sparc64: Implement perf_arch_fetch_caller_regs
    sparc64: Update defconfig.
    sparc64: Fix array size reported by vmemmap_populate()
    sparc: Fix regset register window handling.
    drivers/serial/sunsu.c: Correct use after free

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    perf: Always build the powerpc perf_arch_fetch_caller_regs version
    perf: Always build the stub perf_arch_fetch_caller_regs version
    perf, probe-finder: Build fix on Debian
    perf/scripts: Tuple was set from long in both branches in python_process_event()
    perf: Fix 'perf sched record' deadlock
    perf, x86: Fix callgraphs of 32-bit processes on 64-bit kernels
    perf, x86: Fix AMD hotplug & constraint initialization
    x86: Move notify_cpu_starting() callback to a later stage
    x86,kgdb: Always initialize the hw breakpoint attribute
    perf: Use hot regs with software sched switch/migrate events
    perf: Correctly align perf event tracing buffer

    Linus Torvalds
     
  • …l/git/tip/linux-2.6-tip

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: set_cpus_allowed_ptr(): Don't use rq->migration_thread after unlock
    sched: Fix proc_sched_set_task()

    Linus Torvalds
     
  • …nel/git/tip/linux-2.6-tip

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    ring-buffer: Add missing unlock
    tracing: Fix lockdep warning in global_clock()

    Linus Torvalds
     
  • In initial design, walk_page_range() was designed just for walking page
    table and it didn't require mmap_sem. Now, find_vma() etc.. are used
    in walk_page_range() and we need mmap_sem around it.

    This patch adds mmap_sem around walk_page_range().

    Because /proc//pagemap's callback routine use put_user(), we have
    to get rid of it to do sane fix.

    Changelog: 2010/Apr/2
    - fixed start_vaddr and end overflow
    Changelog: 2010/Apr/1
    - fixed start_vaddr calculation
    - removed unnecessary cast.
    - removed unnecessary change in smaps.
    - use GFP_TEMPORARY instead of GFP_KERNEL

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Matt Mackall
    Cc: KOSAKI Motohiro
    Cc: San Mehat
    Cc: Brian Swetland
    Cc: Dave Hansen
    Cc: Andrew Morton
    [ Fixed kmalloc failure return code as per Matt ]
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     

04 Apr, 2010

5 commits


03 Apr, 2010

22 commits

  • Now that software events use perf_arch_fetch_caller_regs() too, we
    need the powerpc version to be always built.

    Fixes the following build error:

    (.text+0x3210): undefined reference to `perf_arch_fetch_caller_regs'
    (.text+0x3324): undefined reference to `perf_arch_fetch_caller_regs'
    (.text+0x33bc): undefined reference to `perf_arch_fetch_caller_regs'
    (.text+0x33ec): undefined reference to `perf_arch_fetch_caller_regs'
    (.text+0xd4a0): undefined reference to `perf_arch_fetch_caller_regs'
    arch/powerpc/kernel/built-in.o:(.text+0xd528): more undefined references to `perf_arch_fetch_caller_regs' follow
    make[1]: *** [.tmp_vmlinux1] Error 1
    make: *** [sub-make] Error 2

    Reported-by: Michael Ellerman
    Reported-by: Ingo Molnar
    Signed-off-by: Frederic Weisbecker
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Paul Mackerras

    Frederic Weisbecker
     
  • Now that software events use perf_arch_fetch_caller_regs() too, we
    need the stub version to be always built in for archs that don't
    implement it.

    Fixes the following build error in PARISC:

    kernel/built-in.o: In function `perf_event_task_sched_out':
    (.text.perf_event_task_sched_out+0x54): undefined reference to `perf_arch_fetch_caller_regs'

    Reported-by: Ingo Molnar
    Signed-off-by: Frederic Weisbecker
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Paul Mackerras

    Frederic Weisbecker
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    ARM: 5965/1: Fix soft lockup in at91 udc driver
    ARM: 6006/1: ARM: Use the correct NOP size in memmove for Thumb-2 kernel builds
    ARM: 6005/1: arm: kprobes: fix register corruption with jprobes
    ARM: 6003/1: removing compilation warning from pl061.h
    ARM: 6001/1: removing compilation warning comming from clkdev.h
    ARM: 6000/1: removing compilation warning comming from
    ARM: 5999/1: Including device.h and resource.h header files in linux/amba/bus.h
    ARM: 5997/1: ARM: Correct the VFPv3 detection
    ARM: 5996/1: ARM: Change the mandatory barriers implementation (4/4)
    ARM: 5995/1: ARM: Add L2x0 outer_sync() support (3/4)
    ARM: 5994/1: ARM: Add outer_cache_fns.sync function pointer (2/4)
    ARM: 5993/1: ARM: Move the outer_cache definitions into a separate file (1/4)

    Linus Torvalds
     
  • * 'merge' of git://git.secretlab.ca/git/linux-2.6:
    powerpc/5200: in lpbfifo, flag DMA irqs as enabled after requesting them
    powerpc/fsl: add device tree binding for QE firmware
    of/flattree: Fix unhandled OF_DT_NOP tag when unflattening the device tree

    Linus Torvalds
     
  • …t/frederic/random-tracing

    * 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
    reiserfs: Fix locking BUG during mount failure

    Linus Torvalds
     
  • The missing initialization of the nb_cntl.strap_msi_enable does not
    seem to be the only problem that prevents MSI, so that quirk is not
    sufficient to enable MSI on all machines. To be safe, disable MSI
    unconditionally for the internal graphics and HDMI audio on these
    chipsets.

    [rjw: Added the PCI_VENDOR_ID_AI quirk.]

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • * 'kgdb-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
    kgdb: Turn off tracing while in the debugger
    kgdb: use atomic_inc and atomic_dec instead of atomic_set
    kgdb: eliminate kgdb_wait(), all cpus enter the same way
    kgdbts,sh: Add in breakpoint pc offset for superh
    kgdb: have ebin2mem call probe_kernel_write once

    Linus Torvalds
     
  • * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    Freezer: Fix buggy resume test for tasks frozen with cgroup freezer
    Freezer: Only show the state of tasks refusing to freeze

    Linus Torvalds
     
  • release_one_tty(tty) can be called when tty still has a reference
    to pgrp/session. In this case we leak the pid.

    Signed-off-by: Oleg Nesterov
    Reported-by: Catalin Marinas
    Reported-and-tested-by: Tetsuo Handa
    Acked-by: Linus Torvalds
    Acked-by: Eric W. Biederman
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Building chokes with:

    In file included from /usr/include/gelf.h:53,
    from /usr/include/elfutils/libdw.h:53,
    from util/probe-finder.h:61,
    from util/probe-finder.c:39:
    /usr/include/libelf.h:98: error: expected specifier-qualifier-list before 'off64_t'
    [...]

    Signed-off-by: Borislav Petkov
    Acked-by: Masami Hiramatsu
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     
  • The kernel debugger should turn off kernel tracing any time the
    debugger is active and restore it on resume.

    Signed-off-by: Jason Wessel
    Reviewed-by: Steven Rostedt

    Jason Wessel
     
  • Memory barriers should be used for the kgdb cpu synchronization. The
    atomic_set() does not imply a memory barrier.

    Reported-by: Will Deacon
    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • This is a kgdb architectural change to have all the cpus (master or
    slave) enter the same function.

    A cpu that hits an exception (wants to be the master cpu) will call
    kgdb_handle_exception() from the trap handler and then invoke a
    kgdb_roundup_cpu() to synchronize the other cpus and bring them into
    the kgdb_handle_exception() as well.

    A slave cpu will enter kgdb_handle_exception() from the
    kgdb_nmicallback() and set the exception state to note that the
    processor is a slave.

    Previously the salve cpu would have called kgdb_wait(). This change
    allows the debug core to change cpus without resuming the system in
    order to inspect arch specific cpu information.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • The kgdb test suite mimics the behavior of gdb. For the sh
    architecture the pc must be decremented by 2 for software breakpoint.

    Signed-off-by: Jason Wessel
    Acked-by: Paul Mundt

    Jason Wessel
     
  • Rather than call probe_kernel_write() one byte at a time, process the
    whole buffer locally and pass the entire result in one go. This way,
    architectures that need to do special handling based on the length can
    do so, or we only end up calling memcpy() once.

    [sonic.zhang@analog.com: Reported original problem and preliminary patch]

    Signed-off-by: Jason Wessel
    Signed-off-by: Sonic Zhang
    Signed-off-by: Mike Frysinger

    Jason Wessel
     
  • This is a fix to the signed/unsigned field handling in the
    Python scripting engine, based on a patch from Roel Kluin.

    Basically, Python wants to use a PyInt (which is internally a
    long) if it can i.e. if the value will fit into that type. If
    not, it stores it into a PyLong, which isn't actually a long,
    but an arbitrary-precision integer variable.

    The code below is similar to to what Python does internally, and
    it seems to work as expected on the x86 and x86_64 sytems I
    tested it on.

    Signed-off-by: Tom Zanussi
    Cc: Arnaldo Carvalho de Melo
    Cc: Roel Kluin
    Cc: Frederic Weisbecker
    Cc: rostedt@goodmis.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tom Zanussi
     
  • Trivial typo fix. rq->migration_thread can be NULL after
    task_rq_unlock(), this is why we have "mt" which should be
    used instead.

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Oleg Nesterov
     
  • Latencytop clearing sum_exec_runtime via proc_sched_set_task() breaks
    task_times(). Other places in kernel use nvcsw and nivcsw, which are
    being cleared as well, Clear task statistics only.

    Reported-by: Török Edwin
    Signed-off-by: Mike Galbraith
    Cc: Hidetoshi Seto
    Cc: Arjan van de Ven
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Mike Galbraith
     
  • perf sched record can deadlock a box should the holder of
    handle->data->lock take an interrupt, and then attempt to
    acquire an rq lock held by a CPU trying to acquire the
    same lock. Disable interrupts.

    CPU0 CPU1
    sched event with rq->lock held
    grab handle->data->lock
    spin on handle->data->lock
    interrupt
    try to grab rq->lock

    Reported-by: Li Zefan
    Signed-off-by: Mike Galbraith
    Tested-by: Li Zefan
    Signed-off-by: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Mike Galbraith
     
  • When profiling a 32-bit process on a 64-bit kernel, callgraph tracing
    stopped after the first function, because it has seen a garbage memory
    address (tried to interpret the frame pointer, and return address as a
    64-bit pointer).

    Fix this by using a struct stack_frame with 32-bit pointers when the
    TIF_IA32 flag is set.

    Note that TIF_IA32 flag must be used, and not is_compat_task(), because
    the latter is only set when the 32-bit process is executing a syscall,
    which may not always be the case (when tracing page fault events for
    example).

    Signed-off-by: Török Edwin
    Signed-off-by: Peter Zijlstra
    Acked-by: Frederic Weisbecker
    Cc: "H. Peter Anvin"
    Cc: Paul Mackerras
    Cc: x86@kernel.org
    Cc: linux-kernel@vger.kernel.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Torok Edwin
     
  • Commit 3f6da39 ("perf: Rework and fix the arch CPU-hotplug hooks") moved
    the amd northbridge allocation from CPUS_ONLINE to CPUS_PREPARE_UP
    however amd_nb_id() doesn't work yet on prepare so it would simply bail
    basically reverting to a state where we do not properly track node wide
    constraints - causing weird perf results.

    Fix up the AMD NorthBridge initialization code by allocating from
    CPU_UP_PREPARE and installing it from CPU_STARTING once we have the
    proper nb_id. It also properly deals with the allocation failing.

    Signed-off-by: Peter Zijlstra
    [ robustify using amd_has_nb() ]
    Signed-off-by: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Because we need to have cpu identification things done by the time we run
    CPU_STARTING notifiers.

    ( This init ordering will be relied on by the next fix. )

    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra