firefly-linux-kernel-4.4.55.git
12 years agodrm/nvd0/disp: remove unnecessary sync from flip_next
Ben Skeggs [Mon, 30 Apr 2012 00:56:09 +0000 (10:56 +1000)]
drm/nvd0/disp: remove unnecessary sync from flip_next

This shouldn't be necessary, I believe this is just a bit of missed debug
code that got left over somehow.

Causes flips to be always synced to vblank, regardless of swap interval,
which we don't want..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv04/disp: disable vblank interrupts when disabling display
Ben Skeggs [Tue, 22 Nov 2011 03:59:30 +0000 (13:59 +1000)]
drm/nv04/disp: disable vblank interrupts when disabling display

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: base fence timeout on time of emission
Marcin Slusarz [Wed, 25 Apr 2012 21:20:33 +0000 (23:20 +0200)]
drm/nouveau: base fence timeout on time of emission

Wait loop can be interrupted by signal, so if signals are raised
periodically (e.g. SIGALRM) this loop may never finish. Use
emission time as a base for fence timeout.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv40-50/gr: restructure grctx/prog generation
Ben Skeggs [Fri, 20 Apr 2012 01:54:33 +0000 (11:54 +1000)]
drm/nv40-50/gr: restructure grctx/prog generation

The conditional definition of the generation helper functions apparently
confuses some IDEs....

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50/disp: fixup error paths in crtc object creation
Ben Skeggs [Fri, 20 Apr 2012 01:01:46 +0000 (11:01 +1000)]
drm/nv50/disp: fixup error paths in crtc object creation

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: cleanup after display init failure
Marcin Slusarz [Sun, 15 Apr 2012 12:36:08 +0000 (14:36 +0200)]
drm/nouveau: cleanup after display init failure

Depending on exact point of failure, not cleaning would lead to
BUG_ONs/oopses in various distant places.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50: fix ramin heap size for kernel channel too
Marcin Slusarz [Sun, 15 Apr 2012 12:36:07 +0000 (14:36 +0200)]
drm/nv50: fix ramin heap size for kernel channel too

Port change from "drm/nouveau: Keep RAMIN heap within the channel"
to kernel channel, which has its own ramin heap initialisation.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Younes Manton <younes.m@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nve0/graph: bump hub2gpc buffer size
Ben Skeggs [Wed, 4 Apr 2012 01:16:44 +0000 (11:16 +1000)]
drm/nve0/graph: bump hub2gpc buffer size

Reported-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: use the same packet header macros as userspace
Ben Skeggs [Sun, 1 Apr 2012 11:09:13 +0000 (21:09 +1000)]
drm/nouveau: use the same packet header macros as userspace

Cosmetic cleanup only.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/bios: allow loading alternate vbios image as firmware
Ben Skeggs [Fri, 30 Mar 2012 03:14:45 +0000 (13:14 +1000)]
drm/nouveau/bios: allow loading alternate vbios image as firmware

Useful for debugging different VBIOS versions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nve0/ttm: implement buffer moves with weirdo pcopy-on-pgraph methods
Ben Skeggs [Tue, 20 Mar 2012 04:36:04 +0000 (14:36 +1000)]
drm/nve0/ttm: implement buffer moves with weirdo pcopy-on-pgraph methods

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50-/fbcon: move 2d class to subchannel 3
Ben Skeggs [Tue, 20 Mar 2012 04:20:50 +0000 (14:20 +1000)]
drm/nv50-/fbcon: move 2d class to subchannel 3

Kepler GRAPH has (well, sorta) fixed subchannel<->class assignments, make
this match up to keep it happy without trapping.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nve0/gr: initial implementation
Ben Skeggs [Tue, 13 Mar 2012 03:05:13 +0000 (13:05 +1000)]
drm/nve0/gr: initial implementation

This may, perhaps, get re-merged with nvc0_graph.c at some point.  It's
still unclear as to how great an idea that'd be.  Stay tuned...

Completely dependent on firmware blobs from NVIDIA binary driver currently.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nve0/fifo: initial implementation
Ben Skeggs [Thu, 8 Mar 2012 00:41:45 +0000 (10:41 +1000)]
drm/nve0/fifo: initial implementation

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: give a slightly larger pci(e)gart aperture on all chipsets
Ben Skeggs [Tue, 27 Mar 2012 05:15:18 +0000 (15:15 +1000)]
drm/nouveau: give a slightly larger pci(e)gart aperture on all chipsets

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/pm: some more delays for ddr3 reclocking
Ben Skeggs [Mon, 6 Feb 2012 06:20:30 +0000 (16:20 +1000)]
drm/nouveau/pm: some more delays for ddr3 reclocking

These numbers from the binary driver's daemon scripts, and fix the transition
to perflvl 3 on my T510.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0/pm: very initial mclk freq change
Ben Skeggs [Mon, 6 Feb 2012 03:51:30 +0000 (13:51 +1000)]
drm/nvc0/pm: very initial mclk freq change

Loads of magic missing, this will probably blow up if you try it.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvd9/pm: oops, fix timing calc
Ben Skeggs [Mon, 6 Feb 2012 01:42:29 +0000 (11:42 +1000)]
drm/nvd9/pm: oops, fix timing calc

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0/pm: enable mpll src pll, and calc mpll coefficients
Ben Skeggs [Mon, 6 Feb 2012 01:34:20 +0000 (11:34 +1000)]
drm/nvc0/pm: enable mpll src pll, and calc mpll coefficients

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0/pm: start filling in memory reclocking stubs
Ben Skeggs [Tue, 31 Jan 2012 23:00:57 +0000 (09:00 +1000)]
drm/nvc0/pm: start filling in memory reclocking stubs

12 years agodrm/nva3/pm: another few magic regs, and slightly better 0x004018 handling
Ben Skeggs [Sun, 5 Feb 2012 23:58:09 +0000 (09:58 +1000)]
drm/nva3/pm: another few magic regs, and slightly better 0x004018 handling

Not entirely convinced 0x004018 transitions are correct yet, but, it's
an improvement.

The 750MHz value comes from fiddling with the binary driver + coolbits on
two different DDR3 NVA8 chipsets (T510 NVS3100M, and NVS300), not a clue
where this number comes from.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: initial attempt at handling 111100/111104
Ben Skeggs [Fri, 3 Feb 2012 00:34:33 +0000 (10:34 +1000)]
drm/nva3/pm: initial attempt at handling 111100/111104

Probably not quite right, but this is enough now to make NVS300 reclock
between all 3 of its perflvls correctly.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: make pll->pll mode work
Ben Skeggs [Fri, 3 Feb 2012 00:02:03 +0000 (10:02 +1000)]
drm/nva3/pm: make pll->pll mode work

This probably wants a cleanup, but I'm holding off until I know for sure
how the rest of the things that need doing fit together.

Tested on NVS300 by hacking up perflvl 1 to require PLL mode, and switching
between perflvl 3 and 1.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: attempt to bash a few 0x100200 bits correctly
Ben Skeggs [Thu, 2 Feb 2012 05:07:13 +0000 (15:07 +1000)]
drm/nva3/pm: attempt to bash a few 0x100200 bits correctly

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: begin to restructure memory clock changes + another magic
Ben Skeggs [Thu, 2 Feb 2012 01:43:31 +0000 (11:43 +1000)]
drm/nva3/pm: begin to restructure memory clock changes + another magic

The binary driver appears to do various bits and pieces of the memory
clock frequency change at different times, depending on the particular
transition that's occuring.  I've attempted to replicate this here
for div->pll, pll->div and div->div transitions.

With some additional (patches upcoming) magic regs being bashed, this
allows me to correctly transition between all 3 perflvls on NVS300.

pll->pll transitions will *not* work correctly at the moment, pending
me tricking the binary driver into doing one and seeing how to correctly
handle it.

This patch also handles (hopefully) 0x1110e0, which appears to need
changing depending on whether in PLL or divider mode.. Maybe.  We'll
see.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: more random unknown PFB regs
Ben Skeggs [Fri, 27 Jan 2012 03:26:52 +0000 (13:26 +1000)]
drm/nva3/pm: more random unknown PFB regs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: initial attempt at more magic PFB regs
Ben Skeggs [Fri, 27 Jan 2012 00:53:17 +0000 (10:53 +1000)]
drm/nva3/pm: initial attempt at more magic PFB regs

The reg calculation may get moved elsewhere at some point, but lets
figure out what exactly we need to do first.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: hook up to ram reclocking helper
Ben Skeggs [Wed, 25 Jan 2012 06:02:58 +0000 (16:02 +1000)]
drm/nva3/pm: hook up to ram reclocking helper

This gets us a start on memory timings.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: introduce more paranoia
Ben Skeggs [Sat, 17 Dec 2011 04:02:51 +0000 (14:02 +1000)]
drm/nva3/pm: introduce more paranoia

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agotcp: take care of overlaps in tcp_try_coalesce()
Eric Dumazet [Wed, 23 May 2012 17:51:37 +0000 (17:51 +0000)]
tcp: take care of overlaps in tcp_try_coalesce()

Sergio Correia reported following warning :

WARNING: at net/ipv4/tcp.c:1301 tcp_cleanup_rbuf+0x4f/0x110()

WARN(skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq),
     "cleanup rbuf bug: copied %X seq %X rcvnxt %X\n",
     tp->copied_seq, TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt);

It appears TCP coalescing, and more specifically commit b081f85c297
(net: implement tcp coalescing in tcp_queue_rcv()) should take care of
possible segment overlaps in receive queue. This was properly done in
the case of out_or_order_queue by the caller.

