]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
18 years ago[XFS] add __init/__exit mark to specific init/cleanup functions
Lachlan McIlroy [Wed, 6 Feb 2008 02:37:56 +0000 (13:37 +1100)]
[XFS] add __init/__exit mark to specific init/cleanup functions

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30459a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Denis Cheng <crquan@gmail.com>
18 years ago[XFS] Fix oops in xfs_file_readdir()
David Chinner [Wed, 6 Feb 2008 02:37:40 +0000 (13:37 +1100)]
[XFS] Fix oops in xfs_file_readdir()

When xfs_file_readdir() exactly fills a buffer, it can move it's index
past the end of the buffer and dereference it even though the result of
the dereference is never used. On some platforms this causes an oops.

SGI-PV: 976923
SGI-Modid: xfs-linux-melb:xfs-kern:30458a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] kill xfs_root
Christoph Hellwig [Tue, 5 Feb 2008 01:14:01 +0000 (12:14 +1100)]
[XFS] kill xfs_root

The only caller (xfs_fs_fill_super) can simplify call igrab on the root
inode.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30393a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] keep i_nlink updated and use proper accessors
Christoph Hellwig [Tue, 5 Feb 2008 01:13:53 +0000 (12:13 +1100)]
[XFS] keep i_nlink updated and use proper accessors

To get the read-only bind mounts in -mm to work correctly with XFS we need
to call the drop_nlink and inc_nlink helpers to monitor the link count.
Add calls to these to xfs_bumplink and xfs_droplink and stop copying over
di_nlink to i_nlink in xfs_validate_fields and vn_revalidate.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30392a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] stop updating inode->i_blocks
Christoph Hellwig [Tue, 5 Feb 2008 01:13:46 +0000 (12:13 +1100)]
[XFS] stop updating inode->i_blocks

The VFS doesn't use i_blocks, it's only used by generic_fillattr and the
generic quota code which XFS doesn't use. In XFS there is one use to check
whether we have an inline or out of line sumlink, but we can replace that
with a check of the XFS_IFINLINE inode flag.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30391a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Make xfs_ail_check check less by default
David Chinner [Tue, 5 Feb 2008 01:13:38 +0000 (12:13 +1100)]
[XFS] Make xfs_ail_check check less by default

Checking the entire AIL on every insert and remove is prohibitively
expensive - the sustained sequntial create rate on a single disk drops
from about 1800/s to 60/s because of this checking resulting in the
xfslogd becoming cpu bound.

By default on debug builds, only check the next and previous entries in
the list to ensure they are ordered correctly. If you really want, define
XFS_TRANS_DEBUG to use the old behaviour.

SGI-PV: 972759
SGI-Modid: xfs-linux-melb:xfs-kern:30372a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Move AIL pushing into it's own thread
David Chinner [Tue, 5 Feb 2008 01:13:32 +0000 (12:13 +1100)]
[XFS] Move AIL pushing into it's own thread

When many hundreds to thousands of threads all try to do simultaneous
transactions and the log is in a tail-pushing situation (i.e. full), we
can get multiple threads walking the AIL list and contending on the AIL
lock.

The AIL push is, in effect, a simple I/O dispatch algorithm complicated by
the ordering constraints placed on it by the transaction subsystem. It
really does not need multiple threads to push on it - even when only a
single CPU is pushing the AIL, it can push the I/O out far faster that
pretty much any disk subsystem can handle.

So, to avoid contention problems stemming from multiple list walkers, move
the list walk off into another thread and simply provide a "target" to
push to. When a thread requires a push, it sets the target and wakes the
push thread, then goes to sleep waiting for the required amount of space
to become available in the log.

This mechanism should also be a lot fairer under heavy load as the waiters
will queue in arrival order, rather than queuing in "who completed a push
first" order.

Also, by moving the pushing to a separate thread we can do more
effectively overload detection and prevention as we can keep context from
loop iteration to loop iteration. That is, we can push only part of the
list each loop and not have to loop back to the start of the list every
time we run. This should also help by reducing the number of items we try
to lock and/or push items that we cannot move.

Note that this patch is not intended to solve the inefficiencies in the
AIL structure and the associated issues with extremely large list
contents. That needs to be addresses separately; parallel access would
cause problems to any new structure as well, so I'm only aiming to isolate
the structure from unbounded parallelism here.

SGI-PV: 972759
SGI-Modid: xfs-linux-melb:xfs-kern:30371a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] use generic_permission
Christoph Hellwig [Tue, 5 Feb 2008 01:13:24 +0000 (12:13 +1100)]
[XFS] use generic_permission

Now that all direct caller of xfs_iaccess are gone we can kill xfs_iaccess
and xfs_access and just use generic_permission with a check_acl callback.
This is required for the per-mount read-only patchset in -mm to work
properly with XFS.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30370a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] stop re-checking permissions in xfs_swapext
Christoph Hellwig [Tue, 5 Feb 2008 01:13:15 +0000 (12:13 +1100)]
[XFS] stop re-checking permissions in xfs_swapext

xfs_swapext should simplify check if we have a writeable file descriptor
instead of re-checking the permissions using xfs_iaccess. Add an
additional check to refuse O_APPEND file descriptors because swapext is
not an append-only write operation.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30369a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] clean up xfs_swapext
Christoph Hellwig [Tue, 5 Feb 2008 01:13:07 +0000 (12:13 +1100)]
[XFS] clean up xfs_swapext

- stop using vnodes
- use proper multiple label goto unwinding
- give the struct file * variables saner names

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30366a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] remove permission check from xfs_change_file_space
Christoph Hellwig [Tue, 5 Feb 2008 01:12:58 +0000 (12:12 +1100)]
[XFS] remove permission check from xfs_change_file_space

