The current code allocating the DART has a couple of bugs, first
it's called on all machines including the ones who have no DART
(oops), and then it tries to access the device-tree using the
"of_chosen" pointer before it was initialized.
The enclosed patch fixes these.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Looks like we never needed them, since that bug has been there forever,
I didn't get the right base for the IO cycles on the G5 host bridge
in the first place (I probably misinterpreted some OF forth code or
something like that).
Alan Cox [Wed, 29 Sep 2004 07:05:39 +0000 (00:05 -0700)]
[PATCH] tty locking cleanup and fixes
No problems reported other than Linus typo in an unbuildable driver from
the last one.
This one adds tty_ldisc_flush and also makes tty_wakeup do the queue
wake as discussed with Paul. I've then propagated these functions
through all the drivers. This means most drivers don't know about the
ldisc locking and instead call generic functions that look after it.
The result is the removal of a lot of duplicate code both for ldisc
referencing and historical code for handling tty ldisc wakeup semantics.
A nice side effect is that by adding versions of the two helpers we can
switch most of the drivers over before changing the core tty code if
preferred.
Harald Welte [Tue, 28 Sep 2004 07:22:31 +0000 (00:22 -0700)]
[NET]: Generic network statistics
This patch moves the following files in /proc:
/proc/net/rt_cache_stat /proc/net/stat/rt_cache
/proc/net/ip_conntrack_stat /proc/net/stat/ip_conntrack
/proc/net/arp_cache_stat /proc/net/stat/arp_cache
/proc/net/clip_arp_cache_stat /proc/net/stat/clip_arp_cache
/proc/net/dn_neigh_cache_stat /proc/net/stat/dn_neigh_cache
This allows a generic statistics tool to scan for all available statistics
by doing readdir(2) on /proc/net/stat
It also adds a special first 'template' line to rt_cache and ip_conntrack
in order to facilitate compatibility once somebody adds new fields to the
output lines.
WARNING:
This breaks existing rtstat.c and ctstat.c userspace programs
(hopefully for the last time). rtstat is non-existant or broken in
major distributions anyway, and ctstat is too new for any distros
having it picked up. Therefore, we justify this breakage.
A new unified statistics tool for routing cache, connection tracking and
neighbour cache is under development and will be included with iproute2.
Signed-off-by: Harald Welte <laforge@gnumonks.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Thomas Graf [Tue, 28 Sep 2004 06:59:09 +0000 (23:59 -0700)]
[PKT_SCHED]: Report qdisc parent to userspace
Report parent classid of a qdisc back to userspace. Without this there
is no way for userspace to see if the qdisc is attached to a class
other than parsing all class trees of the link and check all tcm_info
fields in the leaf classes.
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
There's an issue with bio_uncopy_user() in that it expects ->bv_len to
be untouched from io submission to io completion, which it wont be for
some transfer lengths on some hardware. So we end up not copying all the
data back to user space, not so good. This patch adds a bio_map_data
local structure to track the io_vec.
[TCP]: Choose congestion algorithm at initialization.
The choice of congestion algorithm needs to be made when connection
is setup to avoid problems when the sysctl values change later and the
necessary data hasn't been collected.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>'
Update for the LDM driver (fs/partitions/ldm.c): The last_vblkd_seq can
be before the end of the vmdb, just make sure it is not out of bounds.
If it is abort. If it is not just continue happily.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
[PATCH] ppc64: Make the DART "iommu" code more generic
The "DART" iommu used on Apple U3 chipset will appear into 3rd party
products soon, thus the code shouldn't be named "pmac_*" anymore.
Also, the explicit config option is no longer needed, there is no
reason to build a PowerMac kernel without the iommu support, and
it can always be disabled at runtime with a cmdline option for
testing or debugging.
This patch do the appropriate renaming and makes the config option
implicit & selected when pmac support is included.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] ppc64: Remote some userland-only stuff from kernel header
include/asm-ppc64/systemcfg.h defines a structure that currently gets
exposed to userland via /proc, and which I intend to deprecate in the
near future once I have better alternatives available.
In the meantime, this patch removes a bunch of stuff from this file that
were only defined for non-__KERNEL__, like an inline function for
getting to that struture via /proc, and some CPU & platform type
definitions that were duplicates of the ones in asm-ppc64/processor.h.
These things have nothing to do in a kernel header.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] ppc64: Fix spelling error in callback name
A small spelling error slipped into a new ppc_md. platform call I added
in my last patch. Not very problematic but worth fixing before any code
using the new call gets pushed.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Russell King [Mon, 27 Sep 2004 00:23:19 +0000 (17:23 -0700)]
[PATCH] Add wait_event_timeout()
There appears to be one case missing from the wait_event() family - the
uninterruptible timeout wait. The following patch adds this.
This wait is particularly useful when (eg) you wish to pass work off to an
interrupt handler to perform, but also want to know if the hardware has
decided to go gaga under you. You don't want to sit around waiting for
something that'll never happen - you want to go and wack the gremlin which
caused the failure and retry.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Peter Osterlund [Sun, 26 Sep 2004 02:49:53 +0000 (19:49 -0700)]
[PATCH] bttv: fix DMA setup bug in latest update
This fixes the bug that made the card DMA lots of data to random memory
locations, causing lockups and instant reboots.
The problem was that the yoffset variable got modified inside the loop,
but the logic in the switch statement was meant to work on the initial
value of the yoffset variable.
(Bug fix extracted from
http://marc.theaimsgroup.com/?l=linux-kernel&m=109532814823565&w=2)
Signed-off-by: Peter Osterlund <petero2@telia.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Matthew Wilcox [Sat, 25 Sep 2004 11:35:17 +0000 (04:35 -0700)]
[PATCH] fix posix_locks_deadlock()
The "blocked_list" used for POSIX deadlock detection should only contain
POSIX locks, or posix_locks_deadlock() can get confused.
As I've noted before (but never posted a patch), we should probably stop
checking for deadlock. POSIX says it's optional for an implementation
to check for deadlock, and since the change to match on tgid, we can
report a deadlock when none exists.
[ Further explanation for Linus: POSIX locks and BSD locks don't block
each other, so checking that the blocker is a POSIX lock also implies
that the waiter is a POSIX lock. ]
Make smbfs with UNIX extensions get file disk usage count right.
We need to convert from bytes to blocks, and we also need to
handle the fact that old smbd's will round up the disk usage
bytecount to even multiples of 1MB, and gracefully fall back
on an estimate based on the file size instead in that case.
Acked by Samuel Thibault who noted the problem in the first
place, and Jeremy Allison wrt smbd behavior.