pandora-kernel.git
15 years ago[XFS] Remove xfs_iflush_all and clean up xfs_finish_reclaim_all()
David Chinner [Thu, 30 Oct 2008 06:06:28 +0000 (17:06 +1100)]
[XFS] Remove xfs_iflush_all and clean up xfs_finish_reclaim_all()

xfs_iflush_all() walks the m_inodes list to find inodes that need
reclaiming. We already have such a list - the m_del_inodes list. Replace
xfs_iflush_all() with a call to xfs_finish_reclaim_all() and clean up
xfs_finish_reclaim_all() to handle the different flush modes now needed.

Originally based on a patch from Christoph Hellwig.

Version 3 o rediff against new linux-2.6/xfs_sync.c code

Version 2 o revert xfs_syncsub() inode reclaim behaviour back to original

code o xfs_quiesce_fs() should use XFS_IFLUSH_DELWRI_ELSE_ASYNC, not

XFS_IFLUSH_ASYNC, to prevent change of behaviour.

SGI-PV: 988139

SGI-Modid: xfs-linux-melb:xfs-kern:32284a

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
15 years ago[XFS] move xfssyncd code to xfs_sync.c
David Chinner [Thu, 30 Oct 2008 06:06:18 +0000 (17:06 +1100)]
[XFS] move xfssyncd code to xfs_sync.c

Move all the xfssyncd code to the new xfs_sync.c file. This places it
closer to the actual code that it interacts with, rather than just being
associated with high level VFS code.

SGI-PV: 988139

SGI-Modid: xfs-linux-melb:xfs-kern:32283a

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
15 years ago[XFS] move sync code to its own file
David Chinner [Thu, 30 Oct 2008 06:06:08 +0000 (17:06 +1100)]
[XFS] move sync code to its own file

The sync code in XFS is spread around several files. While it used to make
sense to have such a distribution, the code is about to be cleaned up and
so centralising it in one spot as the first step makes sense.

SGI-PV: 988139

SGI-Modid: xfs-linux-melb:xfs-kern:32282a

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
15 years ago[XFS] Show buffer address with debug hexdump on corruption
Barry Naujok [Thu, 30 Oct 2008 06:05:58 +0000 (17:05 +1100)]
[XFS] Show buffer address with debug hexdump on corruption

SGI-PV: 987246

SGI-Modid: xfs-linux-melb:xfs-kern:32233a

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
15 years ago[XFS] Check agf_btreeblks is valid when reading in the AGF
Barry Naujok [Thu, 30 Oct 2008 06:05:49 +0000 (17:05 +1100)]
[XFS] Check agf_btreeblks is valid when reading in the AGF

SGI-PV: 987683

SGI-Modid: xfs-linux-melb:xfs-kern:32232a

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
15 years ago[XFS] Sync up kernel and user-space headers
Barry Naujok [Thu, 30 Oct 2008 06:05:38 +0000 (17:05 +1100)]
[XFS] Sync up kernel and user-space headers

SGI-PV: 986558

SGI-Modid: xfs-linux-melb:xfs-kern:32231a

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
15 years ago[XFS] Make xfs_btree_check_ptr() debug-only code.
Lachlan McIlroy [Thu, 30 Oct 2008 06:05:26 +0000 (17:05 +1100)]
[XFS] Make xfs_btree_check_ptr() debug-only code.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32224a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
15 years ago[XFS] Fix build brakage from patch "Clean up dquot pincount code"
Peter Leckie [Thu, 30 Oct 2008 06:05:18 +0000 (17:05 +1100)]
[XFS] Fix build brakage from patch "Clean up dquot pincount code"

This is a fix for patch " Clean up dquot pincount code" which introduced a
build breakage due to a missing & in xfs_qm_dquot_logitem_pin.

SGI-PV: 986789

SGI-Modid: xfs-linux-melb:xfs-kern:32221a

Signed-off-by: Peter Leckie <pleckie@sgi.com>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
15 years ago[XFS] Clean up dquot pincount code.
Peter Leckie [Thu, 30 Oct 2008 06:05:04 +0000 (17:05 +1100)]
[XFS] Clean up dquot pincount code.

This is a code cleanup and optimization that removes a per mount point
spinlock from the quota code and cleans up the code.

The patch changes the pincount from being an int protected by a spinlock
to an atomic_t allowing the pincount to be manipulated without holding the
spinlock.

This cleanup also protects against random wakup's of both the aild and
xfssyncd by reevaluating the pincount after been woken. Two latter patches
will address the Spurious wakeups.

SGI-PV: 986789

SGI-Modid: xfs-linux-melb:xfs-kern:32215a

Signed-off-by: Peter Leckie <pleckie@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
15 years ago[XFS] Wait for all I/O on truncate to zero file size
Lachlan McIlroy [Thu, 30 Oct 2008 05:59:06 +0000 (16:59 +1100)]
[XFS] Wait for all I/O on truncate to zero file size

It's possible to have outstanding xfs_ioend_t's queued when the file size
is zero. This can happen in the direct I/O path when a direct I/O write
fails due to ENOSPC. In this case the xfs_ioend_t will still be queued (ie
xfs_end_io_direct() does not know that the I/O failed so can't force the
xfs_ioend_t to be flushed synchronously).

When we truncate a file on unlink we don't know to wait for these
xfs_ioend_ts and we can have a use-after-free situation if the inode is
reclaimed before the xfs_ioend_t is finally processed.

As was suggested by Dave Chinner lets wait for all I/Os to complete when
truncating the file size to zero.

SGI-PV: 981668

SGI-Modid: xfs-linux-melb:xfs-kern:32216a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
15 years ago[XFS] make btree tracing generic
Christoph Hellwig [Thu, 30 Oct 2008 05:58:50 +0000 (16:58 +1100)]
[XFS] make btree tracing generic

Make the existing bmap btree tracing generic so that it applies to all
btree types.

Some fragments lifted from a patch by Dave Chinner.

This adds two files that were missed from the previous btree tracing
checkin.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32210a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] mark various functions in xfs_btree.c static
Christoph Hellwig [Thu, 30 Oct 2008 05:58:41 +0000 (16:58 +1100)]
[XFS] mark various functions in xfs_btree.c static

Lots of functionality in xfs_btree.c isn't needed by callers outside of
this file anymore, so mark these functions static.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32209a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] add keys_inorder and recs_inorder btree methods
Christoph Hellwig [Thu, 30 Oct 2008 05:58:32 +0000 (16:58 +1100)]
[XFS] add keys_inorder and recs_inorder btree methods

Add methods to check whether two keys/records are in the righ order. This
replaces the xfs_btree_check_key and xfs_btree_check_rec methods. For the
callers from xfs_bmap.c just opencode the bmbt-specific asserts.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32208a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] kill xfs_bmbt_log_block and xfs_bmbt_log_recs
Christoph Hellwig [Thu, 30 Oct 2008 05:58:21 +0000 (16:58 +1100)]
[XFS] kill xfs_bmbt_log_block and xfs_bmbt_log_recs

