Alexander Viro [Sun, 17 Nov 2002 09:40:13 +0000 (01:40 -0800)]
[PATCH] more bogus MOD_INC_USE_COUNT removals
- example in Documentation/DocBook/procfs_example.c uses
MOD_..._USE_COUNT for no reason.
- alpha/kernel/srm_env.c uses MOD_...USE_COUNT for no reason _and_ does
lovely stuff like strlen() on user-supplied pointers,
copy_from_user() with unverified size, half-kilobyte on-stack arrays,
etc. Fixed.
- s390{,x}/kernel/debug.c: set ->owner instead of playing with
MOD_..._USE_COUNT in ->open()/->release()
- mwavedd.c: gratitious use of MOD_..._USE_COUNT
- uinput.c: ditto
- radio/miropcm20-rds.c: set ->owner, remove MOD_..._USE_COUNT from
->open()/->release(), fixed an obvious race in the former (it checked
that nobody else had device opened, then did kmalloc() with
GFP_KERNEL, then marked device as opened).
Alexander Viro [Sun, 17 Nov 2002 09:39:09 +0000 (01:39 -0800)]
[PATCH] devfs_remove() helper
All callers of devfs_find_and_unregister() pass 0 in 6th argument. All
uses of that function either pass 0 in 3rd and 4th argument (in which
case the 5th is ignored) or pass the existing pathname in the 2nd (in
which case 3rd, 4th and 5th are ignored). In all cases the first
argument can be trivially made NULL.
devfs_find_and_unregister() is left as-is. All existing callers
converted to new helper - devfs_remove(pathname). Said beast does
equivalent of devfs_find_and_unregister(NULL, pathname, 0, 0, 0, 0);
Douglas Gilbert [Sun, 17 Nov 2002 10:27:15 +0000 (04:27 -0600)]
[update] scsi_mid_low_api.txt
Here is another version of the scsi_mid_low_api.txt
document. It adds descriptions of functions supplied
by the mid level for a LLD (lower level driver) to call.
It is also tries to describe the two, alternate
registration scenarios. How do the terms:
"hotplug initialization model" and "passive
initialization model" sound?
James Bottomley [Sun, 17 Nov 2002 10:11:17 +0000 (04:11 -0600)]
move sd_init_onedisk so that the disk name is usable
After the gendisk changes, the disk name disappeared from the
initialisation methods (sd_spinup et al) because the disk name
is set after the init routines are called. This moves init to be
after the name is set
Andi Kleen [Sun, 17 Nov 2002 09:10:25 +0000 (01:10 -0800)]
[PATCH] nanosecond stat timefields
stat64 has been changed to return jiffies granuality as nsec in previously
unused fields. This allows make to make better decisions on when
to recompile a file. Follows losely the Solaris API.
CURRENT_TIME has been redefined to return struct timespec. The users
who don't use it in a inode/attr context have been changed to use a new
get_seconds() function. CURRENT_TIME is implemented by an out-of-line
function.
There is a small performance penalty in this patch. The previous
filemap code had an optimization to flush atime only once a second.
This is currently gone, which will increase flushes a bit. I believe
the correct solution if it should be a problem is to have per super
block fields that give an arbitary atime flush granuality - so that you
can set it to be only flushed once a hour if you prefer that. I will
work on that later in separate patches if the need should arise.
struct inode and the attr struct has been changed to store struct
timespec instead of time_t for [cma]time. Not all file systems support
this granuality, but some like XFS,NFSv3,CIFS,JFS do. The others will
currently truncate the nsec part on flushing to disk. There was some
discussion on this rounding on l-k previously. I went for simple
truncation because there is not much evidence IMHO that the more
complicated roundings have any advantages. In practice application will
be rather unlikely to notice the rounding anyways - they can only see a
difference when an inode is flush from memory and reloaded in less than
a second, which is rather unlikely.
Manfred Spraul [Sun, 17 Nov 2002 06:13:58 +0000 (22:13 -0800)]
[PATCH] drivers/pcmcia/i8???.c
- function prototypes for request_irq were missing
- after including <linux/interrupt.h>, I got an error due to
a conflict with the 'irq_count()' macro and the irq_count
function. Rename to i385_count_irq
Russell King [Sun, 17 Nov 2002 21:56:28 +0000 (21:56 +0000)]
[ARM] Move ARMv4 wbi functions to separate file
This allows the ARMv4 write buffer + icache entry handling
instructions to be left out of a kernel which doesn't have separate
icache entry handling instructions.
Russell King [Sun, 17 Nov 2002 19:17:13 +0000 (19:17 +0000)]
[ARM] Optimise set_pmd
Since we store two hardware pte tables contiguously, a common
operation is to set two pmd entries. Rather than call set_pmd()
with the associated overhead twice, we set the two PMD entries,
and then call cpu_flush_pmd() to perform any CPU specific handling.
Russell King [Sun, 17 Nov 2002 16:21:13 +0000 (16:21 +0000)]
[ARM] Fix flush_dcache_page()
Make flush_dcache_page() handle user space mappings correctly; with a
VIVT cache, we need to make sure that any user space cache lines are
coherent with the kernels view of the same page of memory.
Russell King [Sun, 17 Nov 2002 14:57:13 +0000 (14:57 +0000)]
[ARM] Cleanup ARM configuration
- FORCE_MAX_ZONEORDER should depend on SA1111, not a collection of
machine specific configuration symbols.
- RPCMOUSE is obsolete; replaced by MOUSE_RISCPC.
Ben Fennema [Sun, 17 Nov 2002 03:35:24 +0000 (19:35 -0800)]
[PATCH] UDF sync with CVS
This patch updates udf to the CVS version:
- removes UDF_RW
- fixes a extraneous read after write which killed CDRW performance
- fixes setting the session
- fix a array index bug in udf_prealloc_extents
- fix symlinks to correspond to the UDF spec
Ingo Molnar [Sun, 17 Nov 2002 03:22:19 +0000 (19:22 -0800)]
[PATCH] threading fix, tid-2.5.47-A3
This introduces the sys_set_thread_address() syscall. It sets the tid
address (which gets cleared at VM release time) and returns the PID so
that the newly initialized 'initial thread' does not have to do an
additional sys_gettid() call.
It is used to bootstrap a thread group where the original thread user
hasn't had a tid address assigned to it by any parent.
Rusty Russell [Sun, 17 Nov 2002 03:22:06 +0000 (19:22 -0800)]
[PATCH] Forced module unload
This is the logical counterpoint to the code which marks modules
"[unsafe]" when obsolete (racy) interfaces are used. Allows "just
remove the damn thing" rmmod -f, and taints the kernel.
Mark it dangerous and experimental in the config file to make this
doubly clear.
Rusty Russell [Sun, 17 Nov 2002 03:21:55 +0000 (19:21 -0800)]
[PATCH] Allocate struct module using special allocator
Sparc64 (and probably others) need all the kernel symbols within
32-bits, which includes the manufactured "__this_module" which refers
to the struct module *.
This changes the interface back to its old style: the arch-specific code
manipulates the init and core sizes, and we call module_alloc() ourselves.
Rusty Russell [Sun, 17 Nov 2002 03:21:48 +0000 (19:21 -0800)]
[PATCH] separate out moduleloader.h
Separates the module loading function prototypes (and elf.h) into
moduleloader.h. AT_GID in elf.h clashes with xfs.h, but this also
makes module.h less cluttered.
Matthew Wilcox [Sun, 17 Nov 2002 02:13:20 +0000 (18:13 -0800)]
[PATCH] Run timers as softirqs, not tasklets
The timer code is attempting to replicate the softirq characteristics at
the tasklet level, which is a little pointless. This patch converts
timers to be a first-class softirq citizen.
fs.h is pulling so much crap in.. No need to include net.h in fs.h if
we move struct sock_alloc to net.h (which already includes fs.h through
skbuf.h and mm.h..). Fixup the few files in net/ that relied on this,
and the readv/writev implementations that got uio.h through net.h.
Trond Myklebust [Sun, 17 Nov 2002 02:03:15 +0000 (18:03 -0800)]
[PATCH] cleanup: switch to passing *(struct rpc_procinfo) in rpc_message.
The "procedure number" has been used for 2 purposes in the kernel
client RPC implementation:
1) As a number to pass to the server in the RPC header.
2) As an index into the "procedure array" of type 'struct
rpc_procinfo', from which the RPC layer can find the XDR
encode/decode functions, buffer size, and all the other static
data that it needs to construct the on-wire RPC message.
This works fine for NFSv2, v3 and for the NLM locking code for which
there is a one-to-one mapping between NFS file operations, and RPC
procedures.
For NFSv4 on the other hand, the mapping is many-to-one, since there
is only one RPC procedure number: NFSPROC4_COMPOUND.
For efficiency purposes, we want to have a one-to-one mapping between
NFS file operations and the corresponding XDR encode/decode routines,
but currently this is not possible because of (2). The result is the
mess that is 'struct nfs4_op' and encode/decode_compound.
In the process eliminating (2), we might as well change to passing a
pointer to the appropriate procedure array entry instead of an
index. This change can be made transparent
The appended patch therefore does the following:
- Substitute a pointer to the rpc_procinfo instead of the RPC
procedure number in the struct rpc_message.
- Make the RPC procedure number an entry in the struct
rpc_procinfo.
- Clean out the largely unused (except in some obscure lockd
debugging code) p_name field. The latter was just a stringified
version of the RPC procedure name, so for those lockd cases, we
can use the RPC procedure number instead.
Manfred Spraul [Sun, 17 Nov 2002 01:50:42 +0000 (17:50 -0800)]
[PATCH] yenta resource handling bugs
This adds error handling to the resource allocations in yenta.c: check
that request_resource returns success, reduce allocation size if
allocate_resource fails, free resources on module unload.
Manfred Spraul [Sun, 17 Nov 2002 01:48:58 +0000 (17:48 -0800)]
[PATCH] additional cleanup for f_op->poll
This splits poll_table into one structure used by f_op->poll and one
structure used by the implemenation of sys_poll/sys_select: poll_table
contains just the callback function pointer. struct poll_wrapper
additionally contains err and table, i.e. the members used by the poll
implementation.
Changes:
- split poll_table into 2 structures
- reorder the declarations in <linux/poll.h> accordingly
- uninline poll_initwait().
- No more limit of 2 poll wait queue for each file*
Before epoll used to have, inside its item struct, space for two wait
queues. This was driven by the fact that during a f_op->poll() each file
won't register more than one read and one write wait queue. Now, I'm not
sure if this is 100% true or not, but with the current implementation a
linked list of wait queues is kept to remove each limit.
Doug Ledford [Sat, 16 Nov 2002 15:59:23 +0000 (10:59 -0500)]
Update high level scsi drivers to use struct list_head in templates
Update scsi.c for struct list_head in upper layer templates
Update scsi.c for new module loader semantics
scsi.c gets really far too big, and having all code that depends on
CONFIG_PROC_FS in scsi_proc.c is a nice cleanup. Note that much of
the procfs code is really really ugly and wants a rewrite to at
least use the seq_file interface and probably moving to sysfs.
Matthew Wilcox [Sat, 16 Nov 2002 12:22:40 +0000 (04:22 -0800)]
[PATCH] Add some missing includes to drivers/base
drivers/base relies on device.h pulling in sched.h pulling in the rest
of the world. Add some explicit dependencies in preparation for removing
sched.h from device.h.
mmuless ports don't need dup_mmap nor allocation of a pgd.
I tried to avoid ifdef-mess as far as possible, and to archive that
I created small wrappers for pgd allocation/freeing and move taking
of the mmap semaphore into dup_mmap from the only caller. The end
result is just one additiona ifdef.
It's only need for the two monster-inlines set_fs_root and set_fs_pwd
that should better be out of line anyway. Some additional cleanup like
named initializers as extra bonus.