pandora-kernel.git
15 years agoMerge omap-testing
Tony Lindgren [Tue, 5 Oct 2010 01:51:25 +0000 (18:51 -0700)]
Merge omap-testing

15 years agoMerge omap-fixes
Tony Lindgren [Tue, 5 Oct 2010 01:51:23 +0000 (18:51 -0700)]
Merge omap-fixes

15 years agoMerge cbus
Tony Lindgren [Tue, 5 Oct 2010 01:51:21 +0000 (18:51 -0700)]
Merge cbus

15 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 1 Oct 2010 17:53:06 +0000 (10:53 -0700)]
Merge branch 'omap-fixes-for-linus' of git://git./linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  omap: McBSP: tx_irq_completion used in rx_irq_handler
  omap: Fix compile dependency to LEDS_CLASS

15 years agoreiserfs: fix unwanted reiserfs lock recursion
Frederic Weisbecker [Thu, 30 Sep 2010 22:15:38 +0000 (15:15 -0700)]
reiserfs: fix unwanted reiserfs lock recursion

Prevent from recursively locking the reiserfs lock in reiserfs_unpack()
because we may call journal_begin() that requires the lock to be taken
only once, otherwise it won't be able to release the lock while taking
other mutexes, ending up in inverted dependencies between the journal
mutex and the reiserfs lock for example.

This fixes:

  =======================================================
  [ INFO: possible circular locking dependency detected ]
  2.6.35.4.4a #3
  -------------------------------------------------------
  lilo/1620 is trying to acquire lock:
   (&journal->j_mutex){+.+...}, at: [<d0325bff>] do_journal_begin_r+0x7f/0x340 [reiserfs]

  but task is already holding lock:
   (&REISERFS_SB(s)->lock){+.+.+.}, at: [<d032a278>] reiserfs_write_lock+0x28/0x40 [reiserfs]

  which lock already depends on the new lock.

  the existing dependency chain (in reverse order) is:

  -> #1 (&REISERFS_SB(s)->lock){+.+.+.}:
         [<c10562b7>] lock_acquire+0x67/0x80
         [<c12facad>] __mutex_lock_common+0x4d/0x410
         [<c12fb0c8>] mutex_lock_nested+0x18/0x20
         [<d032a278>] reiserfs_write_lock+0x28/0x40 [reiserfs]
         [<d0325c06>] do_journal_begin_r+0x86/0x340 [reiserfs]
         [<d0325f77>] journal_begin+0x77/0x140 [reiserfs]
         [<d0315be4>] reiserfs_remount+0x224/0x530 [reiserfs]
         [<c10b6a20>] do_remount_sb+0x60/0x110
         [<c10cee25>] do_mount+0x625/0x790
         [<c10cf014>] sys_mount+0x84/0xb0
         [<c12fca3d>] syscall_call+0x7/0xb

  -> #0 (&journal->j_mutex){+.+...}:
         [<c10560f6>] __lock_acquire+0x1026/0x1180
         [<c10562b7>] lock_acquire+0x67/0x80
         [<c12facad>] __mutex_lock_common+0x4d/0x410
         [<c12fb0c8>] mutex_lock_nested+0x18/0x20
         [<d0325bff>] do_journal_begin_r+0x7f/0x340 [reiserfs]
         [<d0325f77>] journal_begin+0x77/0x140 [reiserfs]
         [<d0326271>] reiserfs_persistent_transaction+0x41/0x90 [reiserfs]
         [<d030d06c>] reiserfs_get_block+0x22c/0x1530 [reiserfs]
         [<c10db9db>] __block_prepare_write+0x1bb/0x3a0
         [<c10dbbe6>] block_prepare_write+0x26/0x40
         [<d030b738>] reiserfs_prepare_write+0x88/0x170 [reiserfs]
         [<d03294d6>] reiserfs_unpack+0xe6/0x120 [reiserfs]
         [<d0329782>] reiserfs_ioctl+0x272/0x320 [reiserfs]
         [<c10c3188>] vfs_ioctl+0x28/0xa0
         [<c10c3bbd>] do_vfs_ioctl+0x32d/0x5c0
         [<c10c3eb3>] sys_ioctl+0x63/0x70
         [<c12fca3d>] syscall_call+0x7/0xb

  other info that might help us debug this:

  2 locks held by lilo/1620:
   #0:  (&sb->s_type->i_mutex_key#8){+.+.+.}, at: [<d032945a>] reiserfs_unpack+0x6a/0x120 [reiserfs]
   #1:  (&REISERFS_SB(s)->lock){+.+.+.}, at: [<d032a278>] reiserfs_write_lock+0x28/0x40 [reiserfs]

  stack backtrace:
  Pid: 1620, comm: lilo Not tainted 2.6.35.4.4a #3
  Call Trace:
   [<c10560f6>] __lock_acquire+0x1026/0x1180
   [<c10562b7>] lock_acquire+0x67/0x80
   [<c12facad>] __mutex_lock_common+0x4d/0x410
   [<c12fb0c8>] mutex_lock_nested+0x18/0x20
   [<d0325bff>] do_journal_begin_r+0x7f/0x340 [reiserfs]
   [<d0325f77>] journal_begin+0x77/0x140 [reiserfs]
   [<d0326271>] reiserfs_persistent_transaction+0x41/0x90 [reiserfs]
   [<d030d06c>] reiserfs_get_block+0x22c/0x1530 [reiserfs]
   [<c10db9db>] __block_prepare_write+0x1bb/0x3a0
   [<c10dbbe6>] block_prepare_write+0x26/0x40
   [<d030b738>] reiserfs_prepare_write+0x88/0x170 [reiserfs]
   [<d03294d6>] reiserfs_unpack+0xe6/0x120 [reiserfs]
   [<d0329782>] reiserfs_ioctl+0x272/0x320 [reiserfs]
   [<c10c3188>] vfs_ioctl+0x28/0xa0
   [<c10c3bbd>] do_vfs_ioctl+0x32d/0x5c0
   [<c10c3eb3>] sys_ioctl+0x63/0x70
   [<c12fca3d>] syscall_call+0x7/0xb