Both callers of xfs_change_file_space alreaedy do the file->f_mode &
FMODE_WRITE check to ensure we have a file descriptor that has been opened
for write mode, so there is no need to re-check that with xfs_iaccess.
Especially as the later might wrongly deny it for corner cases like file
descriptor passing through unix domain sockets.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30365a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] prevent panic during log recovery due to bogus op_hdr length
Lachlan McIlroy [Thu, 10 Jan 2008 05:43:36 +0000 (16:43 +1100)]
[XFS] prevent panic during log recovery due to bogus op_hdr length

A problem was reported where a system panicked in log recovery due to a
corrupt log record. The cause of the corruption is not known but this
change will at least prevent a crash for this specific scenario. Log
recovery definitely needs some more work in this area.

SGI-PV: 974151
SGI-Modid: xfs-linux-melb:xfs-kern:30318a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
18 years agocpuidle: Add a poll_idle method
venkatesh.pallipadi@intel.com [Fri, 1 Feb 2008 01:35:06 +0000 (17:35 -0800)]
cpuidle: Add a poll_idle method

Add a default poll idle state with 0 latency. Provides an option to users
to use poll_idle by using 0 as the latency requirement.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[XFS] Cleanup various fid related bits:
Christoph Hellwig [Tue, 18 Dec 2007 05:26:55 +0000 (16:26 +1100)]
[XFS] Cleanup various fid related bits:

- merge xfs_fid2 into it's only caller xfs_dm_inode_to_fh.
- remove xfs_vget and opencode it in the two callers, simplifying
  both of them by avoiding the awkward calling convetion.
- assign directly to the dm_fid_t members in various places in the
  dmapi code instead of casting them to xfs_fid_t first (which
  is identical to dm_fid_t)

SGI-PV: 974747
SGI-Modid: xfs-linux-melb:xfs-kern:30258a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Vlad Apostolov <vapo@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Fix xfs_lowbit64
David Chinner [Fri, 7 Dec 2007 03:08:48 +0000 (14:08 +1100)]
[XFS] Fix xfs_lowbit64

xfs_lowbit64 was broken on 32 bit platforms in a recent cleanup of the xfs
bitops. Fix it back up again.

SGI-PV: 974005
SGI-Modid: xfs-linux-melb:xfs-kern:30202a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Remove CFORK macros and use code directly in IFORK and DFORK macros.
Christoph Hellwig [Fri, 7 Dec 2007 03:07:20 +0000 (14:07 +1100)]
[XFS] Remove CFORK macros and use code directly in IFORK and DFORK macros.

Currently XFS_IFORK_* and XFS_DFORK* are implemented by means of
XFS_CFORK* macros. But given that XFS_IFORK_* operates on an xfs_inode
that embedds and xfs_icdinode_core and XFS_DFORK_* operates on an
xfs_dinode that embedds a xfs_dinode_core one will have to do endian
swapping while the other doesn't. Instead of having the current mess with
the CFORK macros that have byteswapping and non-byteswapping version
(which are inconsistantly named while we're at it) just define each family
of the macros to stand by itself and simplify the whole matter.

A few direct references to the CFORK variants were cleaned up to use IFORK
or DFORK to make this possible.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30163a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] kill superflous buffer locking (2nd attempt)
Christoph Hellwig [Fri, 7 Dec 2007 03:07:08 +0000 (14:07 +1100)]
[XFS] kill superflous buffer locking (2nd attempt)

There is no need to lock any page in xfs_buf.c because we operate on our
own address_space and all locking is covered by the buffer semaphore. If
we ever switch back to main blockdeive address_space as suggested e.g. for
fsblock with a similar scheme the locking will have to be totally revised
anyway because the current scheme is neither correct nor coherent with
itself.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30156a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Use kernel-supplied "roundup_pow_of_two" for simplicity
Robert P. J. Day [Fri, 23 Nov 2007 05:30:51 +0000 (16:30 +1100)]
[XFS] Use kernel-supplied "roundup_pow_of_two" for simplicity

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30098a

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Remove the BPCSHIFT and NB* based macros from XFS.
Tim Shimmin [Fri, 23 Nov 2007 05:30:42 +0000 (16:30 +1100)]
[XFS] Remove the BPCSHIFT and NB* based macros from XFS.

The BPCSHIFT based macros, btoc*, ctob*, offtoc* and ctooff are either not
used or don't need to be used. The NDPP, NDPP, NBBY macros don't need to
be used but instead are replaced directly by PAGE_SIZE and PAGE_CACHE_SIZE
where appropriate. Initial patch and motivation from Nicolas Kaiser.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30096a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Remove bogus assert
Niv Sardi [Tue, 27 Nov 2007 06:01:13 +0000 (17:01 +1100)]
[XFS] Remove bogus assert

This assert is bogus. We can have a forced shutdown occur
between the check for the XLOG_FORCED_SHUTDOWN and the ASSERT. Also, the
logging system shouldn't care about the state of XFS_FORCED_SHUTDOWN, it
should only check XLOG_FORCED_SHUTDOWN. The logging system has it's own
forced shutdown flag so, for the case of a forced shutdown that's not due
to a logging error, we can flush the log.

SGI-PV: 972985
SGI-Modid: xfs-linux-melb:xfs-kern:30029a

Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] optimize XFS_IS_REALTIME_INODE w/o realtime config
Eric Sandeen [Fri, 23 Nov 2007 05:29:42 +0000 (16:29 +1100)]
[XFS] optimize XFS_IS_REALTIME_INODE w/o realtime config

Use XFS_IS_REALTIME_INODE in more places, and #define it to 0 if
CONFIG_XFS_RT is off. This should be safe because mount checks in
xfs_rtmount_init:

so if we get mounted w/o CONFIG_XFS_RT, no realtime inodes should be
encountered after that.

Defining XFS_IS_REALTIME_INODE to 0 saves a bit of stack space,
presumeably gcc can optimize around the various "if (0)" type checks:

