28 Jan, 2013

8 commits


25 Jan, 2013

3 commits

  • Take advantage of multiple MSIs implementation on x86 - on
    systems with IRQ remapping AHCI ports not only get assigned
    separate MSI vectors - but also separate IRQs. As result,
    interrupts generated by different ports could be serviced on
    different CPUs rather than on a single one.

    In cases when number of allocated MSIs is less than requested
    the Sharing Last MSI mode does not get used, no matter
    implemented in hardware or not. Instead, the driver assumes the
    advantage of multiple MSIs is negated and falls back to the
    single MSI mode as if MRSM bit was set (some Intel chips
    implement this strategy anyway - MRSM bit gets set even if the
    number of allocated MSIs exceeds the number of implemented ports).

    Signed-off-by: Alexander Gordeev
    Acked-by: Jeff Garzik
    Cc: Bjorn Helgaas
    Cc: Suresh Siddha
    Cc: Yinghai Lu
    Cc: Matthew Wilcox
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/15bf7ee314dd55f21ec7d2a01c47613cd8190a7c.1353324359.git.agordeev@redhat.com
    Signed-off-by: Ingo Molnar

    Alexander Gordeev
     
  • The new function pci_enable_msi_block_auto() tries to allocate
    maximum possible number of MSIs up to the number the device
    supports. It generalizes a pattern when pci_enable_msi_block()
    is contiguously called until it succeeds or fails.

    Opposite to pci_enable_msi_block() which takes the number of
    MSIs to allocate as a input parameter,
    pci_enable_msi_block_auto() could be used by device drivers to
    obtain the number of assigned MSIs and the number of MSIs the
    device supports.

    Signed-off-by: Alexander Gordeev
    Acked-by: Bjorn Helgaas
    Cc: Suresh Siddha
    Cc: Yinghai Lu
    Cc: Matthew Wilcox
    Cc: Jeff Garzik
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/c3de2419df94a0f95ca1a6f755afc421486455e6.1353324359.git.agordeev@redhat.com
    Signed-off-by: Ingo Molnar

    Alexander Gordeev
     
  • The MSI specification has several constraints in comparison with
    MSI-X, most notable of them is the inability to configure MSIs
    independently. As a result, it is impossible to dispatch
    interrupts from different queues to different CPUs. This is
    largely devalues the support of multiple MSIs in SMP systems.

    Also, a necessity to allocate a contiguous block of vector
    numbers for devices capable of multiple MSIs might cause a
    considerable pressure on x86 interrupt vector allocator and
    could lead to fragmentation of the interrupt vectors space.

    This patch overcomes both drawbacks in presense of IRQ remapping
    and lets devices take advantage of multiple queues and per-IRQ
    affinity assignments.

    Signed-off-by: Alexander Gordeev
    Cc: Bjorn Helgaas
    Cc: Suresh Siddha
    Cc: Yinghai Lu
    Cc: Matthew Wilcox
    Cc: Jeff Garzik
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/c8bd86ff56b5fc118257436768aaa04489ac0a4c.1353324359.git.agordeev@redhat.com
    Signed-off-by: Ingo Molnar

    Alexander Gordeev
     

24 Jan, 2013

