Paul Mackerras [Thu, 9 Oct 2003 00:23:30 +0000 (17:23 -0700)]
[PATCH] Fix compile on PPC
At the moment the aty128fb and matroxfb frame buffer drivers don't
compile on PPC. In both cases the error is pretty trivial. This
patch is the minimum change to fix the problems.
The _IOR() type problem fix in aty128fb.c depends on the fact that the
size of a pointer is the same as "size_t", so we don't have to use
_IOR_BAD() to keep the ioctl number the same.
Linus Torvalds [Wed, 8 Oct 2003 13:47:40 +0000 (06:47 -0700)]
disable_irq() should synchronize with irq handler only if one exists.
Noted by Al Viro: if no handler exists (and we have IRQ_INPROGRESS set
because of an earlier irq that got through), synchronize_irq() will
end up waiting forever.
Jamie Lokier [Wed, 8 Oct 2003 11:59:24 +0000 (04:59 -0700)]
[PATCH] futex bug fixes
This fixes two serious bugs in the futex code.
One is a race condition which results in list corruption when
FUTEX_REQUEUE is used. It is due to the split locks change introduced
in 2.6.0-test6, and oopses when triggered.
The other is a security hole. A program can use FUTEX_FD to create
futexes on mms or inodes which don't reference them, and when those
structures are reused by a different mm or inode, the addresses match.
The effect is that a malicious or flawed program can steal wakeups from
completely unrelated tasks, causing them to block (or worse if they are
counting on the token passing property).
These are the specific changes:
1. Each futex_q retains a reference to its key mm or inode.
2. The condition for a futex_q to indicate that it's woken can usually
be interrogated lock-free.
3. futex_wait calls the hash function once instead of three times,
and usually takes the per-bucket lock once too.
4. When a futex is woken, the per-bucket lock is not usually taken,
so that's one less cache line transfer during heavy SMP futex use.
5. The wait condition and barriers in futex_wait are simpler.
5. FUTEX_REQUEUE is fixed. The per-bucket lock juggling is done
in such a way that there are no race conditions against the tests
for whether a futex is woken.
This patch is an combination of patches previously sent to the list. An
equivalent patch has been in Andrew Morton's tree for a while, with no
failure reports. Also I have been running it on my own SMP box for a
while. Conversely, we have received an oops report for the 2.6.0-test6
code, so the fix is needed.
Jamie Lokier [Wed, 8 Oct 2003 11:59:16 +0000 (04:59 -0700)]
[PATCH] set sigio target to current->pid and only if not already set
1. send_sigio() sends to a specific thread, _not_ a process.
(It can also send to a process group, but that's not relevant here).
This is useful, and should stay as it is.
Therefore it makes _no sense_ to call f_setown() with current->tgid.
Presently the kernel is inconsistent about it, with some places using
current->pid and some others using current->tgid.
This patch changes f_setown() calls to use current->pid.
2. In some places, f_setown() is called not at the user's direct request,
but as a side effect of another function. Specifically: dnotify and
file leases.
It is good to allow a program the flexibility to specify a different
pid than the default, using F_SETOWN. Presently they can do this after
the dnotify or lease call, but there is a small time window when it
will be temporarily set to current->tgid (which as pointed out above,
is not always right).
The window is avoidable if the program can use F_SETOWN prior to the
dnotify or lease call. This is exactly what the "force" argument to
f_setown() is for, and this patch changes it to zero in those callers.
This change is not likely to affect any existing programs.
Trond Myklebust [Wed, 8 Oct 2003 11:51:42 +0000 (04:51 -0700)]
[PATCH] NFS: Fix O_DIRECT code
- Support synchronous directio only. Defer asynchronous directio until
it can be made safe.
- If read/write exits due to an error, return number of bytes read/written
prior to occurrence of the error.
- Make sure we mark read pages as dirty in case we're doing zero-copy tricks.
Export set_page_dirty_lock() for use by NFS directio.
- Ensure we revalidate stale attribute info.
Trond Myklebust [Wed, 8 Oct 2003 11:51:15 +0000 (04:51 -0700)]
[PATCH] NFS: fix the synchronous READ/WRITE bugs
- Use correct credentials in the NFSv4 synchronous read/write code.
- Return correct number of read bytes in the NFSv4 synchronous read code.
- SunRPC XDR fix: NFSv4 reads when caller requests a non-word aligned
number of bytes was broken.
Andi Kleen [Wed, 8 Oct 2003 08:55:24 +0000 (01:55 -0700)]
[PATCH] APIC fixes for x86-64
Various APIC/ACPI fixes for x86-64. This brings us closer to working
out of the box on the now popular VIA and NVidia Nforce3 based Athlon64
and Opteron boards. To be really good we would need more ACPI changes
(still waiting for that to be all merged through the usual channels).
With this we mostly work with acpi=off at least.
Also it syncs us up with bugfixes done in 2.4.
- Disable IO-APIC by default on non SMP VIA/NVidia boards. This is a
bit of a hack, but needed to work around ACPI bugs. Can be
overwriten with "apic".
- Add acpi=ht, meaning run ACPI boot setup, but do not enable the
interpreter. Same as i386.
- Stop MADT parsing early when local APIC or IO-APIC are disabled
- Add more option parsing early enough to actually change the boot
process
- Update documentation for command line options
Dave Kleikamp [Wed, 8 Oct 2003 06:07:50 +0000 (01:07 -0500)]
JFS: Improved error handing
This patch replaces many assert statements, which caused a BUG(), with
improved code to mark the superblock dirty and then proceed as specified by
the errors= mount flag (as ext2 and ext3 do). JFS's default for the errors
option is "remount-ro" in order to prevent addition data corruption when a
problem is found.
These asserts are usually triggered by on-disk data corruption. By marking
the superblock dirty, fsck will perform a complete check on the file system
and correct the problems, rather than simply replaying the journal, inviting
later trouble.
Michael Hunold [Wed, 8 Oct 2003 01:48:03 +0000 (18:48 -0700)]
[PATCH] some more av7110 dvb-driver updates
- some progress on DVB-C analog module: experimentally fix frequency
offset, initialize msp3400 for analog TV sound
- Reduce the number of dropped TS packets when an error is detected
(Jon Burgess)
- If somebody calls G_TUNER for a DVB-C card w/ analog module, then
check for the selected tuner, not if the currently selected channel
has a tuner.
- play_iframe may be used to play stillpicture frames, that can either
by complete i-frames or partial p-frames. In any case, the av7110
needs about 400kB of video data, before the internal video decoder
starts displaying anything. for stillframes, this is bad, so we
*always* loop writing the frame until the magic amount is reached.
stupid, but works...
- applied 64bit fixes by Pedro Miguel Teixeira <pmsjt@warner.homeip.net
Michael Hunold [Wed, 8 Oct 2003 01:47:54 +0000 (18:47 -0700)]
[PATCH] Kconfig and Makefile updates, inspired by Adrian Bunk and Roman Zippel
- split up saa7146 compilation in core part (saa7146.o) and video+vbi
part (saa7146_vv). some drivers need both (av7110.c), some drivers
only need the core stuff (budget*.c)
- add entry for sp887x DVB-T modulator to corresponding Kconfig
- use new SELECT facility of Kconfig, first mentioned by Adrian Bunk
and Roman Zippel in DVB subsystem
- use SELECT in media/video/Kconfig, too.
Michael Hunold [Wed, 8 Oct 2003 01:47:45 +0000 (18:47 -0700)]
[PATCH] update dvb frontend drivers
- add budget driver as possible client of the ves1820 frontend driver
- fix wrong include in sp887x.c frontend driver
- fix wrong chip description in tda1004xh frontend driver
- fixed detection of stv0299 if chip is in standby mode
- change some #ifdef to #if, for easier debug enable/disable
- ves1820: patch by Peter Bieringer: nicer log output
- ves1820: allow PWM (tuner calibaration) value from EEPROM to be
overridden on command line (based on patch by Peter Bieringer). New
module paramters: "pwm" (max 4 ints, range -1..0xff) and "verbose"
(to print AFC value aftger tuning).
Michael Hunold [Wed, 8 Oct 2003 01:47:27 +0000 (18:47 -0700)]
[PATCH] various patches for non-av7110 dvb-drivers
- patch by Jon Burgess to fix DMA issues
- reduce the number of dropped TS packets when an error is detected
(Jon Burgess)
- use budget-ci driver for new TT DVB-T cards with onboard MSP430.
Michael Hunold [Wed, 8 Oct 2003 01:47:11 +0000 (18:47 -0700)]
[PATCH] update copyright and licensing
- fix copyright stuff in various files:
- remove e-mail addresses that don't exist anymore, but of course keep
the names
- change license from GPL to LGPL in dvb_i2c.h (Convergence code)
- change license from GPL to LGPL in dvb_ringbuffer.h (ack by original
author Oliver Endriss)
- add LGPL license to dvb_functions
Michael Hunold [Wed, 8 Oct 2003 01:46:54 +0000 (18:46 -0700)]
[PATCH] video capture updates for saa7146 core
- some Kconfig simplifications
- FIELD_ALTERNATE capture was broken, add a "wait for vbi" command
before actually waiting for the field change
- improvements regarding streaming capture to gfx card memory.
- captured frames could only be page aligned. fixed.
- fix pgtable_build_single, it should work for all kinds of buffers now
(system memory (kernel/user) and gfx-memory)
- Fix bytesperline-calculation for V4L2_FIELD_ALTERNATE vs.
V4L2_FIELD_INTERLACED capture
Matthew Wilcox [Wed, 8 Oct 2003 01:33:21 +0000 (18:33 -0700)]
[PATCH] unify drivers/Kconfig
It's a pain for architecture maintainers to keep the toplevel Kconfig
files in sync. This addresses part of the problem by moving all the
standard driver includes to drivers/Kconfig. As a bonus, it moves all
the device drivers together in a menu which tames menuconfig somewhat.
This patch only touches i386. Other architectures can join the party
as soon as they feel ready to inflict all the choices on their userbase.
Miles Bader [Wed, 8 Oct 2003 01:32:54 +0000 (18:32 -0700)]
[PATCH] Changes to v850 platform linker-script fragments
This does two things:
(1) Move the v850 platform-specific linker-script fragments into
arch/v850/kernel, from arch/v850. This move was prompted by a
recent (all-architecture) move for vmlinux.lds.S, to keep the
script together, but I think it also makes sense -- this way, all
platform-specific non-header files are in the same directory with
similar names.
(2) Remove some hardwired constants in the linker script fragments,
using already defined cpp macros anyway. This eliminates one
annoying source of duplicate definitions (which had to be kept in
sync).
Miles Bader [Wed, 8 Oct 2003 01:28:30 +0000 (18:28 -0700)]
[PATCH] Move `ptrinfo' function from mm/slab.c to mm/memory.c
This function doesn't compile on non-MMU systems, so put it in a place
where it won't cause problems (mm/memory.c is only compiled if
CONFIG_MMU is defined).
Trond Myklebust [Tue, 7 Oct 2003 16:51:33 +0000 (12:51 -0400)]
NFSv4 state model update
- Hierarchy of state attached to nfs4_client in order to
simplify state recovery.
state_owners hang off nfs4_client, whereas state hangs
off both open_owners and the nfs_inode.
- Model tries to minimize the number of open_owners on
the server by recycling unused open_owners into a pool.
- NFSv4 state attached to file->private_data. Previously
this was used by credentials (and still is for NFSv2/v3)
Abstract out setup/release of struct file and nfs_page
structure initialization in order to cope with these
conflicting uses of private_data.
Trond Myklebust [Tue, 7 Oct 2003 11:59:42 +0000 (07:59 -0400)]
Simplify the synchronous NFS read call interface by
passing a pointer to a filled nfs_read_data structure
(the same struct used by the asynchronous function calls)
Trond Myklebust [Tue, 7 Oct 2003 11:50:48 +0000 (07:50 -0400)]
The NFSv4 state model assumes that the client machine identifies
itself to the server once and once only.
This patch ensures that we do this by sharing the local identifier
struct nfs4_client among all mountpoints that talk to the same
server/ip address.