For example, segment at tail of queue have sequence 1000-2000, and we
add a segment with sequence 1500-2500.
This can happen in case of retransmits.

In this case, just don't do the coalescing.

Reported-by: Sergio Correia <lists@uece.net>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Sergio Correia <lists@uece.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: fix the rcu race between free_fib_info and ip_route_output_slow
Yanmin Zhang [Wed, 23 May 2012 15:39:45 +0000 (15:39 +0000)]
ipv4: fix the rcu race between free_fib_info and ip_route_output_slow

We hit a kernel OOPS.

<3>[23898.789643] BUG: sleeping function called from invalid context at
/data/buildbot/workdir/ics/hardware/intel/linux-2.6/arch/x86/mm/fault.c:1103
<3>[23898.862215] in_atomic(): 0, irqs_disabled(): 0, pid: 10526, name:
Thread-6683
<4>[23898.967805] HSU serial 0000:00:05.1: 0000:00:05.2:HSU serial prevented me
to suspend...
<4>[23899.258526] Pid: 10526, comm: Thread-6683 Tainted: G        W
3.0.8-137685-ge7742f9 #1
<4>[23899.357404] HSU serial 0000:00:05.1: 0000:00:05.2:HSU serial prevented me
to suspend...
<4>[23899.904225] Call Trace:
<4>[23899.989209]  [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.000416]  [<c1238c2a>] __might_sleep+0x10a/0x110
<4>[23900.007357]  [<c1228021>] do_page_fault+0xd1/0x3c0
<4>[23900.013764]  [<c18e9ba9>] ? restore_all+0xf/0xf
<4>[23900.024024]  [<c17c007b>] ? napi_complete+0x8b/0x690
<4>[23900.029297]  [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.123739]  [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.128955]  [<c18ea0c3>] error_code+0x5f/0x64
<4>[23900.133466]  [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.138450]  [<c17f6298>] ? __ip_route_output_key+0x698/0x7c0
<4>[23900.144312]  [<c17f5f8d>] ? __ip_route_output_key+0x38d/0x7c0
<4>[23900.150730]  [<c17f63df>] ip_route_output_flow+0x1f/0x60
<4>[23900.156261]  [<c181de58>] ip4_datagram_connect+0x188/0x2b0
<4>[23900.161960]  [<c18e981f>] ? _raw_spin_unlock_bh+0x1f/0x30
<4>[23900.167834]  [<c18298d6>] inet_dgram_connect+0x36/0x80
<4>[23900.173224]  [<c14f9e88>] ? _copy_from_user+0x48/0x140
<4>[23900.178817]  [<c17ab9da>] sys_connect+0x9a/0xd0
<4>[23900.183538]  [<c132e93c>] ? alloc_file+0xdc/0x240
<4>[23900.189111]  [<c123925d>] ? sub_preempt_count+0x3d/0x50

Function free_fib_info resets nexthop_nh->nh_dev to NULL before releasing
fi. Other cpu might be accessing fi. Fixing it by delaying the releasing.

With the patch, we ran MTBF testing on Android mobile for 12 hours
and didn't trigger the issue.

Thank Eric for very detailed review/checking the issue.

Signed-off-by: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Signed-off-by: Kun Jiang <kunx.jiang@intel.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomm: add a low limit to alloc_large_system_hash
Tim Bird [Wed, 23 May 2012 13:33:35 +0000 (13:33 +0000)]
mm: add a low limit to alloc_large_system_hash

UDP stack needs a minimum hash size value for proper operation and also
uses alloc_large_system_hash() for proper NUMA distribution of its hash
tables and automatic sizing depending on available system memory.

On some low memory situations, udp_table_init() must ignore the
alloc_large_system_hash() result and reallocs a bigger memory area.

As we cannot easily free old hash table, we leak it and kmemleak can
issue a warning.

This patch adds a low limit parameter to alloc_large_system_hash() to
solve this problem.

We then specify UDP_HTABLE_SIZE_MIN for UDP/UDPLite hash table
allocation.

Reported-by: Mark Asselstine <mark.asselstine@windriver.com>
Reported-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc: Optimize strncpy_from_user() zero byte search.
David S. Miller [Thu, 24 May 2012 02:20:20 +0000 (19:20 -0700)]
sparc: Optimize strncpy_from_user() zero byte search.

Compute a mask that will only have 0x80 in the bytes which
had a zero in them.  The formula is:

~(((x & 0x7f7f7f7f) + 0x7f7f7f7f) | x | 0x7f7f7f7f)

In the inner word iteration, we have to compute the "x | 0x7f7f7f7f"
part, so we can reuse that in the above calculation.

