]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 23 Jun 2008 19:49:22 +0000 (12:49 -0700)]
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futexes: fix fault handling in futex_lock_pi

17 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 23 Jun 2008 19:48:50 +0000 (12:48 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: refactor wait_for_completion_timeout()
  sched: fix wait_for_completion_timeout() spurious failure under heavy load
  sched: rt: dont stop the period timer when there are tasks wanting to run

17 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 23 Jun 2008 19:48:17 +0000 (12:48 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  xen: don't drop NX bit
  xen: mask unwanted pte bits in __supported_pte_mask
  xen: Use wmb instead of rmb in xen_evtchn_do_upcall().
  x86: fix NULL pointer deref in __switch_to

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Mon, 23 Jun 2008 19:45:49 +0000 (12:45 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mthca: Clear ICM pages before handing to FW

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 23 Jun 2008 19:18:06 +0000 (12:18 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: sb - Fix wrong assertions
  ALSA: aw2 - Fix Oops at initialization

17 years agomm: fix race in COW logic
Nick Piggin [Mon, 23 Jun 2008 12:30:30 +0000 (14:30 +0200)]
mm: fix race in COW logic

There is a race in the COW logic.  It contains a shortcut to avoid the
COW and reuse the page if we have the sole reference on the page,
however it is possible to have two racing do_wp_page()ers with one
causing the other to mistakenly believe it is safe to take the shortcut
when it is not.  This could lead to data corruption.

Process 1 and process2 each have a wp pte of the same anon page (ie.
one forked the other).  The page's mapcount is 2.  Then they both
attempt to write to it around the same time...

  proc1 proc2 thr1 proc2 thr2
  CPU0 CPU1 CPU3
  do_wp_page() do_wp_page()
 trylock_page()
  can_share_swap_page()
   load page mapcount (==2)
  reuse = 0
 pte unlock
 copy page to new_page
 pte lock
 page_remove_rmap(page);
   trylock_page()
    can_share_swap_page()
     load page mapcount (==1)
    reuse = 1
   ptep_set_access_flags (allow W)

  write private key into page
read from page
ptep_clear_flush()
set_pte_at(pte of new_page)

Fix this by moving the page_remove_rmap of the old page after the pte
clear and flush.  Potentially the entire branch could be moved down
here, but in order to stay consistent, I won't (should probably move all
the *_mm_counter stuff with one patch).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix ZERO_PAGE breakage with vmware
Linus Torvalds [Mon, 23 Jun 2008 18:21:37 +0000 (11:21 -0700)]
Fix ZERO_PAGE breakage with vmware

Commit 89f5b7da2a6bad2e84670422ab8192382a5aeb9f ("Reinstate ZERO_PAGE
optimization in 'get_user_pages()' and fix XIP") broke vmware, as
reported by Jeff Chua:

  "This broke vmware 6.0.4.
   Jun 22 14:53:03.845: vmx| NOT_IMPLEMENTED
   /build/mts/release/bora-93057/bora/vmx/main/vmmonPosix.c:774"

and the reason seems to be that there's an old bug in how we handle do
FOLL_ANON on VM_SHARED areas in get_user_pages(), but since it only
triggered if the whole page table was missing, nobody had apparently hit
it before.

The recent changes to 'follow_page()' made the FOLL_ANON logic trigger
not just for whole missing page tables, but for individual pages as
well, and exposed this problem.

This fixes it by making the test for when FOLL_ANON is used more
careful, and also makes the code easier to read and understand by moving
the logic to a separate inline function.

Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agogss_krb5: Use random value to initialize confounder
Kevin Coffman [Wed, 30 Apr 2008 16:46:08 +0000 (12:46 -0400)]
gss_krb5: Use random value to initialize confounder

Initialize the value used for the confounder to a random value
rather than starting from zero.
Allow for confounders of length 8 or 16 (which will be needed for AES).

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agogss_krb5: move gss_krb5_crypto into the krb5 module
Kevin Coffman [Wed, 30 Apr 2008 16:45:58 +0000 (12:45 -0400)]
gss_krb5: move gss_krb5_crypto into the krb5 module

The gss_krb5_crypto.o object belongs in the rpcsec_gss_krb5 module.
Also, there is no need to export symbols from gss_krb5_crypto.c

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agogss_krb5: create a define for token header size and clean up ptr location
Kevin Coffman [Wed, 30 Apr 2008 16:45:53 +0000 (12:45 -0400)]
gss_krb5: create a define for token header size and clean up ptr location

cleanup:
Document token header size with a #define instead of open-coding it.

Don't needlessly increment "ptr" past the beginning of the header
which makes the values passed to functions more understandable and
eliminates the need for extra "krb5_hdr" pointer.

Clean up some intersecting  white-space issues flagged by checkpatch.pl.

This leaves the checksum length hard-coded at 8 for DES.  A later patch
cleans that up.

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agoremoved unused var real_tty on n_tty_ioctl()
Gustavo Fernando Padovan [Mon, 23 Jun 2008 11:07:06 +0000 (12:07 +0100)]
removed unused var real_tty on n_tty_ioctl()

I noted that the 'struct tty_struct *real_tty' is not used in this
function, so I removed the code about 'real_tty'.

Signed-off-by: Gustavo Fernando Padovan <gustavo@las.ic.unicamp.br>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agotty_driver: Update required method documentation
Alan Cox [Mon, 23 Jun 2008 11:06:52 +0000 (12:06 +0100)]
tty_driver: Update required method documentation

Some of the requirement rules are now more relaxed. Also correct a
contradiction in the previous update

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[patch 2/3] vfs: dcache cleanups
Miklos Szeredi [Mon, 23 Jun 2008 16:11:53 +0000 (18:11 +0200)]
[patch 2/3] vfs: dcache cleanups

Comment from Al Viro: add prepend_name() wrapper.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[patch 1/3] vfs: dcache sparse fixes
Miklos Szeredi [Mon, 23 Jun 2008 16:11:52 +0000 (18:11 +0200)]
[patch 1/3] vfs: dcache sparse fixes

Fix the following sparse warnings:

fs/dcache.c:2183:19: warning: symbol 'filp_cachep' was not declared. Should it be static?
fs/dcache.c:115:3: warning: context imbalance in 'dentry_iput' - unexpected unlock
fs/dcache.c:188:2: warning: context imbalance in 'dput' - different lock contexts for basic block
fs/dcache.c:400:2: warning: context imbalance in 'prune_one_dentry' - different lock contexts for basic block
fs/dcache.c:431:22: warning: context imbalance in 'prune_dcache' - different lock contexts for basic block
fs/dcache.c:563:2: warning: context imbalance in 'shrink_dcache_sb' - different lock contexts for basic block
fs/dcache.c:1385:6: warning: context imbalance in 'd_delete' - wrong count at exit
fs/dcache.c:1636:2: warning: context imbalance in '__d_unalias' - unexpected unlock
fs/dcache.c:1735:2: warning: context imbalance in 'd_materialise_unique' - different lock contexts for basic block

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[patch 3/3] vfs: make d_path() consistent across mount operations
Andreas Gruenbacher [Mon, 16 Jun 2008 11:28:07 +0000 (13:28 +0200)]
[patch 3/3] vfs: make d_path() consistent across mount operations

The path that __d_path() computes can become slightly inconsistent when it
races with mount operations: it grabs the vfsmount_lock when traversing mount
points but immediately drops it again, only to re-grab it when it reaches the
next mount point.  The result is that the filename computed is not always
consisent, and the file may never have had that name. (This is unlikely, but
still possible.)

Fix this by grabbing the vfsmount_lock for the whole duration of
__d_path().

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: John Johansen <jjohansen@suse.de>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agonfsd: rename MAY_ flags
Miklos Szeredi [Mon, 16 Jun 2008 11:20:29 +0000 (13:20 +0200)]
nfsd: rename MAY_ flags

Rename nfsd_permission() specific MAY_* flags to NFSD_MAY_* to make it
clear, that these are not used outside nfsd, and to avoid name and
number space conflicts with the VFS.

[comment from hch: rename MAY_READ, MAY_WRITE and MAY_EXEC as well]

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agoknfsd: nfsd: Handle ERESTARTSYS from syscalls.
NeilBrown [Thu, 19 Jun 2008 00:11:09 +0000 (10:11 +1000)]
knfsd: nfsd: Handle ERESTARTSYS from syscalls.

OCFS2 can return -ERESTARTSYS from write requests (and possibly
elsewhere) if there is a signal pending.

If nfsd is shutdown (by sending a signal to each thread) while there
is still an IO load from the client, each thread could handle one last
request with a signal pending.  This can result in -ERESTARTSYS
which is not understood by nfserrno() and so is reflected back to
the client as nfserr_io aka -EIO.  This is wrong.

Instead, interpret ERESTARTSYS to mean "try again later" by returning
nfserr_jukebox.  The client will resend and - if the server is
restarted - the write will (hopefully) be successful and everyone will
be happy.

 The symptom that I narrowed down to this was:
    copy a large file via NFS to an OCFS2 filesystem, and restart
    the nfs server during the copy.
    The 'cp' might get an -EIO, and the file will be corrupted -
    presumably holes in the middle where writes appeared to fail.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agonfsd: fix race in nfsd_nrthreads()
Neil Brown [Thu, 12 Jun 2008 03:38:42 +0000 (13:38 +1000)]
nfsd: fix race in nfsd_nrthreads()

We need the nfsd_mutex before accessing nfsd_serv->sv_nrthreads or we
can't even guarantee nfsd_serv will still be there.

Signed-off-by: Neil Brown <neilb@suse.de>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agolockd: close potential race with rapid lockd_up/lockd_down cycle
Jeff Layton [Wed, 11 Jun 2008 14:03:12 +0000 (10:03 -0400)]
lockd: close potential race with rapid lockd_up/lockd_down cycle

If lockd_down is called very rapidly after lockd_up returns, then
there is a slim chance that lockd() will never be called. kthread()
will return before calling the function, so we'll end up never
actually calling the cleanup functions for the thread.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agosunrpc: remove sv_kill_signal field from svc_serv struct
Jeff Layton [Tue, 10 Jun 2008 12:40:39 +0000 (08:40 -0400)]
sunrpc: remove sv_kill_signal field from svc_serv struct

Since we no longer make any distinction between shutdown signals with
nfsd, then it becomes easier to just standardize on a particular signal
to use to bring it down (SIGINT, in this case).

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agoknfsd: convert knfsd to kthread API
Jeff Layton [Tue, 10 Jun 2008 12:40:38 +0000 (08:40 -0400)]
knfsd: convert knfsd to kthread API

This patch is rather large, but I couldn't figure out a way to break it
up that would remain bisectable. It does several things:

- change svc_thread_fn typedef to better match what kthread_create expects
- change svc_pool_map_set_cpumask to be more kthread friendly. Make it
  take a task arg and and get rid of the "oldmask"
- have svc_set_num_threads call kthread_create directly
- eliminate __svc_create_thread

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agoknfsd: remove special handling for SIGHUP
Jeff Layton [Tue, 10 Jun 2008 12:40:37 +0000 (08:40 -0400)]
knfsd: remove special handling for SIGHUP

The special handling for SIGHUP in knfsd is a holdover from much
earlier versions of Linux where reloading the export table was
more expensive. That facility is not really needed anymore and
to my knowledge, is seldom-used.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agoknfsd: clean up nfsd filesystem interfaces
Jeff Layton [Tue, 10 Jun 2008 12:40:36 +0000 (08:40 -0400)]
knfsd: clean up nfsd filesystem interfaces

Several of the nfsd filesystem interfaces allow changes to parameters
that don't have any effect on a running nfsd service. They are only ever
checked when nfsd is started. This patch fixes it so that changes to
those procfiles return -EBUSY if nfsd is already running to make it
clear that changes on the fly don't work.

The patch should also close some relatively harmless races between
changing the info in those interfaces and starting nfsd, since these
variables are being moved under the protection of the nfsd_mutex.

Finally, the nfsv4recoverydir file always returns -EINVAL if read. This
patch fixes it to return the recoverydir path as expected.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agoknfsd: Replace lock_kernel with a mutex for nfsd thread startup/shutdown locking.
Neil Brown [Tue, 10 Jun 2008 12:40:35 +0000 (08:40 -0400)]
knfsd: Replace lock_kernel with a mutex for nfsd thread startup/shutdown locking.

This removes the BKL from the RPC service creation codepath. The BKL
really isn't adequate for this job since some of this info needs
protection across sleeps.

Also, add some comments to try and clarify how the locking should work
and to make it clear that the BKL isn't necessary as long as there is
adequate locking between tasks when touching the svc_serv fields.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agonfsd: eliminate unused nfs4_callback.cb_stat
Benny Halevy [Tue, 10 Jun 2008 10:39:43 +0000 (13:39 +0300)]
nfsd: eliminate unused nfs4_callback.cb_stat

The cb_stat member of struct nfs4_callback is unused
since commit ff7d9756 nfsd: use static memory for callback program and stats

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agonfsd: eliminate unused nfs4_callback.cb_program
Benny Halevy [Tue, 10 Jun 2008 09:59:07 +0000 (12:59 +0300)]
nfsd: eliminate unused nfs4_callback.cb_program

The cb_program member of struct nfs4_callback unused
since commit ff7d9756 nfsd: use static memory for callback program and stats

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agonfsd: remove three unused NFS4_ACE_* defines
J. Bruce Fields [Wed, 4 Jun 2008 22:50:06 +0000 (18:50 -0400)]
nfsd: remove three unused NFS4_ACE_* defines

These flag bits aren't used by either the protocol or our
implementation, so I don't know why they were here.

Thanks to Johann Dahm for running across these.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Johann Dahm <jdahm@umich.edu>
17 years agonfsd: make nfs4xdr WRITEMEM safe against zero count
Benny Halevy [Thu, 29 May 2008 09:56:08 +0000 (12:56 +0300)]
nfsd: make nfs4xdr WRITEMEM safe against zero count

WRITEMEM zeroes the last word in the destination buffer
for padding purposes, but this must not be done if
no bytes are to be copied, as it would result
in zeroing of the word right before the array.

The current implementation works since it's always called
with non zero nbytes or it follows an encoding of the
string (or opaque) length which, if equal to zero,
can be overwritten with zero.

Nevertheless, it seems safer to check for this case.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agonfsd: add dprintk of compound return
J. Bruce Fields [Mon, 5 May 2008 21:17:44 +0000 (17:17 -0400)]
nfsd: add dprintk of compound return

We already print each operation of the compound when debugging is turned
on; printing the result could also help with remote debugging.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
17 years agoIB/mthca: Clear ICM pages before handing to FW
Eli Cohen [Mon, 23 Jun 2008 16:29:58 +0000 (09:29 -0700)]
IB/mthca: Clear ICM pages before handing to FW

Current memfree FW has a bug which in some cases, assumes that ICM
pages passed to it are cleared.  This patch uses __GFP_ZERO to
allocate all ICM pages passed to the FW.  Once firmware with a fix is
released, we can make the workaround conditional on firmware version.

This fixes the bug reported by Arthur Kepner <akepner@sgi.com> here:
http://lists.openfabrics.org/pipermail/general/2008-May/050026.html

Cc: <stable@kernel.org>
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
[ Rewritten to be a one-liner using __GFP_ZERO instead of vmap()ing
  ICM memory and memset()ing it to 0. - Roland ]

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years ago[patch 4/4] flock: remove unused fields from file_lock_operations
Denis V. Lunev [Mon, 9 Jun 2008 23:40:38 +0000 (16:40 -0700)]
[patch 4/4] flock: remove unused fields from file_lock_operations

fl_insert and fl_remove are not used right now in the kernel. Remove them.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[patch 3/4] vfs: fix ERR_PTR abuse in generic_readlink
Marcin Slusarz [Mon, 9 Jun 2008 23:40:37 +0000 (16:40 -0700)]
[patch 3/4] vfs: fix ERR_PTR abuse in generic_readlink

generic_readlink calls ERR_PTR for negative and positive values
(vfs_readlink returns length of "link"), but it should not
(not an errno) and does not need to.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Acked-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[patch 2/4] fs: make struct file arg to d_path const
Jan Engelhardt [Mon, 9 Jun 2008 23:40:36 +0000 (16:40 -0700)]
[patch 2/4] fs: make struct file arg to d_path const

Signed-off-by: Jan Engelhardt <jengelh@medozas.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>
17 years ago[patch 1/4] vfs: path_{get,put}() cleanups
Jan Blunck [Mon, 9 Jun 2008 23:40:35 +0000 (16:40 -0700)]
[patch 1/4] vfs: path_{get,put}() cleanups

Here are some more places where path_{get,put}() can be used instead of
dput()/mntput() pair.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agoi2c: twl4030: warning: mixed declarations and code
Felipe Balbi [Wed, 11 Jun 2008 11:55:23 +0000 (14:55 +0300)]
i2c: twl4030: warning: mixed declarations and code

Latest patches for multi-omap support introduced
it, removing.

Trivial patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years ago[patch for 2.6.26 4/4] vfs: utimensat(): fix write access check for futimens()
Michael Kerrisk [Tue, 10 Jun 2008 04:16:09 +0000 (21:16 -0700)]
[patch for 2.6.26 4/4] vfs: utimensat(): fix write access check for futimens()

The POSIX.1 draft spec for futimens()/utimensat() says:

        Only a process with the effective user ID equal to the
        user ID of the file, *or with write access to the file*,
        or with appropriate privileges may use futimens() or
        utimensat() with a null pointer as the times argument
        or with both tv_nsec fields set to the special value
        UTIME_NOW.

The important piece here is "with write access to the file", and
this matters for futimens(), which deals with an argument that
is a file descriptor referring to the file whose timestamps are
being updated,  The standard is saying that the "writability"
check is based on the file permissions, not the access mode with
which the file is opened.  (This behavior is consistent with the
semantics of FreeBSD's futimes().)  However, Linux is currently
doing the latter -- futimens(fd, times) is a library
function implemented as

       utimensat(fd, NULL, times, 0)

and within the utimensat() implementation we have the code:

                f = fget(dfd);  // dfd is 'fd'
                ...
                if (f) {
                        if (!(f->f_mode & FMODE_WRITE))
                                goto mnt_drop_write_and_out;

The check should instead be based on the file permissions.

Thanks to Miklos for pointing out how to do this check.
Miklos also pointed out a simplification that could be
made to my first version of this patch, since the checks
for the pathname and file descriptor cases can now be
conflated.

Acked-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[patch for 2.6.26 3/4] vfs: utimensat(): fix error checking for {UTIME_NOW,UTIME_OMIT...
Michael Kerrisk [Tue, 10 Jun 2008 04:16:08 +0000 (21:16 -0700)]
[patch for 2.6.26 3/4] vfs: utimensat(): fix error checking for {UTIME_NOW,UTIME_OMIT} case

The POSIX.1 draft spec for utimensat() says:

    Only a process with the effective user ID equal to the
    user ID of the file or with appropriate privileges may use
    futimens() or utimensat() with a non-null times argument
    that does not have both tv_nsec fields set to UTIME_NOW
    and does not have both tv_nsec fields set to UTIME_OMIT.

If this condition is violated, then the error EPERM should result.
However, the current implementation does not generate EPERM if
one tv_nsec field is UTIME_NOW while the other is UTIME_OMIT.
It should give this error for that case.

This patch:

a) Repairs that problem.
b) Removes the now unneeded nsec_special() helper function.
c) Adds some comments to explain the checks that are being
   performed.

Thanks to Miklos, who provided comments on the previous iteration
of this patch.  As a result, this version is a little simpler and
and its logic is better structured.

Miklos suggested an alternative idea, migrating the
is_owner_or_cap() checks into fs/attr.c:inode_change_ok() via
the use of an ATTR_OWNER_CHECK flag.  Maybe we could do that
later, but for now I've gone with this version, which is
IMO simpler, and can be more easily read as being correct.

Acked-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[patch for 2.6.26 1/4] vfs: utimensat(): ignore tv_sec if tv_nsec == UTIME_OMIT or...
Michael Kerrisk [Tue, 10 Jun 2008 04:16:05 +0000 (21:16 -0700)]
[patch for 2.6.26 1/4] vfs: utimensat(): ignore tv_sec if tv_nsec == UTIME_OMIT or UTIME_NOW

The POSIX.1 draft spec for utimensat() says that if a times[n].tv_nsec
field is UTIME_OMIT or UTIME_NOW, then the value in the corresponding
tv_sec field is ignored.  See the last sentence of this para, from
the spec:

    If the tv_nsec field of a timespec structure has
    the special value UTIME_NOW, the file's relevant
    timestamp shall be set to the greatest value
    supported by the file system that is not greater than
    the current time. If the tv_nsec field has the
    special value UTIME_OMIT, the file's relevant
    timestamp shall not be changed. In either case,
    the tv_sec field shall be ignored.

However the current Linux implementation requires the tv_sec value to be
zero (or the EINVAL error results). This requirement should be removed.

Acked-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[patch for 2.6.26 2/4] vfs: utimensat(): be consistent with utime() for immutable...
Michael Kerrisk [Tue, 10 Jun 2008 04:16:07 +0000 (21:16 -0700)]
[patch for 2.6.26 2/4] vfs: utimensat(): be consistent with utime() for immutable and append-only files

This patch fixes utimensat() to make its behavior consistent
with that of utime()/utimes() when dealing with files marked
immutable and append-only.

The current utimensat() implementation also returns EPERM if
'times' is non-NULL and the tv_nsec fields are both UTIME_NOW.
For consistency, the

(times != NULL && times[0].tv_nsec == UTIME_NOW &&
                  times[1].tv_nsec == UTIME_NOW)

case should be treated like the traditional utimes() case where
'times' is NULL.  That is, the call should succeed for a file
marked append-only and should give the error EACCES if the file
is marked as immutable.

The simple way to do this is to set 'times' to NULL
if (times[0].tv_nsec == UTIME_NOW && times[1].tv_nsec == UTIME_NOW).

This is also the natural approach, since POSIX.1 semantics consider the
times == {{x, UTIME_NOW}, {y, UTIME_NOW}}
to be exactly equivalent to the case for
times == NULL.

(Thanks to Miklos for pointing this out.)

Patch 3 in this series relies on the simplification provided
by this patch.

Acked-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] fix cgroup-inflicted breakage in block_dev.c
Al Viro [Mon, 23 Jun 2008 12:30:55 +0000 (08:30 -0400)]
[PATCH] fix cgroup-inflicted breakage in block_dev.c

devcgroup_inode_permission() expects MAY_FOO, not FMODE_FOO; kindly
keep your misdesign consistent if you positively have to inflict it
on the kernel.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agofutexes: fix fault handling in futex_lock_pi
Thomas Gleixner [Mon, 23 Jun 2008 09:21:58 +0000 (11:21 +0200)]
futexes: fix fault handling in futex_lock_pi

This patch addresses a very sporadic pi-futex related failure in
highly threaded java apps on large SMP systems.

David Holmes reported that the pi_state consistency check in
lookup_pi_state triggered with his test application. This means that
the kernel internal pi_state and the user space futex variable are out
of sync. First we assumed that this is a user space data corruption,
but deeper investigation revieled that the problem happend because the
pi-futex code is not handling a fault in the futex_lock_pi path when
the user space variable needs to be fixed up.

The fault happens when a fork mapped the anon memory which contains
the futex readonly for COW or the page got swapped out exactly between
the unlock of the futex and the return of either the new futex owner
or the task which was the expected owner but failed to acquire the
kernel internal rtmutex. The current futex_lock_pi() code drops out
with an inconsistent in case it faults and returns -EFAULT to user
space. User space has no way to fixup that state.

When we wrote this code we thought that we could not drop the hash
bucket lock at this point to handle the fault.

After analysing the code again it turned out to be wrong because there
are only two tasks involved which might modify the pi_state and the
user space variable:

 - the task which acquired the rtmutex
 - the pending owner of the pi_state which did not get the rtmutex

Both tasks drop into the fixup_pi_state() function before returning to
user space. The first task which acquired the hash bucket lock faults
in the fixup of the user space variable, drops the spinlock and calls
futex_handle_fault() to fault in the page. Now the second task could
acquire the hash bucket lock and tries to fixup the user space
variable as well. It either faults as well or it succeeds because the
first task already faulted the page in.

One caveat is to avoid a double fixup. After returning from the fault
handling we reacquire the hash bucket lock and check whether the
pi_state owner has been modified already.

Reported-by: David Holmes <david.holmes@sun.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Holmes <david.holmes@sun.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
 kernel/futex.c |   93 ++++++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 73 insertions(+), 20 deletions(-)

17 years agoThis patch completes the name change from 2430osk to OMAP2EVM
arun c [Wed, 11 Jun 2008 10:36:24 +0000 (16:06 +0530)]
This patch completes the name change from 2430osk to OMAP2EVM

From 11262ea96e0fa73dd3470362b571a33b792bfb09 Mon Sep 17 00:00:00 2001
From: arun <arunedarath@mistralsolutions.com>
Date: Wed, 11 Jun 2008 15:46:10 +0530
Subject: [PATCH] This patch completes the name change from 2430osk to OMAP2EVM

Also
a) Changed old style i2c registration
b) Changed the Maintainer

Signed-off-by: arun <arunedarath@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoAdding basic compile support for OMAP2EVM
arun c [Wed, 11 Jun 2008 10:34:54 +0000 (16:04 +0530)]
Adding basic compile support for OMAP2EVM

From f24b517daecd23377d92c706bb28e218431d1887 Mon Sep 17 00:00:00 2001
From: arun <arunedarath@mistralsolutions.com>
Date: Wed, 11 Jun 2008 14:48:49 +0530
Subject: [PATCH] Adding basic compile support for OMAP2EVM

Signed-off-by: arun <arunedarath@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoRenaming files to reflect name change from 2430OSK to OMAP2EVM
arun c [Wed, 11 Jun 2008 12:11:47 +0000 (17:41 +0530)]
Renaming files to reflect name change from 2430OSK to OMAP2EVM

From c379ad7c092bd0230d6c24652a86abb2d8184d64 Mon Sep 17 00:00:00 2001
From: arun <arunedarath@mistralsolutions.com>
Date: Wed, 11 Jun 2008 14:43:34 +0530
Subject: [PATCH] Renaming files to reflect name change from 2430OSK to OMAP2EVM

renamed:    arch/arm/configs/omap_2430osk_defconfig ->
arch/arm/configs/omap2_evm_defconfig
renamed:    arch/arm/mach-omap2/board-2430osk.c ->
arch/arm/mach-omap2/board-omap2evm.c
renamed:    include/asm-arm/arch-omap/board-2430osk.h ->
include/asm-arm/arch-omap/board-omap2evm.h

Signed-off-by: arun <arunedarath@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agousb: musb: ignore disconnect on suspend
Felipe Balbi [Wed, 11 Jun 2008 11:07:12 +0000 (14:07 +0300)]
usb: musb: ignore disconnect on suspend

This still needed, otherwise tusb2.0 won't connect after
a power cycle.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agox86: change early_gart_iommu_check() back to any_mapped
Yinghai Lu [Sat, 21 Jun 2008 10:50:47 +0000 (03:50 -0700)]
x86: change early_gart_iommu_check() back to any_mapped

Kevin Winchester reported a GART related direct rendering failure against
linux-next-20080611, which shows up via these log entries:

 PCI: Using ACPI for IRQ routing
 PCI: Cannot allocate resource region 0 of device 0000:00:00.0
 agpgart: Detected AGP bridge 0
 agpgart: Aperture conflicts with PCI mapping.
 agpgart: Aperture from AGP @ e0000000 size 128 MB
 agpgart: Aperture conflicts with PCI mapping.
 agpgart: No usable aperture found.
 agpgart: Consider rebooting with iommu=memaper=2 to get a good aperture.

instead of the expected:

 PCI: Using ACPI for IRQ routing
 agpgart: Detected AGP bridge 0
 agpgart: Aperture from AGP @ e0000000 size 128 MB

Kevin bisected it down to this change in tip/x86/gart:
"x86: checking aperture size order".

agp check is using request_mem_region(), and could fail if e820 is reserved...

change it back to e820_any_mapped().

Reported-and-bisected-by: "Kevin Winchester" <kjwinchester@gmail.com>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Tested-by: Kevin Winchester <kjwinchester@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoi2c: add MODULE_ALIAS to twl4030 drivers
Felipe Balbi [Fri, 13 Jun 2008 10:04:03 +0000 (13:04 +0300)]
i2c: add MODULE_ALIAS to twl4030 drivers

When built as module, it helps udev to probe them.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoi2c: allow twl modules to be built as modules
Felipe Balbi [Fri, 13 Jun 2008 10:04:02 +0000 (13:04 +0300)]
i2c: allow twl modules to be built as modules

Besides twl core and twl gpio, all the others can
be dynamically linked.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agousb: musb: add MODULE_ALIAS for udev module loading
Felipe Balbi [Fri, 13 Jun 2008 10:04:01 +0000 (13:04 +0300)]
usb: musb: add MODULE_ALIAS for udev module loading

platform drivers should add MODULE_ALIAS for allowing
udev module loading.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: SmartReflex driver integration
Kalle Jokiniemi [Tue, 17 Jun 2008 07:23:06 +0000 (10:23 +0300)]
ARM: OMAP: SmartReflex driver integration

This patch integrates TI's SmartReflex driver into linux-omap. SmartReflex is
a module that adjusts OMAP3 VDD1 and VDD2 operating voltages around the
nominal values of current operating point depending on silicon
characteristics and operating conditions.

The patch adds Kconfig options "SmartReflex support" and a sub-option
"SmartReflex testing support" under "System type"->"TI OMAP implementations"
menu. The testing support can be used to test SmartReflex functionality, if
the E-fuse values have not been set for the device. It however uses software
hard coded sensor parameters, which may not work on all devices. Beware.

The driver creates two sysfs entries into /sys/power/ named
"sr_vdd1_autocomp" and "sr_vdd2_autocomp" which can be used to activate
voltage autocompensation feature of SmartReflex modules 1 and 2.

Use the following commands to enable autocompensation:

echo -n 1 > /sys/power/sr_vdd1_autocomp
echo -n 1 > /sys/power/sr_vdd2_autocomp

To disable:

echo -n 0 > /sys/power/sr_vdd1_autocomp
echo -n 0 > /sys/power/sr_vdd2_autocomp

Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: SmartReflex driver: added required register and bit definitions.
Kalle Jokiniemi [Thu, 19 Jun 2008 10:42:26 +0000 (13:42 +0300)]
ARM: OMAP: SmartReflex driver: added required register and bit definitions.

Added new register and bit definitions to enable Smartreflex driver
integration. Also PRM_VC_SMPS_SA bit definitions' naming was changed to match
the naming of other similar bit definitions.

Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoThe fix prevents kernel crash caused by twl4030 power button malfunction.
Roman Tereshonkov [Tue, 17 Jun 2008 13:48:06 +0000 (16:48 +0300)]
The fix prevents kernel crash caused by twl4030 power button malfunction.

If i2c connection is broken the twl4030 power button driver is unregistered.
The function input_free_device has to be called only when
input_register_device failed. Otherwise input_unregister_device is used.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoradio-tea5761: Update driver
Eduardo Valentin [Tue, 10 Jun 2008 17:42:12 +0000 (13:42 -0400)]
radio-tea5761: Update driver

This patch updates this driver by changing the way it accesses
the device. There is the tuner API which already has an implementation
for tea5761.

This patch changes the driver to use tuner API.

It also changes the way ioctls are handled. This way
it is more easy to deal with v4l2 and v4l calls.

Some cleans are also done.

Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotea5761 tuner: fix registers utilization
Eduardo Valentin [Tue, 10 Jun 2008 17:42:11 +0000 (13:42 -0400)]
tea5761 tuner: fix registers utilization

Fix registers utilization.
tnctrl register was supposed to be used but it was
right shifted. frqset also was being configured using
incorrect equation.

Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotea5761: Add init and sleep callbacks on tea5761 tuner
Eduardo Valentin [Tue, 10 Jun 2008 17:42:10 +0000 (13:42 -0400)]
tea5761: Add init and sleep callbacks on tea5761 tuner

Add init and sleep callbacks on tea5761 tuner

Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM:OMAP: fix driver MODULE_ALIAS()
Hiroshi DOYU [Thu, 12 Jun 2008 07:40:14 +0000 (10:40 +0300)]
ARM:OMAP: fix driver MODULE_ALIAS()

Add a correct MODULE_ALIAS() entry for this driver to enable udev module
loading.

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Allocate McBSP devices dynamically
Tony Lindgren [Mon, 23 Jun 2008 09:28:00 +0000 (12:28 +0300)]
ARM: OMAP: Allocate McBSP devices dynamically

Allocate McBSP devices dynamically. Also remove some
unnecessary inludes. Based on comments from Russell King.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoALSA: sb - Fix wrong assertions
Takashi Iwai [Mon, 23 Jun 2008 09:58:06 +0000 (11:58 +0200)]
ALSA: sb - Fix wrong assertions

snd_assert() in save_mixer() and restore_mixer() in sb_mixer.c is
just wrong.  The debug code wasn't tested at all, obviously...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: aw2 - Fix Oops at initialization
Takashi Iwai [Mon, 23 Jun 2008 09:54:05 +0000 (11:54 +0200)]
ALSA: aw2 - Fix Oops at initialization

The irq handler may be called before the proper initialization of hardware.
Call snd_aw2_saa7146_setup() before the irq handler registration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoMerge branch 'linus' into x86/threadinfo
Ingo Molnar [Mon, 23 Jun 2008 09:53:03 +0000 (11:53 +0200)]
Merge branch 'linus' into x86/threadinfo

17 years agoMerge branch 'linus' into sched/devel
Ingo Molnar [Mon, 23 Jun 2008 09:30:23 +0000 (11:30 +0200)]
Merge branch 'linus' into sched/devel

17 years agoMerge branch 'linus' into core/rcu
Ingo Molnar [Mon, 23 Jun 2008 09:29:11 +0000 (11:29 +0200)]
Merge branch 'linus' into core/rcu

17 years agoMerge branch 'linus' into tracing/ftrace
Ingo Molnar [Mon, 23 Jun 2008 09:11:42 +0000 (11:11 +0200)]
Merge branch 'linus' into tracing/ftrace

17 years agoMerge branch 'linus' into sched/urgent
Ingo Molnar [Mon, 23 Jun 2008 09:00:26 +0000 (11:00 +0200)]
Merge branch 'linus' into sched/urgent

17 years agoMerge branch 'linus' into core/softirq
Ingo Molnar [Mon, 23 Jun 2008 08:52:59 +0000 (10:52 +0200)]
Merge branch 'linus' into core/softirq

17 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Mon, 23 Jun 2008 07:41:18 +0000 (10:41 +0300)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

17 years ago[ARM] mv78xx0: add defconfig
Lennert Buytenhek [Sun, 22 Jun 2008 20:45:10 +0000 (22:45 +0200)]
[ARM] mv78xx0: add defconfig

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] add Marvell 78xx0 ARM SoC support
Stanislav Samsonov [Sun, 22 Jun 2008 20:45:10 +0000 (22:45 +0200)]
[ARM] add Marvell 78xx0 ARM SoC support