These are equivalent to the xfs_btree_* versions, and the only remaining
caller can be switched to the generic one after they are exported. Also
remove some now dead infrastructure in xfs_bmap_btree.c.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32207a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement generic xfs_btree_get_rec
Christoph Hellwig [Thu, 30 Oct 2008 05:58:11 +0000 (16:58 +1100)]
[XFS] implement generic xfs_btree_get_rec

Not really much reason to make it generic given that it's so small, but
this is the last non-method in xfs_alloc_btree.c and xfs_ialloc_btree.c,
so it makes the whole btree implementation more structured.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32206a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement generic xfs_btree_delete/delrec
Christoph Hellwig [Thu, 30 Oct 2008 05:58:01 +0000 (16:58 +1100)]
[XFS] implement generic xfs_btree_delete/delrec

Make the btree delete code generic. Based on a patch from David Chinner
with lots of changes to follow the original btree implementations more
closely. While this loses some of the generic helper routines for
inserting/moving/removing records it also solves some of the one off bugs
in the original code and makes it easier to verify.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32205a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] move xfs_bmbt_killroot to common code
Christoph Hellwig [Thu, 30 Oct 2008 05:57:51 +0000 (16:57 +1100)]
[XFS] move xfs_bmbt_killroot to common code

xfs_bmbt_killroot is a mostly generic implementation of moving from a real
block based root to an inode based root. So move it to xfs_btree.c where
it can use all the nice infrastructure there and make it pointer size
agnostic

The new name for it is xfs_btree_kill_iroot, following the old naming but
making it clear we're dealing with the root in inode case here, and to
avoid confusion with xfs_btree_new_root which is used for the not inode
rooted case. I've also added a comment describing what it does and why
it's named the way it is.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32203a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement generic xfs_btree_insert/insrec
Christoph Hellwig [Thu, 30 Oct 2008 05:57:40 +0000 (16:57 +1100)]
[XFS] implement generic xfs_btree_insert/insrec

Make the btree insert code generic. Based on a patch from David Chinner
with lots of changes to follow the original btree implementations more
closely. While this loses some of the generic helper routines for
inserting/moving/removing records it also solves some of the one off bugs
in the original code and makes it easier to verify.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32202a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] move xfs_bmbt_newroot to common code
Christoph Hellwig [Thu, 30 Oct 2008 05:57:28 +0000 (16:57 +1100)]
[XFS] move xfs_bmbt_newroot to common code

xfs_bmbt_newroot is a mostly generic implementation of moving from an
inode root to a real block based root. So move it to xfs_btree.c where it
can use all the nice infrastructure there and make it pointer size
agnostic

The new name for it is xfs_btree_new_iroot, following the old naming but
making it clear we're dealing with the root in inode case here, and to
avoid confusion with xfs_btree_new_root which is used for the not inode
rooted case.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32201a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement semi-generic xfs_btree_new_root
Christoph Hellwig [Thu, 30 Oct 2008 05:57:16 +0000 (16:57 +1100)]
[XFS] implement semi-generic xfs_btree_new_root

From: Dave Chinner <dgc@sgi.com>

Add a xfs_btree_new_root helper for the alloc and ialloc btrees. The bmap
btree needs it's own version and is not converted.

[hch: split out from bigger patch and minor adaptions]

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32200a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement generic xfs_btree_split
Christoph Hellwig [Thu, 30 Oct 2008 05:57:03 +0000 (16:57 +1100)]
[XFS] implement generic xfs_btree_split

Make the btree split code generic. Based on a patch from David Chinner
with lots of changes to follow the original btree implementations more
closely. While this loses some of the generic helper routines for
inserting/moving/removing records it also solves some of the one off bugs
in the original code and makes it easier to verify.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32198a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement generic xfs_btree_lshift
Christoph Hellwig [Thu, 30 Oct 2008 05:56:53 +0000 (16:56 +1100)]
[XFS] implement generic xfs_btree_lshift

Make the btree left shift code generic. Based on a patch from David
Chinner with lots of changes to follow the original btree implementations
more closely. While this loses some of the generic helper routines for
inserting/moving/removing records it also solves some of the one off bugs
in the original code and makes it easier to verify.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32197a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement generic xfs_btree_rshift
Christoph Hellwig [Thu, 30 Oct 2008 05:56:43 +0000 (16:56 +1100)]
[XFS] implement generic xfs_btree_rshift

Make the btree right shift code generic. Based on a patch from David
Chinner with lots of changes to follow the original btree implementations
more closely. While this loses some of the generic helper routines for
inserting/moving/removing records it also solves some of the one off bugs
in the original code and makes it easier to verify.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32196a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement generic xfs_btree_update
Christoph Hellwig [Thu, 30 Oct 2008 05:56:32 +0000 (16:56 +1100)]
[XFS] implement generic xfs_btree_update

From: Dave Chinner <dgc@sgi.com>

The most complicated part here is the lastrec tracking for the alloc
btree. Most logic is in the update_lastrec method which has to do some
hopefully good enough dirty magic to maintain it.

[hch: split out from bigger patch and a rework of the lastrec

logic]

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32194a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement generic xfs_btree_updkey
Christoph Hellwig [Thu, 30 Oct 2008 05:56:22 +0000 (16:56 +1100)]
[XFS] implement generic xfs_btree_updkey

From: Dave Chinner <dgc@sgi.com>

Note that there are many > 80 char lines introduced due to the
xfs_btree_key casts. But the places where this happens is throw-away code
once the whole btree code gets merged into a common implementation.

The same is true for the temporary xfs_alloc_log_keys define to the new
name. All old users will be gone after a few patches.

[hch: split out from bigger patch and minor adaptions]

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32193a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement generic xfs_btree_lookup
Christoph Hellwig [Thu, 30 Oct 2008 05:56:09 +0000 (16:56 +1100)]
[XFS] implement generic xfs_btree_lookup

From: Dave Chinner <dgc@sgi.com>

[hch: split out from bigger patch and minor adaptions]

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32192a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement generic xfs_btree_decrement
Christoph Hellwig [Thu, 30 Oct 2008 05:55:58 +0000 (16:55 +1100)]
[XFS] implement generic xfs_btree_decrement

From: Dave Chinner <dgc@sgi.com>

[hch: split out from bigger patch and minor adaptions]

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32191a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] implement generic xfs_btree_increment
Christoph Hellwig [Thu, 30 Oct 2008 05:55:45 +0000 (16:55 +1100)]
[XFS] implement generic xfs_btree_increment

From: Dave Chinner <dgc@sgi.com>

Because this is the first major generic btree routine this patch includes
some infrastrucure, first a few routines to deal with a btree block that
can be either in short or long form, second xfs_btree_read_buf_block,
which is the new central routine to read a btree block given a cursor, and
third the new xfs_btree_ptr_addr routine to calculate the address for a
given btree pointer record.

[hch: split out from bigger patch and minor adaptions]

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32190a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] add helpers for addressing entities inside a btree block
Christoph Hellwig [Thu, 30 Oct 2008 05:55:34 +0000 (16:55 +1100)]
[XFS] add helpers for addressing entities inside a btree block

