Hirokazu Takata [Wed, 6 Oct 2004 01:15:24 +0000 (18:15 -0700)]
[PATCH] m32r: update ioremap routine
Here is a patch to update ioremap*.c for m32r, taken from "Add __iomem
modifier to the return value type of __ioremap() for much stricter
type-checking."
* arch/m32r/mm/ioremap.c: ditto.
- Add __iomem modifier to the return value type of __ioremap()
for much stricter type-checking.
* arch/m32r/mm/ioremap-nommu.c: ditto.
* include/asm-m32r/io.h:
- Modified for much stricter type-checking.
- Change __inline__ to inline.
[PATCH] Disable SW irqbalance/irqaffinity for E7520/E7320/E7525 - change TARGET_CPUS on x86_64
Set TARGET_CPUS on x86_64 to cpu_online_map. This brings the code inline
with x86 mach-default. Fix MSI_TARGET_CPU code which will break with this
target_cpus change.
Andi Kleen [Wed, 6 Oct 2004 01:14:35 +0000 (18:14 -0700)]
[PATCH] x86_64: make in_gate_vma() safer
x86-64 in_gate_vma would take a read lock on the VMA when the passed
address was inside the 32bit vsyscall page.
This would be called by get_user_pages, which already holds the mmap_sem.
Unfortunately some callers of get_user_pages hold the mmap_sem for writing,
which could in theory cause a deadlock.
I think it can currently not happen because the only users who hold it for
write before calling gup() are coredump and AIO in the ring setup, and both
should not ever access the vsyscall page.
But not taking the semaphore is safer and avoid this here.
Andi Kleen [Wed, 6 Oct 2004 01:13:54 +0000 (18:13 -0700)]
[PATCH] x86_64: remove CONFIG_FRAME_POINTER
CONFIG_FRAME_POINTER has never worked on x86-64 because it never passed
-fno-omit-frame-pointer to the compiler, and that is the only way to get a
frame pointer on x86-64.
It also causes complications with profiling. Drop it.
Andi Kleen [Wed, 6 Oct 2004 01:13:42 +0000 (18:13 -0700)]
[PATCH] x86_64: fix profile_pc
This fixes profile_pc to work properly on x86-64 and not crash.
It does now a simple backtrace to the caller of the spin lock without
requiring a frame pointer for this.
Frame pointer support has been dropped because it never worked.
There is still a small race window, but the only way to avoid it would be
to rewrite kernel/spinlock.c in assembler again. The race will account a
profile tick the the parent of the spinlock caller.
David Gibson [Wed, 6 Oct 2004 01:12:54 +0000 (18:12 -0700)]
[PATCH] ppc64: squash EEH warnings
A slightly non-ideal version of the recent patch which fixed EEH being a
no-op went in. The srcsave variable in eeh_memcpy_to_io() is now never
referenced on non-pSeries machines, and so spews hundreds of warnings. The
variable doesn't actually accomplish anything, so this patch gets rid of
it.
Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Gerhard Jaeger [Wed, 6 Oct 2004 01:11:53 +0000 (18:11 -0700)]
[PATCH] ppc32: fix PFC1_EPS and PFC1_EPS_SHIFT for IBM440GX
While writing some BSP code for a 440GX custom board, I noticed, that the
DCRN_SDR_PFC1_EPS and DCRN_SDR_PFC1_EPS_SHIFT definitions are wrong and
therefore the functions ibm440gx_get_eth_grp() and ibm440gx_set_eth_grp()
won't work correctly.
Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Gerhard Jaeger <gjaeger@sysgo.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Wed, 6 Oct 2004 00:56:41 +0000 (17:56 -0700)]
[PATCH] trivial usb endianness annotations
trivial endianness annotations in drivers/usb (apply after ohci and isd200
fixes).
Note: drivers/usb is nearly endian-clean at that point; there are several
very dubious places in there (in particular, rtl8150, pegasus and usbnet
are almost certainly broken in mii-related code on big-endian hosts); I'm
leaving them alone for now.
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Wed, 6 Oct 2004 00:56:15 +0000 (17:56 -0700)]
[PATCH] ohci bugfix for big-endian 64bit boxen
->dma can be a 64bit variable on 64bit boxen; its value will fit into 32 bits
just fine (due to dma mask). However, cpu_to_le32p(&...) will break if we
are on a 64bit big-endian; we'll end up up passing it the address of upper
32 bits and get 0 instead of correct value. Fix is trivial...
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Wed, 6 Oct 2004 00:56:03 +0000 (17:56 -0700)]
[PATCH] hfsplus endianness bugfix
hfs_bnode_read_u8() always returns 0 on little-endian (cut'n'paste bug -
function is almost exact copy of its u16 counterpart, but be16_to_cpu()
should've been removed here).
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Wed, 6 Oct 2004 00:54:02 +0000 (17:54 -0700)]
[PATCH] ncpfs (7/7): misc fixes and cleanups
* remaining endiannes cleanups
* don't mess with setting finfo.i.dataStreamSize when creating the root
directory inode; that field is ignored when populating in-core directory
inodes.
* missing cpu_to_le16() in ncp_search_for_fileset() (for big-endian clients
server sees 0xff7f instead of intended 0x7fff).
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Wed, 6 Oct 2004 00:53:38 +0000 (17:53 -0700)]
[PATCH] ncpfs (5/7): le16 handling in marshalling
New helper: ncp_reply_le16() (decode 16bit little-endian).
ConvertToNWfromDWORD() cleaned up and fixed (it used to have one too many
le16_to_cpu() in arithmetics, on top of ugly tricks with memcpy() et.al.).
ncp_reply_word() has no callers left; removed.
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Wed, 6 Oct 2004 00:52:50 +0000 (17:52 -0700)]
[PATCH] ncpfs (1/7): constants sanitized
That's the beginning of ncpfs endianness cleanup.
* converted fixed-endian constants to little-endian (i.e. replaced
htons(0xCDAB) with cpu_to_le16(0xABCD), etc.). These guys _are_ little-endian
and make much more sense that way, even aside of annotation issues.
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Herbert Xu [Tue, 5 Oct 2004 15:01:33 +0000 (08:01 -0700)]
[TCP]: Fix bug that hid sockets in tcp_diag
This patch squashes a bug in tcp_diag which was created when the
sk_* loops replaced the original for loops. It's a pity that these
sk_*/hlist_*/list_* loops don't take an arbitrary expression as an
argument for continue.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
We broke ECN encapsulation in tunnels recently.
Without this patch, even though encapusulated (inner) packet is
'not-ECN', encapusulating (outer) packet is sent with 'ECT(0)' set.
This is wrong and should be 'not-ECN.'
This patch fixes up.
From RFC3168:
The full-functionality option for ECN encapsulation is to copy the
ECN codepoint of the inside header to the outside header on
encapsulation if the inside header is not-ECT or ECT, and to set the
ECN codepoint of the outside header to ECT(0) if the ECN codepoint of
the inside header is CE.
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Tue, 5 Oct 2004 14:58:06 +0000 (07:58 -0700)]
[TCP]: Show all SYN_RECV sockets in /proc/net/tcp
I was fixing the tcp_diag so that it shows SYN_RECV sockets properly.
I found that /proc/net/tcp didn't do it correctly either. So here is
a small patch to fix /proc/net/tcp.
The logic in there stinks though so I'd love to see a rewrite.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 5 Oct 2004 14:28:15 +0000 (07:28 -0700)]
[SPARC64]: Make kprobe implementation more robust.
Switch over to use the single-step scheme which x86 uses
which is to execute the kprobe instruction in the
kprobe->insn[] area. Also, make sure the kprobe execution
runs fully with interrupts disabled, so we do not deadlock.
This required adding code to fix things up as a result of
the instruction executing at a PC which is different from
where it would normally execute. For example, if the
instruction is a PC-relative branch, we have to adjust the
final PC value.
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Tue, 5 Oct 2004 11:51:53 +0000 (04:51 -0700)]
i386: mark do_test_wp_bit() noinline
As reported by Zachary Amsden <zach@vmware.com>,
some gcc versions will inline the function even when
it is declared after the call-site. This particular
function must not be inlined, since the exception
recovery doesn't like __init sections (which the caller
is in).
Linus Torvalds [Tue, 5 Oct 2004 11:01:31 +0000 (04:01 -0700)]
pcmcia: add iomem sparse annotations.
It was pretty clean already, adding the proper annotations
to the base pointers and a few functions was all it took
to make sparse happy about the PCI accesses.
Linus Torvalds [Tue, 5 Oct 2004 10:29:04 +0000 (03:29 -0700)]
Fix up CHECKFLAGS definitions
More recent versions of sparse do not define the Linux-specific
default defines, so we make the main Makefile default to the
regular Linux preprocessor defines (__linux__, linux, __STDC__
and unix, __unix__).
Also, sparse has long since fixed the default empty define to
be "1" as in regular C, so remove the unnecessary "=1" from
the architecture-specific sparse CHECKFLAGS.
Ingo Molnar [Tue, 5 Oct 2004 09:44:44 +0000 (02:44 -0700)]
[PATCH] Fix task_hot() balancing
This fixes the integer underflow in task_hot() noticed by Kenneth W Chen
and makes use of p->last_ran to separate load-balancing timestamps (used
by task_hot()) from interactivity timestamps. (which two interfered)
compiled, booted on x86 SMP.
Confirmed by Kenneth Chen <kenneth.w.chen@intel.com> to fix the db
transaction processing workload that showed the balancing problem.
Roger Blofeld [Tue, 5 Oct 2004 11:07:18 +0000 (12:07 +0100)]
[SERIAL] Pick nearest baud rate divider
From: Roger Blofeld
This patch modifies uart_get_divisor to select the nearest baud rate
divider rather than the lowest. It minimizes baud rate errors.
For example, if uartclk is 33000000 and baud is 115200 the ratio is about
17.9 The current code selects 17 (5% error) but should select 18 (0.5%
error)
Signed-off-by: Andrew Morton Signed-off-by: Russell King
Manfred Spraul [Tue, 5 Oct 2004 07:23:17 +0000 (00:23 -0700)]
[NET]: Fix secure tcp sequence number generation
Ted's recent random.c update broke the periodic rekeying:
schedule_work() doesn't provide synchronization. Additionally the first
syn values after boot are generated with secret 0 - not good.
Attached is a big cleanup. Linus asked me to send to to you for merging:
The tcp sequence number generator needs a random seed that is reset every
few minutes. Since the sequence numbers should be constantly increasing,
for each rekey 2^24 is added to the sequence number.
The actual use of the sequence number generator is lockless,
synchronization is achieved by having two copies of the control structure.
The attached patch:
- fixes a race in rekey_seq_generator(): schedule_work doesn't
provide synchronization.
- Uses schedule_delayed_work() for the rekey: simplifies synchronization
and speeds up the hot path.
- Adds a late_initcall for the first initialization after boot.
init_call would be too early, I've checked that the late_initcall runs
before net/ipv4/ipconfig.c, i.e. the BOOTP/DHCP autoconfiguration.
Signed-Off-By: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 5 Oct 2004 06:38:47 +0000 (23:38 -0700)]
[NET]: Generic network statistics/estimator
Work done by Thomas Graf <tgraf@suug.ch> and
Jamal Hadi Salim <hadi@cyberus.ca>
The following patchset introduces generic network statistics for
netlink users. It uses nested TLV which prevents further compatibility
problems when introducing new statistics. Backward compatibility to
existing TLV types TCA_STATS and TCA_XSTATS is ensured but can be
easly removed once it is no longer needed. Therefore prior users of
struct tc_stats can be converted to this API and existing userspace
applications will not notice a difference while converted applications
can use the new extendable statistic interface.
Changes:
- Add generic network statistics API for netlink users.
- Introduces a generic rate estimator based on timers. Patch is based
on Jamals patch and adapted to the new generic network statistics
API.
- Add documentation of generic network statistics and estimator API.
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
There is a problem with "struct fddi_statistics" for 64-bit systems.
The starting members of the struct are expected to correspond to the
respective members of "struct net_device_stats" (drivers for FDDI
devices return "struct fddi_statistics" in the response to the
get_stats() call of "struct net_device"). Unfortunately, due to using
different types (u32 vs ulong) they do not. "struct net_device_stats"
is a public interface and as a result, bogus results are retrieved,
e.g. for /proc/net/dev.
Here is my proposal to address the problem. I think there is no
point in duplicating the layout of "struct net_device_stats" in
"struct fddi_statistics" as the former can simply be included as a
member avoiding this problem and actually any possible discrepancy in
the future. This also preserves the layout of the structure for
32-bit systems.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Greg Banks [Tue, 5 Oct 2004 04:37:55 +0000 (21:37 -0700)]
[NET]: Fix race between neigh-timer_handler and neigh_event_send
Fix a race between neigh_timer_handler() calling down to arp_solicit()
with an sk_buff peeked from the head of the neigh->arp_queue, and
neigh_event_send() unqueuing and freeing the head of the same queue
because it's reached the maximum length of 3, by taking an extra
sk_buff reference while holding neigh->lock.
Signed-off-by: Greg Banks <gnb@melbourne.sgi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Hunold [Tue, 5 Oct 2004 00:54:19 +0000 (17:54 -0700)]
[PATCH] Fix error path in Video4Linux dpc7146 driver
The I2C adapter wasn't de-registered correctly in case the video card
wasn't found. When the I2C subsystem tried to speak with the dangling
I2C adapter later on, usually an oops happened.
Added documentation for the GPIO calls, updated
the overview with more information on the supported
core devices, and updated the state of the EB2410ITX
François Romieu [Mon, 4 Oct 2004 13:11:05 +0000 (09:11 -0400)]
[PATCH] via-velocity: removal of incomplete endianness handling
Removed cpu_to_le32 call on OWNED_BY_NIC. This will produce 0x01000000 on
big endian machines while rdesc0.owner still evaluates to 0x00000000 or
0x00000001. BTW, unless we reorder bit fields on big endian machines or
use u32's and cpu_to_le32'd bit mask macros, current code won't work on big
endian machines.