Once we have this mask, we perform divide and conquer to find the
highest 0x80 location.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Linus Torvalds [Thu, 24 May 2012 01:11:45 +0000 (18:11 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/signal

Pull first series of signal handling cleanups from Al Viro:
 "This is just the first part of the queue (about a half of it);
  assorted fixes all over the place in signal handling.

  This one ends with all sigsuspend() implementations switched to
  generic one (->saved_sigmask-based).

  With this, a bunch of assorted old buglets are fixed and most of the
  missing bits of NOTIFY_RESUME hookup are in place.  Two more fixes sit
  in arm and um trees respectively, and there's a couple of broken ones
  that need obvious fixes - parisc and avr32 check TIF_NOTIFY_RESUME
  only on one of two codepaths; fixes for that will happen in the next
  series"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (55 commits)
  unicore32: if there's no handler we need to restore sigmask, syscall or no syscall
  xtensa: add handling of TIF_NOTIFY_RESUME
  microblaze: drop 'oldset' argument of do_notify_resume()
  microblaze: handle TIF_NOTIFY_RESUME
  score: add handling of NOTIFY_RESUME to do_notify_resume()
  m68k: add TIF_NOTIFY_RESUME and handle it.
  sparc: kill ancient comment in sparc_sigaction()
  h8300: missing checks of __get_user()/__put_user() return values
  frv: missing checks of __get_user()/__put_user() return values
  cris: missing checks of __get_user()/__put_user() return values
  powerpc: missing checks of __get_user()/__put_user() return values
  sh: missing checks of __get_user()/__put_user() return values
  sparc: missing checks of __get_user()/__put_user() return values
  avr32: struct old_sigaction is never used
  m32r: struct old_sigaction is never used
  xtensa: xtensa_sigaction doesn't exist
  alpha: tidy signal delivery up
  score: don't open-code force_sigsegv()
  cris: don't open-code force_sigsegv()
  blackfin: don't open-code force_sigsegv()
  ...

12 years agomm: mempolicy: Let vma_merge and vma_split handle vma->vm_policy linkages
Mel Gorman [Wed, 23 May 2012 11:48:13 +0000 (12:48 +0100)]
mm: mempolicy: Let vma_merge and vma_split handle vma->vm_policy linkages

Dave Jones' system call fuzz testing tool "trinity" triggered the
following bug error with slab debugging enabled

    =============================================================================
    BUG numa_policy (Not tainted): Poison overwritten
    -----------------------------------------------------------------------------

    INFO: 0xffff880146498250-0xffff880146498250. First byte 0x6a instead of 0x6b
    INFO: Allocated in mpol_new+0xa3/0x140 age=46310 cpu=6 pid=32154
     __slab_alloc+0x3d3/0x445
     kmem_cache_alloc+0x29d/0x2b0
     mpol_new+0xa3/0x140
     sys_mbind+0x142/0x620
     system_call_fastpath+0x16/0x1b
    INFO: Freed in __mpol_put+0x27/0x30 age=46268 cpu=6 pid=32154
     __slab_free+0x2e/0x1de
     kmem_cache_free+0x25a/0x260
     __mpol_put+0x27/0x30
     remove_vma+0x68/0x90
     exit_mmap+0x118/0x140
     mmput+0x73/0x110
     exit_mm+0x108/0x130
     do_exit+0x162/0xb90
     do_group_exit+0x4f/0xc0
     sys_exit_group+0x17/0x20
     system_call_fastpath+0x16/0x1b
    INFO: Slab 0xffffea0005192600 objects=27 used=27 fp=0x          (null) flags=0x20000000004080
    INFO: Object 0xffff880146498250 @offset=592 fp=0xffff88014649b9d0

This implied a reference counting bug and the problem happened during
mbind().

mbind() applies a new memory policy to a range and uses mbind_range() to
merge existing VMAs or split them as necessary.  In the event of splits,
mpol_dup() will allocate a new struct mempolicy and maintain existing
reference counts whose rules are documented in
Documentation/vm/numa_memory_policy.txt .

The problem occurs with shared memory policies.  The vm_op->set_policy
increments the reference count if necessary and split_vma() and
vma_merge() have already handled the existing reference counts.
However, policy_vma() screws it up by replacing an existing
vma->vm_policy with one that potentially has the wrong reference count
leading to a premature free.  This patch removes the damage caused by
policy_vma().

With this patch applied Dave's trinity tool runs an mbind test for 5
minutes without error.  /proc/slabinfo reported that there are no
numa_policy or shared_policy_node objects allocated after the test
completed and the shared memory region was deleted.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: Dave Jones <davej@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Stephen Wilson <wilsons@start.ca>
Cc: Christoph Lameter <cl@linux.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
Linus Torvalds [Thu, 24 May 2012 00:42:39 +0000 (17:42 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ebiederm/user-namespace

Pull user namespace enhancements from Eric Biederman:
 "This is a course correction for the user namespace, so that we can
  reach an inexpensive, maintainable, and reasonably complete
  implementation.

  Highlights:
   - Config guards make it impossible to enable the user namespace and
     code that has not been converted to be user namespace safe.

   - Use of the new kuid_t type ensures the if you somehow get past the
     config guards the kernel will encounter type errors if you enable
     user namespaces and attempt to compile in code whose permission
     checks have not been updated to be user namespace safe.

   - All uids from child user namespaces are mapped into the initial
     user namespace before they are processed.  Removing the need to add
     an additional check to see if the user namespace of the compared
     uids remains the same.

   - With the user namespaces compiled out the performance is as good or
     better than it is today.

   - For most operations absolutely nothing changes performance or
     operationally with the user namespace enabled.

   - The worst case performance I could come up with was timing 1
     billion cache cold stat operations with the user namespace code
     enabled.  This went from 156s to 164s on my laptop (or 156ns to
     164ns per stat operation).

   - (uid_t)-1 and (gid_t)-1 are reserved as an internal error value.
     Most uid/gid setting system calls treat these value specially
     anyway so attempting to use -1 as a uid would likely cause
     entertaining failures in userspace.

   - If setuid is called with a uid that can not be mapped setuid fails.
     I have looked at sendmail, login, ssh and every other program I
     could think of that would call setuid and they all check for and
     handle the case where setuid fails.

   - If stat or a similar system call is called from a context in which
     we can not map a uid we lie and return overflowuid.  The LFS
     experience suggests not lying and returning an error code might be
     better, but the historical precedent with uids is different and I
     can not think of anything that would break by lying about a uid we
     can't map.

   - Capabilities are localized to the current user namespace making it
     safe to give the initial user in a user namespace all capabilities.

  My git tree covers all of the modifications needed to convert the core
  kernel and enough changes to make a system bootable to runlevel 1."

Fix up trivial conflicts due to nearby independent changes in fs/stat.c

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (46 commits)
  userns:  Silence silly gcc warning.
  cred: use correct cred accessor with regards to rcu read lock
  userns: Convert the move_pages, and migrate_pages permission checks to use uid_eq
  userns: Convert cgroup permission checks to use uid_eq
  userns: Convert tmpfs to use kuid and kgid where appropriate
  userns: Convert sysfs to use kgid/kuid where appropriate
  userns: Convert sysctl permission checks to use kuid and kgids.
  userns: Convert proc to use kuid/kgid where appropriate
  userns: Convert ext4 to user kuid/kgid where appropriate
  userns: Convert ext3 to use kuid/kgid where appropriate
  userns: Convert ext2 to use kuid/kgid where appropriate.
  userns: Convert devpts to use kuid/kgid where appropriate
  userns: Convert binary formats to use kuid/kgid where appropriate
  userns: Add negative depends on entries to avoid building code that is userns unsafe
  userns: signal remove unnecessary map_cred_ns
  userns: Teach inode_capable to understand inodes whose uids map to other namespaces.
  userns: Fail exec for suid and sgid binaries with ids outside our user namespace.
  userns: Convert stat to return values mapped from kuids and kgids
  userns: Convert user specfied uids and gids in chown into kuids and kgid
  userns: Use uid_eq gid_eq helpers when comparing kuids and kgids in the vfs
  ...

12 years agoMerge tag 'module-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty...
Linus Torvalds [Thu, 24 May 2012 00:34:09 +0000 (17:34 -0700)]
Merge tag 'module-for-linus' of git://git./linux/kernel/git/rusty/linux-2.6-for-linus

Pull module patches from Rusty Russell, who really sells them:
 "Three trivial patches of no real utility.  Modules are boring."

But to make things slightly more exciting, he adds:
 "Fortunately David Howells is looking to change this, with his module
  signing patchset.  But that's for next merge window...

  Cheers,
  Rusty."

* tag 'module-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  Guard check in module loader against integer overflow
  modpost: use proper kernel style for autogenerated files
  modpost: Stop grab_file() from leaking filedescriptors if fstat() fails

12 years agoMerge branch 'delete-mca' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg...
Linus Torvalds [Thu, 24 May 2012 00:12:06 +0000 (17:12 -0700)]
Merge branch 'delete-mca' of git://git./linux/kernel/git/paulg/linux

Pull the MCA deletion branch from Paul Gortmaker:
 "It was good that we could support MCA machines back in the day, but
  realistically, nobody is using them anymore.  They were mostly limited
  to 386-sx 16MHz CPU and some 486 class machines and never more than
  64MB of RAM.  Even the enthusiast hobbyist community seems to have
  dried up close to ten years ago, based on what you can find searching
  various websites dedicated to the relatively short lived hardware.

  So lets remove the support relating to CONFIG_MCA.  There is no point
  carrying this forward, wasting cycles doing routine maintenance on it;
  wasting allyesconfig build time on validating it, wasting I/O on git
  grep'ping over it, and so on."

Let's see if anybody screams.  It generally has compiled, and James
Bottomley pointed out that there was a MCA extension from NCR that
allowed for up to 4GB of memory and PPro-class machines.  So in *theory*
there may be users out there.

But even James (technically listed as a maintainer) doesn't actually
have a system, and while Alan Cox claims to have a machine in his cellar
that he offered to anybody who wants to take it off his hands, he didn't
argue for keeping MCA support either.

So we could bring it back.  But somebody had better speak up and talk
about how they have actually been using said MCA hardware with modern
kernels for us to do that.  And David already took the patch to delete
all the networking driver code (commit a5e371f61ad3: "drivers/net:
delete all code/drivers depending on CONFIG_MCA").

* 'delete-mca' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
  MCA: delete all remaining traces of microchannel bus support.
  scsi: delete the MCA specific drivers and driver code
  serial: delete the MCA specific 8250 support.
  arm: remove ability to select CONFIG_MCA

12 years agoMerge tag 'md-3.5' of git://neil.brown.name/md
Linus Torvalds [Thu, 24 May 2012 00:08:40 +0000 (17:08 -0700)]
Merge tag 'md-3.5' of git://neil.brown.name/md

Pull md updates from NeilBrown:
 "It's been a busy cycle for md - lots of fun stuff here..  if you like
  this kind of thing :-)

  Main features:
   - RAID10 arrays can be reshaped - adding and removing devices and
     changing chunks (not 'far' array though)
   - allow RAID5 arrays to be reshaped with a backup file (not tested
     yet, but the priciple works fine for RAID10).
   - arrays can be reshaped while a bitmap is present - you no longer
     need to remove it first
   - SSSE3 support for RAID6 syndrome calculations

  and of course a number of minor fixes etc."

* tag 'md-3.5' of git://neil.brown.name/md: (56 commits)
  md/bitmap: record the space available for the bitmap in the superblock.
  md/raid10: Remove extras after reshape to smaller number of devices.
  md/raid5: improve removal of extra devices after reshape.
  md: check the return of mddev_find()
  MD RAID1: Further conditionalize 'fullsync'
  DM RAID: Use md_error() in place of simply setting Faulty bit
  DM RAID: Record and handle missing devices
  DM RAID: Set recovery flags on resume
  md/raid5: Allow reshape while a bitmap is present.
  md/raid10: resize bitmap when required during reshape.
  md: allow array to be resized while bitmap is present.
  md/bitmap: make sure reshape request are reflected in superblock.
  md/bitmap: add bitmap_resize function to allow bitmap resizing.
  md/bitmap: use DIV_ROUND_UP instead of open-code
  md/bitmap: create a 'struct bitmap_counts' substructure of 'struct bitmap'
  md/bitmap: make bitmap bitops atomic.
  md/bitmap: make _page_attr bitops atomic.
  md/bitmap: merge bitmap_file_unmap and bitmap_file_put.
  md/bitmap: remove async freeing of bitmap file.
  md/bitmap: convert some spin_lock_irqsave to spin_lock_irq
  ...

12 years agoMerge branch 'sbp-target-merge' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 23 May 2012 23:52:27 +0000 (16:52 -0700)]
Merge branch 'sbp-target-merge' of git://git./linux/kernel/git/nab/target-pending

Pull sbp-2 (firewire) target mode support from Nicholas Bellinger:
 "The FireWire SBP-2 Target is a driver for using an IEEE-1394
  connection as a SCSI transport.  This module uses the SCSI Target
  framework to expose LUNs to other machines attached to a FireWire bus,
  in effect acting as a FireWire hard disk similar to FireWire Target
  Disk mode on many Apple computers.

  Also included are the two drivers/firewire/ patches required by
  sbp-target to access fw_request fabric speed needed for mgt_agent
  TCODE_WRITE_BLOCK_REQUEST ops, and exporting fw_card kref logic used
  when creating/destroying active session references to individual
  endpoints.

  A credit goes to Chris in being able to get this code up and running
  so quickly w/o any target core changes, and special thanks goes out to
  Stefan Richter + Clemens Ladisch + Andy Grover for their help in
  getting this driver ready for mainline.  Also, one of Chris's goals
  was to be able to connect sbp-target to a PowerPC based MacOS-X based
  client, that he accomplished along the way in this obligatory
  screenshot:

    http://linux-iscsi.org/wiki/File:Linux-fireware-target-bootc-macosx.png

  Great work Chris + linux-1394 team !!"

Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* 'sbp-target-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  sbp-target: Initial merge of firewire/ieee-1394 target mode support
  firewire: Move fw_card kref functions into linux/firewire.h
  firewire: Add function to get speed from opaque struct fw_request

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Wed, 23 May 2012 22:59:10 +0000 (15:59 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

Pull crypto updates from Herbert Xu:
 - New cipher/hash driver for ARM ux500.
 - Code clean-up for aesni-intel.
 - Misc fixes.

Fixed up conflicts in arch/arm/mach-ux500/devices-common.h, where quite
frankly some of it made no sense at all (the pull brought in a
declaration for the dbx500_add_platform_device_noirq() function, which
neither exists nor is used anywhere).

Also some trivial add-add context conflicts in the Kconfig file in
drivers/{char/hw_random,crypto}/

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: aesni-intel - move more common code to ablk_init_common
  crypto: aesni-intel - use crypto_[un]register_algs
  crypto: ux500 - Cleanup hardware identification
  crypto: ux500 - Update DMA handling for 3.4
  mach-ux500: crypto - core support for CRYP/HASH module.
  crypto: ux500 - Add driver for HASH hardware
  crypto: ux500 - Add driver for CRYP hardware
  hwrng: Kconfig - modify default state for atmel-rng driver
  hwrng: omap - use devm_request_and_ioremap
  crypto: crypto4xx - move up err_request_irq label
  crypto, xor: Sanitize checksumming function selection output
  crypto: caam - add backward compatible string sec4.0

12 years agoMerge git://www.linux-watchdog.org/linux-watchdog
Linus Torvalds [Wed, 23 May 2012 22:42:42 +0000 (15:42 -0700)]
Merge git://www.linux-watchdog.org/linux-watchdog

Pull first set of watchdog updates from Wim Van Sebroeck:
 "This pull contains:

   - The removal of ixp2000_wdt
   - The addition of ie6xx_wdt
   - Some documentation fixes
   - Small fixes and improvements

  (Note: Part 2 will contain generic watchdog core changes + conversion
  of some more drivers)"

* git://www.linux-watchdog.org/linux-watchdog:
  Documentation/watchdog: Fix the file descriptor leak when no cmdline arg given
  Documentation/watchdog: close the fd when cmdline arg given
  Documentation/watchdog: Fix a small typo
  watchdog: s3c2410_wdt: Set timeout to actually achieved timeout
  watchdog: wm831x: Convert to gpio_request_one()
  watchdog: via_wdt: depends on PCI
  watchdog: ie6xx_wdt needs io.h
  watchdog: ie6xx_wdt.c: fix printk format warning
  watchdog: Add watchdog driver for Intel Atom E6XX
  watchdog: it87_wdt: Add support for IT8728F watchdog.
  watchdog: i6300esb: don't depend on X86
  watchdog: Use module_pci_driver
  watchdog: sch311x_wdt.c: Remove RESGEN
  watchdog: s3c2410-wdt: Use of_match_ptr().
  watchdog: Device tree support for pnx4008-wdt
  watchdog: ar7_wdt.c: use devm_request_and_ioremap
  watchdog: remove ixp2000 driver
  watchdog: sp5100_tco.c: quiet sparse noise about using plain integer was NULL pointer

12 years agoMerge tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 23 May 2012 22:27:39 +0000 (15:27 -0700)]
Merge tag 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

Pull libata update from Jeff Garzik:
 "Changes, all of them boring and minor:

  1) Ugly MSFT Hyper-V workaround in ata_piix

  2) Fix a longstanding error recovery delay caused by excessive
     re-re-retries, when media errors occur.

  3) Minor hw-specific workarounds and quirks

  4) New PATA driver for ep93xx"

* tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  PATA host controller driver for ep93xx
  [libata] Add " 2GB ATA Flash Disk"/"ADMA428M" to DMA blacklist
  ata_generic: Skip is_intel_ider() check when ata_generic=1 is set
  libata-eh don't waste time retrying media errors (v3)
  ata_piix: defer disks to the Hyper-V drivers by default
  libata: add a host flag to ignore detected ATA devices

12 years agox86/mce: Add instruction recovery signatures to mce-severity table
Tony Luck [Thu, 10 May 2012 18:12:14 +0000 (11:12 -0700)]
x86/mce: Add instruction recovery signatures to mce-severity table

Instruction recovery cases are very similar to the data recovery one
we already have. Just trade out for a new MCACOD value.

Signed-off-by: Tony Luck <tony.luck@intel.com>
12 years agox86/mce: Fix check for processor context when machine check was taken.
Tony Luck [Wed, 23 May 2012 21:14:22 +0000 (14:14 -0700)]
x86/mce: Fix check for processor context when machine check was taken.

Linus pointed out that there was no value is checking whether m->ip
was zero - because zero is a legimate value.  If we have a reliable
(or faked in the VM86 case) "m->cs" we can use it to tell whether we
were in user mode or kernelwhen the machine check hit.

Reported-by: Linus Torvalds <torvalds@linuxfoundation.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
12 years agoMCE: Fix vm86 handling for 32bit mce handler
Andi Kleen [Fri, 19 Nov 2010 12:16:22 +0000 (13:16 +0100)]
MCE: Fix vm86 handling for 32bit mce handler

When running on 32bit the mce handler could misinterpret
vm86 mode as ring 0. This can affect whether it does recovery
or not; it was possible to panic when recovery was actually
possible.

Fix this by always forcing vm86 to look like ring 3.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
12 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Wed, 23 May 2012 21:15:09 +0000 (14:15 -0700)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 "New driver for INA219 and INA226, added support for IT8782F and
  IT8783E/F to it87 driver, plus cleanups in a couple of drivers."

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (it87) Make temp3 attribute conditional for IT8782F
  hwmon: (it87) Convert to use devm_kzalloc and devm_request_region
  hwmon: INA219 and INA226 support
  hwmon: (it87) Create voltage attributes only if voltage is enabled
  hwmon: (ntc_thermistor) Fix checkpatch warning
  hwmon: (ntc_thermistor) Optimize and fix build warning
  hwmon: (ntc_thermistor) Return error code from hwmon_device_register
  hwmon: (ntc_thermistor) Convert to devm_kzalloc
  hwmon: (ad7314) Remove unused defines, and rename OFFSET to SHIFT
  acpi_power_meter: clean up code around setup_attrs
  acpi_power_meter: drop meter_rw_attrs, use common meter_attrs
  acpi_power_meter: remove duplicate code between register_{ro,rw}_attrs
  acpi_power_meter: use a {RW,RO}_SENSOR_TEMPLATE macro to clean things up
  acpi_power_meter: use the same struct {rw,ro}_sensor_template for both
  hwmon: use module_pci_driver
  hwmon: (it87) Add support for IT8782F and IT8783E/F

12 years agoMerge tag 'pm-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Wed, 23 May 2012 21:07:06 +0000 (14:07 -0700)]
Merge tag 'pm-for-3.5' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management updates from Rafael Wysocki:

 - Implementation of opportunistic suspend (autosleep) and user space
   interface for manipulating wakeup sources.

 - Hibernate updates from Bojan Smojver and Minho Ban.

 - Updates of the runtime PM core and generic PM domains framework
   related to PM QoS.

 - Assorted fixes.

* tag 'pm-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (25 commits)
  epoll: Fix user space breakage related to EPOLLWAKEUP
  PM / Domains: Make it possible to add devices to inactive domains
  PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format
  PM / Domains: Fix computation of maximum domain off time
  PM / Domains: Fix link checking when add subdomain
  PM / Sleep: User space wakeup sources garbage collector Kconfig option
  PM / Sleep: Make the limit of user space wakeup sources configurable
  PM / Documentation: suspend-and-cpuhotplug.txt: Fix typo
  PM / Domains: Cache device stop and domain power off governor results, v3
  PM / Domains: Make device removal more straightforward
  PM / Sleep: Fix a mistake in a conditional in autosleep_store()
  epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready
  PM / QoS: Create device constraints objects on notifier registration
  PM / Runtime: Remove device fields related to suspend time, v2
  PM / Domains: Rework default domain power off governor function, v2
  PM / Domains: Rework default device stop governor function, v2
  PM / Sleep: Add user space interface for manipulating wakeup sources, v3
  PM / Sleep: Add "prevent autosleep time" statistics to wakeup sources
  PM / Sleep: Implement opportunistic sleep, v2
  PM / Sleep: Add wakeup_source_activate and wakeup_source_deactivate tracepoints
  ...

12 years agox86-32, relocs: Whitelist more symbols for ld bug workaround
H. Peter Anvin [Wed, 23 May 2012 21:02:34 +0000 (14:02 -0700)]
x86-32, relocs: Whitelist more symbols for ld bug workaround

As noted in checkin:

a3e854d95 x86, relocs: Workaround for binutils 2.22.52.0.1 section bug

ld version 2.22.52.0.[12] can incorrectly promote relative symbols to
absolute, if the output section they appear in is otherwise empty.

Since checkin:

6520fe55 x86, realmode: 16-bit real-mode code support for relocs tool

we actually check for this and error out rather than silently creating
a kernel which will malfunction if relocated.

Ingo found a configuration in which __start_builtin_fw triggered the
warning.

Go through the linker script sources and look for more symbols that
could plausibly get bogusly promoted to absolute, and add them to the
whitelist.

In general, if the following error triggers:

Invalid absolute R_386_32 relocation: <symbol>

... then we should verify that <symbol> is really meant to be
relocated, and add it and any related symbols manually to the S_REL
regexp.

