Skip to content
  1. Mar 14, 2013
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Fix free of probe entry by calling call_rcu_sched() · 740466bc
      Steven Rostedt (Red Hat) authored
      
      
      Because function tracing is very invasive, and can even trace
      calls to rcu_read_lock(), RCU access in function tracing is done
      with preempt_disable_notrace(). This requires a synchronize_sched()
      for updates and not a synchronize_rcu().
      
      Function probes (traceon, traceoff, etc) must be freed after
      a synchronize_sched() after its entry has been removed from the
      hash. But call_rcu() is used. Fix this by using call_rcu_sched().
      
      Also fix the usage to use hlist_del_rcu() instead of hlist_del().
      
      Cc: stable@vger.kernel.org
      Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      740466bc
  2. Mar 12, 2013
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Fix race in snapshot swapping · 2721e72d
      Steven Rostedt (Red Hat) authored
      
      
      Although the swap is wrapped with a spin_lock, the assignment
      of the temp buffer used to swap is not within that lock.
      It needs to be moved into that lock, otherwise two swaps
      happening on two different CPUs, can end up using the wrong
      temp buffer to assign in the swap.
      
      Luckily, all current callers of the swap function appear to have
      their own locks. But in case something is added that allows two
      different callers to call the swap, then there's a chance that
      this race can trigger and corrupt the buffers.
      
      New code is coming soon that will allow for this race to trigger.
      
      I've Cc'd stable, so this bug will not show up if someone backports
      one of the changes that can trigger this bug.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      2721e72d
  3. Mar 08, 2013
  4. Mar 07, 2013
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Do not return EINVAL in snapshot when not allocated · c9960e48
      Steven Rostedt (Red Hat) authored
      
      
      To use the tracing snapshot feature, writing a '1' into the snapshot
      file causes the snapshot buffer to be allocated if it has not already
      been allocated and dose a 'swap' with the main buffer, so that the
      snapshot now contains what was in the main buffer, and the main buffer
      now writes to what was the snapshot buffer.
      
      To free the snapshot buffer, a '0' is written into the snapshot file.
      
      To clear the snapshot buffer, any number but a '0' or '1' is written
      into the snapshot file. But if the file is not allocated it returns
      -EINVAL error code. This is rather pointless. It is better just to
      do nothing and return success.
      
      Acked-by: default avatarHiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      c9960e48
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Add help of snapshot feature when snapshot is empty · d8741e2e
      Steven Rostedt (Red Hat) authored
      
      
      When cat'ing the snapshot file, instead of showing an empty trace
      header like the trace file does, show how to use the snapshot
      feature.
      
      Also, this is a good place to show if the snapshot has been allocated
      or not. Users may want to "pre allocate" the snapshot to have a fast
      "swap" of the current buffer. Otherwise, a swap would be slow and might
      fail as it would need to allocate the snapshot buffer, and that might
      fail under tight memory constraints.
      
      Here's what it looked like before:
      
       # tracer: nop
       #
       # entries-in-buffer/entries-written: 0/0   #P:4
       #
       #                              _-----=> irqs-off
       #                             / _----=> need-resched
       #                            | / _---=> hardirq/softirq
       #                            || / _--=> preempt-depth
       #                            ||| /     delay
       #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
       #              | |       |   ||||       |         |
      
      Here's what it looks like now:
      
       # tracer: nop
       #
       #
       # * Snapshot is freed *
       #
       # Snapshot commands:
       # echo 0 > snapshot : Clears and frees snapshot buffer
       # echo 1 > snapshot : Allocates snapshot buffer, if not already allocated.
       #                      Takes a snapshot of the main buffer.
       # echo 2 > snapshot : Clears snapshot buffer (but does not allocate)
       #                      (Doesn't have to be '2' works with any number that
       #                       is not a '0' or '1')
      
      Acked-by: default avatarHiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      d8741e2e
  5. Feb 28, 2013
    • Ingo Molnar's avatar
      Merge branch 'tip/perf/urgent' of... · a335358f
      Ingo Molnar authored
      
      Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent
      
      Pull an ftrace Kconfig help text fix from Steve Rostedt.
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a335358f
    • Steven Rostedt's avatar
      ftrace: Update the kconfig for DYNAMIC_FTRACE · db05021d
      Steven Rostedt authored
      
      
      The prompt to enable DYNAMIC_FTRACE (the ability to nop and
      enable function tracing at run time) had a confusing statement:
      
       "enable/disable ftrace tracepoints dynamically"
      
      This was written before tracepoints were added to the kernel,
      but now that tracepoints have been added, this is very confusing
      and has confused people enough to give wrong information during
      presentations.
      
      Not only that, I looked at the help text, and it still references
      that dreaded daemon that use to wake up once a second to update
      the nop locations and brick NICs, that hasn't been around for over
      five years.
      
      Time to bring the text up to the current decade.
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarEzequiel Garcia <elezegarcia@gmail.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      db05021d
  6. Feb 20, 2013
    • Ingo Molnar's avatar
      Merge branch 'tip/perf/core' of... · ff1fb5f6
      Ingo Molnar authored
      
      Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent
      
      Pull two fixes from Steven Rostedt.
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ff1fb5f6
    • Stephane Eranian's avatar
      perf/x86: Add Intel IvyBridge event scheduling constraints · 69943182
      Stephane Eranian authored
      
      
      Intel IvyBridge processor has different constraints compared
      to SandyBridge. Therefore it needs its own contraint table.
      This patch adds the constraint table.
      
      Without this patch, the events listed in the patch may not be
      scheduled correctly and bogus counts may be collected.
      
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      Cc: peterz@infradead.org
      Cc: ak@linux.intel.com
      Cc: acme@redhat.com
      Cc: jolsa@redhat.com
      Cc: namhyung.kim@lge.com
      Link: http://lkml.kernel.org/r/1361355312-3323-1-git-send-email-eranian@google.com
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      69943182
    • Linus Torvalds's avatar
      Merge branch 'for-3.9-async' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · ece8e0b2
      Linus Torvalds authored
      Pull async changes from Tejun Heo:
       "These are followups for the earlier deadlock issue involving async
        ending up waiting for itself through block requesting module[1].  The
        following changes are made by these commits.
      
         - Instead of requesting default elevator on each request_queue init,
           block now requests it once early during boot.
      
         - Kmod triggers warning if invoked from an async worker.
      
         - Async synchronization implementation has been reimplemented.  It's
           a lot simpler now."
      
      * 'for-3.9-async' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        async: initialise list heads to fix crash
        async: replace list of active domains with global list of pending items
        async: keep pending tasks on async_domain and remove async_pending
        async: use ULLONG_MAX for infinity cookie value
        async: bring sanity to the use of words domain and running
        async, kmod: warn on synchronous request_module() from async workers
        block: don't request module during elevator init
        init, block: try to load default elevator module early during boot
      ece8e0b2
    • Linus Torvalds's avatar
      Merge branch 'for-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 67cb104b
      Linus Torvalds authored
      Pull workqueue changes from Tejun Heo:
       "A lot of reorganization is going on mostly to prepare for worker pools
        with custom attributes so that workqueue can replace custom pool
        implementations in places including writeback and btrfs and make CPU
        assignment in crypto more flexible.
      
        workqueue evolved from purely per-cpu design and implementation, so
        there are a lot of assumptions regarding being bound to CPUs and even
        unbound workqueues are implemented as an extension of the model -
        workqueues running on the special unbound CPU.  Bulk of changes this
        round are about promoting worker_pools as the top level abstraction
        replacing global_cwq (global cpu workqueue).  At this point, I'm
        fairly confident about getting custom worker pools working pretty soon
        and ready for the next merge window.
      
        Lai's patches are replacing the convoluted mb() dancing workqueue has
        been doing with much simpler mechanism which only depends on
        assignment atomicity of long.  For details, please read the commit
        message of 0b3dae68 ("workqueue: simplify is-work-item-queued-here
        test").  While the change ends up adding one pointer to struct
        delayed_work, the inflation in percentage is less than five percent
        and it decouples delayed_work logic a lot more cleaner from usual work
        handling, removes the unusual memory barrier dancing, and allows for
        further simplification, so I think the trade-off is acceptable.
      
        There will be two more workqueue related pull requests and there are
        some shared commits among them.  I'll write further pull requests
        assuming this pull request is pulled first."
      
      * 'for-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (37 commits)
        workqueue: un-GPL function delayed_work_timer_fn()
        workqueue: rename cpu_workqueue to pool_workqueue
        workqueue: reimplement is_chained_work() using current_wq_worker()
        workqueue: fix is_chained_work() regression
        workqueue: pick cwq instead of pool in __queue_work()
        workqueue: make get_work_pool_id() cheaper
        workqueue: move nr_running into worker_pool
        workqueue: cosmetic update in try_to_grab_pending()
        workqueue: simplify is-work-item-queued-here test
        workqueue: make work->data point to pool after try_to_grab_pending()
        workqueue: add delayed_work->wq to simplify reentrancy handling
        workqueue: make work_busy() test WORK_STRUCT_PENDING first
        workqueue: replace WORK_CPU_NONE/LAST with WORK_CPU_END
        workqueue: post global_cwq removal cleanups
        workqueue: rename nr_running variables
        workqueue: remove global_cwq
        workqueue: remove worker_pool->gcwq
        workqueue: replace for_each_worker_pool() with for_each_std_worker_pool()
        workqueue: make freezing/thawing per-pool
        workqueue: make hotplug processing per-pool
        ...
      67cb104b
    • Linus Torvalds's avatar
      Merge branch 'for-3.9-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 1eaec821
      Linus Torvalds authored
      Pull workqueue [delayed_]work_pending() cleanups from Tejun Heo:
       "This is part of on-going cleanups to remove / minimize usages of
        workqueue interfaces which are deprecated and/or misleading.
      
        This round drops a number of usages of [delayed_]work_pending(), which
        are dangerous as they lack any form of synchronization and thus often
        lead to buggy / unnecessary code.  There are a couple legitimate use
        cases in kernel.  Hopefully, they can be converted and
        [delayed_]work_pending() can be removed completely.  Even if not,
        removing most of misuses should make it more difficult to find
        examples of misuses and thus slow down growth of them.
      
        These changes are independent from other workqueue changes."
      
      * 'for-3.9-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        wimax/i2400m: fix i2400m->wake_tx_skb handling
        kprobes: fix wait_for_kprobe_optimizer()
        ipw2x00: simplify scan_event handling
        video/exynos: don't use [delayed_]work_pending()
        tty/max3100: don't use [delayed_]work_pending()
        x86/mce: don't use [delayed_]work_pending()
        rfkill: don't use [delayed_]work_pending()
        wl1251: don't use [delayed_]work_pending()
        thinkpad_acpi: don't use [delayed_]work_pending()
        mwifiex: don't use [delayed_]work_pending()
        sja1000: don't use [delayed_]work_pending()
      1eaec821
    • Linus Torvalds's avatar
      Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1a13c0b1
      Linus Torvalds authored
      Pull x86 UV3 support update from Ingo Molnar:
       "Support for the SGI Ultraviolet System 3 (UV3) platform - the upcoming
        third major iteration and upscaling of the SGI UV supercomputing
        platform."
      
      * 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, uv, uv3: Trim MMR register definitions after code changes for SGI UV3
        x86, uv, uv3: Check current gru hub support for SGI UV3
        x86, uv, uv3: Update Time Support for SGI UV3
        x86, uv, uv3: Update x2apic Support for SGI UV3
        x86, uv, uv3: Update Hub Info for SGI UV3
        x86, uv, uv3: Update ACPI Check to include SGI UV3
        x86, uv, uv3: Update MMR register definitions for SGI Ultraviolet System 3 (UV3)
      1a13c0b1
    • Linus Torvalds's avatar
      Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f98982ce
      Linus Torvalds authored
      Pull x86 platform changes from Ingo Molnar:
      
       - Support for the Technologic Systems TS-5500 platform, by Vivien
         Didelot
      
       - Improved NUMA support on AMD systems:
      
         Add support for federated systems where multiple memory controllers
         can exist and see each other over multiple PCI domains.  This
         basically means that AMD node ids can be more than 8 now and the code
         handling this is taught to incorporate PCI domain into those IDs.
      
       - Support for the Goldfish virtual Android emulator, by Jun Nakajima,
         Intel, Google, et al.
      
       - Misc fixlets.
      
      * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: Add TS-5500 platform support
        x86/srat: Simplify memory affinity init error handling
        x86/apb/timer: Remove unnecessary "if"
        goldfish: platform device for x86
        amd64_edac: Fix type usage in NB IDs and memory ranges
        amd64_edac: Fix PCI function lookup
        x86, AMD, NB: Use u16 for northbridge IDs in amd_get_nb_id
        x86, AMD, NB: Add multi-domain support
      f98982ce
    • Linus Torvalds's avatar
      Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 29d50523
      Linus Torvalds authored
      Pull x86/hyperv changes from Ingo Molnar:
       "The biggest change is support for Windows 8's improved hypervisor
        interrupt model on the Linux Hyper-V guest subsystem code side.
      
        Smallish fixes otherwise."
      
      * 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, hyperv: HYPERV depends on X86_LOCAL_APIC
        X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts
        X86: Add a check to catch Xen emulation of Hyper-V
        x86: Hyper-V: register clocksource only if its advertised
      29d50523
    • Linus Torvalds's avatar
      Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 026f149c
      Linus Torvalds authored
      Pull x86/debug changes from Ingo Molnar:
       "Two init annotations and a built-in memtest speedup"
      
      * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/memtest: Shorten time for tests
        x86: Convert a few mistaken __cpuinit annotations to __init
        x86/EFI: Properly init-annotate BGRT code
      026f149c
    • Linus Torvalds's avatar
      Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 11743a1d
      Linus Torvalds authored
      Pull x86 cleanup patches from Ingo Molnar:
       "Misc smaller cleanups"
      
      * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: ptrace.c only needs export.h and not the full module.h
        x86, apb_timer: remove unused variable percpu_timer
        um: don't compare a pointer to 0
        arch/x86/platform/uv: use ARRAY_SIZE where possible
      11743a1d
    • Linus Torvalds's avatar
      Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 121027a7
      Linus Torvalds authored
      Pull two x86 kernel build changes from Ingo Molnar:
       "The first change modifies how 'make oldconfig' works on cross-bitness
        situations on x86.  It was felt the new behavior of preserving the
        bitness of the .config is more logical.  This is a leftover of the
        merge.
      
        The second change eliminates a Perl warning.  (There's another, more
        complete fix resulting of this warning fix, which second fix in flight
        to you via the kbuild tree, which will remove the timeconst.pl script
        altogether.)"
      
      * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        timeconst.pl: Eliminate Perl warning
        x86: Default to ARCH=x86 to avoid overriding CONFIG_64BIT
      121027a7
    • Linus Torvalds's avatar
      Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5abcd76f
      Linus Torvalds authored
      Pull x86 bootup changes from Ingo Molnar:
       "Deal with bootloaders which fail to initialize unknown fields in
        boot_params to zero, by sanitizing boot params passed in.
      
        This unbreaks versions of kexec-utils.  Other bootloaders do not
        appear to show sensitivity to this change, but it's a possibility for
        breakage nevertheless."
      
      * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, boot: Sanitize boot_params if not zeroed on creation
      5abcd76f
    • Linus Torvalds's avatar
      Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a57ed936
      Linus Torvalds authored
      Pull x86/asm changes from Ingo Molnar:
       "The biggest change (by line count) is the unification of the XOR code
        and then the introduction of an additional SSE based XOR assembly
        method.
      
        The other bigger change is the head_32.S rework/cleanup by Borislav
        Petkov.
      
        Last but not least there's the usual laundry list of small but
        dangerous (and hopefully perfectly tested) changes to subtle low level
        x86 code, plus cleanups."
      
      * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, head_32: Give the 6 label a real name
        x86, head_32: Remove second CPUID detection from default_entry
        x86: Detect CPUID support early at boot
        x86, head_32: Remove i386 pieces
        x86: Require MOVBE feature in cpuid when we use it
        x86: Enable ARCH_USE_BUILTIN_BSWAP
        x86/xor: Add alternative SSE implementation only prefetching once per 64-byte line
        x86/xor: Unify SSE-base xor-block routines
        x86: Fix a typo
        x86/mm: Fix the argument passed to sync_global_pgds()
        x86/mm: Convert update_mmu_cache() and update_mmu_cache_pmd() to functions
        ix86: Tighten asmlinkage_protect() constraints
      a57ed936
    • Linus Torvalds's avatar
      Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5800700f
      Linus Torvalds authored
      Pull x86/apic changes from Ingo Molnar:
       "Main changes:
      
         - Multiple MSI support added to the APIC, PCI and AHCI code - acked
           by all relevant maintainers, by Alexander Gordeev.
      
           The advantage is that multiple AHCI ports can have multiple MSI
           irqs assigned, and can thus spread to multiple CPUs.
      
           [ Drivers can make use of this new facility via the
             pci_enable_msi_block_auto() method ]
      
         - x86 IOAPIC code from interrupt remapping cleanups from Joerg
           Roedel:
      
           These patches move all interrupt remapping specific checks out of
           the x86 core code and replaces the respective call-sites with
           function pointers.  As a result the interrupt remapping code is
           better abstraced from x86 core interrupt handling code.
      
         - Various smaller improvements, fixes and cleanups."
      
      * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits)
        x86/intel/irq_remapping: Clean up x2apic opt-out security warning mess
        x86, kvm: Fix intialization warnings in kvm.c
        x86, irq: Move irq_remapped out of x86 core code
        x86, io_apic: Introduce eoi_ioapic_pin call-back
        x86, msi: Introduce x86_msi.compose_msi_msg call-back
        x86, irq: Introduce setup_remapped_irq()
        x86, irq: Move irq_remapped() check into free_remapped_irq
        x86, io-apic: Remove !irq_remapped() check from __target_IO_APIC_irq()
        x86, io-apic: Move CONFIG_IRQ_REMAP code out of x86 core
        x86, irq: Add data structure to keep AMD specific irq remapping information
        x86, irq: Move irq_remapping_enabled declaration to iommu code
        x86, io_apic: Remove irq_remapping_enabled check in setup_timer_IRQ0_pin
        x86, io_apic: Move irq_remapping_enabled checks out of check_timer()
        x86, io_apic: Convert setup_ioapic_entry to function pointer
        x86, io_apic: Introduce set_affinity function pointer
        x86, msi: Use IRQ remapping specific setup_msi_irqs routine
        x86, hpet: Introduce x86_msi_ops.setup_hpet_msi
        x86, io_apic: Introduce x86_io_apic_ops.print_entries for debugging
        x86, io_apic: Introduce x86_io_apic_ops.disable()
        x86, apic: Mask IO-APIC and PIC unconditionally on LAPIC resume
        ...
      5800700f
    • Linus Torvalds's avatar
      Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 266d7ad7
      Linus Torvalds authored
      Pull timer changes from Ingo Molnar:
       "Main changes:
      
         - ntp: Add CONFIG_RTC_SYSTOHC: a generic RTC driver facility
           complementing the existing CONFIG_RTC_HCTOSYS, which uses NTP to
           keep the hardware clock updated.
      
         - posix-timers: Fix clock_adjtime to always return timex data on
           success.  This is changing the ABI, but no breakage was expected
           and found - caution is warranted nevertheless.
      
         - platform persistent clock improvements/cleanups.
      
         - clockevents: refactor timer broadcast handling to be more generic
           and less duplicated with matching architecture code (mostly ARM
           motivated.)
      
         - various fixes and cleanups"
      
      * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        timers/x86/hpet: Use HPET_COUNTER to specify the hpet counter in vread_hpet()
        posix-cpu-timers: Fix nanosleep task_struct leak
        clockevents: Fix generic broadcast for FEAT_C3STOP
        time, Fix setting of hardware clock in NTP code
        hrtimer: Prevent hrtimer_enqueue_reprogram race
        clockevents: Add generic timer broadcast function
        clockevents: Add generic timer broadcast receiver
        timekeeping: Switch HAS_PERSISTENT_CLOCK to ALWAYS_USE_PERSISTENT_CLOCK
        x86/time/rtc: Don't print extended CMOS year when reading RTC
        x86: Select HAS_PERSISTENT_CLOCK on x86
        timekeeping: Add CONFIG_HAS_PERSISTENT_CLOCK option
        rtc: Skip the suspend/resume handling if persistent clock exist
        timekeeping: Add persistent_clock_exist flag
        posix-timers: Fix clock_adjtime to always return timex data on success
        Round the calculated scale factor in set_cyc2ns_scale()
        NTP: Add a CONFIG_RTC_SYSTOHC configuration
        MAINTAINERS: Update John Stultz's email
        time: create __getnstimeofday for WARNless calls
      266d7ad7
    • Linus Torvalds's avatar
      Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bcbd818c
      Linus Torvalds authored
      Pull preparatory smp/hotplug patches from Ingo Molnar:
       "Some early preparatory changes for the WIP hotplug rework by Thomas
        Gleixner."
      
      * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        stop_machine: Use smpboot threads
        stop_machine: Store task reference in a separate per cpu variable
        smpboot: Allow selfparking per cpu threads
      bcbd818c
    • Linus Torvalds's avatar
      Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d652e1eb
      Linus Torvalds authored
      Pull scheduler changes from Ingo Molnar:
       "Main changes:
      
         - scheduler side full-dynticks (user-space execution is undisturbed
           and receives no timer IRQs) preparation changes that convert the
           cputime accounting code to be full-dynticks ready, from Frederic
           Weisbecker.
      
         - Initial sched.h split-up changes, by Clark Williams
      
         - select_idle_sibling() performance improvement by Mike Galbraith:
      
              " 1 tbench pair (worst case) in a 10 core + SMT package:
      
                pre   15.22 MB/sec 1 procs
                post 252.01 MB/sec 1 procs "
      
        - sched_rr_get_interval() ABI fix/change.  We think this detail is not
          used by apps (so it's not an ABI in practice), but lets keep it
          under observation.
      
        - misc RT scheduling cleanups, optimizations"
      
      * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
        sched/rt: Add <linux/sched/rt.h> header to <linux/init_task.h>
        cputime: Remove irqsave from seqlock readers
        sched, powerpc: Fix sched.h split-up build failure
        cputime: Restore CPU_ACCOUNTING config defaults for PPC64
        sched/rt: Move rt specific bits into new header file
        sched/rt: Add a tuning knob to allow changing SCHED_RR timeslice
        sched: Move sched.h sysctl bits into separate header
        sched: Fix signedness bug in yield_to()
        sched: Fix select_idle_sibling() bouncing cow syndrome
        sched/rt: Further simplify pick_rt_task()
        sched/rt: Do not account zero delta_exec in update_curr_rt()
        cputime: Safely read cputime of full dynticks CPUs
        kvm: Prepare to add generic guest entry/exit callbacks
        cputime: Use accessors to read task cputime stats
        cputime: Allow dynamic switch between tick/virtual based cputime accounting
        cputime: Generic on-demand virtual cputime accounting
        cputime: Move default nsecs_to_cputime() to jiffies based cputime file
        cputime: Librarize per nsecs resolution cputime definitions
        cputime: Avoid multiplication overflow on utime scaling
        context_tracking: Export context state for generic vtime
        ...
      
      Fix up conflict in kernel/context_tracking.c due to comment additions.
      d652e1eb
    • Linus Torvalds's avatar
      Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8f55cea4
      Linus Torvalds authored
      Pull perf changes from Ingo Molnar:
       "There are lots of improvements, the biggest changes are:
      
        Main kernel side changes:
      
         - Improve uprobes performance by adding 'pre-filtering' support, by
           Oleg Nesterov.
      
         - Make some POWER7 events available in sysfs, equivalent to what was
           done on x86, from Sukadev Bhattiprolu.
      
         - tracing updates by Steve Rostedt - mostly misc fixes and smaller
           improvements.
      
         - Use perf/event tracing to report PCI Express advanced errors, by
           Tony Luck.
      
         - Enable northbridge performance counters on AMD family 15h, by Jacob
           Shin.
      
         - This tracing commit:
      
              tracing: Remove the extra 4 bytes of padding in events
      
           changes the ABI.  All involved parties (PowerTop in particular)
           seem to agree that it's safe to do now with the introduction of
           libtraceevent, but the devil is in the details ...
      
        Main tooling side changes:
      
         - Add 'event ...
      8f55cea4
    • Linus Torvalds's avatar
      Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b7133a9a
      Linus Torvalds authored
      Pull irq core changes from Ingo Molnar:
       "The biggest changes are the IRQ-work and printk changes from Frederic
        Weisbecker, which prepare the code for 'full dynticks' (the ability to
        stop or slow down the periodic tick arbitrarily, not just in idle time
        as today):
      
         - Don't stop tick with irq works pending.  This fix is generally
           useful and concerns archs that can't raise self IPIs.
      
         - Flush irq works before CPU offlining.
      
         - Introduce "lazy" irq works that can wait for the next tick to be
           executed, unless it's stopped.
      
         - Implement klogd wake up using irq work.  This removes the ad-hoc
           printk_tick()/printk_needs_cpu() hooks and make it working even in
           dynticks mode.
      
         - Cleanups and fixes."
      
      * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Export enable/disable_percpu_irq()
        arch Kconfig: Remove references to IRQ_PER_CPU
        irq_work: Remove return value from the irq_work_queue() function
        genirq: Avoid deadlock in spurious handling
        printk: Wake up klogd using irq_work
        irq_work: Make self-IPIs optable
        irq_work: Warn if there's still work on cpu_down
        irq_work: Flush work on CPU_DYING
        irq_work: Don't stop the tick with pending works
        nohz: Add API to check tick state
        irq_work: Remove CONFIG_HAVE_IRQ_WORK
        irq_work: Fix racy check on work pending flag
        irq_work: Fix racy IRQ_WORK_BUSY flag setting
      b7133a9a
    • Linus Torvalds's avatar
      Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e84cf5d0
      Linus Torvalds authored
      Pull RCU changes from Ingo Molnar:
       "SRCU changes:
      
         - These include debugging aids, updates that move towards the goal of
           permitting srcu_read_lock() and srcu_read_unlock() to be used from
           idle and offline CPUs, and a few small fixes.
      
        Changes to rcutorture and to RCU documentation:
      
         - Posted to LKML at https://lkml.org/lkml/2013/1/26/188
      
        Enhancements to uniprocessor handling in tiny RCU:
      
         - Posted to LKML at https://lkml.org/lkml/2013/1/27/2
      
        Tag RCU callbacks with grace-period number to simplify callback
        advancement:
      
         - Posted to LKML at https://lkml.org/lkml/2013/1/26/203
      
        Miscellaneous fixes:
      
         - Posted to LKML at https://lkml.org/lkml/2013/1/26/204"
      
      * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
        srcu: use ACCESS_ONCE() to access sp->completed in srcu_read_lock()
        srcu: Update synchronize_srcu_expedited()'s comments
        srcu: Update synchronize_srcu()'s comments
        srcu: Remove checks preventing idle CPUs from calling srcu_read_lock()
        srcu: Remove checks preventing offline CPUs from calling srcu_read_lock()
        srcu: Simple cleanup for cleanup_srcu_struct()
        srcu: Add might_sleep() annotation to synchronize_srcu()
        srcu: Simplify __srcu_read_unlock() via this_cpu_dec()
        rcu: Allow rcutorture to be built at low optimization levels
        rcu: Make rcutorture's shuffler task shuffle recently added tasks
        rcu: Allow TREE_PREEMPT_RCU on UP systems
        rcu: Provide RCU CPU stall warnings for tiny RCU
        context_tracking: Add comments on interface and internals
        rcu: Remove obsolete Kconfig option from comment
        rcu: Remove unused code originally used for context tracking
        rcu: Consolidate debugging Kconfig options
        rcu: Correct 'optimized' to 'optimize' in header comment
        rcu: Trace callback acceleration
        rcu: Tag callback lists with corresponding grace-period number
        rcutorture: Don't compare ptr with 0
        ...
      e84cf5d0
    • Konstantin Khlebnikov's avatar
      workqueue: un-GPL function delayed_work_timer_fn() · 1438ade5
      Konstantin Khlebnikov authored
      commit d8e794df
      
       ("workqueue: set
      delayed_work->timer function on initialization") exports function
      delayed_work_timer_fn() only for GPL modules. This makes delayed-works
      unusable for non-GPL modules, because initialization macro now requires
      GPL symbol. For example schedule_delayed_work() available for non-GPL.
      
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org # 3.7
      1438ade5
  7. Feb 19, 2013
    • Ingo Molnar's avatar
      sched/rt: Add <linux/sched/rt.h> header to <linux/init_task.h> · 77852fea
      Ingo Molnar authored
      
      
      IA64 relied on it through sched.h inclusion:
      
        arch/ia64/kernel/init_task.c:38:11: error: 'MAX_PRIO' undeclared here (not in a function)
        arch/ia64/kernel/init_task.c:38:11: error: 'RR_TIMESLICE' undeclared here (not in a function)
      
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Cc: Clark Williams <williams@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/n/tip-xaan1twswggedMR0airtpjui@git.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      77852fea
    • Thomas Gleixner's avatar
      cputime: Remove irqsave from seqlock readers · cdc4e86b
      Thomas Gleixner authored
      
      
      The reader side code has no requirement to disable interrupts while
      sampling data. The sequence counter is enough to ensure consistency.
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      cdc4e86b
    • Steven Rostedt (Red Hat)'s avatar
      ftrace: Call ftrace cleanup module notifier after all other notifiers · 8c189ea6
      Steven Rostedt (Red Hat) authored
      Commit: c1bf08ac
      
       "ftrace: Be first to run code modification on modules"
      
      changed ftrace module notifier's priority to INT_MAX in order to
      process the ftrace nops before anything else could touch them
      (namely kprobes). This was the correct thing to do.
      
      Unfortunately, the ftrace module notifier also contains the ftrace
      clean up code. As opposed to the set up code, this code should be
      run *after* all the module notifiers have run in case a module is doing
      correct clean-up and unregisters its ftrace hooks. Basically, ftrace
      needs to do clean up on module removal, as it needs to know about code
      being removed so that it doesn't try to modify that code. But after it
      removes the module from its records, if a ftrace user tries to remove
      a probe, that removal will fail due as the record of that code segment
      no longer exists.
      
      Nothing really bad happens if the probe removal is called after ftrace
      did the clean up, but the ftrace removal function will return an error.
      Correct code (such as kprobes) will produce a WARN_ON() if it fails
      to remove the probe. As people get annoyed by frivolous warnings, it's
      best to do the ftrace clean up after everything else.
      
      By splitting the ftrace_module_notifier into two notifiers, one that
      does the module load setup that is run at high priority, and the other
      that is called for module clean up that is run at low priority, the
      problem is solved.
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarFrank Ch. Eigler <fche@redhat.com>
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      8c189ea6
    • Linus Torvalds's avatar
      Linux 3.8 · 19f949f5
      Linus Torvalds authored
      v3.8
      19f949f5
    • Chris Metcalf's avatar
      genirq: Export enable/disable_percpu_irq() · 36a5df85
      Chris Metcalf authored
      
      
      These functions are used by the tilegx onchip network driver, and it's
      useful to be able to load that driver as a module.
      
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      Link: http://lkml.kernel.org/r/201302012043.r11KhNZF024371@farm-0021.internal.tilera.com
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      36a5df85
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · e9cf59ae
      Linus Torvalds authored
      Pull input subsystem fixes from Dmitry Torokhov:
       "Two small driver fixups and a documentation update for managed input
        devices"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: wacom - fix wacom_set_report retry logic
        Input: document that unregistering managed devices is not necessary
        Input: lm8323 - fix checking PWM interrupt status
      e9cf59ae
    • Linus Torvalds's avatar
      mm: fix pageblock bitmap allocation · 7c45512d
      Linus Torvalds authored
      Commit c060f943 ("mm: use aligned zone start for pfn_to_bitidx
      calculation") fixed out calculation of the index into the pageblock
      bitmap when a !SPARSEMEM zome was not aligned to pageblock_nr_pages.
      
      However, the _allocation_ of that bitmap had never taken this alignment
      requirement into accout, so depending on the exact size and alignment of
      the zone, the use of that index could then access past the allocation,
      resulting in some very subtle memory corruption.
      
      This was reported (and bisected) by Ingo Molnar: one of his random
      config builds would hang with certain very specific kernel command line
      options.
      
      In the meantime, commit c060f943
      
       has been marked for stable, so this
      fix needs to be back-ported to the stable kernels that backported the
      commit to use the right alignment.
      
      Bisected-and-tested-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarMel Gorman <mgorman@suse.de>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7c45512d
  8. Feb 18, 2013
    • Alexander Holler's avatar
      x86/memtest: Shorten time for tests · 20bf062c
      Alexander Holler authored
      
      
      By just reversing the order memtest is using the test patterns,
      an additional round to zero the memory is not necessary.
      
      This might save up to a second or even more for setups which are
      doing tests on every boot.
      
      Signed-off-by: default avatarAlexander Holler <holler@ahsoftware.de>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1361029097-8308-1-git-send-email-holler@ahsoftware.de
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      20bf062c
  9. Feb 16, 2013
    • Jacob Shin's avatar
      perf/x86/amd: Enable northbridge performance counters on AMD family 15h · e259514e
      Jacob Shin authored
      
      
      On AMD family 15h processors, there are 4 new performance
      counters (in addition to 6 core performance counters) that can
      be used for counting northbridge events (i.e. DRAM accesses).
      
      Their bit fields are almost identical to the core performance
      counters. However, unlike the core performance counters, these
      MSRs are shared between multiple cores (that share the same
      northbridge).
      
      We will reuse the same code path as existing family 10h
      northbridge event constraints handler logic to enforce
      this sharing.
      
      Signed-off-by: default avatarJacob Shin <jacob.shin@amd.com>
      Acked-by: default avatarStephane Eranian <eranian@google.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Jacob Shin <jacob.shin@amd.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1360171589-6381-7-git-send-email-jacob.shin@amd.com
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e259514e
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.8-rc7-tag-two' of... · f741656d
      Linus Torvalds authored
      Merge tag 'stable/for-linus-3.8-rc7-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull xen fixes from Konrad Rzeszutek Wilk:
       "Two fixes:
      
         - A simple bug-fix for redundant NULL check.
      
         - CVE-2013-0228/XSA-42: x86/xen: don't assume %ds is usable in
           xen_iret for 32-bit PVOPS
      
        and two reverts:
      
         - Revert the PVonHVM kexec.  The patch introduces a regression with
           older hypervisor stacks, such as Xen 4.1."
      
      * tag 'stable/for-linus-3.8-rc7-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        Revert "xen PVonHVM: use E820_Reserved area for shared_info"
        Revert "xen/PVonHVM: fix compile warning in init_hvm_pv_info"
        xen: remove redundant NULL check before unregister_and_remove_pcpu().
        x86/xen: don't assume %ds is usable in xen_iret for 32-bit PVOPS.
      f741656d
    • Mauro Carvalho Chehab's avatar
      Revert "[media] dvb_frontend: return -ENOTTY for unimplement IOCTL" · ac897586
      Mauro Carvalho Chehab authored
      As reported by Klaus Schmidinger:
       "In VDR I use an ioctl() call with FE_READ_UNCORRECTED_BLOCKS on a
        device (using stb0899).  After this call I check 'errno' for
        EOPNOTSUPP to determine whether this device supports this call.  This
        used to work just fine, until a few months ago I noticed that my
        devices using stb0899 didn't display their signal quality in VDR's OSD
        any more.  After further investigation I found that
        ioctl(FE_READ_UNCORRECTED_BLOCKS) no longer returns EOPNOTSUPP, but
        rather ENOTTY.  And since I stop getting the signal quality in case
        any unknown errno value appears, this broke my signal quality query
        function."
      
      While the changes reflect what is there at:
      
        http://comments.gmane.org/gmane.linux.kernel/1235728
      
      it does cause regression on userspace.  So, revert it to stop the
      damage.
      
      This reverts commit 177ffe50
      
       ("[media] dvb_frontend: return -ENOTTY
      for unimplement IOCTL").
      
      Reported-by: default avatarKlaus Schmidinger <Klaus.Schmidinger@tvdr.de>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ac897586
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 11e76514
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
       "A couple small fixes for sparc including some THP brown-paper-bag
        material:
      
         1) During the merging of all the THP support for various
            architectures, sparc missed adding a
            HAVE_ARCH_TRANSPARENT_HUGEPAGE to it's Kconfig, oops.
      
         2) Sparc needs to be mindful of hugepages in get_user_pages_fast().
      
         3) Fix memory leak in SBUS probe, from Cong Ding.
      
         4) The sunvdc virtual disk client driver has a test of the bitmask of
            vdisk server supported operations which was off by one bit"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sunvdc: Fix off-by-one in generic_request().
        sparc64: Fix get_user_pages_fast() wrt. THP.
        sparc64: Add missing HAVE_ARCH_TRANSPARENT_HUGEPAGE.
        sparc: kernel/sbus.c: fix memory leakage
      11e76514