The Marvell Discovery Duo (MV78xx0) is a family of ARM SoCs featuring
(depending on the model) one or two Feroceon CPU cores with 512K of L2
cache and VFP coprocessors running at (depending on the model) between
800 MHz and 1.2 GHz, and features a DDR2 controller, two PCIe
interfaces that can each run either in x4 or quad x1 mode, three USB
2.0 interfaces, two 3Gb/s SATA II interfaces, a SPI interface, two
TWSI interfaces, a crypto accelerator, IDMA/XOR engines, a SPI
interface, four UARTs, and depending on the model, two or four gigabit
ethernet interfaces.

This patch adds basic support for the platform, and allows booting
on the MV78x00 development board, with functional UARTs, SATA, PCIe,
GigE and USB ports.

Signed-off-by: Stanislav Samsonov <samsonov@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: PCIe x4/x1 detection support
Lennert Buytenhek [Sun, 22 Jun 2008 20:45:09 +0000 (22:45 +0200)]
[ARM] Orion: PCIe x4/x1 detection support

The Discovery Duo (MV78xx0) has two x4 PCIe ports which can either
be used in x4 mode or in quad x1 mode.  This patch adds an accessor
function to the generic plat-orion PCIe handling code to detect in
which of the two modes we're running (which is determined by strap
pins and/or configured by the bootloader).

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Feroceon: 88fr571-vd support
Lennert Buytenhek [Sun, 22 Jun 2008 20:45:08 +0000 (22:45 +0200)]
[ARM] Feroceon: 88fr571-vd support