xfs_alloc_file_space -8 xfs_bmap_adjacent -16 xfs_bmapi -8
xfs_bmap_rtalloc -16 xfs_bunmapi -28 xfs_free_file_space -64 xfs_imap +8
<-- ? hmm. xfs_iomap_write_direct -12 xfs_qm_dqusage_adjust -4
xfs_qm_vop_chown_reserve -4

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30014a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Move platform specific mount option parse out of core XFS code
David Chinner [Fri, 23 Nov 2007 05:29:32 +0000 (16:29 +1100)]
[XFS] Move platform specific mount option parse out of core XFS code

Mount option parsing is platform specific. Move it out of core code into
the platform specific superblock operation file.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30012a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Implement fallocate.
David Chinner [Fri, 23 Nov 2007 05:29:25 +0000 (16:29 +1100)]
[XFS] Implement fallocate.

Implement the new generic callout for file preallocation. Atomically
change the file size if requested.

SGI-PV: 972756
SGI-Modid: xfs-linux-melb:xfs-kern:30009a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Fix inode allocation latency
David Chinner [Fri, 23 Nov 2007 05:29:18 +0000 (16:29 +1100)]
[XFS] Fix inode allocation latency

The log force added in xfs_iget_core() has been a performance issue since
it was introduced for tight loops that allocate then unlink a single file.
under heavy writeback, this can introduce unnecessary latency due tothe
log I/o getting stuck behind bulk data writes.

Fix this latency problem by avoinding the need for the log force by moving
the place we mark linux inode dirty to the transaction commit rather than
on transaction completion.

This also closes a potential hole in the sync code where a linux inode is
not dirty between the time it is modified and the time the log buffer has
been written to disk.

SGI-PV: 972753
SGI-Modid: xfs-linux-melb:xfs-kern:30007a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Fix transaction overrun during writeback.
David Chinner [Fri, 23 Nov 2007 05:29:11 +0000 (16:29 +1100)]
[XFS] Fix transaction overrun during writeback.

Prevent transaction overrun in xfs_iomap_write_allocate() if we race with
a truncate that overlaps the delalloc range we were planning to allocate.

If we race, we may allocate into a hole and that requires block
allocation. At this point in time we don't have a reservation for block
allocation (apart from metadata blocks) and so allocating into a hole
rather than a delalloc region results in overflowing the transaction block
reservation.

Fix it by only allowing a single extent to be allocated at a time.

SGI-PV: 972757
SGI-Modid: xfs-linux-melb:xfs-kern:30005a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Show all mount args in /proc/mounts
David Chinner [Fri, 23 Nov 2007 05:28:24 +0000 (16:28 +1100)]
[XFS] Show all mount args in /proc/mounts

There are several mount options that don't show up in /proc/mounts. Add
them in and clean up the showargs code at the same time.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30004a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Fix sparse warning in xlog_recover_do_efd_trans.
David Chinner [Fri, 23 Nov 2007 05:28:17 +0000 (16:28 +1100)]
[XFS] Fix sparse warning in xlog_recover_do_efd_trans.

Sparse trips over the locking order in xlog_recover_do_efd_trans() when
xfs_trans_delete_ail() drops the ail lock. Because the unlock is
conditional, we need to either annotate with a "fake unlock" or change the
structure of the code so sparse thinks the function always unlocks.

Reordering the code makes it simpler, so do that.

SGI-PV: 972755
SGI-Modid: xfs-linux-melb:xfs-kern:30003a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Fix up sparse warnings.
David Chinner [Fri, 23 Nov 2007 05:28:09 +0000 (16:28 +1100)]
[XFS] Fix up sparse warnings.

These are mostly locking annotations, marking things static, casts where
needed and declaring stuff in header files.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30002a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] Use the generic bitops rather than implementing them ourselves.
David Chinner [Fri, 23 Nov 2007 05:27:59 +0000 (16:27 +1100)]
[XFS] Use the generic bitops rather than implementing them ourselves.
Patch inspired by Andi Kleen.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30000a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years agoACPI: cpuidle: Support C1 idle time accounting
venkatesh.pallipadi@intel.com [Fri, 1 Feb 2008 01:35:05 +0000 (17:35 -0800)]
ACPI: cpuidle: Support C1 idle time accounting

Show C1 idle time in /sysfs cpuidle interface. C1 idle time may not
be entirely accurate in all cases. It includes the time spent
in the interrupt handler after wakeup with "hlt" based C1. But, it will
be accurate with "mwait" based C1.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[XFS] Make xfs_bulkstat() to report unlinked but referenced inodes
Vlad Apostolov [Fri, 23 Nov 2007 05:27:51 +0000 (16:27 +1100)]
[XFS] Make xfs_bulkstat() to report unlinked but referenced inodes

We need xfs_bulkstat() to report inode stat for inodes with link count
zero but reference count non zero.

The fix here:

http://oss.sgi.com/archives/xfs/2007-09/msg00266.html

changed this behavior and made xfs_bulkstat() to filter all unlinked
inodes including those that are not destroyed yet but held by reference.

The attached patch returns back to the original behavior by marking the
on-disk inode buffer "dirty" when di_mode is cleared (at that time both
inode link and reference counter are zero).

SGI-PV: 972004
SGI-Modid: xfs-linux-melb:xfs-kern:29914a

Signed-off-by: Vlad Apostolov <vapo@sgi.com>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] 971186 Undo mod xfs-linux-melb:xfs-kern:29845a due to a regression
Lachlan McIlroy [Fri, 23 Nov 2007 05:27:32 +0000 (16:27 +1100)]
[XFS] 971186 Undo mod xfs-linux-melb:xfs-kern:29845a due to a regression

SGI-PV: 971596
SGI-Modid: xfs-linux-melb:xfs-kern:29902a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
18 years ago[XFS] fix 32-bit compat ioctls for GETXFLAGS, SETXFLAGS, GETVERSION
Eric Sandeen [Fri, 12 Oct 2007 01:13:22 +0000 (11:13 +1000)]
[XFS] fix 32-bit compat ioctls for GETXFLAGS, SETXFLAGS, GETVERSION

XFS_IOC_GETVERSION, XFS_IOC_GETXFLAGS and XFS_IOC_SETXFLAGS all take a
"long" which changes size between 32 and 64 bit platforms.

