Gerd Knorr [Tue, 12 Mar 2002 05:03:06 +0000 (21:03 -0800)]
[PATCH] videodev redesign
This patch is a redesign for videodev.[ch]. Changes:
- drop the function pointers (read/write/mmap/poll/...) from struct
video_device, use struct file_operations directly instead.
Dispatching to different drivers by minor number is done the same way
soundcore.o handles this: swap file->f_fops at open() time.
- also drop the now obsolete video_red/write/mmap/poll/... functions
from videodev.c
- Stop using the BKL, use a mutex to protect open,register+unregister
calls against races.
- provide a video_generic_ioctl() function which can (and should) be
used by v4l drivers to handle copying from and to userspace.
- provide video_exclusive_open/release functions which can be used by
v4l drivers to make sure only one process at a time opens the
device. They can be hooked directly into struct file_operations if
some driver has nothing to initialize at open time (which is true
for many drivers in drivers/media/radio/).
The move from function pointers in struct video_device to struct
file_operations does break all existing v4l drivers. Thus I have a
large number of patches for the drivers in the kernel tree. Most of it
is just the adoption to the videodev.[ch] changes, but I've also fixed a
small bug there and there while walking througth the source files.
David Woodhouse [Tue, 12 Mar 2002 18:06:44 +0000 (18:06 +0000)]
Update to 2002-03-12 JFFS2 development tree. Main features:
- Preliminary version of NAND flash support.
- Locking documentation and fixes (including BKL removal because it's superfluous).
- Performance improvements - especially for mount time.
- Annoying stuff like i_nlink on directories fixed.
- Portability cleanups.
Stephen Rothwell [Tue, 12 Mar 2002 04:57:48 +0000 (20:57 -0800)]
[PATCH] APM patch: apm_cpu_idle cleanups
Number 7.
This patch contains four cleanup changes whose aim
is better code self-documentation (the best way to
document IMHO). They are sent together because they
overlap.
1. Rename the variable "sys_idle" to 'original_pm_idle'.
This is where we store the value that we find in pm_idle before
we substitute the address of our own apm_cpu_idle() function.
In principle we have no idea whose address this is, so
the variable name shouldn't imply that we know that this is
the address of a system idle function; it should simply
indicate that it is the original value of pm_idle.
2. Variable "apm_is_idle" is renamed 'apm_idle_done'.
This flag indicates when apm_do_idle() has been called.
It is a premise of apm_cpu_idle()'s operation that it is
not known whether the apm_do_idle() function really idles
the CPU. The name of the flag should not lead one to
believe otherwise.
3. Variable "t1" is renamed 'bucket'. The variable is not
a time but a countdown ("bucket"), so the variable name
should not lead one to believe it is some sort of time
value.
4. A default: case is added to the switch in order to
remind the reader that there is a third possible return
value from apm_do_idle().
Stephen Rothwell [Tue, 12 Mar 2002 04:57:43 +0000 (20:57 -0800)]
[PATCH] APM patch: change implementation of ALWAYS_CALL_BUSY
Number 6
This patch cleans up the way the ALWAYS_CALL_BUSY macro
forces calling of the APM BIOS busy routine. Instead
of storing a false value in clock_slowed, we disjoin
clock_slowed with the value of ALWAYS_CALL_BUSY. This
simplifies the code.
Stephen Rothwell [Tue, 12 Mar 2002 04:57:38 +0000 (20:57 -0800)]
[PATCH] Trivial APM patch: set_system_power_state
Number 5 from Thomas Hood
This patch renames the static function "apm_set_power_state"
to 'set_system_power_state'.
Generally, the prefix 'apm_' is required to prevent external
name collisions on exported functions. This is a static function,
so the prefix isn't required for that purpose. The prefix might
also indicate that this function has something particularly
to do with the apm subsystem; but that's not the case here. This
function is simply a wrapper for set_power_state(), inserting the
argument which sets the power state for the whole system.
My main motivation for wanting to change this name is clearly
to indicate the difference between this function and
set_power_state(). Also, I would like to export set_power_state()
someday in the future, but this is a separate issue.
Stephen Rothwell [Tue, 12 Mar 2002 04:56:26 +0000 (20:56 -0800)]
[PATCH] APM: move 'ignore_normal_resume = 1'
This is number four and actually fixes a bug.
This patch moves the setting of the ignore_normal_resume flag
prior to the sti(); otherwise BIOS-generated normal resume
events slip through unignored.
Stephen Rothwell [Tue, 12 Mar 2002 04:56:21 +0000 (20:56 -0800)]
[PATCH] Trivial apm patch: move apm_error up
Here is the third one.
This patch moves the apm_error() function higher
in the file so that it is adjacent to the error_table
that it uses. This makes the code easier to read.
The beginning of the file is an appropriate place
for "utility" functions of this kind. This is a pure
move, with no changes made to the function.
This patch eliminates the 0 initializers on three
static variables inside the apm_cpu_idle function.
These initializers are superfluous.
The initializers are replaced with comments whose
purpose is to indicate that the code relies upon the
fact that these variables are initialized to zero
at load time.
Stephen Rothwell [Tue, 12 Mar 2002 04:56:11 +0000 (20:56 -0800)]
[PATCH] Trivial APM update part 1
This is the first of a series of patches I have got from Thomas Hood
that modify the apm code mainly for better self documentation.
This one does:
Variable "waiting_for_resume" is renamed 'ignore_sys_suspend'.
The reason for the change is that this flag variable is
employed in a manner analogous to that of other flag variables
named 'ignore ...'. When the flag is set, the driver needs to
ignore further system suspends. The driver does not "wait"
in the usual sense of that word. The only sense in which the
driver waits is the sense in which it needs to continue to
ignore system suspends until certain events occur. One such
event is a resume. However, another such event is the vetoing
of the suspend request by a driver. So it would be more
accurate to call the flag 'waiting_for_resume_or_suspend_reject'
or something like that. But for the reason mentioned first,
an even better name is 'ignore_sys_suspend'.
Alexander Viro [Tue, 12 Mar 2002 04:54:15 +0000 (20:54 -0800)]
[PATCH] (1/2) fs/super.c cleanups
New helper - sget(). get_sb_bdev() and get_anon_super()
switched to using it. Basically, it's get_anon_super()
done right (and get_anon_super() itself will probably
die).
John Clemens [Tue, 12 Mar 2002 04:53:14 +0000 (20:53 -0800)]
[PATCH] pci=usepirqmask option.
Last week I sent you a patch adding a config option to honor the pirq mask
in the PCI routing table. On your suggestion, Cory Bell made it a command
line option using the pci= interface and we both agree with you, it's
-much- cleaner this way.
Patch against 2.5.6 (Cory's submitting for 2.4, I've tested and submitting
towards 2.5). All credit goes to Cory Bell, with only minor input and
testing from myself.
Brian Gerst [Tue, 12 Mar 2002 04:51:20 +0000 (20:51 -0800)]
[PATCH] struct superblock cleanup - minixfs
Start of cleaning up the union of filesystem-specific structures in
struct super_block. The goal is to remove dependence on filesystem
headers in fs.h.
This patch abstracts the access to the minix_sb_info structure through
the function minix_sb().
Stephen Rothwell [Tue, 12 Mar 2002 04:47:35 +0000 (20:47 -0800)]
[PATCH] dnotify
The following patch makes directory notifications per thread group instead
of per process tree as they are now. This means, in particular, that if
a child closes a file descriptor that has a directory open with notifies
enabled, the notification will not be removed.
Thanks to Andrea for the push in the right direction.
Neil Brown [Tue, 12 Mar 2002 04:47:30 +0000 (20:47 -0800)]
[PATCH] PATCH - knfsd in 2.5.6 - fsid= export option
Support fsid=<number> export option to be device number independent
This patch was largely supplied by Steven Whitehouse <steve@gw.chygwyn.com>
A new export option "NFSEXP_FSID" indicates that the ex_dev passed down
is a user specified number, not a device number.
It should be used in fsid_type==1 filehandles to identify the
the exportpoint rather than the devid and inode (as in fsid_type == 0).
This allows filehandles to be device-number independent so that when Linux
changes device numbers on you (after reboot), your filesystems wont go stale.
User-space support for this is in the nfs-utils CVS and will be in
the next release (any release > 1.0).
Alexander Viro [Mon, 11 Mar 2002 06:22:18 +0000 (22:22 -0800)]
[PATCH] fix for get_sb_bdev() bug
Grr... When loop in get_sb_bdev() had been switched from
global list of superblock to per-type one, we should have switched
from sb_entry(p) (aka. list_entry(p, struct super_block, s_list)) to
list_entry(p, struct super_block, s_instances).
As it is, we end up with false negatives all the time. I.e.
second mount from the same block device with the same type gices
a new superblock. With obvious nasty results...
Alexander Viro [Mon, 11 Mar 2002 06:21:55 +0000 (22:21 -0800)]
[PATCH] (1/4) ->kill_sb() switchover
New method - ->kill_sb(). It will eventually replace current
fs/super.c::shutdown_super() - i.e. it's called when fs driver
must shut the superblock down, remove it from all lists, etc.
Neil Brown [Mon, 11 Mar 2002 06:21:50 +0000 (22:21 -0800)]
[PATCH] PATCH - knfsd fixes for 2.5.6
Fix a few kNFSd problems.
1/ export svc_reserve which was introduced for NFS/TCP support.
Without this we cannot load nfsd.o as a module
2/ the hash chain of clients was being changed (to put the found
entry at the top of the list) while we only had a read-lock.
This could corrupt the list and cause big problems.
For now, just disable this code. Might add a lock later...
3/ lockd was calling exp_getclient without getting a readlock
on the export table first.
4/ Add Config.help entry for CONFIG_NFSD_TCP
Vojtech Pavlik [Mon, 11 Mar 2002 05:54:21 +0000 (21:54 -0800)]
[PATCH] My AMD IDE driver, v2.7
This patch replaces the current AMD IDE driver (by Andre Hedrick) by
mine. Myself I think my implementation is much cleaner, but I'll leave
upon others to judge that. My driver also additionally supports the
AMD-8111 IDE.
It's well tested, and I'd like to have this in the kernel instead of
what's there now.
Jean Tourrilhes [Mon, 11 Mar 2002 05:44:49 +0000 (21:44 -0800)]
[PATCH] New wireless driver API part 2
Quick summary : this patch build on the first part to offer
two important new features :
o Wireless Events
o Wireless Cell Scanning
Wireless Events are events generated by device, driver or the
wireless subsystem. It allows for example a device to notify user
space when it register to a new cell (roaming) or loose contact with
the current Access Points. Currently, the other defined events include
some configuration changes and packet drop due to excessive retries,
more may come in the future. All those events are useful for MobileIP,
V-Handoff and Ad-Hoc routing.
Wireless Cell Scanning is a generic API to allow device/drive
to report Wireless Cells discovered (including ESSID, frequency and
QoS). This is similar to what is available in WindowsXP (except that
it's compliant to Wireless Extensions).
This patch has been submitted for review on this list a couple
of time in January, has been on my web page since and used intensively
by other people. It was rediffed to 2.5.6. Driver patches have been
submitted to maintainers.
Martin Dalecki [Mon, 11 Mar 2002 05:40:36 +0000 (21:40 -0800)]
[PATCH] 2.5.6 IDE 19
- Fix oversight in replacement of sti() cli() pairs for data structure
access protection. This finally resolvs my problems with the 2.5.6
kernel series. Now I'm in fact quite puzzled how it was even possible
for the system to get into the init stage without this fix..
- Fix usage of CONFIG_BLK_DEV_IDE_MODULES instead of
CONFIG_BLK_DEV_IDE_MODULE.
- Make idescsi_init global for usage in systems without module support
enabled.
- Apply Pavels Macheks patch for suspend support. Whatever some persons
argue that it's not fully implemented, I think that we are in
development series right now. I don't buy the mock-up examples for
problems with either outdated or broken hardware. Micro Drives are
for example expected to be drop in replacements for CF cards in
digital cameras and I would rather expect them to be very tolerant
about the driver in front of them. And then the WB caches of IDE
devices are not caches in the sense of a MESI cache, they are more
like buffer caches and should therefore flush them self after s short
period of inactivity without the application of any special flush
command. The upcoming explicit flushing commands in the ATA standard
are about data integrity guarantees in high reliability systems, like
DB servers for example, and not about simple cache validity.
- Apply Vojtech Pavliks fix to the VIA host chip initialization code.
- Add missing if-defs around PIO timing tables.
- Fix max() min() related compile warnings in IDE-scsi.
Martin Dalecki [Mon, 11 Mar 2002 05:40:28 +0000 (21:40 -0800)]
[PATCH] 2.5.6 IDE 18
No fixes for new problems which occured since today, just syncup.
- Remove help text about suitable compiler versions, which is obsoleted
by the overall kernel reality.
- Remove traces of not progressing work in progress code for the
CONFIG_BLK_DEV_ADMA option as well as the empty ide-adma.c file as
well as CONFIG_BLK_DEV_IDEDMA_TCQ.
- Remove redundant CONFIG_BLK_DEV_IDE != n check in ide/Config.in. Hugh,
this is a tricky one...
- Add EXPORT_SYMBOL(ide_fops) again, since it's used in ide-cd.c add a
note there that this is actually possibly adding the same device twice
to the devfs stuff.
- Finally change the MAINTAINER entry. Just too many persons bogged me
about it and it doesn't take me too much time apparently.
- Apply sis.patch.20020304_1.
- Don't call ide_release_dma twice in cleanup_ata, since ide_unregister
is already calling it for us. Change prototype of ide_unregister to
take a hwif as parameter and disable an ioctl for removing/scanning
hwif from the list of handled interfaces. I see no reasons for having
it and doing it is the fastest DOS attack on my home system I know
about it. Contrary to the comments found here and there, hdparm
doesn't use it. There are better hot plugging interfaces coming to the
kernel right now anyway.
- Wrap invalidate_drives in ide_unregister under the ide_lock instead of
disabling and enabling interrupts during this operation. There are
plenty of other places where the IDE drivers are enabling and
disabling interrupts just to protect some data structures.
- Don't call destroy_proc_ide_drives(hwif) for every single drive out
there.This routine takes a hwif as a parameter.
David S. Miller [Mon, 11 Mar 2002 01:04:30 +0000 (17:04 -0800)]
Init FHC controller registers earlier so that
Zilog interrupt mappings are not clobbered on
Sun Enterprise servers.
Fix some FHC register offsets.
Sometimes IPIs can allow BHs to run with interrupts
disabled, fix that by rescheduling them to normal
PIL based interrupts.
David S. Miller [Mon, 11 Mar 2002 00:58:06 +0000 (16:58 -0800)]
Sparc64 updates mostly build fixes:
1) Update for schedule_tail and switch_to arg changes.
2) Update for PTE highmem.
3) Add random ioctls to ioctl32 translations.
4) Kill migration IPI.
5) Fixup scheduler bitmap function and move into bitops.h
David S. Miller [Sun, 10 Mar 2002 23:12:17 +0000 (15:12 -0800)]
If cache_decay_ticks is large enough, the migration
thread startup at boot time can fail.
Fix this by temporarily setting cache_decay_ticks
to zero around migration thread startup.
David S. Miller [Sun, 10 Mar 2002 23:04:58 +0000 (15:04 -0800)]
Fix scheduler deadlock on some platforms.
Some platforms need to grab mm->page_table_lock during switch_mm().
On the other hand code like swap_out() in mm/vmscan.c needs to hold
mm->page_table_lock during wakeups which needs to grab the runqueue
lock. This creates a conflict and the resolution chosen here is to
not hold the runqueue lock during context_switch().
The implementation is specifically a "frozen" state implemented as a
spinlock, which is held around the context_switch() call. This allows
the runqueue lock to be dropped during this time yet prevent another cpu
from running the "not switched away from yet" task.
David S. Miller [Sun, 10 Mar 2002 22:17:34 +0000 (14:17 -0800)]
Major revamp of VLAN layer:
1) Add hw acceleration hooks for device drivers.
2) Move private declarations out of public includes.
3) Mark file local functions and data as static.
4) Use a small hash table for VLAN group lookups.
5) Correct all the locking and device ref counting.
6) No longer mark it as CONFIG_EXPERIMENTAL.
David S. Miller [Sun, 10 Mar 2002 22:10:37 +0000 (14:10 -0800)]
Make sock_writeable (used mostly by datagram
protocols) more reasonable. Kill all references
to SOCK_MIN_WRITE_SPACE and kill its definition.
Replace with appropriate sock_writeable calls.
David S. Miller [Sun, 10 Mar 2002 21:58:24 +0000 (13:58 -0800)]
Export ip_net_protocol_{register,unregister}
and ip_nat_used_tuple.
Minor cleanups to conntrack/irc modules/configuration.
From Harald Welte and the netfilter team.
David S. Miller [Sun, 10 Mar 2002 21:50:45 +0000 (13:50 -0800)]
Remove bogus tw->tb NULL check in
tcp_timewait_kill. This is what made the following
bug harder to find:
Put new timewait buckets into the bind hash _FIRST_
before they appear into the established hash to
kill some races with socket creation/lookup.
David S. Miller [Sun, 10 Mar 2002 21:47:33 +0000 (13:47 -0800)]
Move IP-specific identity information
out of struct sock.
Fix -EFAULT handling in TCP direct user copy handling.
Use struct initializers in IPV6 ndisc code.
Russell King [Sun, 10 Mar 2002 12:06:50 +0000 (12:06 +0000)]
Re-jig ARMv3 and up page table handing for better correctness with
Ingo's highmem code. This also helps with Riel's rmap VM, and
eliminates the slab overhead for these processors.
For more information, see:
http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2002-March/008089.html
Rusty Russell [Sun, 10 Mar 2002 03:50:14 +0000 (19:50 -0800)]
[PATCH] Futexes IV (Fast Lightweight Userspace Semaphores)
Fast user-space mutex implementation, allowing user space to do all
of the normal handling, with a minimal fallback to kernel space for
when there is lock contention.
The kernel space implementation does not keep any per-lock data
structures, but instead does a fast hash on the physical page and offset
of the user-space lock when contended. Thus no build/teardown costs, or
any scalability costs wrt metadata.
Updated syscall numbers for 2.5.6, and changed FUTEX_UP/DOWN definitions
to be more logical for future expansions (eg. r/w).
Tomas Kasparek [Sat, 9 Mar 2002 23:20:38 +0000 (23:20 +0000)]
[PATCH] 1036/1: allow APM to be build as module (for 2.5.5) (modified)
This is updated version of patch 1002/1 . As build system in 2.5.5 kernel allows same name of .c files in different directories when computing dependencies and versioning information, the patch becomes simple. Now it just modify appropriate Makefile (in arch/arm/mach-sa1100) and exports one symbol in arch/arm/mach-sa10/pm.c)
Tomas Kasparek [Sat, 9 Mar 2002 22:21:53 +0000 (22:21 +0000)]
[PATCH] 1039/1: EXPORT_SYMBOL(dma_spin_lock) for ALSA
Even I do not realy use any ISA code of ALSA on my iPAQ I need it for compilation. As I build ALSA as modules, the dma_spin_lock symbol is missing.
I have seen both definitions of dma_spin_lock (in kernel/dma.c and arch/arm/kernel/dma.c) same as EXPORT_SYMBOL in kernel/ksyms.c, but I think, exporting it in arch/arm/kernel/dma.c should be better then making confusion in kernel/ksyms.c
2Russel: If you don't think this is good solution, we should discuss this in linux-arm-kernel mailing list
[PATCH] 1008/1: PCMCIA MECR handling
This patch changes PCMCIA MECR handling such that:
- MECR is changed in one function only and atomically
- a additional callback for boards to allow them to
tweak BS values on a per-socket basis
Note: I don't know wether or not tish changes are WIP or done
already. If so, please drop it and send me a note.