sh: vsyscall: Fix up .eh_frame generation.

Some improper formatting caused the .eh_frame generation to fail,
resulting in gcc/g++ testsuite failures with regards to unwinding through
the vDSO. Now that someone is actually working on this on the gcc side
it's time to fix up the kernel side, too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
ARM: sa11x0: fix build errors from DMA engine API updates

The recent merge of the sa11x0 code into mainline had silent conflicts
with further development of the DMA engine API, leading to build errors
and warnings:

drivers/net/irda/sa1100_ir.c: In function 'sa1100_irda_dma_start':
drivers/net/irda/sa1100_ir.c:151: error: too few arguments to function 'chan->device->device_prep_slave_sg'
drivers/dma/sa11x0-dma.c: In function 'sa11x0_dma_probe':
drivers/dma/sa11x0-dma.c:950: warning: assignment from incompatible pointer type

Fix these.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
serial: sh-sci: use serial_port_in/out vs sci_in/out.

Follows the 8250 change for pretty much the same rationale.

See commit "serial: use serial_port_in/out vs serial_in/out in 8250".

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
ARM: fix missing bug.h include in arch/arm/kernel/insn.c

arch/arm/kernel/insn.c: In function '__arm_gen_branch_thumb2':
arch/arm/kernel/insn.c:13: error: implicit declaration of function 'WARN_ON_ONCE'

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drm: base prime/dma-buf support (v5)

This adds the basic drm dma-buf interface layer, called PRIME. This
commit doesn't add any driver support, it is simply and agreed upon starting
point so we can work towards merging driver support for the next merge window.

Current drivers with work done are nouveau, i915, udl, exynos and omap.

The main APIs exposed to userspace allow translating a 32-bit object handle
to a file descriptor, and a file descriptor to a 32-bit object handle.

The flags value is currently limited to O_CLOEXEC.

Acknowledgements:
Daniel Vetter: lots of review
Rob Clark: cleaned up lots of the internals and did lifetime review.

v2: rename some functions after Chris preferred a green shed
fix IS_ERR_OR_NULL -> IS_ERR
v3: Fix Ville pointed out using buffer + kmalloc
v4: add locking as per ickle review
v5: allow re-exporting the original dma-buf (Daniel)

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Rob Clark <rob.clark@linaro.org>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Merge branches 'sh/urgent', 'sh/vsyscall' and 'common/serial-rework' into sh-latest
ARM: 7337/1: ptrace: fix ptrace_read_user for !CONFIG_MMU platforms

Commit 68b7f715 ("nommu: ptrace support") added definitions for
PT_TEXT_ADDR and friends, as well as adding ptrace support for reading
from these magic offsets.

Unfortunately, this has probably never worked, since ptrace_read_user
predicates reading on off < sizeof(struct user), returning -EIO
otherwise.

This patch moves the offset size check until after we have tried to
match it against either a magic value or an offset into pt_regs.

Cc: Paul Brook <paul@codesourcery.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
merge_config.sh: Set execute bit

Somehow the merge_config.sh script didn't get its execute bit
set when it was merged. Fix this.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
merge_config.sh: Add option to display redundant configs

Provide a -r option to display when fragments contain redundant
options. This is really useful when breaking apart a config into
fragments, as well as cleaning up older fragments.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/patch-kernel: digest kernel.org hosted .xz patches

kernel.org is hosting patches and kernel compressed with xz (lzma2+).
Allow scripts/patch-kernel to decompress these files.

Signed-off-by: Shawn Landden <shawnlandden@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
itimer: Schedule silent NULL pointer fixup in setitimer() for removal

setitimer() should return -EFAULT if called with an invalid pointer
for value. The current code excludes a NULL pointer from this rule and
silently uses it to stop the timer. This violates the spec.

Warn about user space apps which rely on that feature and schedule it
for removal.

[ tglx: Massaged changelog, warn message and Doc entry ]

Signed-off-by: Sasikantha babu <sasikanth.v19@gmail.com>
Link: http://lkml.kernel.org/r/1332340854-26053-1-git-send-email-sasikanth.v19@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
proc: stats: Use arch_idle_time for idle and iowait times if available

Git commit a25cac5198d4ff28 "proc: Consider NO_HZ when printing idle and
iowait times" changes the code for /proc/stat to use get_cpu_idle_time_us
and get_cpu_iowait_time_us if the system is running with nohz enabled.
For architectures which define arch_idle_time (currently s390 only)
this is a change for the worse. The result of arch_idle_time is supposed
to be the exact sleep time of the target cpu and should be used instead
of the value kept by the scheduler.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20120330122308.18720283@de.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
ALSA: asihpi - fix return value of hpios_locked_mem_alloc()

Make this function consistent with others in this module by
returning 1 for error, instead of -ENOMEM
(reverts function signature change from a938fb1e)

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
perf tools: Remove auto-generated bison/flex files

These should not be in the Git history - they are auto-generated.

Extend the Makefile rules of the parser files to include the generation
run.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120327183335.GA27621@gmail.com
[ committer note: Fixed up O= handling ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
x86: Use -mno-avx when available

On gccs that support AVX it's a good idea to disable that too, similar to
how SSE2, SSE1 etc. are already disabled. This prevents the compiler
from generating AVX ever implicitely.

No failure observed, just from review.

[ hpa: Marking this for urgent and stable, simply because the patch
  will either have absolutely no effect *or* it will avoid potentially
  very hard to debug failures. ]

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1332960678-11879-1-git-send-email-andi@firstfloor.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: <stable@vger.kernel.org>
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull minor Sparc fixes from David Miller:
 "This just fixes build fallout due to recent changes that went int your
  tree."

Sam Ravnborg says that sparc32 still needs some more tender loving.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: Fix even more fallout from system.h split.
  sparc: fix fallout from system.h split
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 build fixes from Martin Schwidefsky.

More small fixes for the system.h disintegration.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  [S390] Fix build errors (fallout from system.h disintegration)
Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of small fixes for 3.4-rc1, including
   - mic-recording regression fix for Realtek codec
   - clean-up of dmaengine parameter mess
   - WM8894 calibration tweak
   - minor fixes for asihpi and some bool module parms"

* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: fix isa/opti9xx module param type
  sound: fix oss/msnd_pinnacle module param type
  ALSA: asihpi - fix return type of hpios_locked_mem_alloc()
  ASoC: dmaengine_pcm: use dmaengine cyclic wrapper
  ASoC: Add extra parameter to device_prep_dma_cyclic
  ALSA: hda/realtek - Fix ADC assignment with a shared HP/Mic pin
  ASoC: wm8994: Update WM8994 DCS calibration
ia64: Fixup asm/cmpxchg.h

The empty asm/cmpxchg.h file that was provided as a temporary build fix
for the asm/system.h disintgration build problem should really include
<asm/intrinsics.h> to make definitions of xchg() and cmpxchg()
available.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[media] radio-rtrack2: add missing slab.h

Missed this one, this patch should solve this issue:

http://www.spinics.net/lists/linux-media/msg45880.html

Slab.h was added to all the other isa drivers, but not radio-rtrack2.c.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>