So, the ioctl cmds that come in from a 32-bit app aren't as expected, for
example on GETXFLAGS,

unknown cmd fd(3) cmd(80046601){t:'f';sz:4}

due to the size mismatch.

So, use instead the 32-bit version of the commands for compat ioctls, and
other than that it doesn't take any more manipulation.

Also, for both native and compat versions, just define them to the values
as defined in fs.h

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29849a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] lose xfs_hex_dump in favor of print_hex_dump
Eric Sandeen [Fri, 12 Oct 2007 01:13:08 +0000 (11:13 +1000)]
[XFS] lose xfs_hex_dump in favor of print_hex_dump

No need for xfs to have its own hex dumping routine now that the kernel
has one.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29847a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] kill XFS_INOBT_IS_FREE_DISK
Christoph Hellwig [Fri, 12 Oct 2007 01:12:54 +0000 (11:12 +1000)]
[XFS] kill XFS_INOBT_IS_FREE_DISK

This macro is unused an all other acros in this family operate on native
types, so we most likely won't grow a user either.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29846a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years agoACPI: enable MWAIT for C1 idle
venkatesh.pallipadi@intel.com [Fri, 1 Feb 2008 01:35:04 +0000 (17:35 -0800)]
ACPI: enable MWAIT for C1 idle

Add MWAIT idle for C1 state instead of halt, on platforms that support
C1 state with MWAIT.

Renames cx->space_id to something more appropriate.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[XFS] kill superflous buffer locking
Christoph Hellwig [Fri, 12 Oct 2007 01:12:39 +0000 (11:12 +1000)]
[XFS] kill superflous buffer locking

There is no need to lock any page in xfs_buf.c because we operate on our
own address_space and all locking is covered by the buffer semaphore. If
we ever switch back to main blockdeive address_space as suggested e.g. for
fsblock with a similar scheme the locking will have to be totally revised
anyway because the current scheme is neither correct nor coherent with
itself.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29845a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] Refactor xfs_mountfs
Eric Sandeen [Fri, 12 Oct 2007 01:03:40 +0000 (11:03 +1000)]
[XFS] Refactor xfs_mountfs

Refactoring xfs_mountfs() to call sub-functions for logical chunks can
help save a bit of stack, and can make it easier to read this long
function.

The mount path is one of the longest common callchains, easily getting to
within a few bytes of the end of a 4k stack when over lvm, quotas are
enabled, and quotacheck must be done.

With this change on top of the other stack-related changes I've sent, I
can get xfs to survive a normal xfsqa run on 4k stacks over lvm.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29834a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] xlog_rec_header/xlog_rec_ext_header endianess annotations
Christoph Hellwig [Fri, 12 Oct 2007 00:59:34 +0000 (10:59 +1000)]
[XFS] xlog_rec_header/xlog_rec_ext_header endianess annotations

Mostly trivial conversion with one exceptions: h_num_logops was kept in
native endian previously and only converted to big endian in xlog_sync,
but we always keep it big endian now. With todays cpus fast byteswap
instructions that's not an issue but the new variant keeps the code clean
and maintainable.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29821a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] clean up some xfs_log_priv.h macros
Christoph Hellwig [Fri, 12 Oct 2007 00:58:59 +0000 (10:58 +1000)]
[XFS] clean up some xfs_log_priv.h macros

- the various assign lsn macros are replaced by a single inline,
xlog_assign_lsn, which is equivalent to ASSIGN_ANY_LSN_HOST except
for a more sane calling convention. ASSIGN_LSN_DISK is replaced
by xlog_assign_lsn and a manual bytespap, and ASSIGN_LSN by the same,
except we pass the cycle and block arguments explicitly instead of a
log paramter. The latter two variants only had 2, respectively one
user anyway.
- the GET_CYCLE is replaced by a xlog_get_cycle inline with exactly the
same calling conventions.
- GET_CLIENT_ID is replaced by xlog_get_client_id which leaves away
the unused arch argument. Instead of conditional defintions
depending on host endianess we now do an unconditional swap and shift
then, which generates equal code.
- the unused XLOG_SET macro is removed.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29820a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years agoACPI: idle: Fix acpi_safe_halt usages and interrupt enabling/disabling
venkatesh.pallipadi@intel.com [Fri, 1 Feb 2008 01:35:03 +0000 (17:35 -0800)]
ACPI: idle: Fix acpi_safe_halt usages and interrupt enabling/disabling

acpi_safe_halt() needs interrupts to be disabled for atomic
need_resched check and safe halt. Otherwise we may miss an
interrupt and go into halt.

acpi_safe_halt() also does not enable interrupts on all return paths.

So the callers should handle enable and disable interrupts around it.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[XFS] clean up some xfs_log_priv.h macros
Christoph Hellwig [Fri, 12 Oct 2007 00:58:05 +0000 (10:58 +1000)]
[XFS] clean up some xfs_log_priv.h macros

- the various assign lsn macros are replaced by a single inline,
xlog_assign_lsn, which is equivalent to ASSIGN_ANY_LSN_HOST except
for a more sane calling convention. ASSIGN_LSN_DISK is replaced
by xlog_assign_lsn and a manual bytespap, and ASSIGN_LSN by the same,
except we pass the cycle and block arguments explicitly instead of a
log paramter. The latter two variants only had 2, respectively one
user anyway.
- the GET_CYCLE is replaced by a xlog_get_cycle inline with exactly the
same calling conventions.
- GET_CLIENT_ID is replaced by xlog_get_client_id which leaves away
the unused arch argument. Instead of conditional defintions
depending on host endianess we now do an unconditional swap and shift
then, which generates equal code.
- the unused XLOG_SET macro is removed.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29819a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] kill xfs_freeze.
Christoph Hellwig [Thu, 11 Oct 2007 08:11:14 +0000 (18:11 +1000)]
[XFS] kill xfs_freeze.