12 commits

  • This patch updates x2apic initializaition code to allow x2apic
    on VMware platform even without interrupt remapping support.
    The hypervisor_x2apic_available hook was added in x2apic
    initialization code and used by KVM and XEN, before this.
    I have also cleaned up that code to export this hook through the
    hypervisor_x86 structure.

    Compile tested for KVM and XEN configs, this patch doesn't have
    any functional effect on those two platforms.

    On VMware platform, verified that x2apic is used in physical
    mode on products that support this.

    Signed-off-by: Alok N Kataria
    Reviewed-by: Doug Covelli
    Reviewed-by: Dan Hecht
    Acked-by: H. Peter Anvin
    Cc: Konrad Rzeszutek Wilk
    Cc: Jeremy Fitzhardinge
    Cc: Avi Kivity
    Link: http://lkml.kernel.org/r/1358466282.423.60.camel@akataria-dtop.eng.vmware.com
    Signed-off-by: Ingo Molnar

    Alok N Kataria
     
  • Since circa 3.5, we've had dozens of reports of people hitting
    this warning. Forwarded reports have been met with silence, so
    just remove the warning if no-one cares.

    Example reports:

    https://bugzilla.redhat.com/show_bug.cgi?id=797687
    https://bugzilla.redhat.com/show_bug.cgi?id=867174
    https://bugzilla.redhat.com/show_bug.cgi?id=894865

    Signed-off-by: Dave Jones
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/20130118175847.GA27662@redhat.com
    Signed-off-by: Ingo Molnar

    Dave Jones
     
  • Pull more USB fixes from Greg Kroah-Hartman:
    "Here are some more USB fixes for the 3.8-rc4 tree.

    Some gadget driver fixes, and finally resolved the ehci-mxc driver
    build issues (it's just some code moving around and being deleted)."

    * tag 'usb-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    USB: EHCI: fix build error in ehci-mxc
    USB: EHCI: add a name for the platform-private field
    USB: EHCI: fix incorrect configuration test
    USB: EHCI: Move definition of EHCI_STATS to ehci.h
    USB: UHCI: fix IRQ race during initialization
    usb: gadget: FunctionFS: Fix missing braces in parse_opts
    usb: dwc3: gadget: fix ep->maxburst for ep0
    ARM: i.MX clock: Change the connection-id for fsl-usb2-udc
    usb: gadget: fsl_mxc_udc: replace MX35_IO_ADDRESS to ioremap
    usb: gadget: fsl-mxc-udc: replace cpu_is_xxx() with platform_device_id
    usb: musb: cppi_dma: drop '__init' annotation

    Linus Torvalds
     
  • Pull drivers/misc fix from Greg Kroah-Hartman:
    "Here is a single revert for the ti-st misc driver, fixing problem that
    was introduced in 3.7-rc1 that has been bothering people."

    * tag 'char-misc-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    Revert "drivers/misc/ti-st: remove gpio handling"

    Linus Torvalds
     
  • Pull a TTY maintainer patch from Greg Kroah-Hartman:
    "Just a MAINTAINERS update, now that Alan has left for a bit, I'll
    continue to watch over the serial drivers."

    * tag 'tty-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    MAINTAINERS: Someone needs to watch over the serial drivers

    Linus Torvalds
     
  • Pull media fixes from Mauro Carvalho Chehab:
    - gspca: add needed delay for I2C traffic for sonixb/sonixj cameras
    - gspca: add one missing Kinect USB ID
    - usbvideo: some regression fixes
    - omap3isp: fix some build issues
    - videobuf2: fix video output handling
    - exynos s5p/m5mols: a few regression fixes.

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] uvcvideo: Set error_idx properly for S_EXT_CTRLS failures
    [media] uvcvideo: Cleanup leftovers of partial revert
    [media] uvcvideo: Return -EACCES when trying to set a read-only control
    [media] omap3isp: Don't include
    [media] s5p-mfc: Fix interrupt error handling routine
    [media] s5p-fimc: Fix return value of __fimc_md_create_flite_source_links()
    [media] m5mols: Fix typo in get_fmt callback
    [media] v4l: vb2: Set data_offset to 0 for single-plane output buffers
    [media] [FOR,v3.8] omap3isp: Don't include deleted OMAP plat/ header files
    [media] gspca_sonixj: Add a small delay after i2c_w1
    [media] gspca_sonixb: Properly wait between i2c writes
    [media] gspca_kinect: add Kinect for Windows USB id

    Linus Torvalds
     
  • Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Pull m68k fixes from Geert Uytterhoeven:
    "The asm-generic changeset has been ack'ed by Arnd."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k: Wire up finit_module
    asm-generic/dma-mapping-broken.h: Provide dma_alloc_attrs()/dma_free_attrs()
    m68k: Provide dma_alloc_attrs()/dma_free_attrs()

    Linus Torvalds
     
  • Pull arm64 fixes from Catalin Marinas:
    - ELF coredump fix (more registers dumped than what user space expects)
    - SUBARCH name generation (s/aarch64/arm64/)

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
    arm64: makefile: fix uname munging when setting ARCH on native machine
    arm64: elf: fix core dumping to match what glibc expects

    Linus Torvalds
     
  • This patch (as1643b) fixes a build error in ehci-hcd when compiling for
    ARM with allmodconfig:

    drivers/usb/host/ehci-hcd.c:1285:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
    drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the previous definition
    drivers/usb/host/ehci-mxc.c:280:31: warning: 'ehci_mxc_driver' defined but not used [-Wunused-variable]
    drivers/usb/host/ehci-hcd.c:1285:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
    drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the previous definition

    The fix is to convert ehci-mxc over to the new "ehci-hcd is a library"
    scheme so that it can coexist peacefully with the ehci-platform
    driver. As part of the conversion the ehci_mxc_priv data structure,
    which was allocated dynamically, is now placed where it belongs: in
    the private area at the end of struct ehci_hcd.

    Signed-off-by: Alan Stern
    Tested-by: Shawn Guo
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • Pull sound fixes from Takashi Iwai:
    "Only a few small HD-audio fixes:
    - Addition of new Conexant codec IDs
    - Two one-liners to add fixups for Realtek codecs
    - A last-minute regression fix for auto-mute with power-saving mode
    (regressed since 3.8-rc1)"

    * tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Fix inconsistent pin states after resume
    ALSA: hda - Add Conexant CX20755/20756/20757 codec IDs
    ALSA: hda - Add fixup for Acer AO725 laptop
    ALSA: hda - Fix mute led for another HP machine

    Linus Torvalds
     
  • Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     