Reported-by: Jarek Poplawski <jarkao2@gmail.com>
Tested-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: All since 2.6.32 <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoreiserfs: fix dependency inversion between inode and reiserfs mutexes
Frederic Weisbecker [Thu, 30 Sep 2010 22:15:37 +0000 (15:15 -0700)]
reiserfs: fix dependency inversion between inode and reiserfs mutexes

The reiserfs mutex already depends on the inode mutex, so we can't lock
the inode mutex in reiserfs_unpack() without using the safe locking API,
because reiserfs_unpack() is always called with the reiserfs mutex locked.

This fixes:

  =======================================================
  [ INFO: possible circular locking dependency detected ]
  2.6.35c #13
  -------------------------------------------------------
  lilo/1606 is trying to acquire lock:
   (&sb->s_type->i_mutex_key#8){+.+.+.}, at: [<d0329450>] reiserfs_unpack+0x60/0x110 [reiserfs]

  but task is already holding lock:
   (&REISERFS_SB(s)->lock){+.+.+.}, at: [<d032a268>] reiserfs_write_lock+0x28/0x40 [reiserfs]

  which lock already depends on the new lock.

  the existing dependency chain (in reverse order) is:

  -> #1 (&REISERFS_SB(s)->lock){+.+.+.}:
         [<c1056347>] lock_acquire+0x67/0x80
         [<c12f083d>] __mutex_lock_common+0x4d/0x410
         [<c12f0c58>] mutex_lock_nested+0x18/0x20
         [<d032a268>] reiserfs_write_lock+0x28/0x40 [reiserfs]
         [<d0329e9a>] reiserfs_lookup_privroot+0x2a/0x90 [reiserfs]
         [<d0316b81>] reiserfs_fill_super+0x941/0xe60 [reiserfs]
         [<c10b7d17>] get_sb_bdev+0x117/0x170
         [<d0313e21>] get_super_block+0x21/0x30 [reiserfs]
         [<c10b74ba>] vfs_kern_mount+0x6a/0x1b0
         [<c10b7659>] do_kern_mount+0x39/0xe0
         [<c10cebe0>] do_mount+0x340/0x790
         [<c10cf0b4>] sys_mount+0x84/0xb0
         [<c12f25cd>] syscall_call+0x7/0xb

  -> #0 (&sb->s_type->i_mutex_key#8){+.+.+.}:
         [<c1056186>] __lock_acquire+0x1026/0x1180
         [<c1056347>] lock_acquire+0x67/0x80
         [<c12f083d>] __mutex_lock_common+0x4d/0x410
         [<c12f0c58>] mutex_lock_nested+0x18/0x20
         [<d0329450>] reiserfs_unpack+0x60/0x110 [reiserfs]
         [<d0329772>] reiserfs_ioctl+0x272/0x320 [reiserfs]
         [<c10c3228>] vfs_ioctl+0x28/0xa0
         [<c10c3c5d>] do_vfs_ioctl+0x32d/0x5c0
         [<c10c3f53>] sys_ioctl+0x63/0x70
         [<c12f25cd>] syscall_call+0x7/0xb

  other info that might help us debug this:

  1 lock held by lilo/1606:
   #0:  (&REISERFS_SB(s)->lock){+.+.+.}, at: [<d032a268>] reiserfs_write_lock+0x28/0x40 [reiserfs]

  stack backtrace:
  Pid: 1606, comm: lilo Not tainted 2.6.35c #13
  Call Trace:
   [<c1056186>] __lock_acquire+0x1026/0x1180
   [<c1056347>] lock_acquire+0x67/0x80
   [<c12f083d>] __mutex_lock_common+0x4d/0x410
   [<c12f0c58>] mutex_lock_nested+0x18/0x20
   [<d0329450>] reiserfs_unpack+0x60/0x110 [reiserfs]
   [<d0329772>] reiserfs_ioctl+0x272/0x320 [reiserfs]
   [<c10c3228>] vfs_ioctl+0x28/0xa0
   [<c10c3c5d>] do_vfs_ioctl+0x32d/0x5c0
   [<c10c3f53>] sys_ioctl+0x63/0x70
   [<c12f25cd>] syscall_call+0x7/0xb

Reported-by: Jarek Poplawski <jarkao2@gmail.com>
Tested-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: <stable@kernel.org> [2.6.32 and later]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMAINTAINERS: update maintainer for S5P ARM ARCHITECTURES
Kukjin Kim [Thu, 30 Sep 2010 22:15:35 +0000 (15:15 -0700)]
MAINTAINERS: update maintainer for S5P ARM ARCHITECTURES

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Kyungmin Park <kmpark@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMAINTAINERS: update matroxfb & ncpfs status
Petr Vandrovec [Thu, 30 Sep 2010 22:15:34 +0000 (15:15 -0700)]
MAINTAINERS: update matroxfb & ncpfs status

I moved couple years ago, so let's update my email and snail mail.

And I do not have any access to Matrox hardware anymore, and I'm quite
unresponsive to matroxfb bug reports (sorry Alan), so saying that I'm
maintainer is a bit far fetched.

For ncpfs I do not use ncpfs in my daily life either, but at least I can
test that one, so I can stay listed here for odd fixes.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoproc: make /proc/pid/limits world readable
Jiri Olsa [Thu, 30 Sep 2010 22:15:33 +0000 (15:15 -0700)]
proc: make /proc/pid/limits world readable

Having the limits file world readable will ease the task of system
management on systems where root privileges might be restricted.

Having admin restricted with root priviledges, he/she could not check
other users process' limits.

Also it'd align with most of the /proc stat files.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Eugene Teo <eugene@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agolib/list_sort: do not pass bad pointers to cmp callback
Don Mullis [Thu, 30 Sep 2010 22:15:32 +0000 (15:15 -0700)]
lib/list_sort: do not pass bad pointers to cmp callback

If the original list is a POT in length, the first callback from line 73
will pass a==b both pointing to the original list_head.  This is dangerous
because the 'list_sort()' user can use 'container_of()' and accesses the
"containing" object, which does not necessary exist for the list head.  So
the user can access RAM which does not belong to him.  If this is a write
access, we can end up with memory corruption.

Signed-off-by: Don Mullis <don.mullis@gmail.com>
Tested-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosys_semctl: fix kernel stack leakage
Dan Rosenberg [Thu, 30 Sep 2010 22:15:31 +0000 (15:15 -0700)]
sys_semctl: fix kernel stack leakage

The semctl syscall has several code paths that lead to the leakage of
uninitialized kernel stack memory (namely the IPC_INFO, SEM_INFO,
IPC_STAT, and SEM_STAT commands) during the use of the older, obsolete
version of the semid_ds struct.

The copy_semid_to_user() function declares a semid_ds struct on the stack
and copies it back to the user without initializing or zeroing the
"sem_base", "sem_pending", "sem_pending_last", and "undo" pointers,
allowing the leakage of 16 bytes of kernel stack memory.

The code is still reachable on 32-bit systems - when calling semctl()
newer glibc's automatically OR the IPC command with the IPC_64 flag, but
invoking the syscall directly allows users to use the older versions of
the struct.

Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoi7core_edac: fix panic in udimm sysfs attributes registration
Marcin Slusarz [Thu, 30 Sep 2010 22:15:30 +0000 (15:15 -0700)]
i7core_edac: fix panic in udimm sysfs attributes registration

Array of udimm sysfs attributes was not ended with NULL marker, leading to
dereference of random memory.

  EDAC DEBUG: edac_create_mci_instance_attributes: edac_create_mci_instance_attributes() file udimm0
  EDAC DEBUG: edac_create_mci_instance_attributes: edac_create_mci_instance_attributes() file udimm1
  EDAC DEBUG: edac_create_mci_instance_attributes: edac_create_mci_instance_attributes() file udimm2
  BUG: unable to handle kernel NULL pointer dereference at 00000000000001a4
  IP: [<ffffffff81330b36>] edac_create_mci_instance_attributes+0x148/0x1f1
  Pid: 1, comm: swapper Not tainted 2.6.36-rc3-nv+ #483 P6T SE/System Product Name
  RIP: 0010:[<ffffffff81330b36>]  [<ffffffff81330b36>] edac_create_mci_instance_attributes+0x148/0x1f1
  (...)
  Call Trace:
   [<ffffffff81330b86>] edac_create_mci_instance_attributes+0x198/0x1f1
   [<ffffffff81330c9a>] edac_create_sysfs_mci_device+0xbb/0x2b2
   [<ffffffff8132f533>] edac_mc_add_mc+0x46b/0x557
   [<ffffffff81428901>] i7core_probe+0xccf/0xec0
  RIP  [<ffffffff81330b36>] edac_create_mci_instance_attributes+0x148/0x1f1
  ---[ end trace 20de320855b81d78 ]---
  Kernel panic - not syncing: Attempted to kill init!

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Doug Thompson <dougthompson@xmission.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/serial/mrst_max3110.c needs linux/irq.h
Andrew Morton [Thu, 30 Sep 2010 22:15:29 +0000 (15:15 -0700)]
drivers/serial/mrst_max3110.c needs linux/irq.h

sparc64 allmodconfig:

  drivers/serial/mrst_max3110.c: In function `serial_m3110_startup':
  drivers/serial/mrst_max3110.c:470: error: `IRQ_TYPE_EDGE_FALLING' undeclared (first use in this function)

Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoarch/m68k/mac/macboing.c: use unsigned long for irqflags
Andrew Morton [Thu, 30 Sep 2010 22:15:29 +0000 (15:15 -0700)]
arch/m68k/mac/macboing.c: use unsigned long for irqflags

Fix the warnings

  arch/m68k/mac/macboing.c: In function 'mac_mksound':
  arch/m68k/mac/macboing.c:189: warning: comparison of distinct pointer types lacks a cast
  arch/m68k/mac/macboing.c:211: warning: comparison of distinct pointer types lacks a cast
  arch/m68k/mac/macboing.c: In function 'mac_quadra_start_bell':
  arch/m68k/mac/macboing.c:241: warning: comparison of distinct pointer types lacks a cast
  arch/m68k/mac/macboing.c:263: warning: comparison of distinct pointer types lacks a cast
  arch/m68k/mac/macboing.c: In function 'mac_quadra_ring_bell':
  arch/m68k/mac/macboing.c:283: warning: comparison of distinct pointer types lacks a cast

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/serial/mfd.c needs slab.h
Andrew Morton [Thu, 30 Sep 2010 22:15:28 +0000 (15:15 -0700)]
drivers/serial/mfd.c needs slab.h

alpha allmodconfig:

  drivers/serial/mfd.c:144: error: implicit declaration of function 'kzalloc'
  drivers/serial/mfd.c:144: warning: assignment makes pointer from integer without a cast

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokfifo: fix scatterlist usage
Ira W. Snyder [Thu, 30 Sep 2010 22:15:27 +0000 (15:15 -0700)]
kfifo: fix scatterlist usage

The kfifo_dma family of functions use sg_mark_end() on the last element in
their scatterlist.  This forces use of a fresh scatterlist for each DMA
operation, which makes recycling a single scatterlist impossible.

Change the behavior of the kfifo_dma functions to match the usage of the
dma_map_sg function.  This means that users must respect the returned
nents value.  The sample code is updated to reflect the change.

This bug is trivial to cause: call kfifo_dma_in_prepare() such that it
prepares a scatterlist with a single entry comprising the whole fifo.
This is the case when you map the entirety of a newly created empty fifo.
This causes the setup_sgl() function to mark the first scatterlist entry
as the end of the chain, no matter what comes after it.

Afterwards, add and remove some data from the fifo such that another call
to kfifo_dma_in_prepare() will create two scatterlist entries.  It returns
nents=2.  However, due to the previous sg_mark_end() call, sg_is_last()
will now return true for the first scatterlist element.  This causes the
sample code to print a single scatterlist element when it should print
two.

By removing the call to sg_mark_end(), we make the API as similar as
possible to the DMA mapping API.  All users are required to respect the
returned nents.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Cc: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix up more fallout form alpha signal cleanups
Linus Torvalds [Thu, 30 Sep 2010 15:37:38 +0000 (08:37 -0700)]
Fix up more fallout form alpha signal cleanups

Commit c52c2ddc1dfa ("alpha: switch osf_sigprocmask() to use of
sigprocmask()") had several problems.  The more obvious compile issues
got fixed in commit 0f44fbd297e1 ("alpha: fix compile problem in
arch/alpha/kernel/signal.c"), but it also caused a regression.

Since _BLOCKABLE is already the set of signals that can be blocked, the
code should do "newmask & _BLOCKABLE" rather than inverting _BLOCKABLE
before masking.

Reported-by: Michael Cree <mcree@orcon.net.nz>
Patch-by: Al Viro <viro@zeniv.linux.org.uk>
Patch-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2
Linus Torvalds [Thu, 30 Sep 2010 03:38:07 +0000 (20:38 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/jlbec/ocfs2

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
  ocfs2: Don't walk off the end of fast symlinks.

15 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Thu, 30 Sep 2010 01:41:19 +0000 (18:41 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/djbw/async_tx

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  dmaengine: fix interrupt clearing for mv_xor
  missing inline keyword for static function in linux/dmaengine.h
  dma/shdma: move dereference below the NULL check

15 years agoocfs2: Don't walk off the end of fast symlinks.
Joel Becker [Thu, 30 Sep 2010 00:33:05 +0000 (17:33 -0700)]
ocfs2: Don't walk off the end of fast symlinks.

ocfs2 fast symlinks are NUL terminated strings stored inline in the
inode data area.  However, disk corruption or a local attacker could, in
theory, remove that NUL.  Because we're using strlen() (my fault,
introduced in a731d1 when removing vfs_follow_link()), we could walk off
the end of that string.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Cc: stable@kernel.org
15 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Wed, 29 Sep 2010 21:58:11 +0000 (14:58 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: force background CIL push under sustained load

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Linus Torvalds [Wed, 29 Sep 2010 21:57:53 +0000 (14:57 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sameo/mfd-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: Fix max8925 irq control bit incorrect setting
  mfd: Ignore non-GPIO IRQs when setting wm831x IRQ types

15 years agoI2C: runtime: Fix checks which make legacy suspend to never get called
Rajendra Nayak [Wed, 29 Sep 2010 21:20:34 +0000 (14:20 -0700)]
I2C: runtime: Fix checks which make legacy suspend to never get called

For devices which are not adapted to runtime PM a call to
pm_runtime_suspended always returns true.

Hence the pm_runtime_suspended checks below prevent legacy
suspend from getting called.

So do a pm_runtime_suspended check only for devices with a
dev_pm_ops populated (which hence do not rely on the legacy
suspend)

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
15 years agofix OMAP2 MTD build failure
Daniel J Blueman [Wed, 29 Sep 2010 20:01:55 +0000 (21:01 +0100)]
fix OMAP2 MTD build failure

Fix build failure from recent interface change and merge.

Tested on OMAP3430.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocrypto: omap-aes - OMAP2/3 AES hw accelerator driver
Dmitry Kasatkin [Wed, 29 Sep 2010 17:12:03 +0000 (10:12 -0700)]
crypto: omap-aes - OMAP2/3 AES hw accelerator driver

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 years agoARM: add cpu_idle_wait() to support CPUidle on SMP systems.
Kevin Hilman [Tue, 28 Sep 2010 16:43:12 +0000 (09:43 -0700)]
ARM: add cpu_idle_wait() to support CPUidle on SMP systems.

In order for CPUidle to work on SMP systems, an implementation of
cpu_idle_wait() is needed.

This patch duplicates the x86 implementation of cpu_idle_wait() for
ARM.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
15 years agoi2c: Fix for suspend/resume issue
Vishwanath BS [Tue, 28 Sep 2010 00:14:58 +0000 (17:14 -0700)]
i2c: Fix for suspend/resume issue

In current i2c core driver, call to pm_runtime_set_active from
i2c_device_pm_resume will unconditionally enable i2c module and
increment child count of the parent. Because of this, in CPU Idle
path, i2c does not idle, preventing Core to enter retention. Also i2c
module will not be suspended upon system suspend as
pm_runtime_set_suspended is not called from i2c_device_pm_suspend.

This issue is fixed by removing pm_runtime_set_active call from resume
path which is not necessary.
This fix has been tested on OMAP4430.

Signed-off-by: Partha Basak <p-basak2@ti.com>
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoPM / Runtime: Lenient generic runtime pm callbacks
Ohad Ben-Cohen [Tue, 28 Sep 2010 00:14:44 +0000 (17:14 -0700)]
PM / Runtime: Lenient generic runtime pm callbacks

Allow drivers, that belong to subsystems which use the generic
runtime pm callbacks, not to define runtime pm suspend/resume handlers,
by implicitly assuming success in such cases.

This is needed to eliminate nop handlers that would otherwise be
necessary by drivers which enable runtime pm, but don't need
to do anything when their devices are runtime-suspended/resumed.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
15 years agoARM: Handle __flush_icache_all for CONFIG_SMP_ON_UP
Tony Lindgren [Wed, 22 Sep 2010 17:31:21 +0000 (10:31 -0700)]
ARM: Handle __flush_icache_all for CONFIG_SMP_ON_UP

Do this by adding flush_icache_all to cache_fns for ARMv6 and 7.
As flush_icache_all may neeed to be called from flush_kern_cache_all,
add it as the first entry in the cache_fns.

Note that now we can remove the ARM_ERRATA_411920 dependency
to !SMP so it can be selected on UP ARMv6 processors, such
as omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
15 years agoARM: Check for is_smp for tlb_ops and cache_ops boardcast
Tony Lindgren [Mon, 20 Sep 2010 21:48:02 +0000 (14:48 -0700)]
ARM: Check for is_smp for tlb_ops and cache_ops boardcast

This should not be needed when running on UP systems.

Additionally we will also get an undefined instruction on ARM cores
without the extended CPUID registers with CONFIG_SMP_ON_UP.

Also, we can now remove the is_smp() test from mmu.c.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: Don't send IPI in smp_send_stop if there's only one CPU
Tony Lindgren [Mon, 20 Sep 2010 21:47:55 +0000 (14:47 -0700)]
ARM: Don't send IPI in smp_send_stop if there's only one CPU

No need to send IPI if there's one CPU, especially when booting
systems with CONFIG_SMP_ON_UP that may not even support IPI.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: Allow SMP kernels to boot on UP systems
Russell King [Wed, 29 Sep 2010 18:05:58 +0000 (11:05 -0700)]
ARM: Allow SMP kernels to boot on UP systems

UP systems do not implement all the instructions that SMP systems have,
so in order to boot a SMP kernel on a UP system, we need to rewrite
parts of the kernel.

Do this using an 'alternatives' scheme, where the kernel code and data
is modified prior to initialization to replace the SMP instructions,
thereby rendering the problematical code ineffectual.  We use the linker
to generate a list of 32-bit word locations and their replacement values,
and run through these replacements when we detect a UP system.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoARM: Provide common header for hard_smp_processor_id()
Russell King [Wed, 29 Sep 2010 18:05:57 +0000 (11:05 -0700)]
ARM: Provide common header for hard_smp_processor_id()

Provide a common header to read the SMP CPU number from the MPIDR.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoARM: Simplify SMP/SCU/TWD dependencies
Russell King [Wed, 29 Sep 2010 18:05:57 +0000 (11:05 -0700)]
ARM: Simplify SMP/SCU/TWD dependencies

All platforms which currently support SMP also support the ARM SCU
and ARM TWD blocks, so it's pointless to make these config symbols
conditional on the platform symbols which SMP is already conditional
on.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agodriver core: platform_bus: allow runtime override of dev_pm_ops
Kevin Hilman [Wed, 29 Sep 2010 18:05:56 +0000 (11:05 -0700)]
driver core: platform_bus: allow runtime override of dev_pm_ops

Currently, the platform_bus allows customization of several of the
busses dev_pm_ops methods by using weak symbols so that platform code
can override them.  The weak-symbol approach is not scalable when
wanting to support multiple platforms in a single kernel binary.

Instead, provide __init methods for platform code to customize the
dev_pm_ops methods at runtime.

NOTE: after these dynamic methods are merged, the weak symbols should
      be removed from drivers/base/platform.c.  AFAIK, this will only
      affect SH and sh-mobile which should be converted to use this
      runtime approach instead of the weak symbols.  After SH &
      sh-mobile are converted, the weak symobols could be removed.

Tested on OMAP3.

Cc: Magnus Damm <magnus.damm@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: host: ehci: fix missing kfree in remove path also
Ajay Kumar Gupta [Wed, 29 Sep 2010 18:05:56 +0000 (11:05 -0700)]
usb: host: ehci: fix missing kfree in remove path also

Added missing kfree() in ehci_hcd_omap_remove().

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoxfs: force background CIL push under sustained load
Dave Chinner [Fri, 24 Sep 2010 08:13:44 +0000 (18:13 +1000)]
xfs: force background CIL push under sustained load

I have been seeing occasional pauses in transaction throughput up to
30s long under heavy parallel workloads. The only notable thing was
that the xfsaild was trying to be active during the pauses, but
making no progress. It was running exactly 20 times a second (on the
50ms no-progress backoff), and the number of pushbuf events was
constant across this time as well.  IOWs, the xfsaild appeared to be
stuck on buffers that it could not push out.

Further investigation indicated that it was trying to push out inode
buffers that were pinned and/or locked. The xfsbufd was also getting
woken at the same frequency (by the xfsaild, no doubt) to push out
delayed write buffers. The xfsbufd was not making any progress
because all the buffers in the delwri queue were pinned. This scan-
and-make-no-progress dance went one in the trace for some seconds,
before the xfssyncd came along an issued a log force, and then
things started going again.

However, I noticed something strange about the log force - there
were way too many IO's issued. 516 log buffers were written, to be
exact. That added up to 129MB of log IO, which got me very
interested because it's almost exactly 25% of the size of the log.
He delayed logging code is suppose to aggregate the minimum of 25%
of the log or 8MB worth of changes before flushing. That's what
really puzzled me - why did a log force write 129MB instead of only
8MB?

Essentially what has happened is that no CIL pushes had occurred
since the previous tail push which cleared out 25% of the log space.
That caused all the new transactions to block because there wasn't
log space for them, but they kick the xfsaild to push the tail.
However, the xfsaild was not making progress because there were
buffers it could not lock and flush, and the xfsbufd could not flush
them because they were pinned. As a result, both the xfsaild and the
xfsbufd could not move the tail of the log forward without the CIL
first committing.

The cause of the problem was that the background CIL push, which
should happen when 8MB of aggregated changes have been committed, is
being held off by the concurrent transaction commit load. The
background push does a down_write_trylock() which will fail if there
is a concurrent transaction commit holding the push lock in read
mode. With 8 CPUs all doing transactions as fast as they can, there
was enough concurrent transaction commits to hold off the background
push until tail-pushing could no longer free log space, and the halt
would occur.

It should be noted that there is no reason why it would halt at 25%
of log space used by a single CIL checkpoint. This bug could
definitely violate the "no transaction should be larger than half
the log" requirement and hence result in corruption if the system
crashed under heavy load. This sort of bug is exactly the reason why
delayed logging was tagged as experimental....

The fix is to start blocking background pushes once the threshold
has been exceeded. Rework the threshold calculations to keep the
amount of log space a CIL checkpoint can use to below that of the
AIL push threshold to avoid the problem completely.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
15 years agomfd: Fix max8925 irq control bit incorrect setting
Kevin Liu [Wed, 8 Sep 2010 13:44:36 +0000 (09:44 -0400)]
mfd: Fix max8925 irq control bit incorrect setting

In max8925_irq_sync_unlock(), irq control bit is set at the same time.
Zero means enabling irq, and one means disabling irq.

The original code is:
irq_chg[0] &= irq_data->enable;

It should be changed to:
irq_chg[0] &= ~irq_data->enable;

Otherwise, irq control bit is mess.

Signed-off-by: Kevin Liu <kliu5@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
15 years agomfd: Ignore non-GPIO IRQs when setting wm831x IRQ types
Mark Brown [Mon, 16 Aug 2010 19:26:51 +0000 (20:26 +0100)]
mfd: Ignore non-GPIO IRQs when setting wm831x IRQ types

The driver was originally tested with an additional patch which
made this unneeded but that patch had issuges and got lost on the
way to mainline, causing problems when the errors are reported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Cc: stable@kernel.org
15 years agoLinux 2.6.36-rc6 v2.6.36-rc6
Linus Torvalds [Wed, 29 Sep 2010 01:01:22 +0000 (18:01 -0700)]
Linux 2.6.36-rc6

15 years agoMN10300: Handle missing sys_cacheflush() when caching disabled
David Howells [Wed, 29 Sep 2010 00:57:02 +0000 (01:57 +0100)]
MN10300: Handle missing sys_cacheflush() when caching disabled

When caching is disabled on the MN10300 arch, the sys_cacheflush()
function is removed by conditional stuff in the makefiles, but is still
referred to by the syscall table.

Provide a null version that just returns 0 when caching is disabled (or
-EINVAL if the arguments are silly).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoalpha: fix compile problem in arch/alpha/kernel/signal.c
Linus Torvalds [Tue, 28 Sep 2010 20:26:57 +0000 (13:26 -0700)]
alpha: fix compile problem in arch/alpha/kernel/signal.c

Tssk.  Apparently Al hadn't checked commit c52c2ddc1dfa ("alpha: switch
osf_sigprocmask() to use of sigprocmask()") at all. It doesn't compile.

Fixed as per suggestions from Michael Cree.

Reported-by: Michael Cree <mcree@orcon.net.nz>
Cc: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 28 Sep 2010 19:38:52 +0000 (12:38 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: fix module refcount breakage introduced by libahci split

15 years agoahci: fix module refcount breakage introduced by libahci split
Tejun Heo [Tue, 21 Sep 2010 07:25:48 +0000 (09:25 +0200)]
ahci: fix module refcount breakage introduced by libahci split

libata depends on scsi_host_template for module reference counting and
sht's should be owned by each low level driver.  During libahci split,
the sht was left with libahci.ko leaving the actual low level drivers
not reference counted.  This made ahci and ahci_platform always
unloadable even while they're being actively used.

Fix it by defining AHCI_SHT() macro in ahci.h and defining a sht for
each low level ahci driver.

stable: only applicable to 2.6.35.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Pedro Francisco <pedrogfrancisco@gmail.com>
Tested-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Tue, 28 Sep 2010 19:13:13 +0000 (12:13 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
  hwmon (coretemp): Fix build breakage if SMP is undefined

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Tue, 28 Sep 2010 19:02:22 +0000 (12:02 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: fix pci_resource_alignment prototype

15 years agocbus: Fix retu init order
Tony Lindgren [Fri, 17 Sep 2010 00:02:33 +0000 (17:02 -0700)]
cbus: Fix retu init order

Device needs to be registered before the driver. Otherwise
the driver register will fail.

Eventually the device register will move to the board-*.c files.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: tahvo: avoid section mismatch
Felipe Balbi [Tue, 14 Sep 2010 08:30:16 +0000 (08:30 +0000)]
cbus: tahvo: avoid section mismatch

... by removing references to init section from
platform_driver structure

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: tahvo: pass irq via struct resource
Felipe Balbi [Tue, 14 Sep 2010 08:30:15 +0000 (08:30 +0000)]
cbus: tahvo: pass irq via struct resource

prepare tahvo for platform_device creation on
board files. Start passing irq number via
struct resource.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: tahvo: remove device_release
Felipe Balbi [Tue, 14 Sep 2010 08:30:14 +0000 (08:30 +0000)]
cbus: tahvo: remove device_release

it's useless as we don't do anything besides
wait_for_completion(). Remove it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: tahvo: usb: convert to platform_driver
Felipe Balbi [Tue, 14 Sep 2010 08:30:13 +0000 (08:30 +0000)]
cbus: tahvo: usb: convert to platform_driver

tahvo-usb was already using a platform_device,
now also convert device_driver into platform_driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: retu: avoid section mismatch
Felipe Balbi [Tue, 14 Sep 2010 08:30:12 +0000 (08:30 +0000)]
cbus: retu: avoid section mismatch

... by removing __init reference from platform_driver
structure.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: retu: pass irq number via struct resource
Felipe Balbi [Tue, 14 Sep 2010 08:30:11 +0000 (08:30 +0000)]
cbus: retu: pass irq number via struct resource

this patch prepares retu to be able to create and
register the platform_device on board files. IRQ
number is now being passed via struct resource as
it should be.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: remove device_release completion
Felipe Balbi [Tue, 14 Sep 2010 08:30:10 +0000 (08:30 +0000)]
cbus: remove device_release completion

We don't do anything before releasing the device
so we might as well return as soon as possible.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: Fix compile by converting ioctl calls to unlocked_ioctlcalls
Jarkko Nikula [Tue, 14 Sep 2010 08:30:09 +0000 (08:30 +0000)]
cbus: Fix compile by converting ioctl calls to unlocked_ioctlcalls

Locked .ioctl is gone from struct file_operations by commit b19dd42
so these cbus drivers don't compile. Also it seems there is no need for BKL
anyway in these drivers.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: Fix compile for 770
Tony Lindgren [Tue, 6 Jul 2010 07:50:31 +0000 (10:50 +0300)]
cbus: Fix compile for 770

Recent changes changed omap_otg_init. Rename tahvo specific init
to tahvo_usb_init to avoid the following error:

tahvo-usb.c:151: error: conflicting types for 'omap_otg_init'
include/plat/usb.h:95: error: previous declaration of 'omap_otg_init' was here

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: switch kmalloc() + memset() to kzalloc()
Felipe Balbi [Sat, 1 May 2010 18:01:10 +0000 (18:01 +0000)]
cbus: switch kmalloc() + memset() to kzalloc()

no functional changes, just using kzalloc().

compile tested with n8x0_defconfig and n770_defconfig

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: fix compilation with current mainline
Felipe Balbi [Sat, 1 May 2010 18:01:09 +0000 (18:01 +0000)]
cbus: fix compilation with current mainline

commit 5a0e3ad6af8660be21ca98a971cd00f331318c05 broke
compilation of the retu-pwrbutton driver when it dropped
implicit inclusion of slab.h and gfp.h.

Fix it by including slab.h on retu-pwrbutton.c, while at
that, also include slab.h on retu-rtc.c to avoid later
problems with implicit inclusion of that being dropped.

Compile tested with n770_defconfig and n8x0_defconfig

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: retu-wdt: misc cleanup on retu-wdt driver
Felipe Balbi [Tue, 27 Apr 2010 01:23:31 +0000 (18:23 -0700)]
cbus: retu-wdt: misc cleanup on retu-wdt driver

a trivial cleanup on the driver. No functional changes.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-wtd: convert to platform_driver
Felipe Balbi [Tue, 27 Apr 2010 01:23:26 +0000 (18:23 -0700)]
cbus: retu-wtd: convert to platform_driver

trivial patch converting a device_driver into
platform_driver.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-wdt: remove the platform_device
Felipe Balbi [Tue, 27 Apr 2010 01:23:15 +0000 (18:23 -0700)]
cbus: retu-wdt: remove the platform_device

it now comes from retu.c, so use that.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-rtc: switch to rtc class device
Felipe Balbi [Tue, 27 Apr 2010 01:23:09 +0000 (18:23 -0700)]
cbus: retu-rtc: switch to rtc class device

remove the old syfs interface and move to rtc class
device registration.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-rtc: make checkpatch.pl happy
Felipe Balbi [Tue, 27 Apr 2010 01:23:04 +0000 (18:23 -0700)]
cbus: retu-rtc: make checkpatch.pl happy

trivial changes to make checkpatch.pl happy.
No functional changes.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-rtc: move retu_rtc_barrier up on source code
Felipe Balbi [Tue, 27 Apr 2010 01:22:58 +0000 (18:22 -0700)]
cbus: retu-rtc: move retu_rtc_barrier up on source code

... and drop the function prototype.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-rtc: get rid of globals
Felipe Balbi [Tue, 27 Apr 2010 01:22:52 +0000 (18:22 -0700)]
cbus: retu-rtc: get rid of globals

allocate everything we need on demand and get rid
of global variables.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-rtc: split MODULE_AUTHOR into several entries
Felipe Balbi [Tue, 27 Apr 2010 01:22:46 +0000 (18:22 -0700)]
cbus: retu-rtc: split MODULE_AUTHOR into several entries

it's easier to read, no functional changes.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-rtc: convert to platform_driver
Felipe Balbi [Tue, 27 Apr 2010 01:22:41 +0000 (18:22 -0700)]
cbus: retu-rtc: convert to platform_driver

still needs work, but it's now using platform_driver
structure.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-rtc: remove platform_device code
Felipe Balbi [Tue, 27 Apr 2010 01:22:36 +0000 (18:22 -0700)]
cbus: retu-rtc: remove platform_device code

that comes from retu.c now.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-headset: simplify module_init
Felipe Balbi [Tue, 27 Apr 2010 01:22:18 +0000 (18:22 -0700)]
cbus: retu-headset: simplify module_init

it's enough to have it as:

return platform_driver_register();

in case of failure, platform code should print
any necessary info.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-pwrbutton: convert to platform_driver
Felipe Balbi [Tue, 27 Apr 2010 01:22:12 +0000 (18:22 -0700)]
cbus: retu-pwrbutton: convert to platform_driver

now that we allocate the platform_devices in retu.c
we can convert this driver to platform_driver.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu: allocate platform_device for Retu's children
Felipe Balbi [Tue, 27 Apr 2010 01:22:07 +0000 (18:22 -0700)]
cbus: retu: allocate platform_device for Retu's children

after this patch, Retu's children can start moving to
platform_driver infrastructure.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: tahvo: convert to platform_driver
Felipe Balbi [Tue, 27 Apr 2010 01:22:01 +0000 (18:22 -0700)]
cbus: tahvo: convert to platform_driver

cleanup a bit and start preparing for splitting
platform_device from platform_driver.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: tahvo: convert printk into dev_*
Felipe Balbi [Tue, 27 Apr 2010 01:21:56 +0000 (18:21 -0700)]
cbus: tahvo: convert printk into dev_*

during probe() we have a device * available so we
can use dev_* macros instead of printk.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: tahvo: don't assign ret inside if ()
Felipe Balbi [Tue, 27 Apr 2010 01:21:51 +0000 (18:21 -0700)]
cbus: tahvo: don't assign ret inside if ()

change codying style, no functional changes.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: tahvo: move EXPORT_SYMBOL macros closer to functions
Felipe Balbi [Tue, 27 Apr 2010 01:21:45 +0000 (18:21 -0700)]
cbus: tahvo: move EXPORT_SYMBOL macros closer to functions

No functional changes but it avoids having to look for which
symbols are exported.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: tahvo: split MODULE_AUTHOR into several entries
Felipe Balbi [Tue, 27 Apr 2010 01:21:39 +0000 (18:21 -0700)]
cbus: tahvo: split MODULE_AUTHOR into several entries

it's easier to read. No functional changes.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu: convert to a platform_driver
Felipe Balbi [Tue, 27 Apr 2010 01:21:33 +0000 (18:21 -0700)]
cbus: retu: convert to a platform_driver

preparing this driver for mainline. Convert into
a platform_driver and prepare to split platform_device
code from platform_driver code.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu: convert printk to dev_*
Felipe Balbi [Tue, 27 Apr 2010 01:21:28 +0000 (18:21 -0700)]
cbus: retu: convert printk to dev_*

during probe(), we have a dev * available, and we
can use that for pretty printing with dev_* macros.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu: don't assing ret inside the if ()
Felipe Balbi [Tue, 27 Apr 2010 01:21:22 +0000 (18:21 -0700)]
cbus: retu: don't assing ret inside the if ()

better coding style.

Change:
if ((ret = driver_register(&retu_driver)))
into:
ret = driver_register(&retu_driver);
if (ret)

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu: split one MODULE_AUTHOR into several
Felipe Balbi [Tue, 27 Apr 2010 01:21:16 +0000 (18:21 -0700)]
cbus: retu: split one MODULE_AUTHOR into several

it's easier to read anyways.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu: fix compile breakage on retu-headset
Felipe Balbi [Tue, 27 Apr 2010 01:21:07 +0000 (18:21 -0700)]
cbus: retu: fix compile breakage on retu-headset

when building retu-headset as a  module, we need to
export retu_set_clear_reg_bits() and retu_read_adc().

While at that, also move the EXPORT_SYMBOL() macros
closer to the function definitions.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: retu-wdt: fix compile breakage
Felipe Balbi [Tue, 27 Apr 2010 01:21:01 +0000 (18:21 -0700)]
cbus: retu-wdt: fix compile breakage

fix compile breakage on retu-wdt driver.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: add kerneldoc
Felipe Balbi [Tue, 27 Apr 2010 01:20:56 +0000 (18:20 -0700)]
cbus: add kerneldoc

trivial patch, no functional changes.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: introduce cbus_send/receive_data wrappers
Felipe Balbi [Tue, 27 Apr 2010 01:20:50 +0000 (18:20 -0700)]
cbus: introduce cbus_send/receive_data wrappers

encapsulate the for loop on those wrappers and
make the code easier to follow.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: handle possible errors on cbus_send/receive_bit
Felipe Balbi [Tue, 27 Apr 2010 01:20:43 +0000 (18:20 -0700)]
cbus: handle possible errors on cbus_send/receive_bit

gpio_direction_input might fail and we have
to handle that possibility. While at that,
also add the device pointer to struct cbus_host
and use that for printing debugging messages and
make cbus_receive_bit return int.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: move cbus_host definition to C source
Felipe Balbi [Tue, 27 Apr 2010 01:20:36 +0000 (18:20 -0700)]
cbus: move cbus_host definition to C source

no-one else besides cbus.c wants to deal with
struct cbus_host, so move the definition to
the C source interested in it.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: fix a resource leakage
Felipe Balbi [Tue, 27 Apr 2010 01:20:29 +0000 (18:20 -0700)]
cbus: fix a resource leakage

sel_gpio was never freed on previous code, free it.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: don't type case when issuing read/write
Felipe Balbi [Tue, 27 Apr 2010 01:20:22 +0000 (18:20 -0700)]
cbus: don't type case when issuing read/write

avoid type casting, fix the types used.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: add read/write flag to cbus_transfer
Felipe Balbi [Tue, 27 Apr 2010 01:20:16 +0000 (18:20 -0700)]
cbus: add read/write flag to cbus_transfer

don't do magic tricks with the data to be written, it's simpler
to pass down a flag which will for sure tell us if we're reading
or writing.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: no ternary on return
Felipe Balbi [Tue, 27 Apr 2010 01:20:10 +0000 (18:20 -0700)]
cbus: no ternary on return

data is reset to 0 if is_read is true. No need
to use ternary operator before returning.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: rely on gpiolib
Felipe Balbi [Tue, 27 Apr 2010 01:20:02 +0000 (18:20 -0700)]
cbus: rely on gpiolib

don't define our own concurrent accesses to gpio banks
if we already have gpiolib to handle that.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: don't export the global cbus_host variable
Felipe Balbi [Tue, 27 Apr 2010 01:19:54 +0000 (18:19 -0700)]
cbus: don't export the global cbus_host variable

we can keep it static to cbus.c and refer to it when
calling cbus_transfer().

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: checkpatch.pl fix on cbus.c
Felipe Balbi [Tue, 27 Apr 2010 01:19:47 +0000 (18:19 -0700)]
cbus: checkpatch.pl fix on cbus.c

make checkpatch.pl (almost) happy.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: NULL global variable on exit
Felipe Balbi [Tue, 27 Apr 2010 01:19:41 +0000 (18:19 -0700)]
cbus: NULL global variable on exit

just to be sure, let's set it to NULL.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: convert u32 base to void __iomem *base
Felipe Balbi [Tue, 27 Apr 2010 01:19:35 +0000 (18:19 -0700)]
cbus: convert u32 base to void __iomem *base

to avoid casting later, pass the parameter of the
correct type already.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
15 years agocbus: fix comilation breakage
Alexander Shishkin [Wed, 21 Apr 2010 14:26:07 +0000 (14:26 +0000)]
cbus: fix comilation breakage

Just tried to build n8x0_defconfig on the current master and
got cbus failing to compile due to implicit kzalloc() (and
others from slab.h) references. I'm not sure that including
slab.h directly is the right thing to do here, though.

Signed-off-by: Alexander Shishkin <ash@koowaldah.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: Fix tahvo init without cbus
Tony Lindgren [Tue, 3 Aug 2010 09:10:01 +0000 (12:10 +0300)]
cbus: Fix tahvo init without cbus

Basically don't even try to use it except on Nokia boards.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: Fix init on boards with no cbus
Tony Lindgren [Tue, 3 Aug 2010 09:10:00 +0000 (12:10 +0300)]
cbus: Fix init on boards with no cbus

This really should get fixed by converting cbus to
use drivers/mfd.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 28 Sep 2010 19:01:26 +0000 (12:01 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits)
  tcp: Fix >4GB writes on 64-bit.
  net/9p: Mount only matching virtio channels
  de2104x: fix ethtool
  tproxy: check for transparent flag in ip_route_newports
  ipv6: add IPv6 to neighbour table overflow warning
  tcp: fix TSO FACK loss marking in tcp_mark_head_lost
  3c59x: fix regression from patch "Add ethtool WOL support"
  ipv6: add a missing unregister_pernet_subsys call
  s390: use free_netdev(netdev) instead of kfree()
  sgiseeq: use free_netdev(netdev) instead of kfree()
  rionet: use free_netdev(netdev) instead of kfree()
  ibm_newemac: use free_netdev(netdev) instead of kfree()
  smsc911x: Add MODULE_ALIAS()
  net: reset skb queue mapping when rx'ing over tunnel
  br2684: fix scheduling while atomic
  de2104x: fix TP link detection
  de2104x: fix power management
  de2104x: disable autonegotiation on broken hardware
  net: fix a lockdep splat
  e1000e: 82579 do not gate auto config of PHY by hardware during nominal use
  ...

15 years agocbus: Fix compile if not selected
Tony Lindgren [Tue, 3 Aug 2010 09:10:00 +0000 (12:10 +0300)]
cbus: Fix compile if not selected

Fix compile if not selected

Signed-off-by: Tony Lindgren <tony@atomide.com>