No need to have a wrapper just two call two more functions.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29816a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years agoPM: documentation cleanups
Pavel Machek [Tue, 5 Feb 2008 18:27:12 +0000 (19:27 +0100)]
PM: documentation cleanups

Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years agoACPI: thinkpad-acpi: second TP_EC_FAN_FULLSPEED should be TP_EC_FAN_AUTO
Roel Kluin [Mon, 4 Feb 2008 23:24:56 +0000 (00:24 +0100)]
ACPI: thinkpad-acpi: second TP_EC_FAN_FULLSPEED should be TP_EC_FAN_AUTO

fix bug in safety net for TPEC fan control mode
eaa7571b2d1a08873e4bdd8e6db3431df61cd9ad

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[Blackfin] arch: declare default INSTALL_PATH for Blackfin ports
Mike Frysinger [Thu, 7 Feb 2008 06:15:37 +0000 (14:15 +0800)]
[Blackfin] arch: declare default INSTALL_PATH for Blackfin ports

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
18 years ago[Blackfin] arch: Encourage users to use the spidev character driver: Provide platform...
Michael Hennerich [Fri, 8 Feb 2008 17:54:09 +0000 (01:54 +0800)]
[Blackfin] arch: Encourage users to use the spidev character driver: Provide platform support

 - Enable kernel generic spidev driver for blackfin SPI ADC
 - spi_adc driver, document and test sample not synced

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
18 years agoACPI: Export acpi_check_resource_conflict
Thomas Renninger [Tue, 5 Feb 2008 07:31:23 +0000 (23:31 -0800)]
ACPI: Export acpi_check_resource_conflict

Export acpi_check_resource_conflict(), sometimes drivers already have
a struct resource at hand so no need to use the wrappers to build a new
one.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years agoACPI: track opregion names to avoid driver resource conflicts.
Thomas Renninger [Tue, 5 Feb 2008 07:31:22 +0000 (23:31 -0800)]
ACPI: track opregion names to avoid driver resource conflicts.

Small ACPICA extension to be able to store the name of operation regions in osl.c later

In ACPI, AML can define accesses to IO ports and System Memory by Operation
Regions.  Those are not registered as done by PNPACPI using resource templates
(and _CRS/_SRS methods).

The IO ports and System Memory regions may get accessed by arbitrary AML code.
 When native drivers are accessing the same resources bad things can happen
(e.g.  a critical shutdown temperature of 3000 C every 2 months or so).

It is not really possible to register the operation regions via
request_resource, as they often overlap with pnp or other resources (e.g.
statically setup IO resources below 0x100).

This approach stores all Operation Region declarations (IO and System Memory
only) at ACPI table parse time.  It offers a similar functionality like
request_region and let drivers which are known to possibly use the same IO
ports and Memory which are also often used by ACPI (hwmon and i2c) check for
ACPI interference.

A boot parameter acpi_enforce_resources=strict/lax/no is provided, which
is default set to lax:
  - strict: let conflicting drivers fail to load with an error message
  - lax:    let conflicting driver work normal with a warning message
  - no:     no functional change at all
Depending on the feedback and the kind of interferences we see, this
should be set to strict at later time.

Goal of this patch set is:
  - Identify ACPI interferences in bug reports (very hard to reproduce
    and to identify)
  - Find BIOSes for that an ACPI driver should exist for specific HW
    instead of a native one.
  - stability in general

Provide acpi_check_{mem_}region.

Drivers can additionally check against possible ACPI interference by also
invoking this shortly before they call request_region.
If -EBUSY is returned, the driver must not load.
Use acpi_enforce_resources=strict/lax/no options to:
  - strict: let conflicting drivers fail to load with an error message
  - lax:    let conflicting driver work normal with a warning message
  - no:     no functional change at all

Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[XFS] cleanup vnode useage in xfs_iget.c
Christoph Hellwig [Thu, 11 Oct 2007 08:11:03 +0000 (18:11 +1000)]
[XFS] cleanup vnode useage in xfs_iget.c

Get rid of vnode useage in xfs_iget.c and pass Linux inode / xfs_inode
where apropinquate. And kill some useless helpers while we're at it.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29808a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] cleanup vnode useage in xfs_ioctl.c
Christoph Hellwig [Thu, 11 Oct 2007 08:09:50 +0000 (18:09 +1000)]
[XFS] cleanup vnode useage in xfs_ioctl.c

xfs_ioctl.c passes around vnode pointers quite a lot, but all places
already have the Linux inode which is identical to the vnode these days.
Clean the code up to always use the Linux inode.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29807a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] Kill off xfs_statvfs.
Christoph Hellwig [Thu, 11 Oct 2007 08:09:40 +0000 (18:09 +1000)]
[XFS] Kill off xfs_statvfs.

We were already filling the Linux struct statfs anyway, and doing this
trivial task directly in xfs_fs_statfs makes the code quite a bit cleaner.
While I was at it I also moved copying attributes that don't change over
the lifetime of the filesystem outside the superblock lock.

xfs_fs_fill_super used to get the magic number and blocksize through
xfs_statvfs, but assigning them directly is a lot cleaner and will save
some stack space during mount.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29802a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years agoACPI: acpi_pci_irq_find_prt_entry(): use list_for_each_entry() instead of list_for_each()
Matthias Kaehlcke [Tue, 5 Feb 2008 07:31:20 +0000 (23:31 -0800)]
ACPI: acpi_pci_irq_find_prt_entry(): use list_for_each_entry() instead of list_for_each()

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years agoACPI: remove duplicated warning message
Miguel Botón [Tue, 5 Feb 2008 07:31:19 +0000 (23:31 -0800)]
ACPI: remove duplicated warning message

Remove duplicated warning message in acpi_power_transition()

ACPI: Transitioning device [%s] to D%d\n

This warning message is printed by acpi_bus_set_power() so we don't
need to print it again.

Signed-off-by: Miguel Botón <mboton@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[XFS] simplify xfs_vn_getattr
Christoph Hellwig [Thu, 11 Oct 2007 07:46:39 +0000 (17:46 +1000)]
[XFS] simplify xfs_vn_getattr

