1. 24 10月, 2012 12 次提交
    • S
      perf, cpu hotplug: Use cached value of smp_processor_id() · c13d38e4
      Srivatsa S. Bhat 提交于
      The perf_cpu_notifier() macro invokes smp_processor_id()
      multiple times. Optimize it by using a local variable.
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Reviewed-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: peterz@infradead.org
      Cc: acme@ghostprotocols.net
      Link: http://lkml.kernel.org/r/20121016075817.3572.76733.stgit@srivatsabhat.in.ibm.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      c13d38e4
    • S
      perf, cpu hotplug: Run CPU_STARTING notifiers with irqs disabled · 6760bca9
      Srivatsa S. Bhat 提交于
      The CPU_STARTING notifiers are supposed to be run with irqs
      disabled. But the perf_cpu_notifier() macro invokes them without
      doing that. Fix it.
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Reviewed-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: peterz@infradead.org
      Cc: acme@ghostprotocols.net
      Link: http://lkml.kernel.org/r/20121016075809.3572.47848.stgit@srivatsabhat.in.ibm.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      6760bca9
    • A
      x86/perf: Fix virtualization sanity check · bffd5fc2
      Andre Przywara 提交于
      In check_hw_exists() we try to detect non-emulated MSR accesses
      by writing an arbitrary value into one of the PMU registers
      and check if it's value after a readout is still the same.
      This algorithm silently assumes that the register does not contain
      the magic value already, which is wrong in at least one situation.
      
      Fix the algorithm to really do a read-modify-write cycle. This fixes
      a warning under Xen under some circumstances on AMD family 10h CPUs.
      
      The reasons in more details actually sound like a story from
      Believe It or Not!:
      
      First you need an AMD family 10h/12h CPU. These do not reset the
      PERF_CTR registers on a reboot.
      Now you boot bare metal Linux, which goes successfully through this
      check, but leaves the magic value of 0xabcd in the register. You
      don't use the performance counters, but do a reboot (warm reset).
      Then you choose to boot Xen. The check will be triggered with a
      recent Linux kernel as Dom0 again, trying to write 0xabcd into the
      MSR. Xen silently drops the write (expected), but the subsequent read
      will return the value in the register, which just happens to be the
      expected magic value. Thus the test misleadingly succeeds, leaving
      the kernel in the belief that the PMU is available. This will trigger
      the following message:
      
      [    0.020294] ------------[ cut here ]------------
      [    0.020311] WARNING: at arch/x86/xen/enlighten.c:730 xen_apic_write+0x15/0x17()
      [    0.020318] Hardware name: empty
      [    0.020323] Modules linked in:
      [    0.020334] Pid: 1, comm: swapper/0 Not tainted 3.3.8 #7
      [    0.020340] Call Trace:
      [    0.020354]  [<ffffffff81050379>] warn_slowpath_common+0x80/0x98
      [    0.020369]  [<ffffffff810503a6>] warn_slowpath_null+0x15/0x17
      [    0.020378]  [<ffffffff810034df>] xen_apic_write+0x15/0x17
      [    0.020392]  [<ffffffff8101cb2b>] perf_events_lapic_init+0x2e/0x30
      [    0.020410]  [<ffffffff81ee4dd0>] init_hw_perf_events+0x250/0x407
      [    0.020419]  [<ffffffff81ee4b80>] ? check_bugs+0x2d/0x2d
      [    0.020430]  [<ffffffff81002181>] do_one_initcall+0x7a/0x131
      [    0.020444]  [<ffffffff81edbbf9>] kernel_init+0x91/0x15d
      [    0.020456]  [<ffffffff817caaa4>] kernel_thread_helper+0x4/0x10
      [    0.020471]  [<ffffffff817c347c>] ? retint_restore_args+0x5/0x6
      [    0.020481]  [<ffffffff817caaa0>] ? gs_change+0x13/0x13
      [    0.020500] ---[ end trace a7919e7f17c0a725 ]---
      
      The new code will change every of the 16 low bits read from the
      register and tries to write and read-back that modified number
      from the MSR.
      Signed-off-by: NAndre Przywara <andre.przywara@amd.com>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Avi Kivity <avi@redhat.com>
      Link: http://lkml.kernel.org/r/1349797115-28346-2-git-send-email-andre.przywara@amd.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      bffd5fc2
    • I
      Merge tag 'perf-urgent-for-mingo' of... · c1264a4a
      Ingo Molnar 提交于
      Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
      
       * Validate syscall id before growing syscall table in 'trace', fixing potential
         excessive memory usage.
      
       * Validate perf_sample.raw_data, making 'trace' more robust, avoiding some
         potential SEGFAULTs when reading tracepoint fields.
      
       * Fix exclude_guest parse events 'perf test's, from Jiri Olsa.
      
       * Do not flush maps on COMM, that is sent by the kernel when a process is
         exec'ed, but also when a process changes its name. Since we were assuming
         a COMM always meant an EXEC, we were losing track of a process maps by
         flushing its maps. Fix from Luigi Semenzato.
      
       * A recent patch introduced a problem by not initializing what should be
         the first kind of pager to use, 'man', instead it was being left as zero
         which means no pager. This caused 'perf subcmd --help' to produce no output.
         Fix from Namhyung Kim.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      c1264a4a
    • L
      Merge tag 'stable/for-linus-3.7-rc2-tag' of... · 0e9e3e30
      Linus Torvalds 提交于
      Merge tag 'stable/for-linus-3.7-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull xen bug-fixes from Konrad Rzeszutek Wilk:
       - Fix mysterious SIGSEGV or SIGKILL in applications due to corrupting
         of the %eip when returning from a signal handler.
       - Fix various ARM compile issues after the merge fallout.
       - Continue on making more of the Xen generic code usable by ARM
         platform.
       - Fix SR-IOV passthrough to mirror multifunction PCI devices.
       - Fix various compile warnings.
       - Remove hypercalls that don't exist anymore.
      
      * tag 'stable/for-linus-3.7-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen: dbgp: Fix warning when CONFIG_PCI is not enabled.
        xen: arm: comment on why 64-bit xen_pfn_t is safe even on 32 bit
        xen: balloon: use correct type for frame_list
        xen/x86: don't corrupt %eip when returning from a signal handler
        xen: arm: make p2m operations NOPs
        xen: balloon: don't include e820.h
        xen: grant: use xen_pfn_t type for frame_list.
        xen: events: pirq_check_eoi_map is X86 specific
        xen: XENMEM_translate_gpfn_list was remove ages ago and is unused.
        xen: sysfs: fix build warning.
        xen: sysfs: include err.h for PTR_ERR etc
        xen: xenbus: quirk uses x86 specific cpuid
        xen PV passthru: assign SR-IOV virtual functions to separate virtual slots
        xen/xenbus: Fix compile warning.
        xen/x86: remove duplicated include from enlighten.c
      0e9e3e30
    • A
      alpha: separate thread-synchronous flags · 3185bd26
      Al Viro 提交于
      ... and fix the race in updating unaligned control ones
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3185bd26
    • L
      Merge tag 'kvm-3.7-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 3d0ceac1
      Linus Torvalds 提交于
      Pull kvm fixes from Avi Kivity:
       "KVM updates for 3.7-rc2"
      
      * tag 'kvm-3.7-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM guest: exit idleness when handling KVM_PV_REASON_PAGE_NOT_PRESENT
        KVM: apic: fix LDR calculation in x2apic mode
        KVM: MMU: fix release noslot pfn
      3d0ceac1
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e17b1315
      Linus Torvalds 提交于
      Pull perf fixes from Ingo Molnar:
       "Most of these are uprobes race fixes from Oleg, and their preparatory
        cleanups.  (It's larger than what I'd normally send for an -rc kernel,
        but they looked significant enough to not delay them.)
      
        There's also an oprofile fix and an uncore PMU fix."
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
        perf/x86: Disable uncore on virtualized CPUs
        oprofile, x86: Fix wrapping bug in op_x86_get_ctrl()
        ring-buffer: Check for uninitialized cpu buffer before resizing
        uprobes: Fix the racy uprobe->flags manipulation
        uprobes: Fix prepare_uprobe() race with itself
        uprobes: Introduce prepare_uprobe()
        uprobes: Fix handle_swbp() vs unregister() + register() race
        uprobes: Do not delete uprobe if uprobe_unregister() fails
        uprobes: Don't return success if alloc_uprobe() fails
        uprobes/x86: Only rep+nop can be emulated correctly
        uprobes: Simplify is_swbp_at_addr(), remove stale comments
        uprobes: Kill set_orig_insn()->is_swbp_at_addr()
        uprobes: Introduce copy_opcode(), kill read_opcode()
        uprobes: Kill set_swbp()->is_swbp_at_addr()
        uprobes: Restrict valid_vma(false) to skip VM_SHARED vmas
        uprobes: Change valid_vma() to demand VM_MAYEXEC rather than VM_EXEC
        uprobes: Change write_opcode() to use FOLL_FORCE
        uprobes: Move clear_thread_flag(TIF_UPROBE) to uprobe_notify_resume()
        uprobes: Kill UTASK_BP_HIT state
        uprobes: Fix UPROBE_SKIP_SSTEP checks in handle_swbp()
        ...
      e17b1315
    • L
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 684baeb1
      Linus Torvalds 提交于
      Pull core kernel fixes from Ingo Molnar:
       "Two small fixes"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Documentation: Reflect the new location of the NMI watchdog info
        nohz: Fix idle ticks in cpu summary line of /proc/stat
      684baeb1
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 4e3ab74c
      Linus Torvalds 提交于
      Pull s390 fixes from Martin Schwidefsky:
       "Among the usual minor bug fixes the more interesting patches are the
        perf counters for the latest machine, the missing select to enable
        transparent huge pages and a build fix for the UAPI rework."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390,uapi: do not use uapi/asm-generic/kvm_para.h
        s390/cache: fix data/instruction cache output
        s390: fix linker script for 31 bit builds
        s390/thp: select HAVE_ARCH_TRANSPARENT_HUGEPAGE
        s390/kdump: Use 64 bit mode for 0x10000 entry point
        perf_cpum_cf: Add support for counters available with IBM zEC12
        s390/css: stop stsch loop after cc 3
        s390/cio: use generic bitmap functions
        s390/chpid: make headers usable (again)
      4e3ab74c
    • L
      Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 4a09cbce
      Linus Torvalds 提交于
      Pull tile fixes from Chris Metcalf:
       "This fixes one issue with compiler flags that can cause modules not to
        load, and cleans up some warnings with ELF_R_xxx defines."
      
      * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        arch/tile: avoid build warnings from duplicate ELF_R_xxx #defines
        arch/tile: avoid generating .eh_frame information in modules
      4a09cbce
    • L
      Merge tag 'please-pull-uapi-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux · 62472efe
      Linus Torvalds 提交于
      Pull ia64 fix from Tony Luck:
       "Fix from dhowells for UAPI fallout"
      
      * tag 'please-pull-uapi-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
        UAPI: Make arch/ia64/include/asm/kvm_para.h generic
      62472efe
  2. 23 10月, 2012 18 次提交
  3. 22 10月, 2012 10 次提交