Forward-port of 2.4.21-ac4 patch by Wilfried Weissmann.
ide_get_or_set_dma_base() may be called via ide_setup_pci_device()
when a PCI controller module is loaded. However, it is defined with __init
and the function is called when its memory is already deallocated.
Ben Collins [Fri, 25 Jul 2003 07:40:53 +0000 (00:40 -0700)]
[PATCH] Update IEEE1394 (r1014)
misc: - Consolidate and make consistent, the NODE_BUS_{FMT,ARGS}
macros.
- Add HPSB_VERBOSE() macro to make VERBOSEDEBUG code a
little cleaner.
ieee1394 : - Replace panic() with BUG and return value in dma routine.
- Reset reset_retries on success or loop recover.
- Add RECV_FLUSH to flush buffers on > 1 irq interval or in
buffer-fill mode.
- Probe logic-unit-subdirectories as children of the
unit-dir.
- Fix compile warning in nodemgr thread.
- Replace tightly scheduled timeout loop with a 50ms timer.
- Better return and usage of BUG_ON() in dma handler.
- Calculate timeout expiry interval at change instead of at
every timeout check.
SBP2 : - Fix logical-unit-directory LUN's.
- Remove procfs interface.
- Fix usage of initdata after init.
Host con : - Change irq output to use __irq_itoa() for sparc.
- Do more to notify bus when module is unloaded, to clear
IRM, etc.
ohci1394 : Fix endianess of async stream packet headers.
A recent change moved the tcq init too early in the init sequence, the
queue isn't initialized at this point which causes the task file
executions to kill elevator with a NULL EIP (->add_req_fn()). This
patch fixes it, acked by Bart.
Bob Miller [Mon, 21 Jul 2003 11:10:54 +0000 (07:10 -0400)]
ISDN: [TRIVIAL] Remove un-needed MOD___USE_COUNT from divamnt's init function.
The module load code adds a reference to the owner field before calling
the modules init function so it isn't necessary for the init function
to do a similar action.
Bob Miller [Mon, 21 Jul 2003 11:08:46 +0000 (07:08 -0400)]
ISDN: [TRIVIAL] Remove un-needed MOD___USE_COUNT from divamnt's init fuction.
The module load code adds a reference to the owner field before calling
the modules init function so it isn't necessary for the init function
to do a similar action.
Bob Miller [Mon, 21 Jul 2003 11:07:09 +0000 (07:07 -0400)]
ISDN: [TRIVIAL] Remove un-needed MOD___USE_COUNT from divamnt's init fuction.
The module load code adds a reference to the owner field before calling
the modules init function so it isn't necessary for the init function
to do a similar action.
Bob Miller [Mon, 21 Jul 2003 11:01:30 +0000 (07:01 -0400)]
ISDN: [TRIVIAL] Remove un-needed MOD___USE_COUNT from divasmain's init fuction.
The module load code adds a reference to the owner field before calling
the modules init function so it isn't necessary for the init function
to do a similar action.
Also fixed the racy check_region()/request_region() calls.
This patch exports the kstat per-cpu variable, needed for
hisax, which uses kstat_irqs() during card probing to make sure
that irqs actually work. This could possibly replaced by a
private counter in the hisax ISRs, but that's really just
unnecessary overhead, since the core kernel already does the work
anyway.
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.
The MOD_INC and MOD_DEC in lapb are no longer necessary in 2.6 since
the module subsystem will not allow lapb to be unloaded as long as a module
that is referencing the symbols (lapb_register/lapb_unregister) is loaded.
- Recognition of reserved anycasts is removed from ipv6_addr_type()
Flag IPV6_ADDR_ANYCAST is removed as well.
- Some meaningless noop code checking for anycast which are not
going to happen is removed from ndisc.c
- ipv6_unicast_destination() replaces suboptimal ipv6_chk_acast_addr()
in data paths
[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.