Add new helpers in xfs_btree.c to find the record, key and block pointer
entries inside a btree block. To implement this genericly the
->get_maxrecs methods and two new xfs_btree_ops entries for the key and
record sizes are used. Also add a big comment describing how the
addressing inside a btree block works.

Note that these helpers are unused until users are introduced in the next
patches and this patch will thus cause some harmless compiler warnings.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32189a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] add get_maxrecs btree operation
Christoph Hellwig [Thu, 30 Oct 2008 05:55:23 +0000 (16:55 +1100)]
[XFS] add get_maxrecs btree operation

Factor xfs_btree_maxrecs into a per-btree operation.

The get_maxrecs method is based on a patch from Dave Chinner.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32188a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] make btree tracing generic
Christoph Hellwig [Thu, 30 Oct 2008 05:55:13 +0000 (16:55 +1100)]
[XFS] make btree tracing generic

Make the existing bmap btree tracing generic so that it applies to all
btree types.

Some fragments lifted from a patch by Dave Chinner.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32187a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] add new btree statistics
David Chinner [Thu, 30 Oct 2008 05:55:03 +0000 (16:55 +1100)]
[XFS] add new btree statistics

From: Dave Chinner <dgc@sgi.com>

Introduce statistics coverage of all the btrees and cover all the btree
operations, not just some.

Invaluable for determining test code coverage of all the btree
operations....

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32184a

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
15 years ago[XFS] refactor btree validation helpers
Christoph Hellwig [Thu, 30 Oct 2008 05:54:53 +0000 (16:54 +1100)]
[XFS] refactor btree validation helpers

Move the various btree validation helpers around in xfs_btree.c so that
they are close to each other and in common #ifdef DEBUG sections.

Also add a new xfs_btree_check_ptr helper to check a btree ptr that can be
either long or short form.

Split out from a bigger patch from Dave Chinner with various small changes
applied by me.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32183a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] refactor xfs_btree_readahead
Christoph Hellwig [Thu, 30 Oct 2008 05:54:43 +0000 (16:54 +1100)]
[XFS] refactor xfs_btree_readahead

From: Dave Chinner <dgc@sgi.com>

Refactor xfs_btree_readahead to make it more readable:

(a) remove the inline xfs_btree_readahead wrapper and move all checks out

of line into the main routine.

(b) factor out helpers for short/long form btrees

(c) move check for root in inodes from the callers into
xfs_btree_readahead

[hch: split out from a big patch and minor cleanups]

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32182a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] add a long pointers flag to xfs_btree_cur
Christoph Hellwig [Thu, 30 Oct 2008 05:54:33 +0000 (16:54 +1100)]
[XFS] add a long pointers flag to xfs_btree_cur

Add a flag to the xfs btree cursor when using long (64bit) block pointers
instead of checking btnum == XFS_BTNUM_BMAP.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32181a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] make btree root in inode support generic
Christoph Hellwig [Thu, 30 Oct 2008 05:54:22 +0000 (16:54 +1100)]
[XFS] make btree root in inode support generic

The bmap btree is rooted in the inode and not in a disk block. Make the
support for this feature more generic by adding a btree flag to for this
feature instead of relying on the XFS_BTNUM_BMAP btnum check.

Also clean up xfs_btree_get_block where this new flag is used.

Based upon a patch from Dave Chinner.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32180a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] add generic btree types
Christoph Hellwig [Thu, 30 Oct 2008 05:54:12 +0000 (16:54 +1100)]
[XFS] add generic btree types

Add generic union types for btree pointers, keys and records. The generic
btree pointer contains either a 32 and 64bit big endian scalar for short
and long form btrees, and the key and record contain the relevant type for
each possible btree.

Split out from a bigger patch from Dave Chinner and simplified a little
further.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32178a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] split up xfs_btree_init_cursor
Christoph Hellwig [Thu, 30 Oct 2008 05:53:59 +0000 (16:53 +1100)]
[XFS] split up xfs_btree_init_cursor

xfs_btree_init_cursor contains close to little shared code for the
different btrees and will get even more non-common code in the future.
Split it up into one routine per btree type.

Because xfs_btree_dup_cursor needs to call the init routine for a generic
btree cursor add a new btree operation vector that contains a dup_cursor
method that initializes a new cursor based on an existing one.

The btree operations vector is based on an idea and code from Dave Chinner
and will grow more entries later during this series.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32176a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] kill struct xfs_btree_hdr
Christoph Hellwig [Thu, 30 Oct 2008 05:53:47 +0000 (16:53 +1100)]
[XFS] kill struct xfs_btree_hdr

This type is only embedded in struct xfs_btree_block and never used
directly. By moving the fields directly into struct xfs_btree_block a lot
of the macros for struct xfs_btree_sblock and struct xfs_btree_lblock can
be used for struct xfs_btree_block too now which helps greatly with some
of the migrations during implementing the generic btree code.

SGI-PV: 985583

SGI-Modid: xfs-linux-melb:xfs-kern:32174a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Bill O'Donnell <billodo@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] Unlock inode before calling xfs_idestroy()
Lachlan McIlroy [Thu, 30 Oct 2008 05:53:38 +0000 (16:53 +1100)]
[XFS] Unlock inode before calling xfs_idestroy()

Lock debugging reported the ilock was being destroyed without being
unlocked. We don't need to lock the inode until we are going to insert it
into the radix tree.

SGI-PV: 987246

SGI-Modid: xfs-linux-melb:xfs-kern:32159a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
15 years ago[XFS] Fix use-after-free with log and quotas
Lachlan McIlroy [Thu, 30 Oct 2008 05:53:25 +0000 (16:53 +1100)]
[XFS] Fix use-after-free with log and quotas

Destroying the quota stuff on unmount can access the log - ie
XFS_QM_DONE() ends up in xfs_dqunlock() which calls
xfs_trans_unlocked_item() and then xfs_log_move_tail(). By this time the
log has already been destroyed. Just move the cleanup of the quota code
earlier in xfs_unmountfs() before the call to xfs_log_unmount(). Moving
XFS_QM_DONE() up near XFS_QM_DQPURGEALL() seems like a good spot.

SGI-PV: 987086

SGI-Modid: xfs-linux-melb:xfs-kern:32148a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Peter Leckie <pleckie@sgi.com>
15 years ago[XFS] Remove final remnants of dirv1 macros and other stuff
Barry Naujok [Thu, 30 Oct 2008 05:52:35 +0000 (16:52 +1100)]
[XFS] Remove final remnants of dirv1 macros and other stuff

SGI-PV: 981498

SGI-Modid: xfs-linux-melb:xfs-kern:32002a

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
15 years ago[XFS] Use xfs_idestroy() to cleanup an inode.
Lachlan McIlroy [Thu, 30 Oct 2008 05:50:35 +0000 (16:50 +1100)]
[XFS] Use xfs_idestroy() to cleanup an inode.

SGI-PV: 981498

