19 Oct, 2010

7 commits

  • The use of the JUMP_LABEL() construct ends up creating endless silly
    wrappers, create a higher level construct to reduce this clutter.

    Signed-off-by: Peter Zijlstra
    Cc: Jason Baron
    Cc: Steven Rostedt
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Cc: Paul Mackerras
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Acked-by: Frederic Weisbecker
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Trades a call + conditional + ret for an unconditional jmp.

    Acked-by: Frederic Weisbecker
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Add an interface to allow usage of jump_labels with atomic counters.

    Signed-off-by: Peter Zijlstra
    Acked-by: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Now that there's still only a few users around, rename things to make
    them more consistent.

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

    Peter Zijlstra
     
  • hw_breakpoint creation needs to account stuff per-task to ensure there
    is always sufficient hardware resources to back these things due to
    ptrace.

    With the perf per pmu context changes the event initialization no
    longer has access to the event context, for the simple reason that we
    need to first find the pmu (result of initialization) before we can
    find the context.

    This makes hw_breakpoints unhappy, because it can no longer do per
    task accounting, cure this by frobbing a task pointer in the event::hw
    bits for now...

    Signed-off-by: Peter Zijlstra
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Provide a mechanism that allows running code in IRQ context. It is
    most useful for NMI code that needs to interact with the rest of the
    system -- like wakeup a task to drain buffers.

    Perf currently has such a mechanism, so extract that and provide it as
    a generic feature, independent of perf so that others may also
    benefit.

    The IRQ context callback is generated through self-IPIs where
    possible, or on architectures like powerpc the decrementer (the
    built-in timer facility) is set to generate an interrupt immediately.

    Architectures that don't have anything like this get to do with a
    callback from the timer tick. These architectures can call
    irq_work_run() at the tail of any IRQ handlers that might enqueue such
    work (like the perf IRQ handler) to avoid undue latencies in
    processing the work.

    Signed-off-by: Peter Zijlstra
    Acked-by: Kyle McMartin
    Acked-by: Martin Schwidefsky
    [ various fixes ]
    Signed-off-by: Huang Ying
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

15 Oct, 2010

2 commits

  • Commit e9677b3ce (oprofile, ARM: Use oprofile_arch_exit() to
    cleanup on failure) caused oprofile_perf_exit to be called
    in the cleanup path of oprofile_perf_init. The __exit tag
    for oprofile_perf_exit should therefore be dropped.

    The same has to be done for exit_driverfs as well, as this
    function is called from oprofile_perf_exit. Else, we get
    the following two linker errors.

    LD .tmp_vmlinux1
    `oprofile_perf_exit' referenced in section `.init.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o
    make: *** [.tmp_vmlinux1] Error 1

    LD .tmp_vmlinux1
    `exit_driverfs' referenced in section `.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o
    make: *** [.tmp_vmlinux1] Error 1

    Signed-off-by: Anand Gadiyar
    Cc: Will Deacon
    Signed-off-by: Robert Richter

    Anand Gadiyar
     
  • Conflicts:
    arch/arm/oprofile/common.c
    kernel/perf_event.c

    Robert Richter
     

14 Oct, 2010

1 commit

  • Define dummy __stop_machine() function even when
    CONFIG_STOP_MACHINE=n. This getcpu-required version of
    stop_machine() will be used from poke_text_smp().

    Signed-off-by: Masami Hiramatsu
    Acked-by: Tejun Heo
    Cc: Rusty Russell
    Cc: Ananth N Mavinakayanahalli
    Cc: 2nddept-manager@sdl.hitachi.co.jp
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     

12 Oct, 2010

1 commit


11 Oct, 2010

