Andi Kleen [Wed, 13 Feb 2002 04:17:35 +0000 (20:17 -0800)]
[PATCH] x86_64 merge: arch + asm
This adds the x86_64 arch and asm directories and a Documentation/x86_64.
It took a bit longer because I first had to make preemption and thread_info
work and also found some other bugs while doing this. The port has been
tested for a long time on UP.
I'm not sure what I should describe. A lot is based on i386 with
a lot of cleanups. I wrote a paper about it for last year's OLS that describes
most of the changes (ftp://ftp.firstfloor.org/pub/ak/x86_64.ps.gz). It is
a bit outdated now, but should give a good overview.
It currently has a completely cut'n'pasted from others+hacked 32bit
emulation. I hope to clean that up in the future by merging the generic
core of this with other 64bit archs.
Paul Mackerras [Wed, 13 Feb 2002 04:27:37 +0000 (20:27 -0800)]
[PATCH] flush_icache_user_range (v2.5.4)
The patch below changes access_process_vm to use a new architecture
hook, flush_icache_user_range, instead of flush_icache_page, and adds
a definition of flush_icache_user_range which does the same thing as
flush_icache_page for all architectures except PPC. (The PPC update
that is in Linus' BK tree already includes a suitable definition of
flush_icache_user_range.)
The reason for doing this is that when flush_icache_page is called
from do_no_page or do_swap_page, I want to be able to do the flush
conditionally, based on the state of the page. In contrast,
access_process_vm needs to do the flush unconditionally since it has
just modified the page. In the access_process_vm case it is useful to
have the information about the user address and length that have been
modified since then we can just flush the affected cache lines rather
than the whole page.
This patch should make it easy to improve performance on alpha, since
there (as I understand it) the icache flush is not needed at all in
do_no_page or do_swap_page, but is needed in access_process_vm. All
that is needed is to make flush_icache_page a noop on alpha. The
patch below doesn't do this, I'll let the alpha maintainers push that
change if they want.
This one-liner fixes an error case in Menuconfig when awk fails.
Written by Andrew Church (achurch@achurch.org).
Reviewed and tested by Michael Elizabeth Chastain (mec@shout.net).
Ingo Molnar [Wed, 13 Feb 2002 15:01:58 +0000 (16:01 +0100)]
- make the preempt-enable test cheaper - only test for the (very rare) TIF_NEED_RESCHED
condition, we test the preemption count in preempt_schedule(). This reduces the icache
footprint and the overhead of preemption.
- plus optimize the irq-path preemption check a bit.
Ingo Molnar [Wed, 13 Feb 2002 14:32:22 +0000 (15:32 +0100)]
this is a fragile piece of the ptrace code, the code relies on a single wakeup coming from the parent.
This fix is necessery after the preempt_schedule() cleanups, it unbreaks 'strace strace ...'.
Ingo Molnar [Wed, 13 Feb 2002 03:45:03 +0000 (04:45 +0100)]
do not unlock irqs before calling schedule() - besides being a small exit() speedup, this also
fixes a preemption race that was introduced by my removal of PREEMPT_ACTIVE.
Ingo Molnar [Tue, 12 Feb 2002 19:57:41 +0000 (20:57 +0100)]
a cleanup and a bugfix in the preemptive kernel:
- the PREEMPT_ACTIVE trick is not needed
- schedule() should check for need_resched, we might miss a
reschedule otherwise.
the cleanup also fixes the bug. The only reason why i kept
preempt_schedule() was to fix up p->state to TASK_RUNNING,
to make it possible to preempt from places that mark the
task TASK_UNINTERRUPTIBLE before adding the task to a waitqueue,
and thus a preemption in that small window could cause the
task to be removed from the runqueue erroneously.
Martin Diehl [Tue, 12 Feb 2002 14:55:33 +0000 (06:55 -0800)]
[PATCH] usb_set_interface: correct toggle reset
this is a patch to prevent usb_set_interface() from erroneously resetting
the toggles for all endpoints instead of only the affected ones from the
requested interface/altsetting. I've also added some missing parentheses
to related macros in usb.h as I prefered not to take special care for
nasty side-effects ;-)
Patch below was created against 2.4.18-pre9 (with some lines of offset it
applies to 2.5.4-pre5 as well).
Tested in multi-interface configuration to provide evidence it:
* correctly identifies the affected endpoints and resets the toggles
* doesn't touch endpoints from other interfaces
* provides correct handling of shared EP0
* solves an issue I had with 2.4.18-pre9 where setting one interface
occasionally caused transfers on other interface to hang due to lost
toggle synchronisation
Despite being a pure bugfix, well localized and (IMHO) pretty obviously
correct wrt. USB-spec, I'd like to suggest including this in early
2.4.19-pre. Just in case some existing driver would somehow workaround
the currently wrong behavior and might break with this fix. And it's
not very urgent right now, as we are probably close to 2.4.18-rc1.
Jeff Garzik [Mon, 11 Feb 2002 20:43:07 +0000 (15:43 -0500)]
Cleanup and fixes to sleeping/scheduling in the olympic token ring
net driver. Also included are a couple of minor error reporting
updates and the proper detection for cardbus removal.
Contributor:
Mike Phillips
Linux Token Ring Project
Jeff Garzik [Mon, 11 Feb 2002 20:36:17 +0000 (15:36 -0500)]
Merge changes from yellowfin GigE net driver version LK1.1.6:
* Only print warning on truly "oversized" packets
* Fix theoretical bug on gigabit cards - return to 1.1.3 behavior
Jeff Garzik [Mon, 11 Feb 2002 20:26:18 +0000 (15:26 -0500)]
Merge ns83820 GigE net driver changes from 2.4.x kernel:
0.13a - optical transceiver support added
by Michael Clark <michael@metaparadigm.com>
0.13b - call register_netdev earlier in initialization
suppress duplicate link status messages
0.15 get ppc (big endian) working
Vojtech Pavlik [Mon, 11 Feb 2002 15:32:56 +0000 (07:32 -0800)]
[PATCH] Update of USB input drivers to the latest versions
Now that the input core changes have made it into 2.5 I can finally
update the USB input drivers to their latest versions.
Here is a patch that does that.
In detail:
HID driver:
Fix a bug in descriptor parsing (array/variable),
namely visible with Logitech new joysticks and mice
Fix bugs in logical/physical min/max parsing
Fix bugs in exponent parsing
Remove workaround for low-speed devices with >8 byte
reports, fix this in a correct way (bigger irq
request)
Untangle some code (fetc_item())
Implement asynchronous input/output/feature report
reading and writing
Implement (hopefully) proper locking in the above
Implement support for devices with an output endpoint
Add some support functions for force feedback support
currently in development
Add entries to the debug dump code, including FF and
exponents
Add more mappings into the hid-input interface
Cleanups here and there
usbkbd driver:
Make LED URBS use GFP_ATOMIC, they'll be called from a
completion handler
Remove dependency on hid.h
usbmouse driver:
Just conversion to the new input core, minor cleanups
Christopher Yeoh [Mon, 11 Feb 2002 14:50:33 +0000 (06:50 -0800)]
[PATCH] mmap can return incorrect errno
mmap currently sets errno to EINVAL when it should be ENOMEM.
SUS/POSIX states that ENOMEM should be returned when:
"MAP_FIXED was specified, and the range [addr, addr + len) exceeds
that allowed for the address space of a process; or if MAP_FIXED was
not specified and there is insufficient room in the address space to
effect the mapping."
The following patch (against 2.4.17) fixes this behaviour:
Petr Vandrovec [Mon, 11 Feb 2002 13:39:50 +0000 (05:39 -0800)]
[PATCH] 2.5.4-pre5 and ncpfs fill_super changes
* fs/ncpfs/inode.c: Return reasonable error codes instead of universal
-EINVAL. Remove printk() as reasonable code is returned.
Set maximum file size limit on ncpfs to 4GB-1.
* fs/ncpfs/sock.c: Return correct error code when send() fails.
Alexander Viro [Mon, 11 Feb 2002 13:26:50 +0000 (05:26 -0800)]
[PATCH] BKL-free ext2_get_block()
Linus, I've got the first of BKL-removal ext2 patches ready to
go. It removes BKL from ext2_get_block() and guts of ext2_truncate().
The only place where we hold BKL on these paths is in dquot.c - probably
can be easily dealt with, but threading quota is a separate story.
Inode metadata (pointers to blocks, both in inode itself and in
indirect blocks, preallocation data and allocation goal) are protected
by rwlock - EXT2_I(inode)->i_meta_lock.
Next steps will involve threading the group descriptors and bitmaps
handling - lock_super() uses in ext2 are going to die. However, that's
a separate story - let's do that step-by-step.
I suspect that patch below will take care of almost all BKL contention
from ext2 - we still have BKL held over directory operations, but for regular
files that's it.
Hans Reiser [Mon, 11 Feb 2002 13:15:52 +0000 (05:15 -0800)]
[PATCH] 08-truncate_update_mtime.diff
truncate now correctly sets mtime always. Before this fix, mtime was not
updated if truncated file was of zero length or if new filesize was bigger
then old.
Problem was noticed by Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
Hans Reiser [Mon, 11 Feb 2002 13:15:30 +0000 (05:15 -0800)]
[PATCH] 03-savelink_dir_truncate.diff
Do not panic on incorrect savelink entries (truncate on directory).
Currently we suppose these can be created if switching between kernels
with and without savelinks support.
What should be happening with the references to the discarded .text.exit
section? I see a __devexit_p mentioned in Documentation/pci.txt, but it
hasn't been implemented except for down inside ieee1394.
In any case, I need something like the following in order to build with
pre-release binutils 2.12. If this sort of thing is acceptible I can
prepare a more comprehensive patch.
David Mosberger [Mon, 11 Feb 2002 13:09:41 +0000 (05:09 -0800)]
[PATCH] video console fix up
Here is the last patch for today: it enables writecombined mappings
for ia64 in fbmem.c and gets rid of an ugly ia64 simulator workaround
in vgacon.c which isn't needed anymore.
David Mosberger [Mon, 11 Feb 2002 13:09:37 +0000 (05:09 -0800)]
[PATCH] fix for elf coredump deadlock
This patch fixes a deadlock condition in the elf core dump that shows
on ia64 because ELF_CORE_COPY_REGS() needs to access user space (to
get a hold of the backing store of the stacked registers). Marcelo
already accepted this into 2.4.17.
David Mosberger [Mon, 11 Feb 2002 13:09:34 +0000 (05:09 -0800)]
[PATCH] dma64_addr_t fix ups
This patch fixes up two places whre dma64_addr_t is used incorrectly.
Note that pci_dev->dma_mask and the second argument to
blk_queue_bounce_limit() are both u64, so the old types clearly are
wrong (besides, dma64_addr_t is supposed to be used only with the
pci_dac_*() routines, as per DaveM's earlier mail).
Rob Radez [Mon, 11 Feb 2002 13:09:30 +0000 (05:09 -0800)]
[PATCH] drivers/char/pcwd.c
This patch to drivers/char/pcwd.c against 2.5.4 does two things:
a) Makes one code snippet more consistent with the rest of the code, and
b) Makes it possible for this code to actually work
Nearly the same patch against 2.4 was reviewed by Alan, and, well, the
maintainer seems to have disappeared. It's also looking like no one uses
this driver much either.
Jens Axboe [Mon, 11 Feb 2002 13:38:30 +0000 (14:38 +0100)]
Remove nr_sectors from bio_end_io end I/O callback. It was a relic
from when completion was potentially called more than once to indicate
partial end I/O. These days bio->bi_end_io is _only_ called when I/O
has completed on the entire bio.
Robert Love [Mon, 11 Feb 2002 12:41:33 +0000 (04:41 -0800)]
[PATCH] Optimized UP preempt fix
I previously sent a patch by Mikael Pettersson to fix the UP+preempt
problem. It seems from your BK repository you have not yet merged it;
if so, this patch takes a different approach which is optimal, removing
the unneeded conditional altogether in the UP case. I have verified UP
and SMP are now correct. Patch is against 2.5.4, please apply.
Stephen Rothwell [Mon, 11 Feb 2002 12:32:46 +0000 (04:32 -0800)]
[PATCH] 2.5.4-pre6 apm compile fix
Here is the patch against 2.5.4. I have compiled this patch under
2.5.3, so it should still be OK.
This patch just resyncs the driver with 2.4.18-pre (which is what is
being testd by others). The only outstanding known problem is some
very strange interaction with VMWARE. But otherwise people seem
happy with the changes.
Original announcement to Dave Jones and Marcelo:
Update a couple of email addresses
Fix the idle handling (this is an improved version of the fix
that Alan Cox has in his -ac tree)
Notify user mode of suspend events before drivers (fix)
Make the idling percentage boot time configurable
Rename kapm-idled to kapmd
Credit to Andreas Steinmetz, Russell King, Thomas Hood and me.
More small updates to come.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
Jens Axboe [Mon, 11 Feb 2002 10:39:44 +0000 (11:39 +0100)]
Replace calls to suser() with capable(). Move those checks to be
as late as possible to avoid accounting overcharging processes with
privilege usage. Applies to 2.5.4-pre3
-- steve.cameron@compaq.com
Jens Axboe [Mon, 11 Feb 2002 10:33:09 +0000 (11:33 +0100)]
This patch fixes a bug that appears when you have more than 16 physical
LUNs attached to a cciss controller, and a tape drive is beyond the 16th
LUN. In such a case, the tape drive would not be accessible without this
patch. Applies to 2.5.4-pre3. -- steve.cameron@compaq.com