SGI-Modid: xfs-linux-melb:xfs-kern:31927a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
15 years ago[XFS] Remove kmem_zone_t argument from xfs_inode_init_once()
Lachlan McIlroy [Thu, 30 Oct 2008 05:42:34 +0000 (16:42 +1100)]
[XFS] Remove kmem_zone_t argument from xfs_inode_init_once()

kmem cache constructor no longer takes a kmem_zone_t argument.

SGI-PV: 957103

SGI-Modid: xfs-linux-melb:xfs-kern:32254a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
15 years ago[XFS] Make use of the init-once slab optimisation.
David Chinner [Thu, 30 Oct 2008 05:11:59 +0000 (16:11 +1100)]
[XFS] Make use of the init-once slab optimisation.

To avoid having to initialise some fields of the XFS inode on every
allocation, we can use the slab init-once feature to initialise them. All
we have to guarantee is that when we free the inode, all it's entries are
in the initial state. Add asserts where possible to ensure debug kernels
check this initial state before freeing and after allocation.

SGI-PV: 981498

SGI-Modid: xfs-linux-melb:xfs-kern:31925a

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
15 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 28 Oct 2008 16:52:25 +0000 (09:52 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits)
  ftrace: fix current_tracer error return
  tracing: fix a build error on alpha
  ftrace: use a real variable for ftrace_nop in x86
  tracing/ftrace: make boot tracer select the sched_switch tracer
  tracepoint: check if the probe has been registered
  asm-generic: define DIE_OOPS in asm-generic
  trace: fix printk warning for u64
  ftrace: warning in kernel/trace/ftrace.c
  ftrace: fix build failure
  ftrace, powerpc, sparc64, x86: remove notrace from arch ftrace file
  ftrace: remove ftrace hash
  ftrace: remove mcount set
  ftrace: remove daemon
  ftrace: disable dynamic ftrace for all archs that use daemon
  ftrace: add ftrace warn on to disable ftrace
  ftrace: only have ftrace_kill atomic
  ftrace: use probe_kernel
  ftrace: comment arch ftrace code
  ftrace: return error on failed modified text.
  ftrace: dynamic ftrace process only text section
  ...

15 years agoMerge branch 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 28 Oct 2008 16:50:11 +0000 (09:50 -0700)]
Merge branch 'kvm-updates/2.6.28' of git://git./linux/kernel/git/avi/kvm

* 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: ia64: Makefile fix for forcing to re-generate asm-offsets.h
  KVM: Future-proof device assignment ABI
  KVM: ia64: Fix halt emulation logic
  KVM: Fix guest shared interrupt with in-kernel irqchip
  KVM: MMU: sync root on paravirt TLB flush

15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 28 Oct 2008 16:49:27 +0000 (09:49 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./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:
  lockdep: fix irqs on/off ip tracing
  lockdep: minor fix for debug_show_all_locks()
  x86: restore the old swiotlb alloc_coherent behavior
  x86: use GFP_DMA for 24bit coherent_dma_mask
  swiotlb: remove panic for alloc_coherent failure
  xen: compilation fix of drivers/xen/events.c on IA64
  xen: portability clean up and some minor clean up for xencomm.c
  xen: don't reload cr3 on suspend
  kernel/resource: fix reserve_region_with_split() section mismatch
  printk: remove unused code from kernel/printk.c

15 years agoMerge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 28 Oct 2008 16:48:25 +0000 (09:48 -0700)]
Merge branch 'irq-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  irq: make variable static