Add support for the Feroceon 88fr571-vd CPU core as found in e.g.
the Marvell Discovery Duo family of ARM SoCs.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Kirkwood: add defconfig
Saeed Bishara [Sun, 22 Jun 2008 20:45:07 +0000 (22:45 +0200)]
[ARM] Kirkwood: add defconfig

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] add Marvell Kirkwood (88F6000) SoC support
Saeed Bishara [Sun, 22 Jun 2008 20:45:06 +0000 (22:45 +0200)]
[ARM] add Marvell Kirkwood (88F6000) SoC support

The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.

This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Feroceon: 88fr131 support
Lennert Buytenhek [Sun, 22 Jun 2008 20:45:05 +0000 (22:45 +0200)]
[ARM] Feroceon: 88fr131 support

Add support for the Shiva 88fr131 CPU core as found in e.g. the
Marvell Kirkwood family of ARM SoCs.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Feroceon: L2 cache support
Lennert Buytenhek [Sun, 22 Jun 2008 20:45:04 +0000 (22:45 +0200)]
[ARM] Feroceon: L2 cache support

This patch adds support for the unified Feroceon L2 cache controller
as found in e.g. the Marvell Kirkwood and Marvell Discovery Duo
families of ARM SoCs.

Note that:

- Page table walks are outer uncacheable on Kirkwood and Discovery
  Duo, since the ARMv5 spec provides no way to indicate outer
  cacheability of page table walks (specifying it in TTBR[4:3] is
  an ARMv6+ feature).

  This requires adding L2 cache clean instructions to
  proc-feroceon.S (dcache_clean_area(), set_pte()) as well as to
  tlbflush.h ({flush,clean}_pmd_entry()).  The latter case is handled
  by defining a new TLB type (TLB_FEROCEON) which is almost identical
  to the v4wbi one but provides a TLB_L2CLEAN_FR flag.

