Instead of faking a hisax-internal card, just register a card
driven by a submodule directly, which fixes the current crashes
when loading such a driver. This makes use of the just introduced
do_register_isdn() and do_init() helpers.
[PATCH] Use before initialisation in devfs_mk_cdev()
As noted by Gergely Nagy:
"devfs_mk_cdev() first checks the mode passed to it, and if it thinks
it is not a char device, it prints a warning and aborts. Now, this
printing involves the local variable `buf' (char buf[64]), which is
not initialised at that point."
Rusty Russell [Fri, 18 Jul 2003 12:23:55 +0000 (05:23 -0700)]
[PATCH] Make percpu_modcopy a macro
davidm@hpl.hp.com writes:
"I'm working on updating the ia64 tree with local_t etc. One
thing that would really help me: could you make
asm-generic/percpu_modcopy() a macro? The routine depends on
cpu_possible(), but I can't including smp.h in percpu.h since
that would lead to recusive header-file dependencies (and in my
opinion, percpu.h should be more "primitive" than smp.h, so that
it can be included virtually everywhere)."
Rusty Russell [Fri, 18 Jul 2003 12:23:46 +0000 (05:23 -0700)]
[PATCH] Delete init/cleanup_module prototypes in obscure places.
A few places pre-declare "int module_init(void);" and "void
module_cleanup(void);". Other than being obsolete, this is
unneccessary (it's in init.h anyway).
There are still about 100 places which still use the
obsolete-since-2.2 "a function named module_init() magically gets
called": this change frees us up implement that via a macro.
Rusty Russell [Fri, 18 Jul 2003 12:23:37 +0000 (05:23 -0700)]
[PATCH] module_put_and_exit
Author: Neil Brown
Define module_put_and_exit() and use it for nfsd/lockd
Both nfsd and lockd have threads which expect to hold a reference
to the module while the thread is running. In order for the thread
to be able to put_module() the module before exiting, the
put_module code must be call from outside the module.
This patch provides module_put_and_exit in non-modular code which a
thread-in-a-module can call. It also gets nfsd and lockd to use it
as appropriate.
Note that in lockd, we can __get_module in the thread itself as the
creator of the thread is waiting for the thread to startup.
In nfsd and for the 'reclaimer' threaded started by locked, we
__get_module first and put_module if the thread failed to start.
Rusty Russell [Fri, 18 Jul 2003 12:23:22 +0000 (05:23 -0700)]
[PATCH] Sparc64 local_t support
These are the local_t bits for sparc64.
Other platforms such as PPC64 and Alpha (and in fact any "load locked/
store conditional" like platform other than IA64), probably want to do
something similar.
Introduces local_t, a type which is like atomic_t, but the
operations are only atomic from a single CPU's point of view
(ie. atomic against interrupts and softirqs). Some architectures
(eg. i386) can implement these very efficiently.
There are special operations for the case of a local operation on a
per-cpu variable (which is common), which some architectures can
implement efficiently (eg. IA64 keeps all per-cpu variables mapped
at the same address, so no address arithmetic is needed).
The generic implementation given here simply uses atomics on 32-bit
archs, three variables on others. x86 is already implemented specially.
Rusty Russell [Fri, 18 Jul 2003 12:22:58 +0000 (05:22 -0700)]
[PATCH] Centralize Linker Symbols
Richard Henderson point out a while back that linker generated symbols
should be declared as: "char _text[]" so that the compiler can't make
assumptions about them sitting in small sections, etc.
Centralize these defintions in asm/sections.h (where some already
are on x86).
Rusty Russell [Fri, 18 Jul 2003 12:22:50 +0000 (05:22 -0700)]
[PATCH] Allow struct members inside percpu macros
The current percpu macros do not allow __get_cpu_var(foo.val1)
which makes building macros on top of them really difficult. The
reason for this is the __per_cpu postfix appended to per-cpu
variables, designed to catch direct uses. Prepend it instead.
Fix vfat shortname character logic that had wrong signedness
tests.
From Dennis Vshivkov:
"whenever I was trying to create a file using only national
characters for its name, it was always created with an
uppercased shortname (provided that the name was not too
long for 8.3, of course). Everything was fine with latin
filenames, though."
The bug is that we check "buf[0]" as an unsigned character, but
"buf" is just "char *", which (depending on architecture and
compiler options) tends to be signed.
Miles Bader [Fri, 18 Jul 2003 03:12:08 +0000 (20:12 -0700)]
[PATCH] Add v850 `sim85e2s' port, and cleanup v850e2 code
This patch adds support for the `sim85e2s' simulation of the NA85E2S
processor implementation. As part of this, cache-flushing support for
the common v850e2 cache implementation is added.
It also cleans up a bunch of code that was duplicated between different
v850e2 processors.
Miles Bader [Fri, 18 Jul 2003 03:11:09 +0000 (20:11 -0700)]
[PATCH] Cleanup v850 cache-flushing code a bit
(1) Add support for the V850E/ME2 processor
(2) Clean up the cache-flushing function naming a bit
(3) Similar to previous patches, rename everything from `nb85e' to `v850e'.
This patch renames some files, and so contains a number of whole-file
add/removes.
Miles Bader [Fri, 18 Jul 2003 03:10:48 +0000 (20:10 -0700)]
[PATCH] Refactor v850 UART driver
The v850 family contains several related-but-not-identical on-chip
UARTs. This patch factors out the common code and uses it to implement
both types (only one was supported before).
Also, this patch changes the way the v850 UART is initialized, to use
the same method as other linux serial drivers.
This patch renames the UART code to be `v850e_uart' rather than
`nb85e_uart', as the former is more correct. As this change renames
some files too, the patch contains a number of whole-file add/removes.
Andrew Morton [Fri, 18 Jul 2003 02:28:24 +0000 (19:28 -0700)]
[PATCH] "Fix" AS i/o hang with aacraid driver
From: Mark Haverkamp <markh@osdl.org>
Mark says:
"Daniel McNeil and I have been debugging a hang with the aacraid driver
using the as I/O scheduler."
We found that scsi_request_fn would de-queue a request and later
re-queued it. This left the as_data->nr_dispatched variable in an
inconsistent state (it was never being decremented back to zero).
We added a call to elv_completed_request to clean up the state before
re-adding the request. This has fixed our hang problem."
It affects other SCSI drivers, but less frequently. We're assuming this is
the cause of several "everything got stuck in D state" reports.
A very long design discussion has ensued. We don't have a suitably tested fix
ready so I think it is best to put Mark's one-liner in there for now, fix it
for real when everyone gets back from OLS.
Andrew Morton [Fri, 18 Jul 2003 02:28:01 +0000 (19:28 -0700)]
[PATCH] fix bootmem allocator on machines with holes in
From: Anton Blanchard <anton@samba.org>
If the memory we are trying to allocate is too large to fit in the current
region, we should skip to the end. We currently search the available
bitmap, find the area is too small, increment the start by incr and try
again. This resulted in an apparent lockup on a 64GB machine that had a
3GB IO hole starting at 1GB (and the mem_map array would not fit in the
first region).
Also use ALIGN macro instead of an open coded version.
Andrew Morton [Fri, 18 Jul 2003 02:27:54 +0000 (19:27 -0700)]
[PATCH] dm: v4 ioctl interface
From: Joe Thornber <thornber@sistina.com>
v4 of the ioctl interface. Note there never was a v2 or a v3 except in an
unofficial EVMS way.
This works correctly with the 64-bit dev_t patches in -mm kernels.
There is now a config option to allow the user to select v1 or v4, it
defaults to v1. dm-ioctl.[hc] just #includes dm-ioctl-v[14].[hc] depending
on the config option.
If you want to use v4 you will have to update your tools
(libdevmapper/lvm). The latest tools at the time of writing are:
Andrew Morton [Fri, 18 Jul 2003 02:27:46 +0000 (19:27 -0700)]
[PATCH] dm: 'wait for event' race
From: Joe Thornber <thornber@sistina.com>
There was a race associated with the 'wait for a significant event'
functionality.
Basically userland could read the status table, then wait for another
event, but the event it was waiting for could have occurred in the gap
between reading and waiting.
To solve this we assign identifiers to events, in order to successfully
wait for an event both userland and the kernel driver must be in agreement
about what the last event identifier was. If they don't agree the wait
call will return immediately, allowing userland to re-read the status and
see what it missed.
Andrew Morton [Fri, 18 Jul 2003 02:27:31 +0000 (19:27 -0700)]
[PATCH] watchdog: i810-tco support
From: Wim Van Sebroeck <wim@iguana.be>
Adds support for the 82801EB and 82801ER I/O Controller Hub's (ICH5 &
ICH5R). This will add watchdog support for the i865 and i875 motherboard
chipsets. It also removes some extra trailing spaces in the source files.
Andrew Morton [Fri, 18 Jul 2003 02:27:23 +0000 (19:27 -0700)]
[PATCH] vesafb fix
From: Gerd Knorr <kraxel@suse.de>
The patch below fixes some vesafb issues. Changes:
* fixed struct screen_info in tty.h to use portable types. "unsigned
long" for 32bit values doesn't work on hammer machines ...
* limited the framebuffer memory used by vesafb to 16 MB. This avoids
that vesafb's ioremap() eats plenty of kernel address space for no real
benefit if the gfx card has very much memory (some have 128 MB or more,
ia32 has 128 MB address space for vmalloc and ioremap ...).
* mtrr is enabled by default. That should improve the vesafb performance
a lot. Also added a option to disable mtrr.