Andrew Morton [Wed, 9 Jun 2004 01:19:04 +0000 (18:19 -0700)]
[PATCH] vga16fb.c: fix bogus mem_start value
From: Herbert Xu <herbert@gondor.apana.org.au>
The recent change to vga16fb's memory mapping that you partially reverted
is still broken. In particular, it's setting fix.mem_start to a virtual
address on i386. The value of fix.mem_start is meant to be physical.
We could simply apply virt_to_phys to it, but somehow I doubt that is what
it's meant to do on arm. So until we hear from someone who knows how it
works on arm, let's just revert this change.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:18:42 +0000 (18:18 -0700)]
[PATCH] fix uts sysctl write size
From: Andy Whitcroft <apw@shadowen.org>
The sysctl interfaces for updating the uts entries such as hostname and
domainname are using the wrong length for these buffers; they are hard
coded to 64. Although safe, this artifically limits the size of these
fields to one less than the true maximum. This generates an inconsistency
between the various methods of update for these fields.
The error originates from the fact the handler for strings (proc_dostring)
already allows for the string terminator. This patch corrects the limit,
taking the oppotunity to convert to use of sizeof().
Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:18:31 +0000 (18:18 -0700)]
[PATCH] cyclone: PIT sanity checking
From: john stultz <johnstul@us.ibm.com>
In testing for SLES9, we ran across a bug caused by userspace apps poking
the PIT which caused bad values to be read by the kernel. This would then
trigger the lost tick detection code with insane values and would then
break the SCSI subsystem.
This patch includes the PIT sanity check from the TSC timesource into the
cyclone timesource code, which catches the bad case described above and
resolves the issue.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:18:10 +0000 (18:18 -0700)]
[PATCH] s390: add support for 6 system call arguments (FUTEX_CMP_REQUEUE)
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
This patch adds support for 6 system call arguments on s390. The first
exploiter of this will be the sys_futex system call for the
FUTEX_CMP_REQUEUE operation. The idea is simple: use register %r7 for the
6th argument. This can be extended to 7/8/9/... arguments if there ever
will be the need for it. To call the system call function in the kernel
the additional arguments needs to get stored on the stack. 8 bytes are
added to the head of struct pt_regs. %r7 is stored to the additional field
for all system calls. The store is hidden in a
address-generation-interlock slot, it doesn't slow down the system call
path.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:17:58 +0000 (18:17 -0700)]
[PATCH] cdrom hardware defect mgt header length
From: Jens Axboe <axboe@suse.de>
cdrom_has_defect_mgt() has the same ->data_len bug - the length field is
not total length, but the length following that field. So it should be +
4, not + 8. However, just kill the length check. Comparison of
feature_code provides enough check.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:17:47 +0000 (18:17 -0700)]
[PATCH] md: fix BUG in raid6 resync code.
From: NeilBrown <neilb@cse.unsw.edu.au>
This condtion on this loop is primarily to avoid the loop if it doesn't
appear to be needed. However it optimises a little too much and there is a
case where it skips the loop when it is really needed. This patch fixes
it.
This is the raid6 version of the recent raid5 resync bugfix.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:17:36 +0000 (18:17 -0700)]
[PATCH] __ARCH_WANT_SYS_RT_SIGACTION fix
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Recent syscall stubs cleanup broke alpha, as it has its own version of
sys_rt_sigaction(). This defines __ARCH_WANT_SYS_RT_SIGACTION for all
architectures except alpha, sparc and sparc64.
Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:17:02 +0000 (18:17 -0700)]
[PATCH] more drivers/atm/horizon.c polishing
From: Francois Romieu <romieu@fr.zoreil.com>
- just say no to numbered labels;
- pci_enable_device can fail so setup_pci_dev() must return a value;
- propagate existing error codes when possible in do_pci_device()
- missing pci_disable_device here and there.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:16:28 +0000 (18:16 -0700)]
[PATCH] runtime selection of CONFIG_PARIDE_EPATC8
From: Christoph Hellwig <hch@lst.de>
drivers/block/paride/epat.c support two slightly different protocol
variants. Currently it's compile-time selected by CONFIG_PARIDE_EPATC8,
but this patch adds a epatc8 module option to allow runtime selection.
CONFIG_PARIDE_EPATC8 stays for now but I'd like to kill it int 2.7.
The basic patch is from the Debian kernel package (Author unknown) but I
reworked it a bit.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:16:17 +0000 (18:16 -0700)]
[PATCH] unalign struct page_state
The ____cacheline_aligned in there is a leftover from before the existence of
the percpu infrastructure. It bloats struct page_state and structures which
contain it enormously, and we use these things on the stack deep in page
reclaim.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:16:06 +0000 (18:16 -0700)]
[PATCH] writeback_inodes can race with unmount
From: Chris Mason <mason@suse.com>
There's a small window where the filesystem can be unmounted during
writeback_inodes. The end result is the iput done by sync_sb_inodes could
be done after the FS put_super and and the super has been removed from all
lists.
The fix is to hold the s_umount sem during sync_sb_inodes to make sure
the FS doesn't get unmounted.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:15:55 +0000 (18:15 -0700)]
[PATCH] ppc64: iSeries vio_dev cleanups
From: Stephen Rothwell <sfr@canb.auug.org.au>
This patch removes the archdata and driver_data members of struct vio_dev
and uses the platform_data and driver_data members of the embedded struct
device instead. I also declared a couple of routines static.
This is part of a work in progress.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:15:44 +0000 (18:15 -0700)]
[PATCH] ppc32: fix missing option in binutils version check
From: Olaf Hering <olh@suse.de>
The binutils check is bogus, it doesnt work with the just released
binutils. A space is needed in the error message.
pomegranate:~# echo dssall | /usr/bin/as -o /tmp/x
{standard input}: Assembler messages:
{standard input}:1: Error: Unrecognized opcode: `dssall'
pomegranate:~# /usr/bin/as -v
GNU assembler version 2.15.91.0.1 (powerpc-suse-linux) using BFD version 2.15.91.0.1 20040527 (SuSE Linux)
*** 2.6 kernels no longer buildcorrectly with old versions of binutils.
*** Please upgrade your binutils to 2.12.1 or newer
make: *** [checkbin] Error 1
make: Target `all' not remade because of errors.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:15:22 +0000 (18:15 -0700)]
[PATCH] jbd: descriptor buffer state fix
Fix a problem discovered by Jeff Mahoney <jeffm@suse.com>, based on an initial
patch from Chris Mason <mason@suse.com>.
journal_get_descriptor_buffer() is used to obtain a regular old buffer_head
against the blockdev mapping. The caller will populate that bh by hand and
will then submit it for writing.
But there are problems:
a) The function sets bh->b_state nonatomically. But this buffer is
accessible to other CPUs via pagecache lookup.
b) The function sets the buffer dirty and then the caller populates it and
then it is submitted for I/O. Wrong order: there's a window in which the
VM could write the buffer before it is fully populated.
c) The function fails to set the buffer uptodate after zeroing it. And one
caller forgot to mark it uptodate as well. So if the VM happens to decide
to write the containing page back __block_write_full_page() encounters a
dirty, not uptodate buffer, which is an illegal state. This was generating
buffer_error() warnings before we removed buffer_error().
Leaving the buffer not uptodate also means that a concurrent reader of
/dev/hda1 could cause physical I/O against the buffer, scribbling on what
we just put in it.
So journal_get_descriptor_buffer() is changed to mark the buffer
uptodate, under the buffer lock.
I considered changing journal_get_descriptor_buffer() to return a locked
buffer but there doesn't seem to be a need for this, and both callers end up
using ll_rw_block() anyway, which requires that the buffer be unlocked again.
Note that the journal_get_descriptor_buffer() callers dirty these buffers with
set_buffer_dirty(). That's a bit naughty, because it could create dirty
buffers against a clean page - an illegal state. They really should use
mark_buffer_dirty() to dirty the page and inode as well. But all callers will
immediately write and clean the buffer anyway, so we can safely leave this
optimising cheat in place.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch corrects a bug in the register access macros for 16 and 8
bit accesses. It also updates the default configuration files for the
2.6.7 kernel.
David Woodhouse [Tue, 8 Jun 2004 20:46:28 +0000 (21:46 +0100)]
Wind River PowerQUICC II SBC82xx update:
- Switch to using u-boot bdinfo.
- Set up CS11 for RTC if the bootloader didn't bother.
- Set BOOTROM_RESTART_ADDR so machine_restart() actually works.
- For non-uboot boot, note bus clock is 66MHz on 8265 model.
Alan Cox [Tue, 8 Jun 2004 10:11:04 +0000 (06:11 -0400)]
[PATCH] ethtool power manglement hooks
Several ethernet drivers have been broken by the ethtool support because
the ioctl code used to power the interface up and down as needed. Rather
than add this to each driver call Jeff Garzik suggested we add hooks
for before/after ethtool processing.
This patch implements them which makes fixing the PM stuff easier,
as the epic100 patch to follow will show. It also cleans up the
via-velocity driver pm/ethtool logic a great deal. As per Jeff's
request the before handler is allowed to fail the operation.
--
The contribution herein included is a creation of Red Hat Inc. It is hereby
submitted under the license of the existing files and as a derivative work
thereof. I know of no reason for not having the right to submit the
work herein included.
Paul Mackerras [Tue, 8 Jun 2004 02:27:15 +0000 (19:27 -0700)]
[PATCH] Make paca xCurrent field be a pointer
The paca struct contains a pointer to the current task, which is used
for the `current' macro. For some reason, this field is a u64, and
every time we use it we need a cast, because it is really a pointer.
This patch cleans things up a little by making it a pointer to struct
task_struct and removing the casts. It also removes a now-incorrect
comment which said that r13 contains current (it now holds
&paca[smp_processor_id()]).
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Tue, 8 Jun 2004 02:27:01 +0000 (19:27 -0700)]
[PATCH] Single-stepping emulated instructions
Occasionally the ppc64 kernel emulates a usermode instruction, for
example in the alignment exception handler. Kumar Gala pointed out
(in the context of the ppc32 kernel) that if the instruction was being
single-stepped, and we end up emulating the instruction, we should
then send the process a SIGTRAP as if it had not been emulated and the
process had then taken a single-step exception. This patch implements
this for ppc64.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Duncan Sands [Mon, 7 Jun 2004 07:21:48 +0000 (00:21 -0700)]
[PATCH] USB devio.c: deadlock fix
proc_resetdevice is called with dev->serialize held.
usb_reset_device takes dev->serialize and then calls
__usb_reset_device. To avoid deadlock, proc_resetdevice
should call __usb_reset_device directly.
Kai Engert [Mon, 7 Jun 2004 07:08:08 +0000 (00:08 -0700)]
[PATCH] USB: enable pwc usb camera driver
The attached patch enables the pwc driver included with kernel 2.6.7-rc2
It also removes the warnings during compilation.
However, note that I blindly duplicated the release approach used by
other usb camera drivers, replacing the current no-op.
The driver works for me with a Logitech QuickCam Notebook Pro and
GnomeMeeting.
[PATCH] USB: Fix problems with cyberjack usb-serial-module since kernel 2.6.2
> Send me a patch to back those changes out to fix your device and I'll
> apply it. If the author is around to realize this, that should wake
> them up :)
Ok, here you are! :)
Attached is a patch for linux-2.6.7-rc2. (though the patch hasn't changed
since -rc1)
Again a short description:
(the patch removes most of the changes done in linux-2.6.2)
1. Removed the local buffer of cyberjack_write, because something goes wrong
upon a write-request bigger than the buffer. Without this, a write-request
stalls with error -3.
2. Removed some usb_clear_halt() lines. Without this, the device doesn't even
open and returns -7.
It works for my cyberjack pinpad USB card reader on
- nforce2 chipset
- VIA KM266 chipset
- AMD Irongate chipset
Adam Kropelin [Sun, 6 Jun 2004 12:59:45 +0000 (05:59 -0700)]
[FB]: Fix uninitialized fb_cmap member in sbuslib.c
When handling FBIOPUTCMAP_SPARC, sbusfb fails to initialize cmap.transp,
which quickly leads to an oops when fb_set_cmap() dereferences it.
First encountered in Aurora Wombat kernels and seems to afflict mainline
as well. Patch is against 2.6.7-rc2. xorg still fails to actually get
anything to display on my CG6, but at least it no longer oopses the kernel.
Signed-off-by: Adam Kropelin <akropel1@rochester.rr.com> Signed-off-by: David S. Miller <davem@redhat.com>
Dave Jones [Sun, 6 Jun 2004 08:04:20 +0000 (01:04 -0700)]
[PATCH] Fix missing padding in DMI table.
This entry in the DMI blacklist table is missing it's NO_MATCH
tags, which means the struct gets padded instead of filled with
the desired NO_MATCH data which is {255, NULL}
Usually not fatal it seems, but there have been numerous cases
in Red Hat bugzilla where this did get tripped up, and caused
an immediate reset on these boards. Not fun to track down.
Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The recent introduction of ptep_set_access_flags() with the optimisation
of not flushing the TLB unfortunately broke ppc32 CPUs with no hash
table.
The data access exception code path in assembly for these doesn't
properly deal with the case where the TLB entry is present with the
wrong PAGE_RW and will just call do_page_fault again instead of just
replacing the TLB entry.
Fixing the asm code for all the different CPU types affected (yah,
embedded PPCs all have different MMUs =P) is painful and need testing I
can't do at the moment, so here's a fix that will just flush the TLB
page when changing the access flags on non-hash based machines. Please
apply.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org
Ingo Molnar [Sun, 6 Jun 2004 04:35:59 +0000 (21:35 -0700)]
[PATCH] sched: honor the "sync" wakeup bit
The scheduler changes had another thing missing: the appreciation of
sync wakeups. (I had this in one of the earlier sched-domains cleanup
patches before but it got lost in the shuffle.)
When a sync waker is waking, we should subtract its load from the
current load - it will schedule away for sure in the near future.
That's what the "sync" bit means.
This change is necessary because with the sched-domains balancer we have
a much more sensitive cpu-load estimator, and in this particular context
of try_to_wake_up() the sync waker's effect will always be part of the
load. Patch against your patch attached.
In my testing there's an additional increase in bw_pipe numbers on a
dual P2 box, it went from 110-120 MB/sec to 120-130 MB/sec.
Jens Axboe [Sat, 5 Jun 2004 06:35:07 +0000 (23:35 -0700)]
[PATCH] kill drivers/ide TCQ support
Lets just remove it. It's been disabled some time ago, and there's no
chance of it ever getting resurrected. PATA TCQ has so many technical
short comings, that it was never really interesting I'm afraid.