Please note that 6520fe55 does not introduce the error, only the check
for the error -- without 6520fe55 this version of ld will simply
produce a corrupt kernel if CONFIG_RELOCATABLE is set on x86-32.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: <stable@vger.kernel.org> v3.4
12 years agoMerge tag 'regmap-domain-deps' of git://git.kernel.org/pub/scm/linux/kernel/git/broon...
Linus Torvalds [Wed, 23 May 2012 20:11:07 +0000 (13:11 -0700)]
Merge tag 'regmap-domain-deps' of git://git./linux/kernel/git/broonie/regmap

Pull a regmap kconfig dependency fix from Mark Brown:
 "Fix the dependency on IRQ_DOMAIN for REGMAP_IRQ in the core

  Fixes a missing select from the Palmas driver a bit more throoughly."

* tag 'regmap-domain-deps' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Use select .. if to get IRQ_DOMAIN enabled

12 years agoMerge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Wed, 23 May 2012 20:05:43 +0000 (13:05 -0700)]
Merge tag 'sound-3.5' of git://git./linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "This is the first big chunk for 3.5 merges of sound stuff.

  There are a few big changes in different areas.  First off, the
  streaming logic of USB-audio endpoints has been largely rewritten for
  the better support of "implicit feedback".  If anything about USB got
  broken, this change has to be checked.

  For HD-audio, the resume procedure was changed; instead of delaying
  the resume of the hardware until the first use, now waking up
  immediately at resume.  This is for buggy BIOS.

  For ASoC, dynamic PCM support and the improved support for digital
  links between off-SoC devices are major framework changes.

  Some highlights are below:

  * HD-audio
   - Avoid accesses of invalid pin-control bits that may stall the codec
   - V-ref setup cleanups
   - Fix the races in power-saving code
   - Fix the races in codec cache hashes and connection lists
   - Split some common codes for BIOS auto-parser to hda_auto_parser.c
   - Changed the PM resume code to wake up immediately for buggy BIOS
   - Creative SoundCore3D support
   - Add Conexant CX20751/2/3/4 codec support

  * ASoC
   - Dynamic PCM support, allowing support for SoCs with internal
     routing through components with tight sequencing and formatting
     constraints within their internal paths or where there are multiple
     components connected with CPU managed DMA controllers inside the
     SoC.
   - Greatly improved support for direct digital links between off-SoC
     devices, providing a much simpler way of connecting things like
     digital basebands to CODECs.
   - Much more fine grained and robust locking, cleaning up some of the
     confusion that crept in with multi-component.
   - CPU support for nVidia Tegra 30 I2S and audio hub controllers and
     ST-Ericsson MSP I2S controolers
   - New CODEC drivers for Cirrus CS42L52, LAPIS Semiconductor ML26124,
     Texas Instruments LM49453.
   - Some regmap changes needed by the Tegra I2S driver.
   - mc13783 audio support.

  * Misc
   - Rewrite with module_pci_driver()
   - Xonar DGX support for snd-oxygen
   - Improvement of packet handling in snd-firewire driver
   - New USB-endpoint streaming logic
   - Enhanced M-audio FTU quirks and relevant cleanups
   - Increment the support of OSS devices to 256
   - snd-aloop accuracy improvement

  There are a few more pending changes for 3.5, but they will be sent
  slightly later as partly depending on the changes of DRM."

Fix up conflicts in regmap (due to duplicate patches, with some further
updates then having already come in from the regmap tree).  Also some
fairly trivial context conflicts in the imx and mcx soc drivers.

* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (280 commits)
  ALSA: snd-usb: fix stream info output in /proc
  ALSA: pcm - Add proper state checks to snd_pcm_drain()
  ALSA: sh: Fix up namespace collision in sh_dac_audio.
  ALSA: hda/realtek - Fix unused variable compile warning
  ASoC: sh: fsi: enable chip specific data transfer mode
  ASoC: sh: fsi: call fsi_hw_startup/shutdown from fsi_dai_trigger()
  ASoC: sh: fsi: use same format for IN/OUT
  ASoC: sh: fsi: add fsi_version() and removed meaningless version check
  ASoC: sh: fsi: use register field macro name on IN/OUT_DMAC
  ASoC: tegra: Add machine driver for WM8753 codec
  ALSA: hda - Fix possible races of accesses to connection list array
  ASoC: OMAP: HDMI: Introduce codec
  ARM: mx31_3ds: Add sound support
  ASoC: imx-mc13783 cleanup
  mx31moboard: Add sound support
  ASoC: mc13783 codec cleanups
  ASoC: add imx-mc13783 sound support
  ASoC: Add mc13783 codec
  mfd: mc13xxx: add codec platform data
  ASoC: don't flip master of DT-instantiated DAI links
  ...

12 years agoMerge tag 'ktest-v3.5-spelling' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 23 May 2012 19:46:49 +0000 (12:46 -0700)]
Merge tag 'ktest-v3.5-spelling' of git://git./linux/kernel/git/rostedt/linux-ktest

Pull trivial ktest spelling fix from Steven Rostedt:
 "I promised Jesper that I would push this for 3.5, but forgot to add it
  to my queue.  It's just a spelling fix, but it should go in regardless
  to hide my inability to get words in the English language correct."

Becuse gud spealing is impurtunt.

* tag 'ktest-v3.5-spelling' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
  ktest: Change singular "paranthesis" to plural "parentheses"

12 years agoMerge branches 'perf-urgent-for-linus' and 'perf-core-for-linus' of git://git.kernel...
Linus Torvalds [Wed, 23 May 2012 19:12:49 +0000 (12:12 -0700)]
Merge branches 'perf-urgent-for-linus' and 'perf-core-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:

 - Leftover AMD PMU driver fix fix from the end of the v3.4
   stabilization cycle.

 - Late tools/perf/ changes that missed the first round:
    * endianness fixes
    * event parsing improvements
    * libtraceevent fixes factored out from trace-cmd
    * perl scripting engine fixes related to libtraceevent,
    * testcase improvements
    * perf inject / pipe mode fixes
    * plus a kernel side fix

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86: Update event scheduling constraints for AMD family 15h models

* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  Revert "sched, perf: Use a single callback into the scheduler"
  perf evlist: Show event attribute details
  perf tools: Bump default sample freq to 4 kHz
  perf buildid-list: Work better with pipe mode
  perf tools: Fix piped mode read code
  perf inject: Fix broken perf inject -b
  perf tools: rename HEADER_TRACE_INFO to HEADER_TRACING_DATA
  perf tools: Add union u64_swap type for swapping u64 data
  perf tools: Carry perf_event_attr bitfield throught different endians
  perf record: Fix documentation for branch stack sampling
  perf target: Add cpu flag to sample_type if target has cpu
  perf tools: Always try to build libtraceevent
  perf tools: Rename libparsevent to libtraceevent in Makefile
  perf script: Rename struct event to struct event_format in perl engine
  perf script: Explicitly handle known default print arg type
  perf tools: Add hardcoded name term for pmu events
  perf tools: Separate 'mem:' event scanner bits
  perf tools: Use allocated list for each parsed event
  perf tools: Add support for displaying event parser debug info
  perf test: Move parse event automated tests to separated object

12 years agoMerge tag 'ia64-3.5-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl...
Linus Torvalds [Wed, 23 May 2012 19:05:44 +0000 (12:05 -0700)]
Merge tag 'ia64-3.5-merge' of git://git./linux/kernel/git/aegl/linux

Pull Itanium fixes from Tony Luck.

* tag 'ia64-3.5-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  [IA64] Liberate the signal layer from IA64 assembler
  [IA64] Add cmpxchg.h to exported userspace headers
  [IA64] Fix fast syscall version of getcpu()
  [IA64] Removed "task_size" element from thread_struct - it is now constant

12 years agoMerge branch 'x86-reboot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 23 May 2012 18:31:22 +0000 (11:31 -0700)]
Merge branch 'x86-reboot-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 reboot changes from Ingo Molnar:
 "The biggest change is a gentler method of rebooting/stopping via IRQs
  first and then via NMIs.  There are several cleanups in the tree as
  well."

* 'x86-reboot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/reboot: Update nonmi_ipi parameter
  x86/reboot: Use NMI to assist in shutting down if IRQ fails
  Revert "x86, reboot: Use NMI instead of REBOOT_VECTOR to stop cpus"
  x86/reboot: Clean up coding style
  x86/reboot: Reduce to a single DMI table for reboot quirks

12 years agoMerge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 23 May 2012 18:16:40 +0000 (11:16 -0700)]
Merge branch 'x86-platform-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 platform changes from Ingo Molnar:
 "This tree includes assorted platform driver updates and a preparatory
  series for a platform with custom DMA remapping semantics (sta2x11 I/O
  hub)."

* 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/vsmp: Fix number of CPUs when vsmp is disabled
  keyboard: Use BIOS Keyboard variable to set Numlock
  x86/olpc/xo1/sci: Report RTC wakeup events
  x86/olpc/xo1/sci: Produce wakeup events for buttons and switches
  x86, platform: Initial support for sta2x11 I/O hub
  x86: Introduce CONFIG_X86_DMA_REMAP
  x86-32: Introduce CONFIG_X86_DEV_DMA_OPS

12 years agoMerge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 23 May 2012 18:06:59 +0000 (11:06 -0700)]
Merge branch 'x86-mm-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 mm changes from Ingo Molnar:
 "This tree includes a micro-optimization that avoids cr3 switches
  during idling; it fixes corner cases and there's also small cleanups"

Fix up trivial context conflict with the percpu_xx -> this_cpu_xx
changes.

* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86-64: Fix accounting in kernel_physical_mapping_init()
  x86/tlb: Clean up and unify TLB_FLUSH_ALL definition
  x86: Drop obsolete ARCH_BOOTMEM support
  x86, tlb: Switch cr3 in leave_mm() only when needed
  x86/mm: Fix the size calculation of mapping tables

12 years agoMerge branch 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 23 May 2012 18:01:52 +0000 (11:01 -0700)]
Merge branch 'x86-mce-for-linus' of git://git./linux/kernel/git/tip/tip

Pull MCE updates from Ingo Molnar:
 "This tree updates/fixes MCE hardware support, it makes the APIC LVT
  thresholding interrupt optional because a subset of AMD F15h models
  don't support it."

* 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, MCE, AMD: Disable error thresholding bank 4 on some models
  x86, MCE, AMD: Hide interrupt_enable sysfs node
  x86, MCE, AMD: Make APIC LVT thresholding interrupt optional

12 years agoMerge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 23 May 2012 17:59:07 +0000 (10:59 -0700)]
Merge branch 'x86-fpu-for-linus' of git://git./linux/kernel/git/tip/tip

Pull fpu state cleanups from Ingo Molnar:
 "This tree streamlines further aspects of FPU handling by eliminating
  the prepare_to_copy() complication and moving that logic to
  arch_dup_task_struct().

  It also fixes the FPU dumps in threaded core dumps, removes and old
  (and now invalid) assumption plus micro-optimizes the exit path by
  avoiding an FPU save for dead tasks."

Fixed up trivial add-add conflict in arch/sh/kernel/process.c that came
in because we now do the FPU handling in arch_dup_task_struct() rather
than the legacy (and now gone) prepare_to_copy().

* 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, fpu: drop the fpu state during thread exit
  x86, xsave: remove thread_has_fpu() bug check in __sanitize_i387_state()
  coredump: ensure the fpu state is flushed for proper multi-threaded core dump
  fork: move the real prepare_to_copy() users to arch_dup_task_struct()

12 years agoipx: restore token ring define to include/linux/ipx.h
Paul Gortmaker [Wed, 23 May 2012 04:43:45 +0000 (04:43 +0000)]
ipx: restore token ring define to include/linux/ipx.h

Commit 211ed865108e24697b44bee5daac502ee6bdd4a4

    "net: delete all instances of special processing for token ring"

removed the define for IPX_FRAME_TR_8022.

While it is unlikely, we can't be 100% sure that there aren't
random userspace consumers of this value, so restore it.

The only instance I could find was in ncpfs-2.2.6, and it was
safe as-is, since it used #ifdef IPX_FRAME_TR_8022 around the
two use cases it had, but there may be other userspace packages
without similar ifdefs.

Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'x86-extable-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 23 May 2012 17:44:35 +0000 (10:44 -0700)]
Merge branch 'x86-extable-for-linus' of git://git./linux/kernel/git/tip/tip

Pull exception table generation updates from Ingo Molnar:
 "The biggest change here is to allow the build-time sorting of the
  exception table, to speed up booting.  This is achieved by the
  architecture enabling BUILDTIME_EXTABLE_SORT.  This option is enabled
  for x86 and MIPS currently.

  On x86 a number of fixes and changes were needed to allow build-time
  sorting of the exception table, in particular a relocation invariant
  exception table format was needed.  This required the abstracting out
  of exception table protocol and the removal of 20 years of accumulated
  assumptions about the x86 exception table format.

  While at it, this tree also cleans up various other aspects of
  exception handling, such as early(er) exception handling for
  rdmsr_safe() et al.

  All in one, as the result of these changes the x86 exception code is
  now pretty nice and modern.  As an added bonus any regressions in this
  code will be early and violent crashes, so if you see any of those,
  you'll know whom to blame!"

Fix up trivial conflicts in arch/{mips,x86}/Kconfig files due to nearby
modifications of other core architecture options.

* 'x86-extable-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (35 commits)
  Revert "x86, extable: Disable presorted exception table for now"
  scripts/sortextable: Handle relative entries, and other cleanups
  x86, extable: Switch to relative exception table entries
  x86, extable: Disable presorted exception table for now
  x86, extable: Add _ASM_EXTABLE_EX() macro
  x86, extable: Remove open-coded exception table entries in arch/x86/ia32/ia32entry.S
  x86, extable: Remove open-coded exception table entries in arch/x86/include/asm/xsave.h
  x86, extable: Remove open-coded exception table entries in arch/x86/include/asm/kvm_host.h
  x86, extable: Remove the now-unused __ASM_EX_SEC macros
  x86, extable: Remove open-coded exception table entries in arch/x86/xen/xen-asm_32.S
  x86, extable: Remove open-coded exception table entries in arch/x86/um/checksum_32.S
  x86, extable: Remove open-coded exception table entries in arch/x86/lib/usercopy_32.c
  x86, extable: Remove open-coded exception table entries in arch/x86/lib/putuser.S
  x86, extable: Remove open-coded exception table entries in arch/x86/lib/getuser.S
  x86, extable: Remove open-coded exception table entries in arch/x86/lib/csum-copy_64.S
  x86, extable: Remove open-coded exception table entries in arch/x86/lib/copy_user_nocache_64.S
  x86, extable: Remove open-coded exception table entries in arch/x86/lib/copy_user_64.S
  x86, extable: Remove open-coded exception table entries in arch/x86/lib/checksum_32.S
  x86, extable: Remove open-coded exception table entries in arch/x86/kernel/test_rodata.c
  x86, extable: Remove open-coded exception table entries in arch/x86/kernel/entry_64.S
  ...

12 years agoMerge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 23 May 2012 17:40:34 +0000 (10:40 -0700)]
Merge branch 'x86-efi-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 EFI updates from Ingo Molnar:
 "This patchset makes changes to the bzImage EFI header, so that it can
  be signed with a secure boot signature tool.  It should not affect
  anyone who is not using the EFI self-boot feature in any way."

* 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, efi: Fix NumberOfRvaAndSizes field in PE32 header for EFI_STUB
  x86, efi: Fix .text section overlapping image header for EFI_STUB
  x86, efi: Fix issue of overlapping .reloc section for EFI_STUB