15 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 28 Oct 2008 16:46:20 +0000 (09:46 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./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: fix documentation reference for sched_min_granularity_ns
  sched: virtual time buddy preemption
  sched: re-instate vruntime based wakeup preemption
  sched: weaken sync hint
  sched: more accurate min_vruntime accounting
  sched: fix a find_busiest_group buglet
  sched: add CONFIG_SMP consistency

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 28 Oct 2008 16:45:31 +0000 (09:45 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./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:
  x86, memory hotplug: remove wrong -1 in calling init_memory_mapping()
  x86: keep the /proc/meminfo page count correct
  x86/uv: memory allocation at initialization
  xen: fix Xen domU boot with batched mprotect

15 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Tue, 28 Oct 2008 16:44:59 +0000 (09:44 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] s390: Fix build for !CONFIG_S390_GUEST + CONFIG_VIRTIO_CONSOLE
  [S390] No more 4kb stacks.
  [S390] Change default IPL method to IPL_VM.
  [S390] tape: disable interrupts in tape_open and tape_release
  [S390] appldata: unsigned ops->size cannot be negative
  [S390] tape block: complete request with correct locking
  [S390] Fix sysdev class file creation.
  [S390] pgtables: Fix race in enable_sie vs. page table ops
  [S390] qdio: remove incorrect memset
  [S390] qdio: prevent double qdio shutdown in case of I/O errors

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 28 Oct 2008 16:42:48 +0000 (09:42 -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:
  libata: ahci enclosure management bit mask
  libata: ahci enclosure management led sync
  pata_ninja32: suspend/resume support
  libata: Fix LBA48 on pata_it821x RAID volumes.
  libata: clear saved xfer_mode and ncq_enabled on device detach
  sata_sil24: configure max read request size to 4k
  libata: add missing kernel-doc
  libata: fix device iteration bugs
  ahci: Add support for Promise PDC42819
  ata: Switch all my stuff to a common address

15 years agoftrace: fix current_tracer error return
Steven Rostedt [Tue, 28 Oct 2008 14:44:24 +0000 (10:44 -0400)]
ftrace: fix current_tracer error return

The commit (in linux-tip) c2931e05ec5965597cbfb79ad332d4a29aeceb23
 ( ftrace: return an error when setting a nonexistent tracer )
added useful code that would error when a bad tracer was written into
the current_tracer file.

But this had a bug if the amount written was more than the amount read by
that code. The first iteration would set the tracer correctly, but since
it did not consume the rest of what was written (usually whitespace), the
userspace utility would continue to write what was not consumed. This
second iteration would fail to find a tracer and return -EINVAL. Funny
thing is that the tracer would have already been set.

This patch just consumes all the data that is written to the file.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoKVM: ia64: Makefile fix for forcing to re-generate asm-offsets.h
Xiantao Zhang [Thu, 23 Oct 2008 02:37:06 +0000 (10:37 +0800)]
KVM: ia64: Makefile fix for forcing to re-generate asm-offsets.h

To avoid using stale asm-offsets.h.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
15 years agoKVM: Future-proof device assignment ABI
Avi Kivity [Sun, 19 Oct 2008 14:39:45 +0000 (16:39 +0200)]
KVM: Future-proof device assignment ABI

Reserve some space so we can add more data.

Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoKVM: ia64: Fix halt emulation logic
Xiantao Zhang [Thu, 16 Oct 2008 07:58:15 +0000 (15:58 +0800)]
KVM: ia64: Fix halt emulation logic

Common halt logic was changed by x86 and did not update ia64.  This patch
updates halt for ia64.

Fixes a regression causing guests to hang with more than 2 vcpus.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
15 years agoKVM: Fix guest shared interrupt with in-kernel irqchip
Sheng Yang [Wed, 15 Oct 2008 12:15:06 +0000 (20:15 +0800)]
KVM: Fix guest shared interrupt with in-kernel irqchip

Every call of kvm_set_irq() should offer an irq_source_id, which is
allocated by kvm_request_irq_source_id(). Based on irq_source_id, we
identify the irq source and implement logical OR for shared level
interrupts.

The allocated irq_source_id can be freed by kvm_free_irq_source_id().

Currently, we support at most sizeof(unsigned long) different irq sources.

[Amit: - rebase to kvm.git HEAD
       - move definition of KVM_USERSPACE_IRQ_SOURCE_ID to common file
       - move kvm_request_irq_source_id to the update_irq ioctl]

[Xiantao: - Add kvm/ia64 stuff and make it work for kvm/ia64 guests]

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
15 years agoKVM: MMU: sync root on paravirt TLB flush
Marcelo Tosatti [Wed, 15 Oct 2008 09:45:08 +0000 (07:45 -0200)]
KVM: MMU: sync root on paravirt TLB flush

The pvmmu TLB flush handler should request a root sync, similarly to
a native read-write CR3.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
15 years agolockdep: fix irqs on/off ip tracing
Heiko Carstens [Tue, 28 Oct 2008 10:14:58 +0000 (11:14 +0100)]
lockdep: fix irqs on/off ip tracing

Impact: fix lockdep lock-api-caller output when irqsoff tracing is enabled

81d68a96 "ftrace: trace irq disabled critical timings" added wrappers around
trace_hardirqs_on/off_caller. However these functions use
__builtin_return_address(0) to figure out which function actually disabled
or enabled irqs. The result is that we save the ips of trace_hardirqs_on/off
instead of the real caller. Not very helpful.

However since the patch from Steven the ip already gets passed. So use that
and get rid of __builtin_return_address(0) in these two functions.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[S390] s390: Fix build for !CONFIG_S390_GUEST + CONFIG_VIRTIO_CONSOLE
Christian Borntraeger [Tue, 28 Oct 2008 10:10:22 +0000 (11:10 +0100)]
[S390] s390: Fix build for !CONFIG_S390_GUEST + CONFIG_VIRTIO_CONSOLE

The s390 kernel does not compile if virtio console is enabled, but guest
support is disabled:

  LD      .tmp_vmlinux1
arch/s390/kernel/built-in.o: In function `setup_arch':
/space/linux-2.5/arch/s390/kernel/setup.c:773: undefined reference to
`s390_virtio_console_init'

The fix is related to
commit 99e65c92f2bbf84f43766a8bf701e36817d62822
Author: Christian Borntraeger <borntraeger@de.ibm.com>
Date:   Fri Jul 25 15:50:04 2008 +0200
    KVM: s390: Fix guest kconfig

Which changed the build process to build kvm_virtio.c only if CONFIG_S390_GUEST
is set. We must ifdef the prototype in the header file accordingly.

Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] No more 4kb stacks.
Heiko Carstens [Tue, 28 Oct 2008 10:10:21 +0000 (11:10 +0100)]
[S390] No more 4kb stacks.

We got a stack overflow with a small stack configuration on a 32 bit
system. It just looks like as 4kb isn't enough and too dangerous.
So lets get rid of 4kb stacks on 32 bit.

But one thing I completely dislike about the call trace below is that
just for debugging or tracing purposes sprintf gets called (cio_start_key):

/* process condition code */
sprintf(dbf_txt, "ccode:%d", ccode);
CIO_TRACE_EVENT(4, dbf_txt);

But maybe its just me who thinks that this could be done better.

    <4>Kernel stack overflow.
    <4>Modules linked in: dm_multipath sunrpc bonding qeth_l2 dm_mod qeth ccwgroup vmur
    <4>CPU: 1 Not tainted 2.6.27-30.x.20081015-s390default #1
    <4>Process httpd (pid: 3807, task: 20ae2df8, ksp: 1666fb78)
    <4>Krnl PSW : 040c0000 8027098a (number+0xe/0x348)
    <4>           R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:0 PM:0
    <4>Krnl GPRS: 00d43318 0027097c 1666f277 9666f270
    <4>           00000000 00000000 0000000a ffffffff
    <4>           9666f270 1666f228 1666f277 1666f098
    <4>           00000002 80270982 80271016 1666f098
    <4>Krnl Code: 8027097ef0340dd0a7f1 srp 3536(4,%r0),2033(%r10),4
    <4>           80270984: 0f00 clcl %r0,%r0
    <4>           80270986a7840001 brc 8,80270988
    <4>          >8027098a: 18ef lr %r14,%r15
    <4>           8027098ca7faff68 ahi %r15,-152
    <4>           80270990: 18bf lr %r11,%r15
    <4>           80270992: 18a2 lr %r10,%r2
    <4>           80270994: 1893 lr %r9,%r3

Modified calltrace with annotated stackframe size of each function:

stackframe size
    |
 0 304 vsnprintf+850 [0x271016]
 1  72 sprintf+74 [0x271522]
 2  56 cio_start_key+262 [0x2d4c16]
 3  56 ccw_device_start_key+222 [0x2dfe92]
 4  56 ccw_device_start+40 [0x2dff28]
 5  48 raw3215_start_io+104 [0x30b0f8]
 6  56 raw3215_write+494 [0x30ba0a]
 7  40 con3215_write+68 [0x30bafc]
 8  40 __call_console_drivers+146 [0x12b0fa]
 9  32 _call_console_drivers+102 [0x12b192]
10  64 release_console_sem+268 [0x12b614]
11 168 vprintk+462 [0x12bca6]
12  72 printk+68 [0x12bfd0]
13 256 __print_symbol+50 [0x15a882]
14  56 __show_trace+162 [0x103d06]
15  32 show_trace+224 [0x103e70]
16  48 show_stack+152 [0x103f20]
17  56 dump_stack+126 [0x104612]
18  96 __alloc_pages_internal+592 [0x175004]
19  80 cache_alloc_refill+776 [0x196f3c]
20  40 __kmalloc+258 [0x1972ae]
21  40 __alloc_skb+94 [0x328086]
22  32 pskb_copy+50 [0x328252]
23  32 skb_realloc_headroom+110 [0x328a72]
24 104 qeth_l2_hard_start_xmit+378 [0x7803bfde]
25  56 dev_hard_start_xmit+450 [0x32ef6e]
26  56 __qdisc_run+390 [0x3425d6]
27  48 dev_queue_xmit+410 [0x331e06]
28  40 ip_finish_output+308 [0x354ac8]
29  56 ip_output+218 [0x355b6e]
30  24 ip_local_out+56 [0x354584]
31 120 ip_queue_xmit+300 [0x355cec]
32  96 tcp_transmit_skb+812 [0x367da8]
33  40 tcp_push_one+158 [0x369fda]
34 112 tcp_sendmsg+852 [0x35d5a0]
35 240 sock_sendmsg+164 [0x32035c]
36  56 kernel_sendmsg+86 [0x32064a]
37  88 sock_no_sendpage+98 [0x322b22]
38 104 tcp_sendpage+70 [0x35cc1e]
39  48 sock_sendpage+74 [0x31eb66]
40  64 pipe_to_sendpage+102 [0x1c4b2e]
41  64 __splice_from_pipe+120 [0x1c5340]
42  72 splice_from_pipe+90 [0x1c57e6]
43  56 generic_splice_sendpage+38 [0x1c5832]
44  48 do_splice_from+104 [0x1c4c38]
45  48 direct_splice_actor+52 [0x1c4c88]
46  80 splice_direct_to_actor+180 [0x1c4f80]
47  72 do_splice_direct+70 [0x1c5112]
48  64 do_sendfile+360 [0x19de18]
49  72 sys_sendfile64+126 [0x19df32]
50 336 sysc_do_restart+18 [0x111a1a]

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Change default IPL method to IPL_VM.
Heiko Carstens [Tue, 28 Oct 2008 10:10:20 +0000 (11:10 +0100)]
[S390] Change default IPL method to IPL_VM.

allyesconfig and allmodconfig built kernels have a tape IPL record.
A the vmreader record makes much more sense, since hardly anybody will
ever IPL a kernel from tape. So change the default.
As I side effect I can test these kernels without fiddling around with
the kernel config ;)

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] tape: disable interrupts in tape_open and tape_release
Frank Munzert [Tue, 28 Oct 2008 10:10:19 +0000 (11:10 +0100)]
[S390] tape: disable interrupts in tape_open and tape_release

