Alexander Viro [Mon, 26 Jul 2004 14:04:13 +0000 (07:04 -0700)]
[PATCH] broken stuff marked as such in Kconfig
a) ppc KGDB builds only on two subarch; say so in Kconfig
b) ide-pmac.c can't be a module; make it dependent on IDE=y.
c) a bunch of isdn drivers is broken on ppc; marked as such
d) oaknet is broken; marked as such (includes on files that do not
exist, etc.)
e) buslogic and cyber2000 are broken on sparc64
f) s3trio framebuffer is broken
g) usual 8250-based serial is broken on sparc64; in principle it might
be worth supporting (there are PCI cards of that sort), for now marked as
broken (no asm/serial.h, to start with).
Alexander Viro [Mon, 26 Jul 2004 14:03:51 +0000 (07:03 -0700)]
[PATCH] asm-ppc/reg.h namespace pollution fixes
asm-ppc/reg.h defines pollutes namespace like there's no tomorrow;
among other things there are
LR
SR0...SR15
DEC
etc.
That breaks quite a few drivers that should otherwise work on ppc. SR...
and LR were never used by ppc code; commented out in reg.h (note that
they are just aliases for SPRN_SR... and SPRN_LR). RPA commented out and
its instances in ppc code (all four of them) replaced with SPRN_RPA. Ditto
for DEC. The rest of the offenders (DAR and PVR) are left alone for now and
#undef'ed in drivers in question.
We probably want to rip all these guys out of reg.h and convert ppc users
to SPRN_... forms - file ends up included in alot of places and namespace
pollution like that is a Bad Thing(tm).
Alexander Viro [Mon, 26 Jul 2004 14:03:29 +0000 (07:03 -0700)]
[PATCH] pointer-to-int conversion fixes
Assorted pointer-to-int fixes:
a) some places want to take pointer modulo alignment or extract
integer that was cast to pointer (which is legitimate), but do that via
wrong cast, triggering sparse warnings.
b) usual %x (int)ptr -> %p ptr fixes
Alexander Viro [Mon, 26 Jul 2004 14:02:32 +0000 (07:02 -0700)]
[PATCH] cciss compat ioctl fix
cciss compat ioctls were broken (mixing kernel and userland pointers);
fixed (and cleaned up) by switch to compat_alloc_user_space() and elimination
of set_fs().
Alexander Viro [Mon, 26 Jul 2004 14:02:20 +0000 (07:02 -0700)]
[PATCH] annotations for arch/ppc and include/asm-ppc
Usual set - explicit -D<arch>=1 for sparse, __sighandler_t / __sigrestore_t
annotated, annotations in arch/ppc/kernel/*, etc. - same as for other platforms
Alexander Viro [Mon, 26 Jul 2004 14:01:57 +0000 (07:01 -0700)]
[PATCH] CONFIG_MCOUNT fix for sparc64
CONFIG_MCOUNT on sparc64 is currently broken; we have both mcount and _mcount
declared (and aliased to each other), but end up exporting the wrong one. As
the result, with that option all modules get unresolved symbol.
Alexander Viro [Mon, 26 Jul 2004 14:00:34 +0000 (07:00 -0700)]
[PATCH] NULL noise removal in drivers/net/*
That definitely duplicates a bunch of stuff in pending patches from various
folks, but since it's all trivial 0->NULL replacements and patches are still
not submitted and/or merged...
Alexander Viro [Mon, 26 Jul 2004 14:00:21 +0000 (07:00 -0700)]
[PATCH] mtd fixes
Assorted mtd fixes.
a) NULL noise removal
b) %p pointer instead of %x (int)pointer in printks
c) missed iovec->kvec replacements (basically, fixing merge problems)
d) fixed type for (unused) last argument in doc_{read,write}_ecc()
e) sanitized some comparisons.
Alexander Viro [Mon, 26 Jul 2004 14:00:10 +0000 (07:00 -0700)]
[PATCH] impi annotation
drivers/char/ipmi/* annotated, structure shared between kernel and
userland (ioctls) split in two.
ACPI callback in the same code used to have wrong type - it should've been
void (...), not u32 (...). Fixed.
Alexander Viro [Mon, 26 Jul 2004 13:59:59 +0000 (06:59 -0700)]
[PATCH] bpck6 compile fix on ppc
bpck6 was b0rken on ppc in rather amusing way - it used
typedef struct ... PPC;
which doesn't mix with having PPC (pre)defined to 1. Fixed by renaming private
typedef in question.
Alexander Viro [Mon, 26 Jul 2004 13:59:03 +0000 (06:59 -0700)]
[PATCH] misc sound/* fixes
a) ALSA variant of wavefront didn't compile on gcc 2.x with debugging
turned on - authors heard something about variadic macros on gcc 2.x,
but screwed it up. Fixed.
b) au88x0 relied on char being signed in non-trivial ways. On ppc it's
not true. Fixed by explicit use of s8 (which is what that code really
wants).
filemap_populate and shmem_populate must install even a linear file_pte,
in case there was a nonlinear page or file_pte already installed there:
could only happen if already VM_NONLINEAR, but no need to check that.
Alexander Viro [Sun, 25 Jul 2004 04:12:16 +0000 (21:12 -0700)]
[PATCH] sparse: simplify and tighten sparse typechecking
This takes advantage of the simplified typeof semantics of sparse
address spaces, (should be enough for alpha, i386, ppc, ppc64, sparc,
sparc64, x86_64 - most of them didn't actually need anything to be done)
and couple of missing annotations that got caught by that.
Anton Blanchard [Sat, 24 Jul 2004 15:31:11 +0000 (08:31 -0700)]
[NET]: Use NET_IP_ALIGN in acenic.
Use NET_IP_ALIGN in acenic driver. Also remove the 16 byte padding,
caches can be anywhere from 16 to 256 bytes and the skb should be
cacheline aligned already.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: David S. Miller <davem@redhat.com>
Herbert Xu [Sat, 24 Jul 2004 15:26:27 +0000 (08:26 -0700)]
[AH6]: Replace skb by iph in clear_mutable_options.
This patch replaces the skb argument in ipv6_clear_mutable_options() by
an ipv6hdr. Doing so allows us to point skb->nh elsewhere when calling
this function.
I've also thrown in some obvious clean-ups for that function.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
Herbert Xu [Sat, 24 Jul 2004 15:24:48 +0000 (08:24 -0700)]
[AH4]: Save daddr iff options are present.
This is a little optimisation for AH4. When I moved the tunnel code out,
I put the daddr copying code on the main path which is unnecessary since
daddr is only mutable if IP options are present.
This patch moves the saving and restoring of daddr under the check for
the existence of IP options.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
Anton Blanchard [Sat, 24 Jul 2004 02:39:20 +0000 (19:39 -0700)]
[PATCH] ppc64: exception path optimisations
- We were statically predicting syscalls would be 32bit which meant every
64bit syscall was guaranteed to be mispredicted. Just let the hardware
predict this one.
- We shouldnt use blrl for indirect function calls, it is unlikely to be
predicted correctly and corrupts the link prediction stack. We should
use bctrl instead.
- Statically predict a branch in the system call path, favouring calls from
userspace.
- Remove static prediction in pagefault path, hardware prediction should do
a better job here.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[SCTP] Mark chunks as ineligible for fast retransmit after they are
retransmitted. Also mark any chunks that could not be fit in the
PMTU sized packet as ineligible for fast retransmit.
Herbert Xu [Fri, 23 Jul 2004 06:26:52 +0000 (23:26 -0700)]
[AH6]: Disallow mutable bits after AH header.
As we discussed before, mutable headers should not be allowed after
the AH header. In fact, this appears to be the intention of RFC 2402.
It is further clarified in section 3.1.1 of
David Mosberger [Fri, 23 Jul 2004 03:26:36 +0000 (20:26 -0700)]
[PATCH] NX: allow architectures to select legacy mode dynamically
On some platforms, you'll want to support READ_IMPLIES_EXEC differently
depending on personality (e.g, native binary vs. x86 binary).
This supports that (and makes the code more readable while at it) by
replacing the old architecture-specific fixed LEGACY_BINARIES macro
define with a architecture-specific "elf_read_implies_exec_binary()"
helper function.
For now, x86 is the only user, and sets the "read implies exec" bit for
legacy apps. ia64 and x86-64 are likely to want to do their own thing.
Make "install_page()" able to handle truncated pages.
This makes it much easier on the callers, no need to
worry about races with vmtruncate() and friends, since
"install_page()" will just cleanly handle that case
and tell the caller about it.
Roman Fietze [Thu, 22 Jul 2004 10:14:12 +0000 (03:14 -0700)]
[PATCH] clean up n_tty alloc_buf()
Don't bother zeroing the allocated memory inside alloc_buf() in the
n_tty line discipline. alloc_buf() is static inline and is only
referenced by n_tty_open() which always clears the memory (once more).
The recent changes to (6 Jul 04) pkt_cls.h are evil, you can't build a version
of 'tc' to work unless you know the kernel config!
It has several API problems:
- API data structures change on kernel config options
- new fields should be added at the end of a structure to allow
binary compatibility.
This patch tries to clean this up.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
Herbert Xu [Thu, 22 Jul 2004 05:16:19 +0000 (22:16 -0700)]
[INET]: Create enum of ECN bits
This patch is a preparation for an update of the ECN encap/decap
code with respect to RFC3168.
It creates an enum of the four code-points defined by RFC3168
and uses them throughout the inet_ecn.h file.
The only non-trivial bit is in IP_ECN_set_ce/IP6_ECN_set_ce where
the patch uses INET_ECN_CE instead of 1. This is OK as those
functions assume that the ECT bit is already set.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
Herbert Xu [Wed, 21 Jul 2004 07:51:31 +0000 (00:51 -0700)]
[CRYPTO]: Fix stack overrun in crypt().
The stack allocation in crypt() is bogus as whether tmp_src/tmp_dst
is used is determined by factors unrelated to nbytes and
src->length/dst->length.
Since the condition for whether tmp_src/tmp_dst are used is very
complex, let's allocate them always instead of guessing.
This fixes a number of weird crashes including those AES crashes
that people have been seeing with the 2.4 backport + ipt_conntrack.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: James Morris <jmorris@redhat.com> Signed-off-by: David S. Miller <davem@redhat.com>
Simple enhancement to netem packet scheduler that makes it classful so
that the underlying pfifo default discipline can be substituted with something
else (tbf, red, ...)
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>