23 Jan, 2013

17 commits

  • The commit [26a6cb6c: ALSA: hda - Implement a poll loop for jacks as a
    module parameter] introduced the polling jack detection code, but it
    also moved the call of snd_hda_jack_set_dirty_all() in the resume path
    after resume/init ops call. This caused a regression when the jack
    state has been changed during power-down (e.g. in the power save
    mode). Since the driver doesn't probe the new jack state but keeps
    using the cached value due to no dirty flag, the pin state remains
    also as if the jack is still plugged.

    The fix is simply moving snd_hda_jack_set_dirty_all() to the original
    position.

    Reported-by: Manolo Díaz
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • This reverts commit eccf2979b2c034b516e01b8a104c3739f7ef07d1.

    The reason is that it broke TI WiLink shared transport on Panda.
    Also, callback functions should not be added to board files anymore,
    so revert to implementing the power functions in the driver itself.

    Additionally, changed a variable name ('status' to 'err') so that this
    revert compiles properly.

    Cc: stable [3.7]
    Acked-by: Tony Lindgren
    Signed-off-by: Luciano Coelho
    Signed-off-by: Greg Kroah-Hartman

    Luciano Coelho
     
  • Pull PCI updates from Bjorn Helgaas:
    "The most important is a fix for a pciehp deadlock that occurs when
    unplugging a Thunderbolt adapter. We also applied the same fix to
    shpchp, removed CONFIG_EXPERIMENTAL dependencies, fixed a
    pcie_aspm=force problem, and fixed a refcount leak.

    Details:

    - Hotplug
    PCI: pciehp: Use per-slot workqueues to avoid deadlock
    PCI: shpchp: Make shpchp_wq non-ordered
    PCI: shpchp: Handle push button event asynchronously
    PCI: shpchp: Use per-slot workqueues to avoid deadlock

    - Power management
    PCI: Allow pcie_aspm=force even when FADT indicates it is unsupported

    - Misc
    PCI/AER: pci_get_domain_bus_and_slot() call missing required pci_dev_put()
    PCI: remove depends on CONFIG_EXPERIMENTAL"

    * tag '3.8-pci-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    PCI: remove depends on CONFIG_EXPERIMENTAL
    PCI: Allow pcie_aspm=force even when FADT indicates it is unsupported
    PCI: shpchp: Use per-slot workqueues to avoid deadlock
    PCI: shpchp: Handle push button event asynchronously
    PCI: shpchp: Make shpchp_wq non-ordered
    PCI/AER: pci_get_domain_bus_and_slot() call missing required pci_dev_put()
    PCI: pciehp: Use per-slot workqueues to avoid deadlock

    Linus Torvalds
     
  • Commit 083b804c4d3e ("async: use workqueue for worker pool") made it
    possible that async jobs are moved from pending to running out-of-order.
    While pending async jobs will be queued and dispatched for execution in
    the same order, nothing guarantees they'll enter "1) move self to the
    running queue" of async_run_entry_fn() in the same order.

    Before the conversion, async implemented its own worker pool. An async
    worker, upon being woken up, fetches the first item from the pending
    list, which kept the executing lists sorted. The conversion to
    workqueue was done by adding work_struct to each async_entry and async
    just schedules the work item. The queueing and dispatching of such work
    items are still in order but now each worker thread is associated with a
    specific async_entry and moves that specific async_entry to the
    executing list. So, depending on which worker reaches that point
    earlier, which is non-deterministic, we may end up moving an async_entry
    with larger cookie before one with smaller one.

    This broke __lowest_in_progress(). running->domain may not be properly
    sorted and is not guaranteed to contain lower cookies than pending list
    when not empty. Fix it by ensuring sort-inserting to the running list
    and always looking at both pending and running when trying to determine
    the lowest cookie.

    Over time, the async synchronization implementation became quite messy.
    We better restructure it such that each async_entry is linked to two
    lists - one global and one per domain - and not move it when execution
    starts. There's no reason to distinguish pending and running. They
    behave the same for synchronization purposes.

    Signed-off-by: Tejun Heo
    Cc: Arjan van de Ven
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

    . revert 20b279 - require exclude_guest to use PEBS - kernel side, now
    older binaries will continue working for things like cycles:pp
    without needing to pass extra modifiers, from David Ahern.

    . Fix building from 'make perf-*-src-pkg' tarballs, broken by UAPI,
    from Sebastian Andrzej Siewior

    [ Pulling directly, Ingo would normally pull but has been unresponsive ]

    * tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
    perf tools: Fix building from 'make perf-*-src-pkg' tarballs
    perf x86: revert 20b279 - require exclude_guest to use PEBS - kernel side

    Linus Torvalds
     
  • Pull parisc fixes from Helge Deller:
    "Improve the stability of the linux kernel on the parisc architecture"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: sigaltstack doesn't round ss.ss_sp as required
    parisc: improve ptrace support for gdb single-step
    parisc: don't claim cpu irqs more than once
    parisc: avoid undefined shift in cnv_float.h

    Linus Torvalds
     
  • Pull fuse fixes from Miklos Szeredi:
    "This contain a bugfix for CUSE and miscellaneous small fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
    fuse: remove unused variable in fuse_try_move_page()
    fuse: make fuse_file_fallocate() static
    fuse: Move CUSE Kconfig entry from fs/Kconfig into fs/fuse/Kconfig
    cuse: fix uninitialized variable warnings
    cuse: do not register multiple devices with identical names
    cuse: use mutex as registration lock instead of spinlocks

    Linus Torvalds
     
  • Pull GPIO fixes from Linus Walleij:
    "Here are some GPIO fixes I stacked up in my GPIO tree:

    - Remove a bad #include from the Samsung driver
    - Some Kconfig hazzle for the Samsungs
    - Skip gpiolib registration on EXYNOS5440
    - Don't free the MVEBU label"

    * tag 'fixes-for-v3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    gpio: mvebu: Don't free chip label memory
    gpio: samsung: skip gpio lib registration for EXYNOS5440
    gpio: samsung: silent build warning for EXYNOS5 SoCs
    gpio: samsung: fix pinctrl condition for exynos and exynos5440
    gpio: samsung: remove inclusion

    Linus Torvalds
     
  • Pull f2fs fixes from Jaegeuk Kim:
    o Support swap file and link generic_file_remap_pages
    o Enhance the bio streaming flow and free section control
    o Major bug fix on recovery routine
    o Minor bug/warning fixes and code cleanups

    * tag 'f2fs-for-3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (22 commits)
    f2fs: use _safe() version of list_for_each
    f2fs: add comments of start_bidx_of_node
    f2fs: avoid issuing small bios due to several dirty node pages
    f2fs: support swapfile
    f2fs: add remap_pages as generic_file_remap_pages
    f2fs: add __init to functions in init_f2fs_fs
    f2fs: fix the debugfs entry creation path
    f2fs: add global mutex_lock to protect f2fs_stat_list
    f2fs: remove the blk_plug usage in f2fs_write_data_pages
    f2fs: avoid redundant time update for parent directory in f2fs_delete_entry
    f2fs: remove redundant call to set_blocksize in f2fs_fill_super
    f2fs: move f2fs_balance_fs to punch_hole
    f2fs: add f2fs_balance_fs in several interfaces
    f2fs: revisit the f2fs_gc flow
    f2fs: check return value during recovery
    f2fs: avoid null dereference in f2fs_acl_from_disk
    f2fs: initialize newly allocated dnode structure
    f2fs: update f2fs partition info about SIT/NAT layout
    f2fs: update f2fs document to reflect SIT/NAT layout correctly
    f2fs: remove unneeded INIT_LIST_HEAD at few places
    ...

    Linus Torvalds
     
  • Pull vfio fix from Alex Williamson.
    "vfio-pci: Fix buffer overfill"

    * tag 'vfio-for-v3.8-rc5' of git://github.com/awilliam/linux-vfio:
    vfio-pci: Fix buffer overfill

    Linus Torvalds
     
  • Pull ftrace fix from Steven Rostedt:
    "Kprobes now uses the function tracer if it can. That is, if a probe
    is placed on a function mcount/nop location, and the arch supports it,
    instead of adding a breakpoint, kprobes will register a function
    callback as that is much more efficient.

    The function tracer requires to update modules before they run, and
    uses the module notifier to do so. But if something else in the
    module notifiers registers a kprobe at one of these locations, before
    ftrace can get to it, then the system could fail.

    The function tracer must be initialized early, otherwise module
    notifiers that probe will only work by chance."

    * tag 'trace-3.8-rc4-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    ftrace: Be first to run code modification on modules

    Linus Torvalds
     
  • Pull libata fixes from Jeff Garzik:

    1) ahci: Fix typo that caused erronenous error handling.

    Thought: I wonder if sparse could have caught this, somehow.

    2) ahci: support a slightly odd Enmotus variant

    3) core: fix a drive detection problem by correcting the logic by which
    the DevSlp timing variables are obtained and used.

    * tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    [libata] replace sata_settings with devslp_timing
    [libata] ahci: Add support for Enmotus Bobcat device.
    [libata] ahci: Fix lack of command retry after a success error handler.

    Linus Torvalds
     
  • Pull security subsystem bugfixes from James Morris.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
    security/device_cgroup: lock assert fails in dev_exception_clean()
    evm: checking if removexattr is not a NULL

    Linus Torvalds
     
  • wake_up_process() should never wakeup a TASK_STOPPED/TRACED task.
    Change it to use TASK_NORMAL and add the WARN_ON().

    TASK_ALL has no other users, probably can be killed.

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • putreg() assumes that the tracee is not running and pt_regs_access() can
    safely play with its stack. However a killed tracee can return from
    ptrace_stop() to the low-level asm code and do RESTORE_REST, this means
    that debugger can actually read/modify the kernel stack until the tracee
    does SAVE_REST again.

    set_task_blockstep() can race with SIGKILL too and in some sense this
    race is even worse, the very fact the tracee can be woken up breaks the
    logic.

    As Linus suggested we can clear TASK_WAKEKILL around the arch_ptrace()
    call, this ensures that nobody can ever wakeup the tracee while the
    debugger looks at it. Not only this fixes the mentioned problems, we
    can do some cleanups/simplifications in arch_ptrace() paths.

    Probably ptrace_unfreeze_traced() needs more callers, for example it
    makes sense to make the tracee killable for oom-killer before
    access_process_vm().

    While at it, add the comment into may_ptrace_stop() to explain why
    ptrace_stop() still can't rely on SIGKILL and signal_pending_state().

    Reported-by: Salman Qazi
    Reported-by: Suleiman Souhlal
    Suggested-by: Linus Torvalds
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • By popular demand, arch/aarch64 is now known as arch/arm64. However,
    uname -m (and indeed the GNU triplet) still use aarch64 as the machine
    string.

    This patch fixes native builds of both the kernel and perf tools by
    updating the relevant Makefiles to munge the output of uname -m and
    set the ARCH variable appropriately.

    Cc:
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     
  • The kernel's internal definition of ELF_NGREG uses struct pt_regs, which
    means that we disagree with userspace on the size of coredumps since
    glibc correctly uses the user-visible struct user_pt_regs.

    This patch fixes our ELF_NGREG definition to use struct user_pt_regs
    and introduces our own ELF_CORE_COPY_REGS to convert between the user
    and kernel structure definitions.

    Cc:
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon