safe/jmp/linux-2.6
14 years agosdhci-of: reorganize driver to support additional hardware
Albert Herranz [Thu, 17 Dec 2009 23:27:20 +0000 (15:27 -0800)]
sdhci-of: reorganize driver to support additional hardware

This patch breaks down sdhci-of into a core portion and a eSDHC portion,
clearing the path to easily support additional hardware using the same OF
driver.

Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosdhci-of: rename main driver file prior to reorganization
Albert Herranz [Thu, 17 Dec 2009 23:27:19 +0000 (15:27 -0800)]
sdhci-of: rename main driver file prior to reorganization

This patch renames sdhci-of.c to sdhci-of-core.c before reorganizing the
driver to support additional hardware.

The driver is still built as sdhci-of despite the rename of the file.  No
functional change.

Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosdhci: protect header file against multi inclusion
Albert Herranz [Thu, 17 Dec 2009 23:27:19 +0000 (15:27 -0800)]
sdhci: protect header file against multi inclusion

Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosdio: initialise SDIO functions and update card->sdio_funcs in lockstep
Matt Fleming [Thu, 17 Dec 2009 23:27:18 +0000 (15:27 -0800)]
sdio: initialise SDIO functions and update card->sdio_funcs in lockstep

Daniel Drake noticed a crash in the error path of mmc_attach_sdio().  This
bug is discussed at http://dev.laptop.org/ticket/9707.

BUG: unable to handle kernel paging request at 6b6b6c57
IP: [<b066d6e2>] sdio_remove_func+0x9/0x27
Call Trace:
[<b066cfb4>] ? mmc_sdio_remove+0x34/0x65
[<b066d1fc>] ? mmc_attach_sdio+0x217/0x240
[<b066a22f>] ? mmc_rescan+0x1a2/0x20f
[<b042e9a0>] ? worker_thread+0x156/0x1e

We need to accurately track how many SDIO functions have been initialised
(and keep card->sdio_funcs in sync) so that we don't try to remove more
functions than we initialised if we hit the error path in
mmc_attach_sdio().

Without this patch if we hit the error path in mmc_attach_sdio() we run
the risk of deferencing invalid memory in sdio_remove_func(), leading to a
crash.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Cc: Daniel Drake <dsd@laptop.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosdio: fix reference counting in sdio_remove_func()
Daniel Drake [Thu, 17 Dec 2009 23:27:17 +0000 (15:27 -0800)]
sdio: fix reference counting in sdio_remove_func()

sdio_remove_func() needs to be more careful about reference counting.  It
can be called in error paths where sdio_add_func() has never been called
e.g.  mmc_attach_sdio error path --> mmc_sdio_remove --> sdio_remove_func

Signed-off-by: Daniel Drake <dsd@laptop.org>
Reviewed-by: Matt Fleming <matt@console-pimps.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm: introduce coredump parameter structure
Masami Hiramatsu [Thu, 17 Dec 2009 23:27:16 +0000 (15:27 -0800)]
mm: introduce coredump parameter structure

Introduce coredump parameter data structure (struct coredump_params) to
simplify binfmt->core_dump() arguments.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Suggested-by: Ingo Molnar <mingo@elte.hu>
Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodo_wait() optimization: do not place sub-threads on task_struct->children list
Oleg Nesterov [Thu, 17 Dec 2009 23:27:15 +0000 (15:27 -0800)]
do_wait() optimization: do not place sub-threads on task_struct->children list

Thanks to Roland who pointed out de_thread() issues.

Currently we add sub-threads to ->real_parent->children list.  This buys
nothing but slows down do_wait().

With this patch ->children contains only main threads (group leaders).
The only complication is that forget_original_parent() should iterate over
sub-threads by hand, and de_thread() needs another list_replace() when it
changes ->group_leader.

Henceforth do_wait_thread() can never see task_detached() && !EXIT_DEAD
tasks, we can remove this check (and we can unify do_wait_thread() and
ptrace_do_wait()).

This change can confuse the optimistic search in mm_update_next_owner(),
but this is fixable and minor.

Perhaps badness() and oom_kill_process() should be updated, but they
should be fixed in any case.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ratan Nalumasu <rnalumasu@gmail.com>
Cc: Vitaly Mayatskikh <vmayatsk@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agonommu: ramfs: remove unused local var
Mike Frysinger [Thu, 17 Dec 2009 23:27:14 +0000 (15:27 -0800)]
nommu: ramfs: remove unused local var

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: David Howells <dhowells@redhat.com>
Acked-by: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agolib/vsprintf.c: document more vsnprintf extensions
Uwe Kleine-König [Thu, 17 Dec 2009 23:27:12 +0000 (15:27 -0800)]
lib/vsprintf.c: document more vsnprintf extensions

These were added in

9ac6e44 (lib/vsprintf.c: add %pU to print UUID/GUIDs)
c7dabef (vsprintf: use %pR, %pr instead of %pRt, %pRf)
8a27f7c (lib/vsprintf.c: Add "%pI6c" - print pointer as compressed ipv6 address)
4aa9960 (printk: add %I4, %I6, %i4, %i6 format specifiers)
dd45c9c (printk: add %pM format specifier for MAC addresses)

but only added comments to pointer() not vsnprintf() that is refered to by
printk's comments.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Harvey Harrison <harvey.harrison@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Joe Perches <joe@perches.com>
Cc: Jens Rosenboom <jens@mcbone.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agovt: don't export vt_kmsg_redirect() to userspace
Bernhard Walle [Thu, 17 Dec 2009 23:27:11 +0000 (15:27 -0800)]
vt: don't export vt_kmsg_redirect() to userspace

Fix following warning in linux-next by guarding the function definition
(both the "extern" and the inline) with #ifdef __KERNEL__.

usr/include/linux/vt.h:89: userspace cannot call function or variable defined in
the kernel

Introduced by commit 5ada918b82399eef3afd6a71e3637697d6bd719f ("vt:
introduce and use vt_kmsg_redirect() function").

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodrivers/video/via/viafbdev.c: correct code taking the size of a pointer
Julia Lawall [Thu, 17 Dec 2009 23:27:09 +0000 (15:27 -0800)]
drivers/video/via/viafbdev.c: correct code taking the size of a pointer

sizeof(viafb_gamma_table) is just the size of the pointer.  This is changed
to the size used when calling kmalloc to initialize the pointer.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression *x;
expression f;
type T;
@@

*f(...,(T)x,...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agohwmon: I2C bus support for lis3lv02d and variant accelerometer chips
Samu Onkalo [Thu, 17 Dec 2009 23:27:07 +0000 (15:27 -0800)]
hwmon: I2C bus support for lis3lv02d and variant accelerometer chips

Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Cc: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Kalhan Trisal <kalhan.trisal@intel.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoreiserfs: truncate blocks not used by a write
Jan Kara [Thu, 17 Dec 2009 23:27:06 +0000 (15:27 -0800)]
reiserfs: truncate blocks not used by a write

It can happen that write does not use all the blocks allocated in
write_begin either because of some filesystem error (like ENOSPC) or
because page with data to write has been removed from memory.  We truncate
these blocks so that we don't have dangling blocks beyond i_size.

Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocs5535: CS5535_MFGPT_DEFAULT_IRQ should depend on CS5535_MFGPT
Geert Uytterhoeven [Thu, 17 Dec 2009 23:27:05 +0000 (15:27 -0800)]
cs5535: CS5535_MFGPT_DEFAULT_IRQ should depend on CS5535_MFGPT

It doesn't make much sense to have CS5535_MFGPT_DEFAULT_IRQ show up in
configs that cannot have CS5535_MFGPT.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agokernel/sysctl.c: fix the incomplete part of sysctl_max_map_count-should-be-non-negati...
WANG Cong [Thu, 17 Dec 2009 23:27:05 +0000 (15:27 -0800)]
kernel/sysctl.c: fix the incomplete part of sysctl_max_map_count-should-be-non-negative.patch

It is a mistake that we used 'proc_dointvec', it should be
'proc_dointvec_minmax', as in the original patch.

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agox86: Fix objdump version check in arch/x86/tools/chkobjdump.awk
akpm@linux-foundation.org [Thu, 17 Dec 2009 23:26:36 +0000 (15:26 -0800)]
x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk

It says

Warning: objdump version  is older than 2.19
Warning: Skipping posttest.

because it used the wrong field from `objdump -v':

akpm:/usr/src/25> /opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-objdump -v
GNU objdump 2.16.1
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <200912172326.nBHNQaQl024796@imap1.linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
14 years agoMerge branch 'cache' (early part)
Russell King [Thu, 17 Dec 2009 23:22:23 +0000 (23:22 +0000)]
Merge branch 'cache' (early part)

14 years agox86: Reenable TSC sync check at boot, even with NONSTOP_TSC
Pallipadi, Venkatesh [Thu, 17 Dec 2009 20:27:02 +0000 (12:27 -0800)]
x86: Reenable TSC sync check at boot, even with NONSTOP_TSC

Commit 83ce4009 did the following change
If the TSC is constant and non-stop, also set it reliable.

But, there seems to be few systems that will end up with TSC warp across
sockets, depending on how the cpus come out of reset. Skipping TSC sync
test on such systems may result in time inconsistency later.

So, reenable TSC sync test even on constant and non-stop TSC systems.
Set, sched_clock_stable to 1 by default and reset it in
mark_tsc_unstable, if TSC sync fails.

This change still gives perf benefit mentioned in 83ce4009 for systems
where TSC is reliable.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <20091217202702.GA18015@linux-os.sc.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agoRevert "task_struct: make journal_info conditional"
Linus Torvalds [Thu, 17 Dec 2009 21:23:24 +0000 (13:23 -0800)]
Revert "task_struct: make journal_info conditional"

This reverts commit e4c570c4cb7a95dbfafa3d016d2739bf3fdfe319, as
requested by Alexey:

 "I think I gave a good enough arguments to not merge it.
  To iterate:
   * patch makes impossible to start using ext3 on EXT3_FS=n kernels
     without reboot.
   * this is done only for one pointer on task_struct"

  None of config options which define task_struct are tristate directly
  or effectively."

Requested-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
Chris Mason [Thu, 17 Dec 2009 21:01:41 +0000 (16:01 -0500)]
Merge branch 'master' of ssh:///linux/kernel/git/mason/btrfs-unstable into for-linus

14 years agoRevert "fix mismerge with Trond's stuff (create_mnt_ns() export is gone now)"
Linus Torvalds [Thu, 17 Dec 2009 20:51:05 +0000 (12:51 -0800)]
Revert "fix mismerge with Trond's stuff (create_mnt_ns() export is gone now)"

This reverts commit e9496ff46a20a8592fdc7bdaaf41b45eb808d310. Quoth Al:

 "it's dependent on a lot of other stuff not currently in mainline
  and badly broken with current fs/namespace.c.  Sorry, badly
  out-of-order cherry-pick from old queue.

  PS: there's a large pending series reworking the refcounting and
  lifetime rules for vfsmounts that will, among other things, allow to
  rip a subtree away _without_ dissolving connections in it, to be
  garbage-collected when all active references are gone.  It's
  considerably saner wrt "is the subtree busy" logics, but it's nowhere
  near being ready for merge at the moment; this changeset is one of the
  things becoming possible with that sucker, but it certainly shouldn't
  have been picked during this cycle.  My apologies..."

Noticed-by: Eric Paris <eparis@redhat.com>
Requested-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoBtrfs: make sure fallocate properly starts a transaction
Chris Mason [Thu, 17 Dec 2009 20:47:17 +0000 (15:47 -0500)]
Btrfs: make sure fallocate properly starts a transaction

The recent patch to make fallocate enospc friendly would send
down a NULL trans handle to the allocator.  This moves the
transaction start to properly fix things.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBluetooth: Prevent ill-timed autosuspend in USB driver
Oliver Neukum [Wed, 16 Dec 2009 18:23:43 +0000 (19:23 +0100)]
Bluetooth: Prevent ill-timed autosuspend in USB driver

The device must be marked busy as it receives data.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Tested-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Fix L2CAP locking scheme regression
Andrei Emeltchenko [Tue, 15 Dec 2009 09:38:04 +0000 (11:38 +0200)]
Bluetooth: Fix L2CAP locking scheme regression

When locking was introduced the error path branch was not taken
into account. Error was found in sparse code checking. Kudos to
Jani Nikula.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Ack L2CAP I-frames before retransmit missing packet
Gustavo F. Padovan [Tue, 15 Dec 2009 22:13:27 +0000 (20:13 -0200)]
Bluetooth: Ack L2CAP I-frames before retransmit missing packet

Moving the Ack to before l2cap_retransmit_frame() we can avoid the
case where txWindow is full and the packet can't be retransmited.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Fix unset of RemoteBusy flag for L2CAP
Gustavo F. Padovan [Tue, 15 Dec 2009 17:56:34 +0000 (15:56 -0200)]
Bluetooth: Fix unset of RemoteBusy flag for L2CAP

RemoteBusy flag need to be unset before l2cap_ertm_send(), otherwise
l2cap_ertm_send() will return without sending packets because it checks
that flag before start sending.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoMerge branch btrfs-master into for-linus
Chris Mason [Thu, 17 Dec 2009 20:02:22 +0000 (15:02 -0500)]
Merge branch btrfs-master into for-linus

Conflicts:
fs/btrfs/acl.c

14 years agoBluetooth: Fix PTR_ERR return of wrong pointer in hidp_setup_hid()
Roel Kluin [Mon, 7 Dec 2009 13:23:21 +0000 (14:23 +0100)]
Bluetooth: Fix PTR_ERR return of wrong pointer in hidp_setup_hid()

Return the PTR_ERR of the correct pointer.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBtrfs: make metadata chunks smaller
Josef Bacik [Mon, 7 Dec 2009 21:45:59 +0000 (21:45 +0000)]
Btrfs: make metadata chunks smaller

This patch makes us a bit less zealous about making sure we have enough free
metadata space by pearing down the size of new metadata chunks to 256mb instead
of 1gb.  Also, we used to try an allocate metadata chunks when allocating data,
but that sort of thing is done elsewhere now so we can just remove it.  With my
-ENOSPC test I used to have 3gb reserved for metadata out of 75gb, now I have
1.7gb.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Show discard option in /proc/mounts
Matthew Wilcox [Mon, 14 Dec 2009 22:01:12 +0000 (22:01 +0000)]
Btrfs: Show discard option in /proc/mounts

Christoph's patch e244a0aeb6a599c19a7c802cda6e2d67c847b154 doesn't display
the discard option in /proc/mounts, leading to some confusion for me.
Here's the missing bit.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: deny sys_link across subvolumes.
TARUISI Hiroaki [Thu, 12 Nov 2009 07:14:26 +0000 (07:14 +0000)]
Btrfs: deny sys_link across subvolumes.

I rebased Christian Parpart's patch to deny hard link across
subvolumes. Original patch modifies also btrfs_rename, but
I excluded it because we can move across subvolumes now and
it make no problem.
-----------------

Hard link across subvolumes should not allowed in Btrfs.
btrfs_link checks root of 'to' directory is same as root
of 'from' file. If not same, btrfs_link returns -EPERM.

Signed-off-by: TARUISI Hiroaki <taruishi.hiroak@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fail mount on bad mount options
Sage Weil [Sat, 7 Nov 2009 06:19:16 +0000 (06:19 +0000)]
Btrfs: fail mount on bad mount options

We shouldn't silently ignore unrecognized options.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: don't add extent 0 to the free space cache v2
Yan, Zheng [Thu, 26 Nov 2009 09:31:11 +0000 (09:31 +0000)]
Btrfs: don't add extent 0 to the free space cache v2

If block group 0 is completely free, btrfs_read_block_groups will
add extent [0, BTRFS_SUPER_INFO_OFFSET) to the free space cache.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Fix per root used space accounting
Yan, Zheng [Thu, 12 Nov 2009 09:36:50 +0000 (09:36 +0000)]
Btrfs: Fix per root used space accounting

The bytes_used field in root item was originally planned to
trace the amount of used data and tree blocks. But it never
worked right since we can't trace freeing of data accurately.
This patch changes it to only trace the amount of tree blocks.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Fix btrfs_drop_extent_cache for skip pinned case
Yan, Zheng [Thu, 12 Nov 2009 09:36:44 +0000 (09:36 +0000)]
Btrfs: Fix btrfs_drop_extent_cache for skip pinned case

The check for skip pinned case is wrong, it may breaks the
while loop too soon.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Add delayed iput
Yan, Zheng [Thu, 12 Nov 2009 09:36:34 +0000 (09:36 +0000)]
Btrfs: Add delayed iput

iput() can trigger new transactions if we are dropping the
final reference, so calling it in btrfs_commit_transaction
may end up deadlock. This patch adds delayed iput to avoid
the issue.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Pass transaction handle to security and ACL initialization functions
Yan, Zheng [Thu, 12 Nov 2009 09:35:27 +0000 (09:35 +0000)]
Btrfs: Pass transaction handle to security and ACL initialization functions

Pass transaction handle down to security and ACL initialization
functions, so we can avoid starting nested transactions

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Make truncate(2) more ENOSPC friendly
Yan, Zheng [Thu, 12 Nov 2009 09:35:36 +0000 (09:35 +0000)]
Btrfs: Make truncate(2) more ENOSPC friendly

truncating and deleting regular files are unbound operations,
so it's not good to do them in a single transaction. This
patch makes btrfs_truncate and btrfs_delete_inode start a
new transaction after all items in a tree leaf are deleted.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Make fallocate(2) more ENOSPC friendly
Yan, Zheng [Thu, 12 Nov 2009 09:34:52 +0000 (09:34 +0000)]
Btrfs: Make fallocate(2) more ENOSPC friendly

fallocate(2) may allocate large number of file extents, so it's not
good to do it in a single transaction. This patch make fallocate(2)
start a new transaction for each file extents it allocates.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Avoid orphan inodes cleanup during committing transaction
Yan, Zheng [Thu, 12 Nov 2009 09:37:02 +0000 (09:37 +0000)]
Btrfs: Avoid orphan inodes cleanup during committing transaction

btrfs_lookup_dentry may trigger orphan cleanup, so it's not good
to call it while committing a transaction.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Avoid orphan inodes cleanup while replaying log
Yan, Zheng [Thu, 12 Nov 2009 09:34:40 +0000 (09:34 +0000)]
Btrfs: Avoid orphan inodes cleanup while replaying log

We do log replay in a single transaction, so it's not good to do unbound
operations. This patch cleans up orphan inodes cleanup after replaying
the log. It also avoids doing other unbound operations such as truncating
a file during replaying log. These unbound operations are postponed to
the orphan inode cleanup stage.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Fix disk_i_size update corner case
Yan, Zheng [Thu, 12 Nov 2009 09:34:21 +0000 (09:34 +0000)]
Btrfs: Fix disk_i_size update corner case

There are some cases file extents are inserted without involving
ordered struct. In these cases, we update disk_i_size directly,
without checking pending ordered extent and DELALLOC bit. This
patch extends btrfs_ordered_update_i_size() to handle these cases.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Thu, 17 Dec 2009 16:31:01 +0000 (08:31 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/viro/vfs-2.6

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  kill I_LOCK
  fold do_sync_file_range into sys_sync_file_range
  fix up O_SYNC comments
  VFS/fsstack: handle 32-bit smp + preempt + large files in fsstack_copy_inode_size
  fsstack/ecryptfs: remove unused get_nlinks param to fsstack_copy_attr_all
  vfs: remove extraneous NULL d_inode check from do_filp_open
  fs: no games with DCACHE_UNHASHED
  fs: anon_inodes implement dname
  dio: fix use-after-free

14 years agoMerge branch 'for-linus' of git://gitserver.sunplusct.com/linux-2.6-score
Linus Torvalds [Thu, 17 Dec 2009 16:08:57 +0000 (08:08 -0800)]
Merge branch 'for-linus' of git://gitserver.sunplusct.com/linux-2.6-score

* 'for-linus' of git://gitserver.sunplusct.com/linux-2.6-score:
  score: include asm-generic/param.h in asm/delay.h.
  score: fixed pfn_valid define.
  score: add flush_dcahce_page and PG_dcache_dirty define

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
Linus Torvalds [Thu, 17 Dec 2009 16:08:36 +0000 (08:08 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (27 commits)
  regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode()
  twl-regulator: Fix reg_disable functionality for 4030 and 6030
  twl-regulator: Add turnon delay to reg_enable
  twl-regulator: Restore REMAP configuration in regulator probe
  twl-regulator: Add turnon-delay and REMAP config to twlreg_info struct
  twl-regulator: Define critical regulators as always_on
  twl-regulator: Add all twl4030 regulators to twlreg_info
  regulator: mc13783-regulator: correct the probing time.
  regulator: Fix unbalanced disables/enables in regulator_bulk_{enable,disable} error path
  regulator: core.c: Small coding style cleanup (indentation fixup)
  drivers/regulator: use PTR_ERR to get error code
  regulator: consumer.h - fix build when consumer.h is #included first.
  regulator/mc13783: various cleanups
  regulator/mc13783: rename source file to match other drivers
  Fix some AB3100 regulator issues
  regulator: keep index within bounds in da9034_get_ldo12_voltage()
  regulator: Ensure val is initialised in 88pm8607 choose_voltage()
  regulator: Remove duplicate consts from ab3100
  regulator: Handle regulators without suspend mode configuration
  regulator: Factor out regulator name pretty printing
  ...

14 years agokill I_LOCK
Christoph Hellwig [Thu, 17 Dec 2009 13:25:01 +0000 (14:25 +0100)]
kill I_LOCK

After I_SYNC was split from I_LOCK the leftover is always used together with
I_NEW and thus superflous.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agofold do_sync_file_range into sys_sync_file_range
Christoph Hellwig [Thu, 17 Dec 2009 13:24:40 +0000 (14:24 +0100)]
fold do_sync_file_range into sys_sync_file_range

We recently go rid of all callers of do_sync_file_range as they're better
served with vfs_fsync or the filemap_write_and_wait.  Now that
do_sync_file_range is down to a single caller fold it into it so that people
don't start using it again accidentally.  While at it also switch it from
using __filemap_fdatawrite_range(..., WB_SYNC_ALL) to the more clear
filemap_fdatawrite_range().

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agofix up O_SYNC comments
Christoph Hellwig [Thu, 17 Dec 2009 13:24:20 +0000 (14:24 +0100)]
fix up O_SYNC comments

Proper Posix O_SYNC handling only made it into 2.6.33, not 2.6.32.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agospi: spi_txx9.c: use resource_size()
hartleys [Mon, 14 Dec 2009 22:43:42 +0000 (22:43 +0000)]
spi: spi_txx9.c: use resource_size()

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agospi: spi_sh_sci.c: use resource_size()
hartleys [Mon, 14 Dec 2009 22:40:05 +0000 (22:40 +0000)]
spi: spi_sh_sci.c: use resource_size()

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agospi: spi_mpc8xxx.c: use resource_size()
hartleys [Mon, 14 Dec 2009 22:37:15 +0000 (22:37 +0000)]
spi: spi_mpc8xxx.c: use resource_size()

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agospi: spi_bfin5xx.c: use resource_size()
hartleys [Mon, 14 Dec 2009 22:33:43 +0000 (22:33 +0000)]
spi: spi_bfin5xx.c: use resource_size()

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agospi: atmel_spi.c: use resource_size()
hartleys [Mon, 14 Dec 2009 22:22:25 +0000 (22:22 +0000)]
spi: atmel_spi.c: use resource_size()

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agoVFS/fsstack: handle 32-bit smp + preempt + large files in fsstack_copy_inode_size
Erez Zadok [Fri, 4 Dec 2009 02:56:09 +0000 (21:56 -0500)]
VFS/fsstack: handle 32-bit smp + preempt + large files in fsstack_copy_inode_size

Copy the inode size and blocks from one inode to another correctly on 32-bit
systems with CONFIG_SMP, CONFIG_PREEMPT, or CONFIG_LBDAF.  Use proper inode
spinlocks only when i_size/i_blocks cannot fit in one 32-bit word.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agospi: Add s3c64xx SPI Controller driver
Jassi Brar [Mon, 30 Nov 2009 07:39:42 +0000 (07:39 +0000)]
spi: Add s3c64xx SPI Controller driver

Each SPI controller has exactly one CS line and as such doesn't
provide for multi-cs. We implement a workaround to support
multi-cs by _not_ configuring the mux'ed CS pin for each SPI
controller. The CS mechanism is assumed to be fully machine
specific - the driver doesn't even assume some GPIO pin is used
to control the CS.

The driver selects between DMA and POLLING mode depending upon
the xfer size - DMA mode for xfers bigger than FIFO size, POLLING
mode otherwise.

The driver has been designed to be capable of running SoCs since
s3c64xx and till date, for that reason some of the register fields
have been passed via, SoC specific, platform data.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agofsstack/ecryptfs: remove unused get_nlinks param to fsstack_copy_attr_all
Erez Zadok [Thu, 3 Dec 2009 00:51:54 +0000 (19:51 -0500)]
fsstack/ecryptfs: remove unused get_nlinks param to fsstack_copy_attr_all

This get_nlinks parameter was never used by the only mainline user,
ecryptfs; and it has never been used by unionfs or wrapfs either.

Acked-by: Dustin Kirkland <kirkland@canonical.com>
Acked-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agoatmel_spi: fix dma addr calculation for len > BUFFER_SIZE
Ben Nizette [Tue, 15 Dec 2009 06:20:20 +0000 (22:20 -0800)]
atmel_spi: fix dma addr calculation for len > BUFFER_SIZE

If len > BUFFER_LEN and !xfer->rx_buf we end up calculating the tx buffer
address as

*tx_dma = xfer->tx_dma + xfer->len - BUFFER_SIZE;

which is constant; i.e.  we just send the last BUFFER_SIZE data over again
until we've reached the right number of bytes.

This patch gets around this by using the /requested/ length when
calculating addresses.

Note there's no way len != *plen when we calculate the rx buffer address
but conceptually we should be using *plen and I don't want someone to come
through later, see the calculations for rx and tx are different and "clean
up" back to what we had.

Signed-off-by: Ben Nizette <bn@niasdigital.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agospi_s3c24xx: add FIQ pseudo-DMA support
Ben Dooks [Tue, 15 Dec 2009 06:20:24 +0000 (22:20 -0800)]
spi_s3c24xx: add FIQ pseudo-DMA support

Add pseudo-DMA by FIQ to the S3C24XX SPI driver.  This allows the driver
to get DMA-like performance where there are either no free DMA channels or
when doing transfers that required both TX and RX data paths.

Since this patch requires the addition of an assembly file to hold the FIQ
code, we rename the module (instead of adding a rename of the .c file to
this patch).  We expect most users are loading this via udev and thus
there should be no change to the userland configuration.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agovfs: remove extraneous NULL d_inode check from do_filp_open
Jeff Layton [Mon, 16 Nov 2009 20:05:20 +0000 (12:05 -0800)]
vfs: remove extraneous NULL d_inode check from do_filp_open

We can't get to this point unless it's a valid pointer.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agofs: no games with DCACHE_UNHASHED
Nick Piggin [Wed, 18 Nov 2009 04:30:19 +0000 (05:30 +0100)]
fs: no games with DCACHE_UNHASHED

Filesystems outside the regular namespace do not have to clear DCACHE_UNHASHED
in order to have a working /proc/$pid/fd/XXX. Nothing in proc prevents the
fd link from being used if its dentry is not in the hash.

Also, it does not get put into the dcache hash if DCACHE_UNHASHED is clear;
that depends on the filesystem calling d_add or d_rehash.

So delete the misleading comments and needless code.

Acked-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agofs: anon_inodes implement dname
Nick Piggin [Fri, 20 Nov 2009 22:28:35 +0000 (14:28 -0800)]
fs: anon_inodes implement dname

Add a d_dname method for anon_inodes filesystem, the same way pipefs and
sockfs pseudo filesystems.  This allows us to remove the DCACHE_UNHASHED
hack from anon_inodes.c (see next patch).

[AV: inumber is useless here, dropped from anon_inodefs_dname()]

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agospi: controller driver for Designware SPI core
Feng Tang [Mon, 14 Dec 2009 22:20:22 +0000 (14:20 -0800)]
spi: controller driver for Designware SPI core

Driver for the Designware SPI core, it supports multipul interfaces like
PCI/APB etc.  User can use "dw_apb_ssi_db.pdf" from Synopsys as HW
datasheet.

[randy.dunlap@oracle.com: fix build]
[akpm@linux-foundation.org: build fix]
Signed-off-by: Feng Tang <feng.tang@intel.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agospidev: add proper section markers
Mike Frysinger [Mon, 14 Dec 2009 22:20:22 +0000 (14:20 -0800)]
spidev: add proper section markers

The driver already uses __devexit_p() in the structure, but looks like
actual __dev{init,exit} markings were forgotten.

The spidev_spi driver also needs renaming to include a "_driver" suffix to
avoid section mismatch warnings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agospidev: use DECLARE_BITMAP instead of declaring the array
Thadeu Lima de Souza Cascardo [Mon, 14 Dec 2009 22:20:23 +0000 (14:20 -0800)]
spidev: use DECLARE_BITMAP instead of declaring the array

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agoMerge branch 'for-33' of git://repo.or.cz/linux-kbuild
Linus Torvalds [Thu, 17 Dec 2009 15:23:42 +0000 (07:23 -0800)]
Merge branch 'for-33' of git://repo.or.cz/linux-kbuild

* 'for-33' of git://repo.or.cz/linux-kbuild: (29 commits)
  net: fix for utsrelease.h moving to generated
  gen_init_cpio: fixed fwrite warning
  kbuild: fix make clean after mismerge
  kbuild: generate modules.builtin
  genksyms: properly consider  EXPORT_UNUSED_SYMBOL{,_GPL}()
  score: add asm/asm-offsets.h wrapper
  unifdef: update to upstream revision 1.190
  kbuild: specify absolute paths for cscope
  kbuild: create include/generated in silentoldconfig
  scripts/package: deb-pkg: use fakeroot if available
  scripts/package: add KBUILD_PKG_ROOTCMD variable
  scripts/package: tar-pkg: use tar --owner=root
  Kbuild: clean up marker
  net: add net_tstamp.h to headers_install
  kbuild: move utsrelease.h to include/generated
  kbuild: move autoconf.h to include/generated
  drop explicit include of autoconf.h
  kbuild: move compile.h to include/generated
  kbuild: drop include/asm
  kbuild: do not check for include/asm-$ARCH
  ...

Fixed non-conflicting clean merge of modpost.c as per comments from
Stephen Rothwell (modpost.c had grown an include of linux/autoconf.h
that needed to be changed to generated/autoconf.h)

14 years agoRevert "fbdev: atafb - add palette register check"
Geert Uytterhoeven [Thu, 17 Dec 2009 13:15:09 +0000 (14:15 +0100)]
Revert "fbdev: atafb - add palette register check"

This reverts commit 8546e3ce6e37c359979b69862442f94e0ef0e03b, as it's a
partial duplicate of commit 2f390380ca69e1617cdddb12d8da94f0a9f4319d
("fbdev: add palette register check to several drivers").

The former went in first through the m68k tree, the latter through Andrew
Morton.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agox86/ptrace: make genregs[32]_get/set more robust
Linus Torvalds [Thu, 17 Dec 2009 15:04:56 +0000 (07:04 -0800)]
x86/ptrace: make genregs[32]_get/set more robust

The loop condition is fragile: we compare an unsigned value to zero, and
then decrement it by something larger than one in the loop.  All the
callers should be passing in appropriately aligned buffer lengths, but
it's better to just not rely on it, and have some appropriate defensive
loop limits.

Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agox86: Don't use POSIX character classes in gen-insn-attr-x86.awk
Roland Dreier [Thu, 17 Dec 2009 01:39:48 +0000 (17:39 -0800)]
x86: Don't use POSIX character classes in gen-insn-attr-x86.awk

Not all awk implementations (including the default awk in Ubuntu 9.10)
support POSIX character classes.  Since x86-opcode-map.txt is plain
ASCII, we can just use explicit ranges for lower case, alphabetic, and
alphanumeric characters instead.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <adabphy750b.fsf@roland-alpha.cisco.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agoMakefile: set LC_CTYPE, LC_COLLATE, LC_NUMERIC to C
H. Peter Anvin [Thu, 17 Dec 2009 14:56:11 +0000 (06:56 -0800)]
Makefile: set LC_CTYPE, LC_COLLATE, LC_NUMERIC to C

There are a number of common Unix constructs like character ranges in
grep/sed/awk which don't work as expected with LC_COLLATE set to other
than C.  Similarly, set LC_CTYPE and LC_NUMERIC to C to avoid other
nasty surprises.

In order to make sure these actually take effect we also have to
clear LC_ALL.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Michal Marek <mmarek@sues.cz>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Roland Dreier <rdreier@cisco.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
LKML-Reference: <4B2A1761.4070904@suse.cz>

14 years agoALSA: hda - Fix missing capsrc_nids for ALC88x
Takashi Iwai [Thu, 17 Dec 2009 14:00:26 +0000 (15:00 +0100)]
ALSA: hda - Fix missing capsrc_nids for ALC88x

Some model quirks missed the corresponding capsrc_nids.  This resulted in
non-working capture source selection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
14 years agosched: Fix broken assertion
Peter Zijlstra [Thu, 17 Dec 2009 12:16:31 +0000 (13:16 +0100)]
sched: Fix broken assertion

There's a preemption race in the set_task_cpu() debug check in
that when we get preempted after setting task->state we'd still
be on the rq proper, but fail the test.

Check for preempted tasks, since those are always on the RQ.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20091217121830.137155561@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agosched: Assert task state bits at build time
Peter Zijlstra [Thu, 17 Dec 2009 12:16:30 +0000 (13:16 +0100)]
sched: Assert task state bits at build time

Since everybody is lazy and prone to forgetting things, make the
compiler help us a bit.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20091217121830.060186433@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agosched: Update task_state_arraypwith new states
Peter Zijlstra [Thu, 17 Dec 2009 12:16:29 +0000 (13:16 +0100)]
sched: Update task_state_arraypwith new states

Neglected because its hidden... (who reads comments anyway)

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20091217121829.970166036@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agosched: Add missing state chars to TASK_STATE_TO_CHAR_STR
Peter Zijlstra [Thu, 17 Dec 2009 12:16:28 +0000 (13:16 +0100)]
sched: Add missing state chars to TASK_STATE_TO_CHAR_STR

We grew 3 new task states since the last time someone touched
it.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20091217121829.892737686@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agosched: Move TASK_STATE_TO_CHAR_STR near the TASK_state bits
Peter Zijlstra [Thu, 17 Dec 2009 12:16:27 +0000 (13:16 +0100)]
sched: Move TASK_STATE_TO_CHAR_STR near the TASK_state bits

So that we don't keep forgetting about it.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20091217121829.815779372@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf events: Dont report side-band events on each cpu for per-task-per-cpu events
Peter Zijlstra [Thu, 17 Dec 2009 12:16:32 +0000 (13:16 +0100)]
perf events: Dont report side-band events on each cpu for per-task-per-cpu events

Acme noticed that his FORK/MMAP numbers were inflated by about
the same factor as his cpu-count.

This led to the discovery of a few more sites that need to
respect the event->cpu filter.

Reported-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20091217121830.215333434@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agobacklight: mbp_nvidia_bl - add two more MacBookPro variants
Daniel Ritz [Tue, 1 Dec 2009 23:41:31 +0000 (00:41 +0100)]
backlight: mbp_nvidia_bl - add two more MacBookPro variants

This adds the MacBookPro 5,3 and 5,4 to the DMI tables.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agobacklight: Pass device through notify callback in the pwm driver
Ben Dooks [Tue, 10 Nov 2009 17:20:40 +0000 (17:20 +0000)]
backlight: Pass device through notify callback in the pwm driver

Add the device to the notify callback's arguments in the PWM backlight
driver. This brings the notify callback into line with the other
callbacks defined by this driver.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agoleds: leds-pwm: Set led_classdev max_brightness
Lars-Peter Clausen [Fri, 27 Nov 2009 05:17:38 +0000 (06:17 +0100)]
leds: leds-pwm: Set led_classdev max_brightness

Currently the driver leds-pwm doesn't set max_brightness for the led device
although it's platform data proides a maximum brightness. Instead it stores its
own private driver struct. The max_brightness defaults to 255 for led device if
it has not been set.
As a result any leds-pwm device with a different maximum brightness will show
incorrect behavior, as it is posible to either set a longer then period duty
time or not be able to switch the led to full brightness.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agoleds: leds-lp3944.h - remove unneeded includes
Antonio Ospite [Sun, 29 Nov 2009 12:12:21 +0000 (13:12 +0100)]
leds: leds-lp3944.h - remove unneeded includes

These were needed in the first version of the driver because we used to expose
workqueue and led class details in the header file, now we don't.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agoleds: use default-on trigger for Cobalt Qube
Florian Fainelli [Thu, 26 Nov 2009 18:41:02 +0000 (19:41 +0100)]
leds: use default-on trigger for Cobalt Qube

This patch changes the default trigger from "ide-disk"
to "default-on". Users updating from kernels not having this
LED driver will prefer having the same LED behavior as they
used to.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agoleds: drivers/leds/leds-ss4200.c: fix return statement
akpm@linux-foundation.org [Sat, 14 Nov 2009 03:56:37 +0000 (19:56 -0800)]
leds: drivers/leds/leds-ss4200.c: fix return statement

drivers/leds/leds-ss4200.c: In function 'ich7_lpc_probe':
drivers/leds/leds-ss4200.c:353: warning: 'return' with no value, in function returning non-void

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agoleds: leds-pca9532.h- indent with tabs, not spaces
Antonio Ospite [Sat, 28 Nov 2009 11:55:51 +0000 (12:55 +0100)]
leds: leds-pca9532.h- indent with tabs, not spaces

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agoALSA: hda - Make use of beep device found in Dell Vostro 1015n
Einar Rünkaru [Wed, 16 Dec 2009 20:41:36 +0000 (22:41 +0200)]
ALSA: hda - Make use of beep device found in Dell Vostro 1015n

Conexant CX20583-10Z has digital beep device with volume control.
Making use of them.

Signed-off-by: Einar Rünkaru <einarry@smail.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Fixed internal mic initialization for Dell Vostro 1015
Einar Rünkaru [Wed, 16 Dec 2009 20:16:13 +0000 (22:16 +0200)]
ALSA: hda - Fixed internal mic initialization for Dell Vostro 1015

Fixed initialization of internal mic and added internal mic boost control
Renamed analog mic boost control to ext mic boost contol.
Name pair analog/digital seems too confusing for a normal user.

Signed-off-by: Einar Rünkaru <einarry@smail.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoleds: Add LED class driver for regulator driven LEDs.
Antonio Ospite [Mon, 7 Dec 2009 14:08:13 +0000 (15:08 +0100)]
leds: Add LED class driver for regulator driven LEDs.

This driver provides an interface for controlling LEDs (or vibrators)
connected to PMICs for which there is a regulator framework driver.

This driver can be used, for instance, to control vibrator on all Motorola EZX
phones using the pcap-regulator driver services.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agoALSA: hda - More ALC663 fixes and support of compatible chips
Kailang Yang [Thu, 17 Dec 2009 11:23:00 +0000 (12:23 +0100)]
ALSA: hda - More ALC663 fixes and support of compatible chips

1. Add more ASUS NB model.
2. Fixed alc663_m51va_setup
   M51VA has Digital Mic that NID is 0x12. The record source index is
   0x9 for ALC663.
   So, to modify the alc663_m51va_setup function to index 0x9
   and add analog Mic aupport function alc663_mode1_setup.
3. Add ASUS mode7 and mode8 modules for ALC663

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agosound/oss/pss: Fix test of unsigned in pss_reset_dsp() and pss_download_boot()
Roel Kluin [Wed, 16 Dec 2009 15:54:43 +0000 (16:54 +0100)]
sound/oss/pss: Fix test of unsigned in pss_reset_dsp() and pss_download_boot()

limit and jiffies are unsigned so the test did not work.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agobacklight: PTR_ERR return of wrong pointer in cr_backlight_probe()
Roel Kluin [Mon, 7 Dec 2009 13:35:32 +0000 (14:35 +0100)]
backlight: PTR_ERR return of wrong pointer in cr_backlight_probe()

Return the PTR_ERR of the correct pointer.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agoleds: leds-cobalt-qube.c: use resource_size()
H Hartley Sweeten [Fri, 11 Dec 2009 21:50:58 +0000 (16:50 -0500)]
leds: leds-cobalt-qube.c: use resource_size()

Use resource_size() for ioremap.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agoleds: leds-cobalt-raq.c - use resource_size()
H Hartley Sweeten [Fri, 11 Dec 2009 23:13:40 +0000 (18:13 -0500)]
leds: leds-cobalt-raq.c - use resource_size()

Use resource_size() for ioremap.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agoscore: include asm-generic/param.h in asm/delay.h.
Chen Liqin [Thu, 17 Dec 2009 10:31:23 +0000 (18:31 +0800)]
score: include asm-generic/param.h in asm/delay.h.

Signed-off-by: Cui Bixiong <bixiong@sunnorth.com.cn>
Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com>
14 years agoscore: fixed pfn_valid define.
Chen Liqin [Wed, 18 Nov 2009 05:28:13 +0000 (13:28 +0800)]
score: fixed pfn_valid define.

Signed-off-by: Cui Bixiong <bixiong@sunnorth.com.cn>
Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com>
modified:   arch/score/include/asm/page.h
modified:   arch/score/kernel/setup.c
modified:   arch/score/mm/init.c

14 years agoscore: add flush_dcahce_page and PG_dcache_dirty define
Chen Liqin [Wed, 18 Nov 2009 05:22:33 +0000 (13:22 +0800)]
score: add flush_dcahce_page and PG_dcache_dirty define

Signed-off-by: Cui Bixiong <bixiong@sunnorth.com.cn>
Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com>
modified:   arch/score/include/asm/cacheflush.h
modified:   arch/score/mm/cache.c

14 years agoregulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode()
Roel Kluin [Tue, 15 Dec 2009 19:07:31 +0000 (20:07 +0100)]
regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode()

ret should be signed to notice a failure in wm831x_reg_read().

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agotwl-regulator: Fix reg_disable functionality for 4030 and 6030
Juha Keski-Saari [Wed, 16 Dec 2009 13:28:00 +0000 (15:28 +0200)]
twl-regulator: Fix reg_disable functionality for 4030 and 6030

This change makes sure all regulator group assignments are cleared on
disable call

Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agotwl-regulator: Add turnon delay to reg_enable
Juha Keski-Saari [Wed, 16 Dec 2009 12:55:26 +0000 (14:55 +0200)]
twl-regulator: Add turnon delay to reg_enable

This change implements a basic turnon delay in the regulator enable function
to make it less probable that reg_enable returns before the regulator
output is at target level

Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agotwl-regulator: Restore REMAP configuration in regulator probe
Juha Keski-Saari [Wed, 16 Dec 2009 13:27:58 +0000 (15:27 +0200)]
twl-regulator: Restore REMAP configuration in regulator probe

This change ensures the regulator REMAP register configuration is in a known
state so state transitions will function as intended regardless of
possible bootloader effects on it

Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agotwl-regulator: Add turnon-delay and REMAP config to twlreg_info struct
Juha Keski-Saari [Wed, 16 Dec 2009 12:49:52 +0000 (14:49 +0200)]
twl-regulator: Add turnon-delay and REMAP config to twlreg_info struct

This change includes regulator turnon delay values and the REMAP reset
configuration to the twlreg_info struct, since they are basic attributes
of every TWL regulator

Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agotwl-regulator: Define critical regulators as always_on
Juha Keski-Saari [Wed, 16 Dec 2009 13:27:56 +0000 (15:27 +0200)]
twl-regulator: Define critical regulators as always_on

Defines VIO, VDD1, VDD2, VPLL1 and VINT* regulators as always_on by default
since they are critical to TWL and its master's functionality and should
be on in all cases where RegFW is used

Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>