Just fill in struct kstat directly from the xfs_inode instead of doing a
detour through a bhv_vattr_t and xfs_getattr.

SGI-PV: 970980
SGI-Modid: xfs-linux-melb:xfs-kern:29770a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] kill xfs_iocore_t
Christoph Hellwig [Thu, 11 Oct 2007 07:44:08 +0000 (17:44 +1000)]
[XFS] kill xfs_iocore_t

xfs_iocore_t is a structure embedded in xfs_inode. Except for one field it
just duplicates fields already in xfs_inode, and there is nothing this
abstraction buys us on XFS/Linux. This patch removes it and shrinks source
and binary size of xfs aswell as shrinking the size of xfs_inode by 60/44
bytes in debug/non-debug builds.

SGI-PV: 970852
SGI-Modid: xfs-linux-melb:xfs-kern:29754a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] Remove spin.h
Eric Sandeen [Thu, 11 Oct 2007 07:43:56 +0000 (17:43 +1000)]
[XFS] Remove spin.h

remove spinlock init abstraction macro in spin.h, remove the callers, and
remove the file. Move no-op spinlock_destroy to xfs_linux.h Cleanup
spinlock locals in xfs_mount.c

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29751a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] Cleanup lock goop.
Eric Sandeen [Thu, 11 Oct 2007 07:43:43 +0000 (17:43 +1000)]
[XFS] Cleanup lock goop.

Switch last couple lock_t's to spinlock_t's. Remove now-unused
spinlock-related macros & types.

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29748a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] ktrace kt_lock is unused, remove it.
Eric Sandeen [Thu, 11 Oct 2007 07:43:32 +0000 (17:43 +1000)]
[XFS] ktrace kt_lock is unused, remove it.

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29747a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] Unwrap XFS_SB_LOCK.
Eric Sandeen [Thu, 11 Oct 2007 07:42:32 +0000 (17:42 +1000)]
[XFS] Unwrap XFS_SB_LOCK.

Un-obfuscate XFS_SB_LOCK, remove XFS_SB_LOCK->mutex_lock->spin_lock
macros, call spin_lock directly, remove extraneous cookie holdover from
old xfs code, and change lock type to spinlock_t.

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29746a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] Unwrap mru_lock.
Eric Sandeen [Thu, 11 Oct 2007 07:42:10 +0000 (17:42 +1000)]
[XFS] Unwrap mru_lock.

Un-obfuscate mru_lock, remove mutex_lock->spin_lock macros, call spin_lock
directly, remove extraneous cookie holdover from old xfs code.

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29745a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] Unwrap xfs_dabuf_global_lock
Eric Sandeen [Thu, 11 Oct 2007 07:41:21 +0000 (17:41 +1000)]
[XFS] Unwrap xfs_dabuf_global_lock

Un-obfuscate dabuf_global_lock, remove mutex_lock->spin_lock macros, call
spin_lock directly, remove extraneous cookie holdover from old xfs code,
and change lock type to spinlock_t.

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29744a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] Unwrap pagb_lock.
Eric Sandeen [Thu, 11 Oct 2007 07:38:28 +0000 (17:38 +1000)]
[XFS] Unwrap pagb_lock.

Un-obfuscate pagb_lock, remove mutex_lock->spin_lock macros, call
spin_lock directly, remove extraneous cookie holdover from old xfs code,
and change lock type to spinlock_t.

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29743a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years agoasus_acpi: add support for F3Sa
Luca Tettamanti [Tue, 5 Feb 2008 07:31:18 +0000 (23:31 -0800)]
asus_acpi: add support for F3Sa

Add support for ASUS F3Sa notebook. Features:
- LCD on/off
- Brightness
- Wifi kill
- Bluetooth kill

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Karol Kozimor <sziwan@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[XFS] Unwrap XFS_DQ_PINUNLOCK.
Eric Sandeen [Thu, 11 Oct 2007 07:38:18 +0000 (17:38 +1000)]
[XFS] Unwrap XFS_DQ_PINUNLOCK.

Un-obfuscate DQ_PINLOCK, remove DQ_PINLOCK->mutex_lock->spin_lock macros,
call spin_lock directly, remove extraneous cookie holdover from old xfs
code, and change lock type to spinlock_t.

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29742a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] Unwrap GRANT_LOCK.
Eric Sandeen [Thu, 11 Oct 2007 07:37:31 +0000 (17:37 +1000)]
[XFS] Unwrap GRANT_LOCK.

Un-obfuscate GRANT_LOCK, remove GRANT_LOCK->mutex_lock->spin_lock macros,
call spin_lock directly, remove extraneous cookie holdover from old xfs
code, and change lock type to spinlock_t.

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29741a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] Unwrap LOG_LOCK.
Eric Sandeen [Thu, 11 Oct 2007 07:37:10 +0000 (17:37 +1000)]
[XFS] Unwrap LOG_LOCK.

Un-obfuscate LOG_LOCK, remove LOG_LOCK->mutex_lock->spin_lock macros, call
spin_lock directly, remove extraneous cookie holdover from old xfs code,
and change lock type to spinlock_t.

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29740a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] Unwrap AIL_LOCK
Donald Douwsma [Thu, 11 Oct 2007 07:36:05 +0000 (17:36 +1000)]
[XFS] Unwrap AIL_LOCK

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29739a

Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] kill unnessecary ioops indirection
Lachlan McIlroy [Thu, 11 Oct 2007 07:34:33 +0000 (17:34 +1000)]
[XFS] kill unnessecary ioops indirection

Currently there is an indirection called ioops in the XFS data I/O path.
Various functions are called by functions pointers, but there is no
coherence in what this is for, and of course for XFS itself it's entirely
unused. This patch removes it instead and significantly reduces source and
binary size of XFS while making maintaince easier.