12 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 23 May 2012 17:21:19 +0000 (10:21 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86/urgent branch from Ingo Molnar:
 "These are the fixes left over from the very end of the v3.4
  stabilization cycle, plus one more fix."

Ugh.  Those KERN_CONT additions are just pointless.  I think they came
as a reaction to some of the early (broken) printk() work - but that was
fixed before it was merged.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, relocs: Build clean fix
  x86, printk: Add missing KERN_CONT to NMI selftest
  x86: Fix boot on Twinhead H12Y

12 years agoMerge branches 'x86-asm-for-linus', 'x86-cleanups-for-linus', 'x86-cpu-for-linus...
Linus Torvalds [Wed, 23 May 2012 17:09:50 +0000 (10:09 -0700)]
Merge branches 'x86-asm-for-linus', 'x86-cleanups-for-linus', 'x86-cpu-for-linus', 'x86-debug-for-linus' and 'x86-microcode-for-linus' of git://git./linux/kernel/git/tip/tip

Pull initial trivial x86 stuff from Ingo Molnar.

Various random cleanups and trivial fixes.

* 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86-64: Eliminate dead ia32 syscall handlers

* 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/pci-calgary_64.c: Remove obsoleted simple_strtoul() usage
  x86: Don't continue booting if we can't load the specified initrd
  x86: kernel/dumpstack.c simple_strtoul cleanup
  x86: kernel/check.c simple_strtoul cleanup
  debug: Add CONFIG_READABLE_ASM
  x86: spinlock.h: Remove REG_PTR_MODE

* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/cache_info: Fix setup of l2/l3 ids

* 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: Avoid double stack traces with show_regs()

* 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, microcode: microcode_core.c simple_strtoul cleanup

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux...
Linus Torvalds [Wed, 23 May 2012 16:04:58 +0000 (09:04 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/rkuo/linux-hexagon-kernel

Pull Hexagon architecture changes from Richard Kuo:
 "These are mostly cleanups and feedback remaining from the original
  upstreaming."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel:
  various Kconfig cleanup and old platform build code removal
  hexagon/mm/vm_fault.c: Port OOM changes to do_page_fault
  arch/hexagon/kernel/dma.c: make function static
  Remove unneeded include of version.h from arch/hexagon/include/asm/spinlock_types.h
  Hexagon: Use resource_size function

12 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Wed, 23 May 2012 16:02:42 +0000 (09:02 -0700)]
Merge branch 'next' of git://git./linux/kernel/git/benh/powerpc

Pull powerpc updates from Benjamin Herrenschmidt:
 "Here are the powerpc goodies for 3.5.  Main highlights are:

   - Support for the NX crypto engine in Power7+
   - A bunch of Anton goodness, including some micro optimization of our
     syscall entry on Power7
   - I converted a pile of our thermal control drivers to the new i2c
     APIs (essentially turning the old therm_pm72 into a proper set of
     windfarm drivers).  That's one more step toward removing the
     deprecated i2c APIs, there's still a few drivers to fix, but we are
     getting close
   - kexec/kdump support for 47x embedded cores

  The big missing thing here is no updates from Freescale.  Not sure
  what's up here, but with Kumar not working for them anymore things are
  a bit in a state of flux in that area."

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (71 commits)
  powerpc: Fix irq distribution
  Revert "powerpc/hw-breakpoint: Use generic hw-breakpoint interfaces for new PPC ptrace flags"
  powerpc: Fixing a cputhread code documentation
  powerpc/crypto: Enable the PFO-based encryption device
  powerpc/crypto: Build files for the nx device driver
  powerpc/crypto: debugfs routines and docs for the nx device driver
  powerpc/crypto: SHA512 hash routines for nx encryption
  powerpc/crypto: SHA256 hash routines for nx encryption
  powerpc/crypto: AES-XCBC mode routines for nx encryption
  powerpc/crypto: AES-GCM mode routines for nx encryption
  powerpc/crypto: AES-ECB mode routines for nx encryption
  powerpc/crypto: AES-CTR mode routines for nx encryption
  powerpc/crypto: AES-CCM mode routines for nx encryption
  powerpc/crypto: AES-CBC mode routines for nx encryption
  powerpc/crypto: nx driver code supporting nx encryption
  powerpc/pseries: Enable the PFO-based RNG accelerator
  powerpc/pseries/hwrng: PFO-based hwrng driver
  powerpc/pseries: Add PFO support to the VIO bus
  powerpc/pseries: Add pseries update notifier for OFDT prop changes
  powerpc/pseries: Add new hvcall constants to support PFO
  ...

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Linus Torvalds [Wed, 23 May 2012 16:01:41 +0000 (09:01 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/rw/uml

Pull UML updates from Richard Weinberger:
 "Most changes are bug fixes and cleanups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: missing checks of __put_user()/__get_user() return values
  um: stub_rt_sigsuspend isn't needed these days anymore
  um/x86: merge (and trim) 32- and 64-bit variants of ptrace.h
  irq: Remove irq_chip->release()
  um: Remove CONFIG_IRQ_RELEASE_METHOD
  um: Remove usage of irq_chip->release()
  um: Implement um_free_irq()
  um: Fix __swp_type()
  um: Implement a custom pte_same() function
  um: Add BUG() to do_ops()'s error path
  um: Remove unused variables
  um: bury unused _TIF_RESTORE_SIGMASK
  um: wrong sigmask saved in case of multiple sigframes
  um: add TIF_NOTIFY_RESUME
  um: ->restart_block.fn needs to be reset on sigreturn

12 years agoMerge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Wed, 23 May 2012 16:00:40 +0000 (09:00 -0700)]
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh

Pull SuperH updates from Paul Mundt:
 - New CPUs: SH7734 (SH-4A), SH7264 and SH7269 (SH-2A)
 - New boards: RSK2+SH7264, RSK2+SH7269
 - Unbreaking kgdb for SMP
 - Consolidation of _32/_64 page fault handling.
 - watchdog and legacy DMA chainsawing, part 1
 - Conversion to evt2irq() hwirq lookup, to support relocation of
   vectored IRQs for irqdomains.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (98 commits)
  sh: intc: Kill off special reservation interface.
  sh: Enable PIO API for hp6xx and se770x.
  sh: Kill off machvec IRQ hinting.
  sh: dma: More legacy cpu dma chainsawing.
  sh: Kill off MAX_DMA_ADDRESS leftovers.
  sh: Tidy up some of the cpu legacy dma header mess.
  sh: Move sh4a dma header from cpu-sh4 to cpu-sh4a.
  sh64: Fix up vmalloc fault range check.
  Revert "sh: Ensure fixmap and store queue space can co-exist."
  serial: sh-sci: Fix for port types without BRI interrupts.
  sh: legacy PCI evt2irq migration.
  sh: cpu dma evt2irq migration.
  sh: sh7763rdp evt2irq migration.
  sh: sdk7780 evt2irq migration.
  sh: migor evt2irq migration.
  sh: landisk evt2irq migration.
  sh: kfr2r09 evt2irq migration.
  sh: ecovec24 evt2irq migration.
  sh: ap325rxa evt2irq migration.
  sh: urquell evt2irq migration.
  ...

12 years agoRevert "sched, perf: Use a single callback into the scheduler"
Jiri Olsa [Wed, 23 May 2012 11:13:02 +0000 (13:13 +0200)]
Revert "sched, perf: Use a single callback into the scheduler"

This reverts commit cb04ff9ac424 ("sched, perf: Use a single
callback into the scheduler").

Before this change was introduced, the process switch worked
like this (wrt. to perf event schedule):

     schedule (prev, next)
       - schedule out all perf events for prev
       - switch to next
       - schedule in all perf events for current (next)

After the commit, the process switch looks like:

     schedule (prev, next)
       - schedule out all perf events for prev
       - schedule in all perf events for (next)
       - switch to next

The problem is, that after we schedule perf events in, the pmu
is enabled and we can receive events even before we make the
switch to next - so "current" still being prev process (event
SAMPLE data are filled based on the value of the "current"
process).

Thats exactly what we see for test__PERF_RECORD test. We receive
SAMPLES with PID of the process that our tracee is scheduled
from.

Discussed with Peter Zijlstra:

 > Bah!, yeah I guess reverting is the right thing for now. Sad
 > though.
 >
 > So by having the two hooks we have a black-spot between them
 > where we receive no events at all, this black-spot covers the
 > hand-over of current and we thus don't receive the 'wrong'
 > events.
 >
 > I rather liked we could do away with both that black-spot and
 > clean up the code a little, but apparently people rely on it.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: acme@redhat.com
Cc: paulus@samba.org
Cc: cjashfor@linux.vnet.ibm.com
Cc: fweisbec@gmail.com
Cc: eranian@google.com
Link: http://lkml.kernel.org/r/20120523111302.GC1638@m.brq.redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
12 years agoDocumentation/watchdog: Fix the file descriptor leak when no cmdline arg given
Devendra Naga [Thu, 17 May 2012 09:37:48 +0000 (15:07 +0530)]
Documentation/watchdog: Fix the file descriptor leak when no cmdline arg given

we start a infinite loop when user gives ./watchdog-test, and when user
ctrl + c's the program, we just exit immeadiately with out closing the
filedescriptor of the watchdog device. a signal handler is used to
do the job of closing the filedescriptor and exiting the program.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agoDocumentation/watchdog: close the fd when cmdline arg given
Devendra Naga [Mon, 14 May 2012 18:12:02 +0000 (23:42 +0530)]
Documentation/watchdog: close the fd when cmdline arg given

in the watchdog test code, the ioctl is performed on the watchdog device
and just doing exit(0) so we leak a filedescripor.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agoDocumentation/watchdog: Fix a small typo
Devendra Naga [Mon, 14 May 2012 09:03:37 +0000 (14:33 +0530)]
Documentation/watchdog: Fix a small typo

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: s3c2410_wdt: Set timeout to actually achieved timeout
Hans de Goede [Fri, 11 May 2012 10:00:27 +0000 (12:00 +0200)]
watchdog: s3c2410_wdt: Set timeout to actually achieved timeout

While rebasing my "watchdog_dev: Let the driver update the timeout field on
set_timeout success" patch (before I noticed it was already picked up by Wim),
I noticed that the s3c2410_wdt driver may not always have a 1 second
resolution, this patch changes s3c2410wdt_set_heartbeat to update the
timeout to the actually achieved timeout.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: wm831x: Convert to gpio_request_one()
Mark Brown [Sun, 13 May 2012 22:42:55 +0000 (23:42 +0100)]
watchdog: wm831x: Convert to gpio_request_one()

Use the more modern API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: via_wdt: depends on PCI
Randy Dunlap [Fri, 11 May 2012 23:37:22 +0000 (16:37 -0700)]
watchdog: via_wdt: depends on PCI

via_wdt is a PCI driver so it should depend on PCI so that
it will not cause build errors.

drivers/watchdog/via_wdt.c:256:1: warning: data definition has no type or storage class
drivers/watchdog/via_wdt.c:256:1: warning: type defaults to 'int' in declaration of 'module_pci_driver'
drivers/watchdog/via_wdt.c:256:1: warning: parameter names (without types) in function declaration

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: ie6xx_wdt needs io.h
Randy Dunlap [Mon, 14 May 2012 20:14:29 +0000 (13:14 -0700)]
watchdog: ie6xx_wdt needs io.h

Fix build error by including <linux/io.h>:

drivers/watchdog/ie6xx_wdt.c:97:2: error: implicit declaration of function 'outb'
drivers/watchdog/ie6xx_wdt.c:133:2: error: implicit declaration of function 'outl'
drivers/watchdog/ie6xx_wdt.c:161:2: error: implicit declaration of function 'inb'
drivers/watchdog/ie6xx_wdt.c:199:3: error: implicit declaration of function 'inl'
drivers/watchdog/ie6xx_wdt.c:203:3: error: implicit declaration of function 'inw'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: ie6xx_wdt.c: fix printk format warning
Randy Dunlap [Sat, 12 May 2012 01:33:31 +0000 (18:33 -0700)]
watchdog: ie6xx_wdt.c: fix printk format warning

Fix printk format warning; use cast to u64 since resource_size_t can
be either u32 or u64.

drivers/watchdog/ie6xx_wdt.c:261:4: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: Add watchdog driver for Intel Atom E6XX
Alexander Stein [Thu, 10 May 2012 14:37:43 +0000 (16:37 +0200)]
watchdog: Add watchdog driver for Intel Atom E6XX

Add driver for the watchdog timer built into the
Intel Atom E6XX (TunnelCreek) processor.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: it87_wdt: Add support for IT8728F watchdog.
Diego Elio Pettenò [Wed, 14 Mar 2012 19:49:04 +0000 (20:49 +0100)]
watchdog: it87_wdt: Add support for IT8728F watchdog.

This works the same way IT8721F works, but it supports WDT_PWROK
(checked on the datasheet).

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: i6300esb: don't depend on X86
Michael Olbrich [Sun, 8 Apr 2012 11:56:06 +0000 (13:56 +0200)]
watchdog: i6300esb: don't depend on X86

i6300esb is on of the watchdogs QEMU can emulate. It is also available
when emulating ARM. The driver works without problems and is quite
useful to test userspace dealing with /dev/watchdog.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: Use module_pci_driver
Wim Van Sebroeck [Fri, 4 May 2012 12:43:25 +0000 (14:43 +0200)]
watchdog: Use module_pci_driver

This patch converts the PCI watchdog drivers so that they use the
module_pci_driver() macro. This makes the code smaller and simpler.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Thomas Mingarelli <thomas.mingarelli@hp.com>
Cc: Marc Vertes <marc.vertes@sigfox.com>
12 years agoktest: Change singular "paranthesis" to plural "parentheses"
Jesper Juhl [Mon, 16 Apr 2012 17:40:24 +0000 (19:40 +0200)]
ktest: Change singular "paranthesis" to plural "parentheses"

Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
12 years agowatchdog: sch311x_wdt.c: Remove RESGEN
Dave Mueller [Wed, 11 Apr 2012 13:43:22 +0000 (15:43 +0200)]
watchdog: sch311x_wdt.c: Remove RESGEN

The SCH311x chip contains 2 watchdogs. One is the watchdog programmable
by the runtime register at address 0x65-0x68, the other is the watchdog
inside the power on reset generator. This second watchdog has a fixed
timeout value of ~1.6 seconds and is configurable only by the RESGEN
register.

The BIOS normally takes care of the RESGEN watchdog and disables it (at
least) before the OS is booted.

Unfortunately the sch311x_wdt driver clears bit 0 of the RESGEN register
which has the effect that at the latest 1.6 seconds later, a POR is
triggered.

The attached patch fixes this problem by completely removing any
reference to the RESGEN watchdog from the sch311x_wdt driver.

Signed-off-by: Dave Mueller <d.mueller@elsoft.ch>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: s3c2410-wdt: Use of_match_ptr().
Wim Van Sebroeck [Thu, 3 May 2012 05:24:17 +0000 (05:24 +0000)]
watchdog: s3c2410-wdt: Use of_match_ptr().

Use of_match_ptr definition for the of_match_table.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
12 years agowatchdog: Device tree support for pnx4008-wdt
Roland Stigge [Fri, 20 Apr 2012 19:55:29 +0000 (21:55 +0200)]
watchdog: Device tree support for pnx4008-wdt

This patch adds device tree support to pnx4008-wdt.c

Signed-off-by: Roland Stigge <stigge@antcom.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: ar7_wdt.c: use devm_request_and_ioremap
Julia Lawall [Sun, 15 Apr 2012 10:27:33 +0000 (12:27 +0200)]
watchdog: ar7_wdt.c: use devm_request_and_ioremap

Combine request_region and ioremap into devm_request_and_ioremap.  This has
the effect of fixing a missing iounmap on the failure of clk_get.

This also introduces a call to clk_put and clears the vbus_clk variable in
the case of failure or device removal.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: remove ixp2000 driver
Rob Herring [Wed, 4 Apr 2012 01:34:03 +0000 (20:34 -0500)]
watchdog: remove ixp2000 driver

The platform is removed, so there are no users of this driver.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agowatchdog: sp5100_tco.c: quiet sparse noise about using plain integer was NULL pointer
H Hartley Sweeten [Wed, 2 May 2012 23:54:43 +0000 (16:54 -0700)]
watchdog: sp5100_tco.c: quiet sparse noise about using plain integer was NULL pointer

Pointers should not be compared to plain integers.
Quiets the sparse warning:
warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agodrm/nouveau/radeon: add static const to the dma-buf ops.
Dave Airlie [Wed, 23 May 2012 13:10:27 +0000 (14:10 +0100)]
drm/nouveau/radeon: add static const to the dma-buf ops.

Reported-by: wfg@linux.intel.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/i915: make some dmabuf things static
Dave Airlie [Wed, 23 May 2012 13:09:32 +0000 (14:09 +0100)]
drm/i915: make some dmabuf things static

these functions and the table can all be static/static const.

Reported-by: wfg@linux.intel.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: update ast/cirrus/mgag200 for change in TTM api
Dave Airlie [Wed, 23 May 2012 13:08:41 +0000 (14:08 +0100)]
drm: update ast/cirrus/mgag200 for change in TTM api

New drivers merged after changes were done in prime TTM code.

Fix build.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoGuard check in module loader against integer overflow
David Howells [Tue, 22 May 2012 14:56:13 +0000 (15:56 +0100)]
Guard check in module loader against integer overflow

The check:

if (len < hdr->e_shoff + hdr->e_shnum * sizeof(Elf_Shdr))

may not work if there's an overflow in the right-hand side of the condition.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agomodpost: use proper kernel style for autogenerated files
Greg Kroah-Hartman [Wed, 25 Apr 2012 18:10:15 +0000 (11:10 -0700)]
modpost: use proper kernel style for autogenerated files

If the kernel build process is creating files automatically, the least
it can do is create them in a properly formatted manner.  Sure, it's a
minor issue, but being consistent is nice.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alessio Igor Bogani <abogani@kernel.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agomodpost: Stop grab_file() from leaking filedescriptors if fstat() fails
Jesper Juhl [Wed, 23 May 2012 12:58:49 +0000 (22:28 +0930)]
modpost: Stop grab_file() from leaking filedescriptors if fstat() fails

In case the open() call succeeds but the subsequent fstat() call
fails, then we'll return without close()'ing the filedescriptor.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agoMerge branch 'prime-merge' of ssh://people.freedesktop.org/~airlied/linux into drm...
Dave Airlie [Wed, 23 May 2012 09:46:24 +0000 (10:46 +0100)]
Merge branch 'prime-merge' of ssh://people.freedesktop.org/~airlied/linux into drm-core-next

* 'prime-merge' of ssh://people.freedesktop.org/~airlied/linux:
  drm/radeon: add PRIME support (v2)
  i915: add dmabuf/prime buffer sharing support.
  nouveau: add PRIME support
  ttm: add prime sharing support to TTM (v2)
  udl: add prime fd->handle support.
  drm/prime: add exported buffers to current fprivs imported buffer list (v2)
  drm/prime: introduce sg->pages/addr arrays helper

12 years agodrm/radeon: add PRIME support (v2)
Alex Deucher [Thu, 10 May 2012 22:33:13 +0000 (18:33 -0400)]
drm/radeon: add PRIME support (v2)

This adds prime->fd and fd->prime support to radeon.
It passes the sg object to ttm and then populates
the gart entries using it.

Compile tested only.

v2: stub kmap + use new helpers + add reimporting

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoi915: add dmabuf/prime buffer sharing support.
Daniel Vetter [Thu, 10 May 2012 13:25:09 +0000 (15:25 +0200)]
i915: add dmabuf/prime buffer sharing support.

This adds handle->fd and fd->handle support to i915, this is to allow
for offloading of rendering in one direction and outputs in the other.

v2 from Daniel Vetter:
- fixup conflicts with the prepare/finish gtt prep work.
- implement ppgtt binding support.

Note that we have squat i-g-t testcoverage for any of the lifetime and
access rules dma_buf/prime support brings along. And there are quite a
few intricate situations here.

Also note that the integration with the existing code is a bit
hackish, especially around get_gtt_pages and put_gtt_pages. It imo
would be easier with the prep code from Chris Wilson's unbound series,
but that is for 3.6.

Also note that I didn't bother to put the new prepare/finish gtt hooks
to good use by moving the dma_buf_map/unmap_attachment calls in there
(like we've originally planned for).

Last but not least this patch is only compile-tested, but I've changed
very little compared to Dave Airlie's version. So there's a decent
chance v2 on drm-next works as well as v1 on 3.4-rc.

v3: Right when I've hit sent I've noticed that I've screwed up one
obj->sg_list (for dmar support) and obj->sg_table (for prime support)
disdinction. We should be able to merge these 2 paths, but that's
material for another patch.

v4: fix the error reporting bugs pointed out by ickle.

v5: fix another error, and stop non-gtt mmaps on shared objects
stop pread/pwrite on imported objects, add fake kmap

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agonouveau: add PRIME support
Dave Airlie [Mon, 2 Apr 2012 10:53:06 +0000 (11:53 +0100)]
nouveau: add PRIME support

This adds prime->fd and fd->prime support to nouveau,
it passes the SG object to TTM, and then populates the
GART entries using it.

v2: add stubbed kmap + use new function to fill out pages array
for faulting + add reimport test.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agottm: add prime sharing support to TTM (v2)
Dave Airlie [Mon, 2 Apr 2012 10:46:06 +0000 (11:46 +0100)]
ttm: add prime sharing support to TTM (v2)

This adds the ability for ttm common code to take an SG table
and use it as the backing for a slave TTM object.

The drivers can then populate their GTT tables using the SG object.

v2: make sure to setup VM for sg bos as well.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoudl: add prime fd->handle support.
Dave Airlie [Wed, 21 Dec 2011 11:23:44 +0000 (11:23 +0000)]
udl: add prime fd->handle support.

udl can only be used as an output offload so doesn't need to support
handle->fd direction.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>