Pierre Ossman [Fri, 21 Jan 2005 11:19:40 +0000 (11:19 +0000)]
[MMC] wbsd update
Patch from Pierre Ossman
This patch includes the latest changes to the wbsd driver.
* Proper usage of kunmap.
* Comment about hw bugs.
* Waits for data transfers to finish properly.
* Added module version info.
* FIFO bug fix for small reads.
* Optimised FIFO loop.
* DMA demand mode.
* IRQ race condition when sending commands fixed.
Petr Vandrovec [Fri, 21 Jan 2005 03:57:23 +0000 (19:57 -0800)]
[PATCH] Fix x86-64 vsyscall32 mapping
The x86-64 kernel incorrectly marks the 32-bit vsyscall page mapping at
virtual address 0xffffe000 as a global one, even though that mapping
does not exist globally. As such, task switches do not correctly
invalidate the mapping, and strange behaviour ensues if a 64-bit program
happens to use that same virtual address for something else.
Jens Axboe [Fri, 21 Jan 2005 02:27:36 +0000 (18:27 -0800)]
[PATCH] Fix md using bio on stack with bio clones
If md resides on top of a driver using bio_clone() (such as dm), it will
oops the kernel due to md submitting a botched bio that has a veclist but
doesn't have bio->bi_max_vecs set.
This patch inlines shortname_info_to_lcase() by hand. At least my compiler
(gcc 3.3.4 from Debian) doesn't go all the way, so the compiled text size is
decreased by this patch. And IMHO the code gets more readable, too.
The terms (base->valid && ext->valid), (ext->lower || ext->upper) and
(base->lower || base->upper) are trivially found to be true at the single
callsite of shortname_info_to_lcase(). The relevant lines are included in
this patch file.
Andi Kleen [Fri, 21 Jan 2005 00:09:19 +0000 (16:09 -0800)]
[PATCH] Some fixes for compat ioctl
While doing some compat_ioctl conversions I noticed a few issues in
compat_sys_ioctl:
- It is not completely compatible to old ->ioctl because the traditional
common ioctls are not checked before it. I added a check for those. The
main advantage is that the handler now works the same as a traditional
handler even when it returns -EINVAL
- The private socket ioctl check should only apply for sockets.
- There was a security hook missing. Drawback is that it uses the same
hook now, and the LSM module cannot distingush between 32bit and 64bit
clients. But it'll have to live with that for now.
Ingo Molnar [Fri, 21 Jan 2005 00:08:46 +0000 (16:08 -0800)]
[PATCH] completion API additions
Adds 3 new completion API calls, which are a straightforward extension of
the current APIs:
int wait_for_completion_interruptible(struct completion *x);
unsigned long wait_for_completion_timeout(struct completion *x,
unsigned long timeout);
unsigned long wait_for_completion_interruptible_timeout(
struct completion *x, unsigned long timeout);
This enables the conversion of more semaphore-using code to completions.
There is code that cannot be converted right now (and is forced to use
semaphores) because these primitives are missing. Thomas Gleixner has a
bunch of patches to make use of them.
Signed-off-by: Ingo Molnar <mingo@elte.hu> Tested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Corey Minyard [Fri, 21 Jan 2005 00:08:29 +0000 (16:08 -0800)]
[PATCH] Minor IPMI driver updates
This patch fixes counting of unhandled messages. Messages that were
handled internally by the driver (to the NULL user) were miscounted as
unhanlded responses. This counts them properly.
This patch also fixes the DMI 16-byte setting, which was set as a 16-bit
setting.
It also uses the right value to initilize the address memory when using a
memory-based interface.
To convert page->index to a byte index you need to cast it to loff_t first
so it's a 64bit value. There have been quite a few places that got it
wrong in the kernel. To make it easier a nice little helper would be nice,
and in fact the NFS code already has it. Let's move it to pagemap.h so
everyone can use it.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sa_handler isn't the first member of struct sigaction on mips. Use C99
initializers to avoid a compiler warning. (There don't seem to be more
serious problems as mips worked with that warning for ages)
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Fri, 21 Jan 2005 00:07:42 +0000 (16:07 -0800)]
[PATCH] Use -Wno-pointer-sign for gcc 4.0
Compiling an allyesconfig kernel straight with a gcc 4.0 snapshot gives
nearly 10k new warnings like:
warning: pointer targets in passing argument 5 of `cpuid' differ in signedness
Since the sheer number of these warnings was too much even for the most
determined kernel janitors (I actually asked ;-) and I don't think it's a
very serious issue to have these mismatches I submitted an new option to
gcc to disable it. It was incorporated in gcc mainline now.
This patch makes the kernel compilation use it. There are still quite a
lot of new warnings with 4.0 (mostly about uninitialized variables), but
the compile log looks much nicer nnow.
Chris Wright [Fri, 21 Jan 2005 00:07:25 +0000 (16:07 -0800)]
[PATCH] consolidate arch specific resource.h headers
Most of the include/asm-*/resource.h headers are the same as one another.
This patch makes one generic version, include/asm-generic/resource.h, and
uses that when appropriate. The only vaguely interesting things here are
that the generic version introduces a new _STK_LIM_MAX macro, which can be
populated by an arch (ia64 and parisc needed that). Also, some arches hid
RLIM_INFINITY under __KERNEL__, while others did not. The generic version
does not, so the following arches will see that change:
arm, arm26, mips, ppc, ppc64, sh (and hence sh64)
And, finally, some arches maintain their own order for the resource
numbers. This is now marked by __ARCH_RLIMIT_ORDER, and is used by the
following arches:
alpha, mips, sparc, and sparc64.
This actually uncovered a mips bug (fix already sent, this patch is
relative to that fix), where the default RLIMIT_MEMLOCK was set to
RLIM_INFINITY and RLIMIT_NPROC set to MLOCK_LIMIT (the latter is no big
deal because RLIMIT_NPROC default is overwritten dynamically during bootup
in fork_init()). Also, this change makes alpha's default for RLIMIT_NPROC
change from RLIM_INFINITY to 0, but again...no problem as it's dynamically
overwritten during bootup.
The following arches are left untouched:
m68knommu: untouched (uses m68k/resource.h)
sh64: untouched (uses asm-sh/resource.h)
um: untouched (uses arch code already)
Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric Lammerts [Fri, 21 Jan 2005 00:07:09 +0000 (16:07 -0800)]
[PATCH] ext3: commit superblock before panicking
I have a problem with errors=panic on ext3. When a panic occurs, the error
event is not recorded anywhere. So after the reboot, e2fsck doesn't kick
in, the file system gets mounted again and the box panics again...
Patch below moves the ERRORS_PANIC test down a bit so the journal is
aborted before panic() is called.
Signed-off-by: Eric Lammerts <eric@lammerts.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
H. Peter Anvin [Fri, 21 Jan 2005 00:06:53 +0000 (16:06 -0800)]
[PATCH] Use official Unicodes for DEC VT characters
The use of U+F800 to U+F804 has been deprecated since 2003; this makes the
deprecation effective by replacing these characters with the officially
assigned U+23BA to U+23BD.
It also updates unicode.txt to match the latest version from the LANANA
webpage.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Egbert Eich [Fri, 21 Jan 2005 00:06:35 +0000 (16:06 -0800)]
[PATCH] vgacon fixes to help font restauration in X11
So far the X.Org/XFree86 Xservers use internal functions to perform
saving/restoring of console fonts. This doesn't work under all
circumstances and has disadvantages:
1. On some platforms (IA64) X needs to POST the BIOS before
it even has a chance to access the hardware itself. This POSTing
will usually undo any changes to the graphics hardware that the
kernel may have done.
2. More and more drivers fully rely on BIOS support. However
the BIOS functions which could be used to save/restore
register settings may be broken so the only way of mode
save/restore is getting/setting the BIOS mode ID.
This will restore the BIOSes default fonts, not the custom font
that the user may have loaded.
I would like to utilize the kernel's save/restore console fonts ioctls to
save/restore the text mode console fonts from inside X.
The patch does two things:
1. Eliminates the optimization that returns from vgacon_adjust_height()
early (without reprogramming the HW) when the hight of the font hasn't
changed.
2. Resets the stored 'from' and 'to' lines for the text cursor in
vgacon_adjust_height() to cause vgacon_set_cursor_size() reprogram
the textcursor start and end line.
These are necessary to sanitize the HW in case something other than the
kernel has changed the register values without restoring them properly.
I'm fully aware that in the long run we will need to look into a new driver
model for graphics where no two instances fight over who gets register
access. However such a model won't be created nor will we get the majority
of the drivers ported over night. Therefore we need to find an interim
solution for the most pressing problems.
Signed-off-by: Egbert Eich <eich@freedesktop.org> Approved-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/mips/kernel/binfmt_elfn32.c needs to override e_flags for elf
coredumps. It already defines ELF_CORE_EFLAGS before including
binfmt_elf.c, but the latter doesn't pick up the define yet.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Mosberger [Fri, 21 Jan 2005 00:05:03 +0000 (16:05 -0800)]
[PATCH] avoid sparse warning due to time-interpolator
The "addr" member in the time-interpolator is sometimes used as a
function-pointer and sometimes as an I/O-memory pointer. The attached
patch tells sparse that this is OK.
Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] move read-only and immutable checks into permission()
Currently it's up to the filesystem ->permission method to check whether
the filesystem is readonly or the file marked immutable. But this is
really a VFS decision, and the distintion becomes more important when
moving to per-mountpoint read only flags.
For most filesystems that have been using generic_permission this is not
change in behaviour. For those that we're missing the check (cifs without
CIFS_MOUNT_NO_PERM and coda [1]) this is a bugfix.
Both reiserfs and xfs have this check still in their ->permission routine
because they call it from other places aswell. I'll try switching them
over to generic_permission and will take care of this one.
[1] coda_ioctl_permission always returns 0, aka always grants access,
which looks more than fishy to me.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Kara [Fri, 21 Jan 2005 00:04:02 +0000 (16:04 -0800)]
[PATCH] Minor ext3 speedup
Remove unnecessary division and modulo from ext3 code in often used paths.
Without the patch an oprofile of dbench load shows ext3_get_group_desc()
uses 0.84% and ext3_group_sparse() 1.51%, with the patch the numbers are
0.33% and 0.27% respectively.
Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andreas Dilger <adilger@clusterfs.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Prasanna Meda [Fri, 21 Jan 2005 00:03:48 +0000 (16:03 -0800)]
[PATCH] file_table:expand_files() code cleanup
expand_files() cleanup: Make expand_files() common code for
fork.c:fork/copy_files(), open.c:open/get_unused_fd() and
fcntl.c:dup/locate_fd().
expand_files() does both expand_fd_array and expand_fd_set based on the
need. This is used in dup(). open() and fork() duplicates the work of
expand files. At all places we check for expanding fd array, we also check
for expanding fdset. There is no need of checking and calling them
seperately.
This change also moves the expand_files to file.c from fcntl.c, and makes
the expand_fd_array and expand_fd_set local to that file.
Jeff Dike [Fri, 21 Jan 2005 00:03:15 +0000 (16:03 -0800)]
[PATCH] uml: fix a stack corruption crash
Fix a race where signals could be handled to the parent of a new process on
the kernel stack of the child, corrupting that stack, and crashing UML when
the next first runs.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>