SGI-PV: 970841
SGI-Modid: xfs-linux-melb:xfs-kern:29737a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] simplify vn_revalidate
Christoph Hellwig [Wed, 19 Sep 2007 05:27:49 +0000 (15:27 +1000)]
[XFS] simplify vn_revalidate

No need to allocate a bhv_vattr_t on stack and call xfs_getattr to update
a few fields in the Linux inode from the XFS inode, just do it directly.

And yes, this function is in dire need of a better name and prototype,
I'll do in a separate patch, though.

SGI-PV: 970705
SGI-Modid: xfs-linux-melb:xfs-kern:29713a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] more vnode/inode tracing fixes
Lachlan McIlroy [Mon, 17 Sep 2007 03:11:58 +0000 (13:11 +1000)]
[XFS] more vnode/inode tracing fixes

SGI-PV: 970335
SGI-Modid: xfs-linux-melb:xfs-kern:29697a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] kill BMAPI_UNWRITTEN
Christoph Hellwig [Fri, 14 Sep 2007 05:23:31 +0000 (15:23 +1000)]
[XFS] kill BMAPI_UNWRITTEN

There is no reason to go through xfs_iomap for the BMAPI_UNWRITTEN because
it has nothing in common with the other cases. Instead check for the
shutdown filesystem in xfs_end_bio_unwritten and perform a direct call to
xfs_iomap_write_unwritten (which should be renamed to something more
sensible one day)

SGI-PV: 970241
SGI-Modid: xfs-linux-melb:xfs-kern:29681a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] kill BMAPI_DEVICE
Christoph Hellwig [Fri, 14 Sep 2007 05:23:17 +0000 (15:23 +1000)]
[XFS] kill BMAPI_DEVICE

There is no reason to go into the iomap machinery just to get the right
block device for an inode. Instead look at the realtime flag in the inode
and grab the right device from the mount structure.

I created a new helper, xfs_find_bdev_for_inode instead of opencoding it
because I plan to use it in other places in the future.

SGI-PV: 970240
SGI-Modid: xfs-linux-melb:xfs-kern:29680a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years ago[XFS] clean up vnode/inode tracing
Lachlan McIlroy [Thu, 7 Feb 2008 05:42:19 +0000 (16:42 +1100)]
[XFS] clean up vnode/inode tracing

Simplify vnode tracing calls by embedding function name & return addr in
the calling macro.

Also do a lot of vnode->inode renaming for consistency, while we're at it.

SGI-PV: 970335
SGI-Modid: xfs-linux-melb:xfs-kern:29650a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years agoasus-laptop: add parentheses
Roel Kluin [Sat, 2 Feb 2008 20:07:38 +0000 (21:07 +0100)]
asus-laptop: add parentheses

'!' has a higher priority than '&': bitanding has no effect.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years agodlm: add __init and __exit marks to init and exit functions
Denis Cheng [Fri, 1 Feb 2008 17:53:46 +0000 (01:53 +0800)]
dlm: add __init and __exit marks to init and exit functions

it moves 365 bytes from .text to .init.text, and 30 bytes from .text to
.exit.text, saves memory.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: David Teigland <teigland@redhat.com>
18 years ago[XFS] remove dead SYNC_BDFLUSH case in xfs_sync_inodes
Lachlan McIlroy [Fri, 14 Sep 2007 05:21:08 +0000 (15:21 +1000)]
[XFS] remove dead SYNC_BDFLUSH case in xfs_sync_inodes

A large part of xfs_sync_inodes is conditional on the SYNC_BDFLUSH which
is never passed to it. This patch removes it and adds an assert that
triggers in case some new code tries to pass SYNC_BDFLUSH to it.

SGI-PV: 970242
SGI-Modid: xfs-linux-melb:xfs-kern:29630a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
18 years agoasus-laptop new write_acpi_int
Corentin CHARY [Wed, 16 Jan 2008 15:56:42 +0000 (16:56 +0100)]
asus-laptop new write_acpi_int

Just a little modification of write_acpi_int

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[POWERPC] mpc52xx: fix compile error introduce when rebasing patch
Grant Likely [Thu, 7 Feb 2008 05:29:25 +0000 (22:29 -0700)]
[POWERPC] mpc52xx: fix compile error introduce when rebasing patch

When rebasing one of the mpc5200 psc UART patches I made a mistake and
damaged the patch.

This patch fixes the compile failure introduced in commit
25ae3a0739c69425a911925b43213895a9802b98

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
18 years agodlm: eliminate astparam type casting
David Teigland [Thu, 7 Feb 2008 05:27:04 +0000 (23:27 -0600)]
dlm: eliminate astparam type casting

Put lkb_astparam in a union with a dlm_user_args pointer to
eliminate a lot of type casting.

Signed-off-by: David Teigland <teigland@redhat.com>
18 years agomlx4_core: Clean up struct mlx4_buf
Roland Dreier [Thu, 7 Feb 2008 05:17:59 +0000 (21:17 -0800)]
mlx4_core: Clean up struct mlx4_buf

Now that struct mlx4_buf.u is a struct instead of a union because of
the vmap() changes, there's no point in having a struct at all.  So
move .direct and .page_list directly into struct mlx4_buf and get rid
of a bunch of unnecessary ".u"s.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agomlx4_core: For 64-bit systems, vmap() kernel queue buffers
Jack Morgenstein [Mon, 28 Jan 2008 08:40:51 +0000 (10:40 +0200)]
mlx4_core: For 64-bit systems, vmap() kernel queue buffers

Since kernel virtual memory is not a problem on 64-bit systems, there
is no reason to use our own 2-layer page mapping scheme for large
kernel queue buffers on such systems.  Instead, map the page list to a
single virtually contiguous buffer with vmap(), so that can we access
buffer memory via direct indexing.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agodrm: add initial r500 drm support
Dave Airlie [Thu, 7 Feb 2008 05:01:05 +0000 (15:01 +1000)]
drm: add initial r500 drm support

This adds CP support for the r500 series of chips, and allows
accel 2D support on these chips with a new radeon driver.

Signed-off-by: Dave Airlie <airlied@redhat.com>
18 years agoradeon: setup the ring buffer fetcher to be less agressive.
Roland Scheidegger [Thu, 7 Feb 2008 04:59:24 +0000 (14:59 +1000)]
radeon: setup the ring buffer fetcher to be less agressive.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: fixup some of the ioctl function exit paths
Dave Airlie [Thu, 7 Feb 2008 04:51:32 +0000 (14:51 +1000)]
drm: fixup some of the ioctl function exit paths

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: the drm really should call pci_set_master..
Dave Airlie [Thu, 7 Feb 2008 04:48:32 +0000 (14:48 +1000)]
drm: the drm really should call pci_set_master..

perhaps bonghits could turn on my bus-mastering because the drm
certainly never bothered doing it before.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agoi915: Add chipset id for Intel Integrated Graphics Device
Zhenyu Wang [Thu, 24 Jan 2008 06:46:36 +0000 (16:46 +1000)]
i915: Add chipset id for Intel Integrated Graphics Device

This adds new chipset id in drm.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
18 years agodrm: cleanup DRM_DEBUG() parameters
Márton Németh [Thu, 24 Jan 2008 05:58:57 +0000 (15:58 +1000)]
drm: cleanup DRM_DEBUG() parameters

As DRM_DEBUG macro already prints out the __FUNCTION__ string (see
drivers/char/drm/drmP.h), it is not worth doing this again. At some
other places the ending "\n" was added.

airlied:- I cleaned up a few that this patch missed also

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm/i915: add support for E7221 chipset
Carlos Martín [Wed, 23 Jan 2008 06:41:17 +0000 (16:41 +1000)]
drm/i915: add support for E7221 chipset

E7221 chipset is a server version of the i915.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: don't cast a pointer to pointer of list_head
Li Zefan [Sun, 16 Dec 2007 23:47:19 +0000 (09:47 +1000)]
drm: don't cast a pointer to pointer of list_head

The casting is safe only when the list_head member is the first member of
the structure.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agomga_dma: return 'err' not just zero from mga_do_cleanup_dma()
Jesper Juhl [Sun, 16 Dec 2007 23:47:17 +0000 (09:47 +1000)]
mga_dma: return 'err' not just zero from mga_do_cleanup_dma()

While reading some code I stumbled across the use of 'err' in
drivers/char/drm/mga_dma.c::mga_do_cleanup_dma() and I think there's a small
problem.

The variable is only used inside #if __OS_HAS_AGP which is fine, but all that
ever happens is an assignment to the variable - it is never actually used for
anything.  The variable is nicely initialized to zero which is also what the
return statement at the end of function returns (always at the moment).

It looks to me like that function should be returning 'err' instead of always
just returning 0.  Here's a patch to do that.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: add _DRM_DRIVER flag, and re-order unload.
Dave Airlie [Sun, 16 Dec 2007 23:41:56 +0000 (09:41 +1000)]
drm: add _DRM_DRIVER flag, and re-order unload.

Allow drivers to addmaps that won't be removed by lastclose or unload.
The unload needs to be re-ordered to avoid removing the hashs before
the driver has removed the final maps.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: enable udev node creation
Dave Airlie [Wed, 28 Nov 2007 23:48:20 +0000 (09:48 +1000)]
drm: enable udev node creation

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: Make DRM_IOCTL_GET_CLIENT return EINVAL when it can't find client #idx.
Eric Anholt [Thu, 22 Nov 2007 08:46:54 +0000 (18:46 +1000)]
drm: Make DRM_IOCTL_GET_CLIENT return EINVAL when it can't find client #idx.

Fixes the getclient test and dritest -c.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: move drm_mem_init to proper place in startup sequence
Dave Airlie [Thu, 22 Nov 2007 08:43:46 +0000 (18:43 +1000)]
drm: move drm_mem_init to proper place in startup sequence

For TTM this needs to be called later.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: call driver load function after initialising AGP
Dave Airlie [Thu, 22 Nov 2007 08:23:13 +0000 (18:23 +1000)]
drm: call driver load function after initialising AGP

needed to intel chipset flushing

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: Fix ioc32 compat layer
Ian Romanick [Thu, 22 Nov 2007 07:02:08 +0000 (17:02 +1000)]
drm: Fix ioc32 compat layer

Previously any ioctls that weren't explicitly listed in the compat ioctl
table would fail with ENOTTY.  If the incoming ioctl number is outside the
range of the table, assume that it Just Works, and pass it off to drm_ioctl.
This make the fence related ioctls work on 64-bit PowerPC.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: fd.o bug #11895: Only add the AGP base to map offset if the caller didn't.
Eric Anholt [Thu, 22 Nov 2007 06:55:15 +0000 (16:55 +1000)]
drm: fd.o bug #11895: Only add the AGP base to map offset if the caller didn't.

The i830 and newer intel 2D code adds the AGP base to map offsets already,
because it wasn't doing the AGP enable which used to set dev->agp->base.

Credit goes to Zhenyu for finding the issue.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agoi915: add suspend/resume support
Jesse Barnes [Thu, 22 Nov 2007 04:14:14 +0000 (14:14 +1000)]
i915: add suspend/resume support

Add suspend/resume support to the i915 driver.  Moves some of the
initialization into the driver load routine, and fixes up places where we
assumed no dev_private existed in some of the cleanup paths.  This allows
us to suspend/resume properly even if X isn't running.

Signed-off-by: Dave Airlie <airlied@linux.ie>
18 years agodrm: update DRM sysfs support
Jesse Barnes [Thu, 22 Nov 2007 04:02:38 +0000 (14:02 +1000)]
drm: update DRM sysfs support

Make DRM devices use real Linux devices instead of class devices, which are
going away.  While we're at it, clean up some of the interfaces to take
struct drm_device * or struct device * and use the global drm_class where
needed instead of passing it around.

Signed-off-by: Dave Airlie <airlied@linux.ie>