- The Feroceon L2 cache controller supports L2 range (i.e. 'clean L2
  range by MVA' and 'invalidate L2 range by MVA') operations, and this
  patch uses those range operations for all Linux outer cache
  operations, as they are faster than the regular per-line operations.

  L2 range operations are not interruptible on this hardware, which
  avoids potential livelock issues, but can be bad for interrupt
  latency, so there is a compile-time tunable (MAX_RANGE_SIZE) which
  allows you to select the maximum range size to operate on at once.
  (Valid range is between one cache line and one 4KiB page, and must
  be a multiple of the line size.)

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Feroceon: L1 cache range operation support
Stanislav Samsonov [Tue, 3 Jun 2008 08:24:40 +0000 (11:24 +0300)]
[ARM] Feroceon: L1 cache range operation support

This patch adds support for the L1 D cache range operations that
are supported by the Marvell Discovery Duo and Marvell Kirkwood
ARM SoCs.

Signed-off-by: Stanislav Samsonov <samsonov@marvell.com>
Acked-by: Saeed Bishara <saeed@marvell.com>
Reviewed-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Loki: add defconfig
Lennert Buytenhek [Sun, 22 Jun 2008 20:45:02 +0000 (22:45 +0200)]
[ARM] Loki: add defconfig

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] add Marvell Loki (88RC8480) SoC support
Lennert Buytenhek [Sun, 22 Jun 2008 20:45:02 +0000 (22:45 +0200)]
[ARM] add Marvell Loki (88RC8480) SoC support

