perf session: Skip event correctly for unknown id/machine

In case the perf_session__process_event function fails, we estimate the
next event offset.

This is not necessary for sample event failing on unknown ID or machine.
In such case we know proper size of the event, so we dont need to guess.
Also failure statistics are updated correctly so we don't miss any
information.

Forcing perf_session__process_event to return 0 in case of unknown ID or
machine.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1334233262-5679-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Merge tag 'for-usb-linus-2012-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus

Hi Greg,

Here's 11 xHCI bug fixes for 3.4.

Some of the patches fix issues with crashes on system resume related to
VIA xHCI host controllers accessing bad memory addresses.  The patches
change the register restore ordering, so I had several vendors confirm
that the patches don't break their xHCI hosts.

Elric Fu confirms this patchset fixes the VIA issue, Alex He confirms
the changes does not break suspend/resume on AMD xHCI systems, and I've
made sure it doesn't break Intel host controllers.  I have not heard
back from Felipe about the TI host, so at this point, I'm just going to
send them off.

Several of the patches are marked for stable.  Please pull.

Sarah Sharp
USB: update usbtmc api documentation

Correct path names in API documentation for usbtmc

Signed-off-by: Stephen Lewis <lewis@sdf.lonestar.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-intel-fixes

Daniel Vetter writes:
3 regression fixes:
- disable gmbus again, too broken for 3.4, we'll try again for 3.5
- dp bandwidth computation fix, we've lost the 6bpc dithering flag
 sometimes, this is a 3.3 regression (maybe even earlier for some
 configurations).
- fix resume regression caused by the gen2/3 fencing fix merged into -rc2.

And a few other fixes:
- gpu hang fix for i845 (Chris)
- sprite fix (Armin Reese)
- crtc disable vs. scanlinewait race fix (Chris)
- rc6 module option read-only, it confused testers (Jesse)
- fbc related blitter death hw workaround, note that we disable fbc on snb
 by default anyway.

With these fixes we have one 3.4 regression outstanding: One of the
cleanup patches for the interlaced support managed to confuse the lvds
panel fitter when upscaling. The root-cause is still unclear, but test
patches are awaiting feedback from the reporter.

* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: clear fencing tracking state when retiring requests
  drm/i915: make rc6 module parameter read-only
  drm/i915: implement ColorBlt w/a
  drm/i915/ringbuffer: Exclude last 2 cachlines of ring on 845g
  Revert "drm/i915: reenable gmbus on gen3+ again"
  drm/i915: properly compute dp dithering for user-created modes
  drm/i915: Finish any pending operations on the framebuffer before disabling
  drm/i915: Removed IVB forced enable of sprite dest key.
Merge branch 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung into drm-intel-fixes

* 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung:
  drm/exynos: fixed exynos broken ioctl
  drm/exynos: fix to pointer manager member of struct exynos_drm_subdrv
  drm/exynos: fix struct for operation callback functions to driver name
  drm/exynos: use define instead of default_win member in struct mixer_context
  drm/exynos: rename s/HDMI_OVERLAY_NUMBER/MIXER_WIN_NR
  drm/exynos: remove unused codes in hdmi and mixer
  drm/exynos: remove unnecessary type conversion of hdmi and mixer
  drm/exynos: add format list of plane
  drm/exynos: fixed duplicated page allocation bug.
  drm/exynos: fixed page align and code clean.
Revert "Btrfs: increase the global block reserve estimates"

This reverts commit 5500cdbe14d7435e04f66ff3cfb8ecd8b8e44ebf.

We've had a number of complaints of early enospc that bisect down
to this patch.  We'll hae to fix the reservations differently.

CC: stable@kernel.org
Signed-off-by: Chris Mason <chris.mason@oracle.com>
ALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940G

It's compatible with 8930G.
Using the same fixup gives the proper 5.1 sound back.

Reported-and-tested-by: Dany Martineau <dany.luc.martineau@gmail.com>
Cc: <stable@kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda/realtek - Add quirk for Mac Pro 5,1 machines

A user reported that setting model=imac24 used to allow sound to work on their
Mac Pro 5,1 machine.  Commit 5671087ffa "Move ALC885 macpro and imac24 models
to auto-parser" removed this model option.  All Mac machines are now explicitly
handled with a quirk and the auto-parser.  This adds a quirk for the device
found on the Mac Pro 5,1 machines.