Get tape device lock with interrupts disabled. Otherwise lockdep will issue a
warning similar to:

=================================
[ INFO: inconsistent lock state ]
2.6.27 #1
---------------------------------
inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
vol_id/2903 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (sch->lock){++..}, at: [<000003e00004c7a2>] tape_open+0x42/0x1a4 [tape]
{in-hardirq-W} state was registered at:
  [<000000000007ce5c>] __lock_acquire+0x894/0xa74
  [<000000000007d0ce>] lock_acquire+0x92/0xb8
  [<0000000000345154>] _spin_lock+0x5c/0x9c
  [<0000000000202264>] do_IRQ+0x124/0x1f0
  [<0000000000026610>] io_return+0x0/0x8

irq event stamp: 847
hardirqs last  enabled at (847): [<000000000007aca6>] trace_hardirqs_on+0x2a/0x38
hardirqs last disabled at (846): [<0000000000076ca2>] trace_hardirqs_off+0x2a/0x38
softirqs last  enabled at (0): [<000000000004909e>] copy_process+0x43e/0x11f4
softirqs last disabled at (0): [<0000000000000000>] 0x0

other info that might help us debug this:
1 lock held by vol_id/2903:
 #0:  (&bdev->bd_mutex){--..}, at: [<000000000010e0f4>] do_open+0x78/0x358

stack backtrace:
CPU: 1 Not tainted 2.6.27 #1},
Process vol_id (pid: 2903, task: 000000003d4c0000, ksp: 000000003d4e3b10)
0400000000000000 000000003d4e3830 0000000000000002 0000000000000000
       000000003d4e38d0 000000003d4e3848 000000003d4e3848 00000000000168a8
       0000000000000000 000000003d4e3b10 0000000000000000 0000000000000000
       000000003d4e3830 000000000000000c 000000003d4e3830 000000003d4e38a0
       000000000034aa98 00000000000168a8 000000003d4e3830 000000003d4e3880
Call Trace:
([<000000000001681c>] show_trace+0x138/0x158)
 [<0000000000016902>] show_stack+0xc6/0xf8
 [<00000000000170d4>] dump_stack+0xb0/0xc0
 [<0000000000078810>] print_usage_bug+0x1e8/0x228
 [<000000000007a71c>] mark_lock+0xb14/0xd24
 [<000000000007cd5a>] __lock_acquire+0x792/0xa74
 [<000000000007d0ce>] lock_acquire+0x92/0xb8
 [<0000000000345154>] _spin_lock+0x5c/0x9c
 [<000003e00004c7a2>] tape_open+0x42/0x1a4 [tape]
 [<000003e00005185c>] tapeblock_open+0x98/0xd0 [tape]

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] appldata: unsigned ops->size cannot be negative
Roel Kluin [Tue, 28 Oct 2008 10:10:18 +0000 (11:10 +0100)]
[S390] appldata: unsigned ops->size cannot be negative

unsigned ops->size cannot be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] tape block: complete request with correct locking
Frank Munzert [Tue, 28 Oct 2008 10:10:17 +0000 (11:10 +0100)]
[S390] tape block: complete request with correct locking

__blk_end_request must be called with request queue lock held. We need to use
blk_end_request rather than  __blk_end_request.

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Fix sysdev class file creation.
Heiko Carstens [Tue, 28 Oct 2008 10:10:16 +0000 (11:10 +0100)]
[S390] Fix sysdev class file creation.

Use sysdev_class_create_file() to create create sysdev class attributes
instead of sysfs_create_file(). Using sysfs_create_file() wasn't a very
good idea since the show and store functions have a different amount of
parameters for sysfs files and sysdev class files.
In particular the pointer to the buffer is the last argument and
therefore accesses to random memory regions happened.
Still worked surprisingly well until we got a kernel panic.

Cc: stable@kernel.org
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] pgtables: Fix race in enable_sie vs. page table ops
Christian Borntraeger [Tue, 28 Oct 2008 10:10:15 +0000 (11:10 +0100)]
[S390] pgtables: Fix race in enable_sie vs. page table ops

The current enable_sie code sets the mm->context.pgstes bit to tell
dup_mm that the new mm should have extended page tables. This bit is also
used by the s390 specific page table primitives to decide about the page
table layout - which means context.pgstes has two meanings. This can cause
any kind of bugs. For example  - e.g. shrink_zone can call
ptep_clear_flush_young while enable_sie is running. ptep_clear_flush_young
will test for context.pgstes. Since enable_sie changed that value of the old
struct mm without changing the page table layout ptep_clear_flush_young will
do the wrong thing.
The solution is to split pgstes into two bits
- one for the allocation
- one for the current state

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] qdio: remove incorrect memset
Jan Glauber [Tue, 28 Oct 2008 10:10:14 +0000 (11:10 +0100)]
[S390] qdio: remove incorrect memset

Remove the memset since zeroing the string is not needed and use
snprintf instead of sprintf.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] qdio: prevent double qdio shutdown in case of I/O errors
Jan Glauber [Tue, 28 Oct 2008 10:10:13 +0000 (11:10 +0100)]
[S390] qdio: prevent double qdio shutdown in case of I/O errors

In case of I/O errors on a qdio subchannel qdio_shutdown may be
called twice by the qdio driver and by zfcp. Remove the
superfluous shutdown from qdio and let the upper layer driver
handle the error condition.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years agolockdep: minor fix for debug_show_all_locks()
qinghuang feng [Tue, 28 Oct 2008 09:24:28 +0000 (17:24 +0800)]
lockdep: minor fix for debug_show_all_locks()