The Marvell Loki (88RC8480) is an ARM SoC based on a Feroceon CPU
core running at between 400 MHz and 1.0 GHz, and features a 64 bit
DDR controller, 512K of internal SRAM, two x4 PCI-Express ports,
two Gigabit Ethernet ports, two 4x SAS/SATA controllers, two UARTs,
two TWSI controllers, and IDMA/XOR engines.

This patch adds support for the Marvell LB88RC8480 Development
Board, enabling the use of the PCIe interfaces, the ethernet
interfaces, the TWSI interfaces and the UARTs.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: add a separate BRIDGE_INT_TIMER1_CLR define
Ke Wei [Fri, 23 May 2008 08:23:22 +0000 (10:23 +0200)]
[ARM] Orion: add a separate BRIDGE_INT_TIMER1_CLR define

Some Feroceon-based SoCs have an MBUS bridge interrupt controller
that requires writing a one instead of a zero to clear edge
interrupt sources such as timer expiry.

This patch adds a new BRIDGE_INT_TIMER1_CLR define, which platform
code can set to either ~BRIDGE_INT_TIMER1 (write-zero-to-clear) or
BRIDGE_INT_TIMER1 (write-one-to-clear) depending on the platform.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Feroceon: allow more old Feroceon IDs
Ke Wei [Sun, 22 Jun 2008 20:45:00 +0000 (22:45 +0200)]
[ARM] Feroceon: allow more old Feroceon IDs

There are a couple more Feroceon-based SoCs out in the field that use
different Variant and Architecture fields in their Main ID registers
-- this patch tweaks the processor match/mask in proc-feroceon.S to
catch those SoCs as well.

Signed-off-by: Ke Wei <kewei@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Feroceon: catch other Feroceon CPU IDs in head.S
Nicolas Pitre [Tue, 3 Jun 2008 21:06:21 +0000 (23:06 +0200)]
[ARM] Feroceon: catch other Feroceon CPU IDs in head.S

Tweak the Feroceon match/mask in arch/arm/boot/compressed/head.S to
match a couple of newer Feroceon cores (such as the 88fr571vd with
CPU ID 0x56155710, and the 88fr131 with CPU ID 0x56251310) as well.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Feroceon: speed up flushing of the entire cache
Nicolas Pitre [Thu, 24 Apr 2008 00:04:54 +0000 (02:04 +0200)]
[ARM] Feroceon: speed up flushing of the entire cache

Flushing the L1 D cache with a test/clean/invalidate loop is very
easy in software, but it is not the quickest way of doing it, as
there is a lot of overhead involved in re-scanning the cache from
the beginning every time we hit a dirty line.

This patch makes proc-feroceon.S use "clean+invalidate by set/way"
loops according to possible cache configuration of Feroceon CPUs
(either direct-mapped or 4-way set associative).

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: nuke orion5x_{read,write}
Lennert Buytenhek [Wed, 28 May 2008 14:43:48 +0000 (16:43 +0200)]
[ARM] Orion: nuke orion5x_{read,write}

Nuke the Orion-specific orion5x_{read,write} wrappers.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: use linux/serial_reg.h for Orion uncompress.h
Lennert Buytenhek [Wed, 4 Jun 2008 01:16:21 +0000 (03:16 +0200)]
[ARM] Orion: use linux/serial_reg.h for Orion uncompress.h

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: add Maxtor Shared Storage II support
Sylver Bruneau [Mon, 9 Jun 2008 23:00:38 +0000 (01:00 +0200)]
[ARM] Orion: add Maxtor Shared Storage II support

This patch adds support for the Maxtor Shared Storage II hardware.

Signed-off-by: Sylver Bruneau <sylver.bruneau@googlemail.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: add Technologic Systems TS-78xx support
Alexander Clouter [Sat, 31 May 2008 21:32:37 +0000 (22:32 +0100)]
[ARM] Orion: add Technologic Systems TS-78xx support

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: remove code duplication in TS209 and TS409 setup files
Sylver Bruneau [Sat, 31 May 2008 16:21:49 +0000 (18:21 +0200)]
[ARM] Orion: remove code duplication in TS209 and TS409 setup files

Signed-off-by: Sylver Bruneau <sylver.bruneau@googlemail.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: add HP Media Vault mv2120 support
Martin Michlmayr [Sun, 6 Apr 2008 12:08:17 +0000 (14:08 +0200)]
[ARM] Orion: add HP Media Vault mv2120 support

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: add Linksys WRT350N v2 support
Lennert Buytenhek [Sat, 31 May 2008 06:19:20 +0000 (08:19 +0200)]
[ARM] Orion: add Linksys WRT350N v2 support

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Tested-by: Dirk Teurlings <dirk@upexia.nl>
Tested-by: Peter van Valderen <p.v.valderen@gmail.com>
17 years ago[ARM] Orion: add 88F5181L (Orion-VoIP) support
Lennert Buytenhek [Sat, 31 May 2008 06:30:40 +0000 (08:30 +0200)]
[ARM] Orion: add 88F5181L (Orion-VoIP) support

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
17 years ago[ARM] Orion: add QNAP TS-409 support
Sylver Bruneau [Sat, 26 Apr 2008 00:35:29 +0000 (02:35 +0200)]
[ARM] Orion: add QNAP TS-409 support

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: implement power-off method for Kurobox Pro
Sylver Bruneau [Wed, 30 Apr 2008 06:14:58 +0000 (08:14 +0200)]
[ARM] Orion: implement power-off method for Kurobox Pro

This patch implements the communication with the microcontroller on the
Kurobox Pro and Linkstation Pro/Live boards.  This is allowing to send
the commands needed to power-off the board correctly.

Signed-off-by: Sylver Bruneau <sylver.bruneau@googlemail.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: avoid setting ->force_phy_addr
Lennert Buytenhek [Wed, 28 May 2008 14:17:39 +0000 (16:17 +0200)]
[ARM] Orion: avoid setting ->force_phy_addr

The mv643xx_eth platform data field ->force_phy_addr only needs
to be set if the passed-in ->phy_addr field is zero (to distinguish
the case of not having specified a phy address
(force_phy_addr = 0) from the case where a phy address of zero needs
to be used (force_phy_addr = 1.))

Also, the ->force_phy_addr field will hopefully disappear in a
future mv643xx_eth reorganisation.

Therefore, this patch deletes the ->force_phy_addr field initialiser
from all Orion board code.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: remove error printks in ->map_irq() implementations
Lennert Buytenhek [Fri, 6 Jun 2008 10:32:59 +0000 (12:32 +0200)]
[ARM] Orion: remove error printks in ->map_irq() implementations

If all PCI devices are working as expected, the error printks in the
various implementations of ->map_irq() doesn't really provide any
useful info.  And if something is not working as expected, turning
on pci=debug gives you more useful information than the printk calls
in ->map_irq(), since the former also tells you which devices _did_
get IRQs successfully assigned.  Therefore, delete these printks
entirely.

Spotted by Russell King.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
17 years ago[ARM] Orion: rework MPP handling
Lennert Buytenhek [Sat, 10 May 2008 21:25:46 +0000 (23:25 +0200)]
[ARM] Orion: rework MPP handling

Instead of having board code poke directly into the MPP configuration
registers, and separately calling orion5x_gpio_set_valid_pins() to
indicate which MPP pins can be used as GPIO pins, introduce a helper
function for configuring the roles of each of the MPP pins, and have
that helper function handle gpio validity internally.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Sylver Bruneau <sylver.bruneau@googlemail.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
17 years ago[ARM] Orion: move setting up PCIe WA window into PCIe setup path
Lennert Buytenhek [Sat, 10 May 2008 15:01:18 +0000 (17:01 +0200)]
[ARM] Orion: move setting up PCIe WA window into PCIe setup path

It makes no sense to do PCIe WA window setup in the individual
board support files while the decision whether or not to use the
PCIe WA access method is made in a different place, in the PCIe
support code.

This patch moves the configuration of a PCIe WA window from the
individual Orion board support files to the central Orion PCIe
support code.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
17 years ago[ARM] Orion: move EHCI/I2C/UART peripheral init into board code
Lennert Buytenhek [Tue, 22 Apr 2008 03:37:12 +0000 (05:37 +0200)]
[ARM] Orion: move EHCI/I2C/UART peripheral init into board code

This patch moves initialisation of EHCI/I2C/UART platform devices
from the common orion5x_init() into the board support code.

The rationale behind this is that only the board support code knows
whether certain peripherals have been brought out on the board, and
not initialising peripherals that haven't been brought out is
desirable for example:
- to reduce user confusion (e.g. seeing both 'eth0' and 'eth1'
  appear while there is only one ethernet port on the board); and
- to allow for future power savings (peripherals that have not
  been brought out can be clock gated off entirely).

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
17 years ago[ARM] Orion: delete unused IO_SPACE_REMAP define
Lennert Buytenhek [Wed, 28 May 2008 14:20:56 +0000 (16:20 +0200)]
[ARM] Orion: delete unused IO_SPACE_REMAP define

This define isn't used anywhere in the kernel tree -- nuke it.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
17 years ago[ARM] Orion: top-level IRQs are level-triggered
Lennert Buytenhek [Sun, 18 May 2008 17:46:59 +0000 (19:46 +0200)]
[ARM] Orion: top-level IRQs are level-triggered

Make it clear that Orion top-level IRQs are level-triggered.  This
means that we don't need an ->ack() handler, or at least, we don't
need the ->ack() handler (or the acking part of the ->mask_ack()
handler) to actually do anything.

Given that, we might as well point our ->mask_ack() handler at the
->mask() handler instead of providing a dummy ->ack() handler, since
providing a ->mask_ack() handler on level IRQ sources will prevent
->ack() from ever being called.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
17 years ago[ARM] Feroceon: annotate 88fr531-vd CPU entries
Lennert Buytenhek [Fri, 11 Apr 2008 21:08:26 +0000 (23:08 +0200)]
[ARM] Feroceon: annotate 88fr531-vd CPU entries

Annotate the entries for the 88fr531-vd CPU core in
arch/arm/boot/compressed/head.S and arch/arm/mm/proc-feroceon.S
with the full name of the core.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
17 years ago[ARM] Orion: DRAM mapping granularity is 64KiB, not 16MiB
Lennert Buytenhek [Fri, 23 May 2008 06:34:42 +0000 (08:34 +0200)]
[ARM] Orion: DRAM mapping granularity is 64KiB, not 16MiB

The DRAM base address and size fields in the CPU's MBUS bridge have
64KiB granularity, instead of the currently used 16MiB.  Since all
of the currently supported MBUS peripherals support 64KiB granularity
as well, this patch changes the Orion address map code to stop
rounding base addresses down and sizes up to multiples of 16MiB.

Found by Ke Wei <kewei@marvell.com>.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>