4 commits

  • Move the perf-events backend from arch/arm/oprofile into
    drivers/oprofile so that the code can be shared between architectures.

    This allows each architecture to maintain only a single copy of the PMU
    accessor functions instead of one for both perf and OProfile. It also
    becomes possible for other architectures to delete much of their
    OProfile code in favour of the common code now available in
    drivers/oprofile/oprofile_perf.c.

    Signed-off-by: Matt Fleming
    Tested-by: Will Deacon
    Signed-off-by: Robert Richter

    Matt Fleming
     
  • Make op_name_from_perf_id() global so that we have a way for each
    architecture to construct an oprofile name for op->cpu_type. We need to
    remove the argument from the function prototype so that we can hide all
    implementation details inside the function.

    Signed-off-by: Matt Fleming
    Signed-off-by: Robert Richter

    Matt Fleming
     
  • Introduce perf_pmu_name() helper function that returns the name of the
    pmu. This gives us a generic way to get the name of a pmu regardless of
    how an architecture identifies it internally.

    Signed-off-by: Matt Fleming
    Acked-by: Peter Zijlstra
    Acked-by: Paul Mundt
    Signed-off-by: Robert Richter

    Matt Fleming
     
  • The number of counters for the registered pmu is needed in a few places
    so provide a helper function that returns this number.

    Signed-off-by: Matt Fleming
    Tested-by: Will Deacon
    Acked-by: Paul Mundt
    Acked-by: Peter Zijlstra
    Signed-off-by: Robert Richter

    Matt Fleming
     

08 Oct, 2010

1 commit


06 Oct, 2010

3 commits

  • …/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:
    rcu: rcu_read_lock_bh_held(): disabling irqs also disables bh
    generic-ipi: Fix deadlock in __smp_call_function_single

    Linus Torvalds
     
  • The "flags" member of "struct wait_queue_t" is used in several places in
    the kernel code without beeing initialized by init_wait(). "flags" is
    used in bitwise operations.

    If "flags" not initialized then unexpected behaviour may take place.
    Incorrect flags might used later in code.

    Added initialization of "wait_queue_t.flags" with zero value into
    "init_wait".

    Signed-off-by: Evgeny Kuznetsov
    [ The bit we care about does end up being initialized by both
    prepare_to_wait() and add_to_wait_queue(), so this doesn't seem to
    cause actual bugs, but is definitely the right thing to do -Linus ]
    Signed-off-by: Linus Torvalds

    Evgeny Kuznetsov
     
  • With all the recent module loading cleanups, we've minimized the code
    that sits under module_mutex, fixing various deadlocks and making it
    possible to do most of the module loading in parallel.

    However, that whole conversion totally missed the rather obscure code
    that adds a new module to the list for BUG() handling. That code was
    doubly obscure because (a) the code itself lives in lib/bugs.c (for
    dubious reasons) and (b) it gets called from the architecture-specific
    "module_finalize()" rather than from generic code.

    Calling it from arch-specific code makes no sense what-so-ever to begin
    with, and is now actively wrong since that code isn't protected by the
    module loading lock any more.

    So this commit moves the "module_bug_{finalize,cleanup}()" calls away
    from the arch-specific code, and into the generic code - and in the
    process protects it with the module_mutex so that the list operations
    are now safe.

    Future fixups:
    - move the module list handling code into kernel/module.c where it
    belongs.
    - get rid of 'module_bug_list' and just use the regular list of modules
    (called 'modules' - imagine that) that we already create and maintain
    for other reasons.

    Reported-and-tested-by: Thomas Gleixner
    Cc: Rusty Russell
    Cc: Adrian Bunk
    Cc: Andrew Morton
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

02 Oct, 2010

3 commits

  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    vmwgfx: Fix fb VRAM pinning failure due to fragmentation
    vmwgfx: Remove initialisation of dev::devname
    vmwgfx: Enable use of the vblank system
    vmwgfx: vt-switch (master drop) fixes
    drm/vmwgfx: Fix breakage introduced by commit "drm: block userspace under allocating buffer and having drivers overwrite it (v2)"
    drm: Hold the mutex when dropping the last GEM reference (v2)
    drm/gem: handlecount isn't really a kref so don't make it one.
    drm: i810/i830: fix locked ioctl variant
    drm/radeon/kms: add quirk for MSI K9A2GM motherboard
    drm/radeon/kms: fix potential segfault in r600_ioctl_wait_idle
    drm: Prune GEM vma entries
    drm/radeon/kms: fix up encoder info messages for DFP6
    drm/radeon: fix PCI ID 5657 to be an RV410

    Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPI: invoke DSDT corruption workaround on all Toshiba Satellite
    ACPI, APEI, Fix ERST MOVE_DATA instruction implementation
    ACPI: fan: Fix more unbalanced code block
    ACPI: acpi_pad: simplify code to avoid false gcc build warning
    ACPI, APEI, Fix error path for memory allocation
    ACPI, APEI, HEST Fix the unsuitable usage of platform_data
    ACPI, APEI, Fix acpi_pre_map() return value
    ACPI, APEI, Fix APEI related table size checking
    ACPI: Disable Windows Vista compatibility for Toshiba P305D
    ACPI: Kconfig: fix typo.
    ACPI: add missing __percpu markup in arch/x86/kernel/acpi/cstate.c
    ACPI: Fix typos
    ACPI video: fix a poor warning message
    ACPI: fix build warnings resulting from merge window conflict
    ACPI: EC: add Vista incompatibility DMI entry for Toshiba Satellite L355
    ACPI: expand Vista blacklist to include SP1 and SP2
    ACPI: delete ZEPTO idle=nomwait DMI quirk
    ACPI: enable repeated PCIEXP wakeup by clearing PCIEXP_WAKE_STS on resume
    PM / ACPI: Blacklist systems known to require acpi_sleep=nonvs
    ACPI: Don't report current_now if battery reports in mWh

    Linus Torvalds
     
  • * 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
    intel_idle: Voluntary leave_mm before entering deeper
    acpi_idle: add missing \n to printk
    intel_idle: add missing __percpu markup
    intel_idle: Change mode 755 => 644
    cpuidle: Fix typos
    intel_idle: PCI quirk to prevent Lenovo Ideapad s10-3 boot hang

    Linus Torvalds
     