When we failed to get tasklist_lock eventually (count equals 0),
we should only print " ignoring it.\n", and not print
" locked it.\n" needlessly.

Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing: fix a build error on alpha
Frederic Weisbecker [Tue, 28 Oct 2008 08:43:26 +0000 (09:43 +0100)]
tracing: fix a build error on alpha

Impact: build fix on Alpha

When tracing is enabled, some arch have included <linux/irqflags.h>
on their <asm/system.h> but others like alpha or m68k don't.

Build error on alpha:

kernel/trace/trace.c: In function 'tracing_cpumask_write':
kernel/trace/trace.c:2145: error: implicit declaration of function 'raw_local_irq_disable'
kernel/trace/trace.c:2162: error: implicit declaration of function 'raw_local_irq_enable'

Tested on Alpha through a cross-compiler (should correct a similar issue on m68k).

Reported-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, memory hotplug: remove wrong -1 in calling init_memory_mapping()
Shaohua Li [Mon, 27 Oct 2008 20:03:18 +0000 (13:03 -0700)]
x86, memory hotplug: remove wrong -1 in calling init_memory_mapping()

Impact: fix crash with memory hotplug

Shuahua Li found:

| I just did some experiments on a desktop for memory hotplug and this bug
| triggered a crash in my test.
|
| Yinghai's suggestion also fixed the bug.

We don't need to round it, just remove that extra -1

Signed-off-by: Yinghai <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agolibata: ahci enclosure management bit mask
David Milburn [Mon, 13 Oct 2008 19:38:36 +0000 (14:38 -0500)]
libata: ahci enclosure management bit mask

Enclosure management bit mask definitions.

Signed-off-by: David Milburn <dmilburn@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: ahci enclosure management led sync
David Milburn [Thu, 16 Oct 2008 14:26:19 +0000 (09:26 -0500)]
libata: ahci enclosure management led sync

Synchronize ahci_sw_activity and ahci_sw_activity_blink with ata_port lock.

Signed-off-by: David Milburn <dmilburn@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata_ninja32: suspend/resume support
Alan Cox [Fri, 17 Oct 2008 18:08:31 +0000 (19:08 +0100)]
pata_ninja32: suspend/resume support

I had assumed that the standard recovery would be sufficient for this
hardware but it isn't. Fix up the other registers on resume as needed. See
bug #11735

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: Fix LBA48 on pata_it821x RAID volumes.
Ondrej Zary [Sun, 26 Oct 2008 22:10:19 +0000 (18:10 -0400)]
libata: Fix LBA48 on pata_it821x RAID volumes.