This (partially) fixes https://bugzilla.redhat.com/show_bug.cgi?id=808559

[sorted the new entry in the ID number order by tiwai]

Reported-by: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ASoC: dapm: Ensure power gets managed for line widgets

Line widgets had not been included in either the power up or power down
sequences so if a widget had an event associated with it that event would
never be run. Fix this minimally by adding them to the sequences, we
should probably be doing away with the specific widget types as they all
have the same priority anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
perf tools: fix NO_GTK2 Makefile config error

In case the user specified NO_GTK2 on the make cmdline, compilation
would fail with undefined symbol because the Makefile would not set the
correct cpp variable: NO_GTK2 vs. NO_GTK2_SUPPORT.

This patch renames the variable to the correct name.

Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20120410103513.GA9229@quad
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
 "Regression fix in mtdchar_open(), fix for a really old leak
  (almost never hit in practice - it's a b0rken failure exit in
  simple_fill_super()) and a typo fix in vfs.txt (misspelled
  method type)."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  typo fix in Documentation/filesystems/vfs.txt
  dentry leak in simple_fill_super() failure exit
  fix breakage in mtdchar_open(), sanitize failure exits
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:
 "Just a few small fixes..."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: da9052 - fix memory leak in da9052_onkey_probe()
  Input: gpio_mouse - use linux/gpio.h rather than asm/gpio.h
  Input: trackpoint - use psmouse_fmt() for messages
  Input: elantech - v4 is a clickpad, with only one button
  Input: elantech - reset touchpad before configuring it
  Input: sentelic - filter taps in absolute mode
  Input: tps6507x-ts - fix MODULE_ALIAS to match driver name
Merge tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6

Pull irqdomain bug fixes from Grant Likely:
 "This branch fixes a bug in irq_create_mapping() where an error return
  from irq_alloc_desc_from() gets ignored.

  It also removes irq_virq_count to fix a bug on powerpc where the
  irqdomain code does not find irqs allocated above the CONFIG_NR_IRQS
  boundary.

  The remaining patches get rid of an completely pointless export and
  fix some minor bugs in the irqdomain debug output."

* tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6:
  irq_domain: Move irq_virq_count into NOMAP revmap
  irqdomain: Fix debugfs formatting
  irq_domain: correct the debugfs file name
  irq: Kill pointless irqd_to_hw export
  irq/irq_domain: Quit ignoring error returns from irq_alloc_desc_from().
Btrfs: fix uninit variable in repair_eb_io_failure

We'd have to be passing bogus extent buffers for this uninit variable to
actually be used, but set it to zero just in case.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
ata_piix: IDE-mode SATA patch for Intel DH89xxCC DeviceIDs

This patch adds the IDE-mode SATA DeviceIDs for the Intel DH89xxCC PCH.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
sata_mv: silence an uninitialized variable warning

Gcc version 4.6.2-12 complains that if we can't find the "nr-ports"
property in of_property_read_u32_array() then "n_ports" is used
uninitialized.  Let's set it to zero in that case.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
libata: make ata_print_id atomic

This variable is incremented from multiple contexts (module_init via
libata-lldds and the libsas discovery thread).  Make it atomic to head
off any chance of libsas and libata creating duplicate ids.

Acked-by: Jacek Danecki <jacek.danecki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Btrfs: fix eof while discarding extents

We miscalculate the length of extents we're discarding, and it leads to
an eof of device.

Reported-by: Daniel Blueman <daniel@quora.org>
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Btrfs: remove lock assert from get_restripe_target()

This fixes a regression introduced by fc67c450.  spin_is_locked() always
returns 0 on UP kernels, which caused assert in get_restripe_target() to
be fired on every call from btrfs_reduce_alloc_profile() on UP systems.
Remove it completely for now, it's not clear if it's going to be needed
in future.

Reported-by: Bobby Powers <bobbypowers@gmail.com>
Reported-by: Mitch Harder <mitch.harder@sabayonlinux.org>
Tested-by: Mitch Harder <mitch.harder@sabayonlinux.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Btrfs: check return value of bio_alloc() properly

bio_alloc() has the possibility of returning NULL.
So, it is necessary to check the return value.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>