01 Oct, 2010

3 commits

  • In order to be fully threadsafe we need to check that the drm_gem_object
    refcount is still 0 after acquiring the mutex in order to call the free
    function. Otherwise, we may encounter scenarios like:

    Thread A: Thread B:
    drm_gem_close
    unreference_unlocked
    kref_put mutex_lock
    ... i915_gem_evict
    ... kref_get -> BUG
    ... i915_gem_unbind
    ... kref_put
    ... i915_gem_object_free
    ... mutex_unlock
    mutex_lock
    i915_gem_object_free -> BUG
    i915_gem_object_unbind
    kfree
    mutex_unlock

    Note that no driver is currently using the free_unlocked vfunc and it is
    scheduled for removal, hasten that process.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30454
    Reported-and-Tested-by: Magnus Kessler
    Signed-off-by: Chris Wilson
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Chris Wilson
     
  • Avoid TLB flush IPIs for the cores in deeper c-states by voluntary leave_mm()
    before entering into that state. CPUs tend to flush TLB in those c-states
    anyways.

    acpi_idle does this with C3-type states, but it was not caried over
    when intel_idle was introduced. intel_idle can apply it
    to C-states in addition to those that ACPI might export as C3...

    Signed-off-by: Suresh Siddha
    Signed-off-by: Len Brown

    Suresh Siddha
     
  • There were lots of places being inconsistent since handle count
    looked like a kref but it really wasn't.

    Fix this my just making handle count an atomic on the object,
    and have it increase the normal object kref.

    Now i915/radeon/nouveau drivers can drop the normal reference on
    userspace object creation, and have the handle hold it.

    This patch fixes a memory leak or corruption on unload, because
    the driver had no way of knowing if a handle had been actually
    added for this object, and the fbcon object needed to know this
    to clean itself up properly.

    Reviewed-by: Chris Wilson
    Signed-off-by: Dave Airlie

    Dave Airlie
     

30 Sep, 2010

1 commit


29 Sep, 2010

2 commits

  • Signed-off-by: Len Brown

    Lucas De Marchi
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits)
    tcp: Fix >4GB writes on 64-bit.
    net/9p: Mount only matching virtio channels
    de2104x: fix ethtool
    tproxy: check for transparent flag in ip_route_newports
    ipv6: add IPv6 to neighbour table overflow warning
    tcp: fix TSO FACK loss marking in tcp_mark_head_lost
    3c59x: fix regression from patch "Add ethtool WOL support"
    ipv6: add a missing unregister_pernet_subsys call
    s390: use free_netdev(netdev) instead of kfree()
    sgiseeq: use free_netdev(netdev) instead of kfree()
    rionet: use free_netdev(netdev) instead of kfree()
    ibm_newemac: use free_netdev(netdev) instead of kfree()
    smsc911x: Add MODULE_ALIAS()
    net: reset skb queue mapping when rx'ing over tunnel
    br2684: fix scheduling while atomic
    de2104x: fix TP link detection
    de2104x: fix power management
    de2104x: disable autonegotiation on broken hardware
    net: fix a lockdep splat
    e1000e: 82579 do not gate auto config of PHY by hardware during nominal use
    ...

    Linus Torvalds
     

28 Sep, 2010

4 commits

  • Fixes kernel bugzilla #16603

    tcp_sendmsg() truncates iov_len to an 'int' which a 4GB write to write
    zero bytes, for example.

    There is also the problem higher up of how verify_iovec() works. It
    wants to prevent the total length from looking like an error return
    value.

    However it does this using 'int', but syscalls return 'long' (and
    thus signed 64-bit on 64-bit machines). So it could trigger
    false-positives on 64-bit as written. So fix it to use 'long'.

    Reported-by: Olaf Bonorden
    Reported-by: Daniel Büse
    Reported-by: Andrew Morton
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Hook the GEM vm open/close ops into the generic drm vm open/close so
    that the private vma entries are created and destroy appropriately.
    Fixes the leak of the drm_vma_entries during the lifetime of the filp.

    Reported-by: Matt Mackall
    Cc: Jesse Barnes
    Signed-off-by: Chris Wilson
    Acked-by: Jesse Barnes
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Chris Wilson
     
  • as done in ip_route_connect()

    Signed-off-by: Ulrich Weber
    Signed-off-by: David S. Miller

    Ulrich Weber
     
  • …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/amd-iommu: Fix rounding-bug in __unmap_single
    x86/amd-iommu: Work around S3 BIOS bug
    x86/amd-iommu: Set iommu configuration flags in enable-loop
    x86, setup: Fix earlyprintk=serial,0x3f8,115200
    x86, setup: Fix earlyprintk=serial,ttyS0,115200

    Linus Torvalds
     

27 Sep, 2010

3 commits

  • Clean up a missing exit path in the ipv6 module init routines. In
    addrconf_init we call ipv6_addr_label_init which calls register_pernet_subsys
    for the ipv6_addr_label_ops structure. But if module loading fails, or if the
    ipv6 module is removed, there is no corresponding unregister_pernet_subsys call,
    which leaves a now-bogus address on the pernet_list, leading to oopses in
    subsequent registrations. This patch cleans up both the failed load path and
    the unload path. Tested by myself with good results.

    Signed-off-by: Neil Horman

    include/net/addrconf.h | 1 +
    net/ipv6/addrconf.c | 11 ++++++++---
    net/ipv6/addrlabel.c | 5 +++++
    3 files changed, 14 insertions(+), 3 deletions(-)
    Signed-off-by: David S. Miller

    Neil Horman
     
  • Reset queue mapping when an skb is reentering the stack via a tunnel.
    On second pass, the queue mapping from the original device is no
    longer valid.

    Signed-off-by: Tom Herbert
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Tom Herbert
     
  • fixes https://bugzilla.kernel.org/show_bug.cgi?id=19012

    cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Dave Airlie
     

24 Sep, 2010

2 commits


23 Sep, 2010

3 commits

  • rcu_dereference_bh() doesnt know yet about hard irq being disabled, so
    lockdep can trigger in netpoll_rx() after commit f0f9deae9e7c4 (netpoll:
    Disable IRQ around RCU dereference in netpoll_rx)

    Reported-by: Miles Lane
    Signed-off-by: Eric Dumazet
    Tested-by: Miles Lane
    Signed-off-by: Paul E. McKenney

    Eric Dumazet
     
  • This patch adds a workaround for an IOMMU BIOS problem to
    the AMD IOMMU driver. The result of the bug is that the
    IOMMU does not execute commands anymore when the system
    comes out of the S3 state resulting in system failure. The
    bug in the BIOS is that is does not restore certain hardware
    specific registers correctly. This workaround reads out the
    contents of these registers at boot time and restores them
    on resume from S3. The workaround is limited to the specific
    IOMMU chipset where this problem occurs.

    Cc: stable@kernel.org
    Signed-off-by: Joerg Roedel

    Joerg Roedel
     
  • This fixes the regression caused by the commit 6fee48cd330c68
    ("dma-mapping: arm: use generic pci_set_dma_mask and
    pci_set_consistent_dma_mask").

    ARM needs to clip the dma coherent mask for dmabounce devices. This
    restores the old trick.

    Note that strictly speaking, the DMA API doesn't allow architectures to do
    such but I'm not sure it's worth adding the new API to set the dma mask
    that allows architectures to clip it.

    Reported-by: Krzysztof Halasa
    Signed-off-by: FUJITA Tomonori
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori