[PATCH] vm: convert users of remap_page_range() under sound/ to use remap_pfn_range()
This patch converts all users of remap_page_range() under sound/ to use
remap_pfn_range(), with the exception of maestro3 changelogs, which are likely
expected to be preserved intact apart from additions (as most changelogs are),
regardless of API changes.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] vm: convert users of remap_page_range() under include/asm-*/ to use remap_pfn_range()
This patch converts uses of remap_page_range() via io_remap_page_range() in
include/asm-*/ to use remap_pfn_range(). io_remap_page_range() has a similar
physical address overflow issue that needs to be addressed later.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] vm: introduce remap_pfn_range() to replace remap_page_range()
This patch introduces remap_pfn_range(), destined to replace
remap_page_range(), to which all callers of remap_page_range() are converted
in the sequel.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:27:48 +0000 (18:27 -0700)]
[PATCH] nfsd4: move code to truncate on open to separate function
for OPEN with O_TRUNC, if the truncate fails, the open fails. for
nfs4_open_upgrade, this means undo the get_write_access. for new OPENs, this
means release the newly created stateid.
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:27:34 +0000 (18:27 -0700)]
[PATCH] nfsd4: fix putrootfh return
Thanks to Al Viro for noticing that putrootfh could return either a linux or
an nfs error.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:27:19 +0000 (18:27 -0700)]
[PATCH] nfsd: clean up nfsd4_process_open2
Comments, dprintk cleanup
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:27:05 +0000 (18:27 -0700)]
[PATCH] nfsd4: move some nfsd4_process_open2 code to nfs4_new_open
Move most of the code in the new_open case of nfsd4_process_open2 to
nfs4_new_open.
Signed-off-by: Andy Adamson <andros@umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:26:49 +0000 (18:26 -0700)]
[PATCH] nfsd4: move open_upgrade code into a separate function
Move most of the code for the open_upgrade case into a separate
nfs4_upgrade_open.
Signed-off-by: Andy Adamson <andros@umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:26:38 +0000 (18:26 -0700)]
[PATCH] nfsd4: reorganize "if" in nfsd4_process_open2 to make test clearer
Reorganize "if" in nfsd4_process_open2 to make test clearer; there was no real
reason to test for the negative here.
Signed-off-by: Andy Adamson <andros@umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:26:23 +0000 (18:26 -0700)]
[PATCH] nfsd4: move seqid decrement on reclaim to separate function
Move seqid decrement on reclaim to separate function
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:26:11 +0000 (18:26 -0700)]
[PATCH] nfsd: set OPEN_RESULT_LOCKTYPE_POSIX in open()
We should set the OPEN_RESULT_LOCKTYPE_POSIX flag in the return to open, to
indicate that we support locking.
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:25:56 +0000 (18:25 -0700)]
[PATCH] nfsd4: move open owner checks from nfsd4_process_open2 into new function
nfsd4_process_open2 has become a bit long and contorted. The following
patches break nfsd4_process_open2 into smaller functions and add comments to
describe logic flow, in preparation for delegation state.
We begin by pulling out the code that searches for conflicting open owners
into a separate function.
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:25:41 +0000 (18:25 -0700)]
[PATCH] nfsd: remove incorrect stateid modification in nfsv4 open upgrade
When we upgrade an open, we keep the same stateid and bump only the seqid.
Signed-off-by: Andy Adamson <andros@umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:25:26 +0000 (18:25 -0700)]
[PATCH] nfsd4: fix race in xdr encoding of lock_denied response.
We take a reference on the stateowner, and copy the clientid, instead of just
hoping no one destroys the stateowner before we reference it in
nfsd4_encode_lock_denied.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:25:12 +0000 (18:25 -0700)]
[PATCH] nfsd4: revert awkward extension of state lock over xdr for replay encoding
With the addition of a reference count, we no longer need the code that
conditionally extended the nfs4 state lock over the xdr encode stage.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:24:58 +0000 (18:24 -0700)]
[PATCH] nfsd4: take a reference to preserve stateowner through xdr replay code
Take a reference to preserve the stateowner through the xdr replay code, and
simplify nfsd4_proc_compound a little.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:24:43 +0000 (18:24 -0700)]
[PATCH] nfsd4: reference count stateowners
Reference-counting the nfsd4 stateowner structs will let us fix a race and
simplify some of the xdr code a bit, and may also help us make the nfsd4
locking a little more fine-grained in the future.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:24:28 +0000 (18:24 -0700)]
[PATCH] nfsd: make sure getxattr inode op is non-NULL before calling it
Make sure getxattr inode op is non-NULL before calling it.
Also, security hook should probably be called before calling the getxattr op
the first time.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:24:16 +0000 (18:24 -0700)]
[PATCH] nfsd4: don't take i_sem around call to ->getxattr
The ->getxattr op doesn't take the i_sem (see
Documentation/filesystems/Locking)
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:24:01 +0000 (18:24 -0700)]
[PATCH] nfsd: separate a little of logic from fh_verify into new function
Separate out the little bit of logic in fh_verify that checks the i_mode into
a separate function. This is nicely encapsulated, fh_verify() is overly long
anyway, and this change helps make a subsequent nfs4 named attribute change
clearer.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Wed, 20 Oct 2004 01:23:47 +0000 (18:23 -0700)]
[PATCH] nfsd4: nfsd oopsed when encountering a conflict with a local lock
Bug Fix: Non NFSD conflicting byte-range locks were causing an Oops.
Encode a zero length owner and zero clientid for non NFSD conflicting locks in
the lock_denied response.
Signed-off-by: Andy Adamson <andros@umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Martin Schlemmer [Wed, 20 Oct 2004 01:23:20 +0000 (18:23 -0700)]
[PATCH] Select cpio_list or source directory for initramfs image
Attached is a patch that adds CONFIG_INITRAMFS_SOURCE, enabling you to
either specify a file as cpio_list, or a directory to generate a list from.
It depreciate the INITRAMFS_LIST environment variable introduced not long
ago.
There are some issues (suggestions/patches welcome) that I am not
sure about:
1) I put the menu entry under block devices, but I am not sure if
this is the correct location?
2) There might be a better (or more correct) way to do this with
kbuild?
3) Variable names and especially help text needs some love.
4) I am not sure if I am duplicating work in progress?
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Thayne Harbaugh [Wed, 20 Oct 2004 01:23:04 +0000 (18:23 -0700)]
[PATCH] gen_init_cpio uses external file list
This patch makes gen_init_cpio generate the initramfs_data.cpio from a file
which contains a list of entries: file, dir, nod. I swapped the order of
filename/location for the file arguments so that it would be more uniform
with the dir and node tyes.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Michael Hunold [Wed, 20 Oct 2004 01:22:10 +0000 (18:22 -0700)]
[PATCH] DVB: misc driver updates
- [DVB] av7110: convert MODULE_PARM() to module_param(), replace home-brewn
waiting stuff in osd code with wait_event_interruptible_timeout()
- [DVB] av7110: put a semaphore around osd calls to make sure they're
properly serialized, timeout variable in arm_thread() must be int, not
unsigned long
- [DVB] av7110: add additional OSD window types (patch by Jeremy Jones), new
ioctl OSD_GET_CAPABILITY/OSD_CAP_MEMSIZE; returns size of OSD memory
- [DVB] av7110: put audio/video initialization into separate function
init_av7110_av(); call this function after system initialization and after
arm crash to restore the previous state; thanks to Soeren Sonnenburg
<bugreports@nn7.de> for this patch.
Michael Hunold [Wed, 20 Oct 2004 01:20:58 +0000 (18:20 -0700)]
[PATCH] DVB: frontend conversion #3
- [DVB] dvb_dummy_fe, grundig_29504-401, grundig_29504-491, mt312: convert
from dvb-i2c to kernel-i2c, MODULE_PARM() to module_param(), dvb_delay() to
mdelay()
- [DVB] update frontend Kconfig
Signed-off-by: Michael Hunold <hunold@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Michael Hunold [Wed, 20 Oct 2004 01:20:16 +0000 (18:20 -0700)]
[PATCH] DVB: core update
- [DVB] remove non-linux compatibility stuff from dvb_functions. rest in
peace.
- [DVB] remove home-brewn dvb-i2c stuff. rest in peace.
- [DVB] convert MODULE_PARM() to module_param()
- [DVB] convert dvb_delay() to mdelay()
- [DVB] convert C++ comments to C comments
- [DVB] dvb_ca_en50221: fix for matrix CAMs from Sjoerd Simons, use c99
initializers, Fix for aston CAM read timeout problems, Moved CAM CTRL IF
reset to a better place, better debugging with multiple cards (Sjoerd
Simons)
- [DVB] dvb-frontend: patch by Wolfgang Fritz: suppress spurious events
during tuning, Do not allow write (and related) ioctls when frontend is
opened RDONLY, Properly lock the frontend module on open/close, patch by
Christopher Pascoe: remove bogus up(fe->sem) on fe thread exit, patch by
Christopher Pascoe: remove bogus up(fe->sem) on fe thread exit
- [DVB] dvb-demux: using spin_lock instead of spin_lock_irq caused a race
condition between irq/tasklet and user space task
- [DVB] dvb-core: add sysfs/udev support using "class_simple", prevent Oops
when PES filter is set with invalid pes_type, protect feed_list with
spin_locks
Signed-off-by: Michael Hunold <hunold@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Michael Hunold [Wed, 20 Oct 2004 01:19:59 +0000 (18:19 -0700)]
[PATCH] DVB: skystar2 dvb bt8xx update
- [DVB] convert drivers from dvb-i2c to kernel-i2c
- [DVB] convert MODULE_PARM() to module_param()
- [DVB] convert dvb_delay() to mdelay()
- [DVB] dvb-bt8xx: convert home-brewn bttv i2c access to a real bttv sub-driver
Signed-off-by: Michael Hunold <hunold@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Michael Hunold [Wed, 20 Oct 2004 01:19:44 +0000 (18:19 -0700)]
[PATCH] DVB: documentation update
- [DVB] add udev.txt which describes how to use dvb and udev/sysfs
- [DVB] add Visionplus VisionDTV USB-Ter DVB-T adapter documentation
- [DVB] update TT USB DEC documentation
- [DVB] update various Kconfig entries
- [DVB] remove obsolete firmware documentation
Signed-off-by: Michael Hunold <hunold@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Gerd Knorr [Wed, 20 Oct 2004 01:18:39 +0000 (18:18 -0700)]
[PATCH] DVB/V4L dependency fix
The problem is that dvb is way to much work-in-progress right now, it's
almost impossible to build something which works on both mainline kernel +
latest dvb cvs. Hope at least the interfaces are settled soon, for now I
gave up on getting it work in mainline in short-term.
The patch below compiles the DVB card configuration code only when
VIDEO_CX88_DVB is enabled (which is commented right now in Kconfig due to
being broken).
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Gerd Knorr [Wed, 20 Oct 2004 01:18:25 +0000 (18:18 -0700)]
[PATCH] v4l: cx88 driver update
This is a major update of the cx88 driver. Main new feature is support
for the MPEG PCI function of the cx2388x chips. The changes in detail:
* A bunch of code restructions, to allow multiple modules (one per PCI
function) work on top of the core module.
* Add a new module with common code for the mpeg PCI function.
* Add a new module to support mpeg encoder cards (connexant
"blackbird" reference design). That one is not much tested yet and
may have bugs. They can be easily workarounded by not loading the
module through, it isn't needed to capture uncompressed video.
* Add a new module to support DVB cards. That one is better tested
than the blackbird one, but it needs additional cutting-edge stuff
from the dvb project, thats why it is disabled in Kconfig for now.
* Several cleanups along the way: use kthread, use msleep(), drop some
2.4.x compatibility code, move insmod options to 2.6 style, ...
* adapt code to the video-buf changes.
* suspend fixes.
* as usual some new tv cards.
Gerd Knorr [Wed, 20 Oct 2004 01:18:09 +0000 (18:18 -0700)]
[PATCH] v4l: bttv driver update
This update for the bttv driver. Changes:
* adapt the driver to video-buf changes.
* It also added sanity checks for the bt878 risc code buffer sizes.
* adds support for new tv cards.
* cleanup i2c driver autoload.
* misc cleanups (msleep, ...).
* fix IRQ bug when stopping vbi capture.
* drop check for cx2388x (bt878 successor) and the printk saying bttv
doesn't support these.
* set i2c class correctly for dvb cards.
Gerd Knorr [Wed, 20 Oct 2004 01:17:42 +0000 (18:17 -0700)]
[PATCH] v4l: avoid using struct file ptrs in video-buf
This patch makes the video-buf helper module pass through a void pointer
instead of a struct file pointer, that makes the code also usable when no
file pointer is available. This is needed for when using the video-buf
infrastructure to manage DMA buffers for DVB cards.
The file pointer was used by the videobuf_queue_ops callbacks to get the
drivers private data via file->private_data, now a pointer to the drivers's
private data can be passed directly.
Adaptions of the drivers follow with separate patches.
Hugh Dickins [Wed, 20 Oct 2004 01:17:12 +0000 (18:17 -0700)]
[PATCH] lighten mmlist_lock
Let's lighten the global spinlock mmlist_lock.
What's it for?
1. Its original role is to guard mmlist.
2. It later got a second role, to prevent get_task_mm from raising
mm_users from the dead, just after it went down to 0.
Firstly consider the second: __exit_mm sets tsk->mm NULL while holding
task_lock before calling mmput; so mmlist_lock only guards against the
exceptional case, of get_task_mm on a kernel workthread which did AIO's
use_mm (which transiently sets its tsk->mm without raising mm_users) on an
mm now exiting.
Well, I don't think get_task_mm should succeed at all on use_mm tasks.
It's mainly used by /proc/pid and ptrace, seems at best confusing for those
to present the kernel thread as having a user mm, which it won't have a
moment later. Define PF_BORROWED_MM, set in use_mm, clear in unuse_mm
(though we could just leave it), get_task_mm give NULL if set.
Secondly consider the first: and what's mmlist for?
1. Its original role was for swap_out to scan: rmap ended that in 2.5.27.
2. In 2.4.10 it got a second role, for try_to_unuse to scan for swapoff.
So, make mmlist a list of mms which maybe have pages on swap: add mm to
mmlist when first swap entry is assigned in try_to_unmap_one (pageout), or
in copy_page_range (fork); and mmput remove it from mmlist as before,
except usually list_empty and there's no need to lock. drain_mmlist added
to swapoff, to empty out the mmlist if no swap is then in use.
mmput leave mm on mmlist until after its exit_mmap, so try_to_unmap_one can
still add mm to mmlist without worrying about the mm_users 0 case; but
try_to_unuse must avoid the mm_users 0 case (when an mm might be removed
from mmlist, and freed, while it's down in unuse_process): use
atomic_inc_return now all architectures support that.
Some of the detailed comments in try_to_unuse have grown out of date:
updated and trimmed some, but leave SWAP_MAP_MAX for another occasion.
Hirofumi Ogawa [Wed, 20 Oct 2004 01:16:56 +0000 (18:16 -0700)]
[PATCH] FAT: remove validity check of FAT first entry
The low byte of FAT's first entry must have same value with media-field.
So, I added that validity check for some case. In fact, in some case
this check detected non-FAT filesystem. But in real world,
unfortunately too many devices is writing a wrong value.
Hirofumi Ogawa [Wed, 20 Oct 2004 01:15:04 +0000 (18:15 -0700)]
[PATCH] FAT: rewrite the cache for file allocation table lookup
This rewrites the cache stuff for file allocation table (FAT).
This cache stocks the more pieces of FAT-chain by counting the number
of contiguous data blocks. And if cache hit, since a block number can
calculate without looking FAT-chain up, fat_get_block() become more
fast.
But if data blocks was fragmenting, unfortunately this cache is unuseful.
read from block device
[1st]# time dd if=/dev/hda6 of=/dev/null bs=1M count=2048 2147483648 bytes transferred in 229.524189 seconds (9356241 bytes/sec)
real 3m49.557s, user 0m0.026s, sys 1m20.414s
[2nd]# time dd if=/dev/hda6 of=/dev/null bs=1M count=2048 2147483648 bytes transferred in 229.539358 seconds (9355623 bytes/sec)
real 3m49.647s, user 0m0.036s, sys 1m20.144s
read from full contiguous file with this patch
[1st]# time dd if=data of=/dev/null bs=1M count=2048 2147483648 bytes transferred in 337.959477 seconds (6354264 bytes/sec)
real 5m37.970s, user 0m0.031s, sys 1m21.915s
[2nd]# time dd if=data of=/dev/null bs=1M count=2048 2147483648 bytes transferred in 225.401699 seconds (9527362 bytes/sec)
real 3m45.476s, user 0m0.027s, sys 1m19.286s
read from full fragmented file with this patch
[1st]# time dd if=data of=/dev/null bs=1M count=2048 2147483647 bytes transferred in 1146.529081 seconds (1873030 bytes/sec)
real 19m6.538s, user 0m0.020s, sys 1m32.774s
[2nd]# time dd if=data of=/dev/null bs=1M count=2048 2147483647 bytes transferred in 1045.084822 seconds (2054841 bytes/sec)
real 17m25.152s, user 0m0.022s, sys 1m34.801s
read from full contiguous file without this patch
[1st]# time dd if=data of=/dev/null bs=1M count=2048 2147483648 bytes transferred in 348.144707 seconds (6168365 bytes/sec)
real 5m48.169s, user 0m0.019s, sys 1m29.962s
[2nd]# time dd if=data of=/dev/null bs=1M count=2048 2147483648 bytes transferred in 324.017361 seconds (6627681 bytes/sec)
real 5m24.038s, user 0m0.023s, sys 1m20.602s
read from full fragmented file without this patch
[1st]# time dd if=data of=/dev/null bs=1M count=2048 2147483647 bytes transferred in 1156.845693 seconds (1856327 bytes/sec)
real 19m16.855s, user 0m0.031s, sys 1m32.172s
[2nd]# time dd if=data of=/dev/null bs=1M count=2048 2147483647 bytes transferred in 1066.518713 seconds (2013545 bytes/sec)
real 17m46.526s, user 0m0.023s, sys 1m33.630s
Add atomic_sub_and_test() to sparc32, implemented in terms of
atomic_sub_return(), so reiser4 can be simultaneously microoptimized for
x86 and made to pass compilation testing on sparc32.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
KaiGai Kohei [Wed, 20 Oct 2004 01:13:58 +0000 (18:13 -0700)]
[PATCH] atomic_inc_return() for arm26
This patch implements atomic_inc_return() and so on for ARM26. Because
Hugh says that SMP is not supported in arm26, it is implemented by normal
operations between local_irq_save() and local_irq_restore() like another
atomic operations.
David Woodhouse [Wed, 20 Oct 2004 01:13:00 +0000 (18:13 -0700)]
[PATCH] JFFS2: work around uninitialised use of usercompr field by old code.
We didn't use the 'usercompr' field before recently. Unfortunately we didn't
set it to zero either, so there's a lot of file systems out there with it set
to 0x5a. Deal with that rather than getting confused.
Signed-Off-By: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Wed, 20 Oct 2004 01:12:46 +0000 (18:12 -0700)]
[PATCH] x86_64/io_apic init section fixups
Code section errors in i386/io_apic.c found by scripts/reference_init.pl.
Looks like they could cause problems for a few drivers or in a real hotplug
environment.
Error: ./arch/i386/kernel/io_apic.o .text refers to 000018ff R_386_PC32 .init.text
Error: ./arch/i386/kernel/io_apic.o .text refers to 00001967 R_386_PC32 .init.text
(as above thru {A}, then:)
IO_APIC_irq_trigger
irq_trigger
MPBIOS_trigger >> removing __init from this led to
needing to remove __init from
EISA_ELCR also.
Signed-off-by: Randy Dunlap <rddunlap@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Gordon Jin [Wed, 20 Oct 2004 01:12:34 +0000 (18:12 -0700)]
[PATCH] x86_64: correct copy_user_generic return value when exception happens
Fix a bug that arch/x86_64/lib/copy_user:copy_user_generic will return a
wrong value when exception happens.
In the case the address is not 8-byte aligned (i.e. go into
Lbad_alignment), if exception happens in Ls11, %rdx will be wrong number of
copied bytes, then copy_user_generic returns wrong value. It also fixed a
bug of zeroing wrong number of bytes of destination at this situation. (In
Lzero_rest)
Signed-off-by: Yanmin Zhang <yanmin.zhang@intel.com> Signed-off-by: Nanhai Zou <nanhai.zou@intel.com> Signed-off-by: Gordon Jin <gordon.jin@intel.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 20 Oct 2004 01:12:05 +0000 (18:12 -0700)]
[PATCH] x86_64: fix IOAPIC on Nvidia boards
Originally suggested by Zwane Mwaikumbo
Ignore all ACPI timer overrides on all Nvidia boards. The fallback doesn't
work and no Nvidia boards needs a timer override. But some buggy BIOS have
it anyways.
Also enable IO-APIC mode by default for Nvidia then.
Andi Kleen [Wed, 20 Oct 2004 01:11:26 +0000 (18:11 -0700)]
[PATCH] x86_64: use TSC on SMP EM64T machines
x86-64 MP kernels always used HPET timing when available. This was done
because AMD systems don't have synchronized TSCs in all cases. On Intel
this is not true (except Summit), so use faster TSC timing for those.
Also only enable HPET gettimeofday when there is more than one CPU online.
Andi Kleen [Wed, 20 Oct 2004 01:10:56 +0000 (18:10 -0700)]
[PATCH] x86_64: drop old APIC workaround
Suggested by Ingo Molnar.
Drop APIC level workaround for old IO-APICs on x86-64 because it is a
significant part of interrupt handling time. x86-64 only runs on modern
chipsets that probably don't have this bug.
Rusty Russell [Wed, 20 Oct 2004 01:10:43 +0000 (18:10 -0700)]
[PATCH] module_param_array() should take a pointer
module_param_array() takes a variable to put the number of elements in.
Looking through the uses, many people don't care, so they declare a dummy
or share one variable between several parameters. The latter is
problematic because sysfs uses that number to decide how many to display.
The solution is to change the variable arg to a pointer, and if the pointer
is NULL, use the "max" value. This change is fairly small, but fixing up
the callers is a lot of (trivial) churn.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Robin Holt [Tue, 19 Oct 2004 20:38:23 +0000 (20:38 +0000)]
[IA64-SGI] Distribute useage of BTE interfaces.
During peak utilization periods, the first interface on a node has
an inordinately large amount of contention. This is due to all
cpus starting their scan for an interface at 0. This patch distributes
that based upon the slice the requesting cpu is attached to.
Signed-off-by: Robin Holt Signed-off-by: Tony Luck <tony.luck@intel.com>
Robin Holt [Tue, 19 Oct 2004 20:36:01 +0000 (20:36 +0000)]
[IA64-SGI] Correct BTE notification timeouts on SN2.
The SN2 Block Transfer Engine occassionally fails to send a notification
that it has completed a transfer to the kernel. This patch adds a
timeout mechanism which will detect the failure, reset the interface,
and then retry the transfer.
Signed-off-by: Robin Holt Signed-off-by: Tony Luck <tony.luck@intel.com>
Robin Holt [Tue, 19 Oct 2004 17:33:58 +0000 (17:33 +0000)]
[IA64-SGI] Double spin_unlock in bte.c
If all bte interfaces are in use, the current code will leave the
bte pointer set when exiting from the loop trying to locate an
interface to use. This results in two processes using the same
interface and both trying to free the same one. With a
premptible kernel, this results in the preempt count getting
off.
Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Russell King [Tue, 19 Oct 2004 17:11:22 +0000 (18:11 +0100)]
[SERIAL] Keep trying to register our console device.
Some serial drivers receive their serial port device information via
the device model. This unfortunately means that the selected port
may not be available when the console subsystem initialises, so we
must keep trying to register the console after each port is added.
Russell King [Tue, 19 Oct 2004 16:50:24 +0000 (17:50 +0100)]
[SERIAL] Add new port registration/unregistration functions.
serial8250_register_port()/serial8250_unregister_port() has the
capability of registering ports with their struct device nodes,
which allows sysfs to indicate which tty devices belong to which
hardware devices.
We also add a serial8250 platform device driver in an initial
attempt at PM for ISA ports. However, I'm leaving out the
platform device for the time being since adding that would cause
potential oops issues.
Russell King [Tue, 19 Oct 2004 16:22:21 +0000 (17:22 +0100)]
[SERIAL] Make port autoprobing set up->capabilities.
Convert port autoprobing to set up->capabilities as it discovers
various capabilities of the port. Warn when the detected
capabilities do not match those in the uart_config table.
Russell King [Tue, 19 Oct 2004 16:00:01 +0000 (17:00 +0100)]
[SERIAL] Clean up handling of LSR in receive function.
It's pointless accessing the LSR value via a pointer all the time -
it prevents the compiler optimising it. Also, ensure that we
recognise a break sent during a kernel printk correctly.
Gerd Knorr [Tue, 19 Oct 2004 09:19:10 +0000 (02:19 -0700)]
[PATCH] I2C: i2c bus power management support
The patch below adds power management support to the i2c bus.
It adds just two small functions which call down to the devices
power management functions if they are present, so the i2c device
drivers will receive the suspend and resume events.
Jean Delvare [Tue, 19 Oct 2004 08:24:45 +0000 (01:24 -0700)]
[PATCH] I2C: lm87 driver ported to Linux 2.6
This is my port of the lm87 driver to Linux 2.6. It is based on the
preliminary work of Jeff Oliver. I then significantly improved the code,
added functionality, tested the whole thing on a real motherboard, fixed
a couple remaining bugs, and here we are.
I'll port a number of improvements and fixes back to the 2.4 version of
the driver after lm_sensors 2.8.8 is released (i.e. soon).
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>