[http://lkml.org/lkml/2008/10/18/82]

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: clear saved xfer_mode and ncq_enabled on device detach
Tejun Heo [Sun, 26 Oct 2008 06:43:03 +0000 (15:43 +0900)]
libata: clear saved xfer_mode and ncq_enabled on device detach

libata EH saves xfer_mode and ncq_enabled at start to later set
DUBIOUS_XFER flag if it has changed.  These values need to be cleared
on device detach such that hot device swap doesn't accidentally miss
DUBIOUS_XFER.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_sil24: configure max read request size to 4k
Tejun Heo [Sat, 25 Oct 2008 05:26:54 +0000 (14:26 +0900)]
sata_sil24: configure max read request size to 4k

Due to request posting limitations, bandwidth of sil3132 is limited to
around 120MB/s with the minimum pci-e payload size (128bytes) which is
used by most consumer systems.  However, write throughput can be
slightly (~3%) increased by increasing the max read requeset size.
Configure it to 4k which is the maximum supported.  This optimization
is also done by SIMG's windows driver.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: add missing kernel-doc
Randy Dunlap [Mon, 27 Oct 2008 03:19:32 +0000 (20:19 -0700)]
libata: add missing kernel-doc

Fix libata missing kernel-doc:

Warning(lin2628-rc2//drivers/ata/libata-core.c:4562): No description
found for parameter 'tag'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: fix device iteration bugs
Tejun Heo [Mon, 27 Oct 2008 10:59:23 +0000 (19:59 +0900)]
libata: fix device iteration bugs

There were several places where only enabled devices should be
iterated over but device enabledness wasn't checked.

* IDENTIFY data 40 wire check in cable_is_40wire()
* xfer_mode/ncq_enabled saving in ata_scsi_error()
* DUBIOUS_XFER handling in ata_set_mode()

While at it, reformat comments in cable_is_40wire().

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoahci: Add support for Promise PDC42819
Mark Nelson [Thu, 23 Oct 2008 03:08:16 +0000 (14:08 +1100)]
ahci: Add support for Promise PDC42819

Add an appropriate entry for the Promise PDC42819 controller. It has an
AHCI mode and so far works correctly with board_ahci.

This chip is found on Promise's FastTrak TX2650 (2 port) and TX4650 (4 port)
software-based RAID cards (for which there is a binary driver, t3sas) and
can be found on some motherboards, for example the MSI K9A2 Platinum,
which calls the chip a Promise T3 controller.

Although this controller also supports SAS devices, its default bootup mode
is AHCI and the binary driver has to do some magic to get the chip into the
appropriate mode to drive SAS disks.

Seeing as no documentation is provided by Promise, adding this entry to the
ahci driver allows the controller to be useful to people as a SATA
controller (with no ill effects on the system if a SAS disk is connected -
probing of the port just times out with "link online but device
misclassified"), without having to resort to using the binary driver. Users
who require SAS or the proprietary software raid can get this functionality
using the binary driver.

Signed-off-by: Mark Nelson <mdnelson8@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoata: Switch all my stuff to a common address
Alan Cox [Mon, 27 Oct 2008 15:09:10 +0000 (15:09 +0000)]
ata: Switch all my stuff to a common address

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Mon, 27 Oct 2008 18:41:51 +0000 (11:41 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  libata: fix NCQ devices behind port multipliers
  scsi: make sure that scsi_init_shared_tag_map() doesn't overwrite existing map

15 years agolibata: fix NCQ devices behind port multipliers
Jens Axboe [Mon, 27 Oct 2008 18:23:06 +0000 (19:23 +0100)]
libata: fix NCQ devices behind port multipliers

For devices behind sata port multipliers, we have to make sure that
they share a tag map since all tags for that PMP must be unique.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoscsi: make sure that scsi_init_shared_tag_map() doesn't overwrite existing map
Jens Axboe [Mon, 27 Oct 2008 18:20:59 +0000 (19:20 +0100)]
scsi: make sure that scsi_init_shared_tag_map() doesn't overwrite existing map

Right now callers have to check whether scsi_host->bqt is already
set up, it's much cleaner to just have scsi_init_shared_tag_map()
does this check on its own.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agox86: keep the /proc/meminfo page count correct
Yinghai Lu [Sun, 26 Oct 2008 05:58:21 +0000 (22:58 -0700)]
x86: keep the /proc/meminfo page count correct

Impact: get correct page count in /proc/meminfo

found page count in /proc/meminfo is nor correct on 1G system in VirtualBox 2.0.4

# cat /proc/meminfo
MemTotal:        1017508 kB
MemFree:          822700 kB
Buffers:            1456 kB
Cached:            26632 kB
SwapCached:            0 kB
...
Hugepagesize:       2048 kB
DirectMap4k:      4032 kB
DirectMap2M:  18446744073709549568 kB

with this patch get:
...
DirectMap4k:      4032 kB
DirectMap2M:   1044480 kB

which is consistent to kernel_page_tables
---[ Low Kernel Mapping ]---
0xffff880000000000-0xffff880000001000           4K     RW     PCD     GLB x  pte
0xffff880000001000-0xffff88000009f000         632K     RW             GLB x  pte
0xffff88000009f000-0xffff8800000a0000           4K     RW     PCD     GLB x  pte
0xffff8800000a0000-0xffff880000200000        1408K     RW             GLB x  pte
0xffff880000200000-0xffff88003fe00000        1020M     RW         PSE GLB x  pmd
0xffff88003fe00000-0xffff88003fff0000        1984K     RW             GLB NX pte
0xffff88003fff0000-0xffff880040000000          64K                           pte
0xffff880040000000-0xffff888000000000         511G                           pud
0xffff888000000000-0xffffc20000000000       58880G                           pgd

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: fix documentation reference for sched_min_granularity_ns
Jiri Kosina [Mon, 27 Oct 2008 16:41:58 +0000 (17:41 +0100)]
sched: fix documentation reference for sched_min_granularity_ns

Impact: documentation fix

sched-design-CFS.txt wrongly references sched_granularity_ns sysctl,
as its name in fact is sched_min_granularity_ns.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Mon, 27 Oct 2008 16:54:23 +0000 (09:54 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (33 commits)
  MIPS: lemote/lm2e: Added io_map_base to pci controller
  MIPS: TXx9: Make firmware parameter passing more robust
  MIPS: Markeins: Remove unnecessary define and cleanup comments, etc.
  MIPS: Markeins: Extract ll_emma2rh_* functions
  MIPS: Markeins: Remove runtime debug prints
  MIPS: EMMA: Fold arch/mips/emma/{common,markeins}/irq*.c into markeins/irq.c
  MIPS: EMMA2RH: Remove emma2rh_gpio_irq_base
  MIPS: EMMA2RH: Remove emma2rh_sw_irq_base
  MIPS: EMMA2RH: Remove emma2rh_irq_base global variable
  MIPS: EMMA2RH: Remove emma2rh_sync on read operation
  MIPS: EMMA: Move <asm/emma2rh> to <asm/emma> dir
  MIPS: EMMA: Move arch/mips/emma2rh/ into arch/mips/emma/
  MIPS: EMMA: Kconfig reorganization
  MIPS: Add CONFIG_CPU_R5500 for NEC VR5500 series processors
  MIPS: RB532: Disable the right device
  MIPS: Add support for NXP PNX833x (STB222/5) into linux kernel
  MIPS: TXx9: CONFIG_TOSHIBA_RBTX4939 spelling
  MIPS: Fix KGDB build error
  INPUT: sgi_btns: Add license specification
  MIPS: IP22: ip22-int.c header file weeding.
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Mon, 27 Oct 2008 16:37:16 +0000 (09:37 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: fw-sbp2: fix races
  firewire: fw-sbp2: delay first login to avoid retries
  firewire: fw-ohci: initialization failure path fixes
  firewire: fw-ohci: don't leak dma memory on module removal
  firewire: fix struct fw_node memory leak
  firewire: Survive more than 256 bus resets

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 27 Oct 2008 16:36:33 +0000 (09:36 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ASoC: Blackfin: update SPORT0 port selector (v2)
  ALSA: hda - Restore default pin configs for realtek codecs
  sound: use a common working email address
  pci: use pci_ioremap_bar() in sound/

15 years agoMIPS: lemote/lm2e: Added io_map_base to pci controller
Zhang Le [Mon, 27 Oct 2008 23:33:24 +0000 (23:33 +0000)]
MIPS: lemote/lm2e: Added io_map_base to pci controller

Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: TXx9: Make firmware parameter passing more robust
Geert Uytterhoeven [Mon, 27 Oct 2008 14:25:49 +0000 (15:25 +0100)]
MIPS: TXx9: Make firmware parameter passing more robust

When booting Linux on a txx9 board with VxWorks boot loader, it crashes in
prom_getenv(), as VxWorks doesn't pass firmware parameters in a0-a3 (in my
case, the actual leftover values in these registers were 0x80002000,
0x80001fe0, 0x2000, and 0x20).

Make the parsing of argc, argv, and envp a bit more robust by checking if
argc is a number below CKSEG0, and argv/envp point to CKSEG0.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Markeins: Remove unnecessary define and cleanup comments, etc.
Shinya Kuribayashi [Thu, 23 Oct 2008 16:36:33 +0000 (01:36 +0900)]
MIPS: Markeins: Remove unnecessary define and cleanup comments, etc.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Markeins: Extract ll_emma2rh_* functions
Shinya Kuribayashi [Thu, 23 Oct 2008 16:35:59 +0000 (01:35 +0900)]
MIPS: Markeins: Extract ll_emma2rh_* functions

These functions are completely ineffective.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Markeins: Remove runtime debug prints
Shinya Kuribayashi [Thu, 23 Oct 2008 16:33:10 +0000 (01:33 +0900)]
MIPS: Markeins: Remove runtime debug prints

Remove runtime db_* macros as we don't need them any more.  In general,
such helpers are useful for initial porting, but once approved, they are
not indispensable.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: EMMA: Fold arch/mips/emma/{common,markeins}/irq*.c into markeins/irq.c
Shinya Kuribayashi [Thu, 23 Oct 2008 16:32:40 +0000 (01:32 +0900)]
MIPS: EMMA: Fold arch/mips/emma/{common,markeins}/irq*.c into markeins/irq.c

Current EMMA2RH irq code is mess.  Before cleaning it up, gather them
in one place as a first step.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: EMMA2RH: Remove emma2rh_gpio_irq_base
Shinya Kuribayashi [Thu, 23 Oct 2008 16:32:11 +0000 (01:32 +0900)]
MIPS: EMMA2RH: Remove emma2rh_gpio_irq_base

Let's use immediate value, instead.  This also saves memory footprint,
and probably a little bit faster.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: EMMA2RH: Remove emma2rh_sw_irq_base
Shinya Kuribayashi [Thu, 23 Oct 2008 16:31:43 +0000 (01:31 +0900)]
MIPS: EMMA2RH: Remove emma2rh_sw_irq_base

Let's use immediate value, instead.  This also saves memory footprint,
and probably a little bit faster.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: EMMA2RH: Remove emma2rh_irq_base global variable
Shinya Kuribayashi [Thu, 23 Oct 2008 16:31:16 +0000 (01:31 +0900)]
MIPS: EMMA2RH: Remove emma2rh_irq_base global variable

Let's use immediate value, instead.  This also saves memory footprint,
and probably a little bit faster.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>