Commit Graph

74617 Commits

Author SHA1 Message Date
Linus Torvalds
f4d53cedce Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  virtio: fix net driver loop case where we fail to restart
  module: fix and elaborate comments
  virtio: fix module/device unloading
  lguest: Fix uninitialized members in example launcher
2007-11-26 19:17:19 -08:00
Finn Thain
9bb9f2220e mac68k: mailing list addresss
The mail service for the mac.linux-m68k.org domain is defunct.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-26 19:15:31 -08:00
Geert Uytterhoeven
2f9b0b5e46 Amiga zorro bus: Add missing zorro_device_remove()
Amiga zorro bus: Add missing zorro_device_remove(). Without this ifconfig and
/proc/net/dev oops after unloading a Zorro network device driver module.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-26 19:15:31 -08:00
Adrian Bunk
9e893bb853 m68k: export atari_keyb_init
m68k: export atari_keyb_init

This patch fixes the following build error:

  ..
    MODPOST 25 modules
  ERROR: "atari_keyb_init" [drivers/input/mouse/atarimouse.ko] undefined!
  ERROR: "atari_keyb_init" [drivers/input/keyboard/atakbd.ko] undefined!
  make[2]: *** [__modpost] Error 1

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-26 19:15:31 -08:00
Patrick McHardy
5dba479711 [XFRM]: Fix leak of expired xfrm_states
The xfrm_timer calls __xfrm_state_delete, which drops the final reference
manually without triggering destruction of the state. Change it to use
xfrm_state_put to add the state to the gc list when we're dropping the
last reference. The timer function may still continue to use the state
safely since the final destruction does a del_timer_sync().

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2007-11-27 11:10:07 +08:00
Linus Torvalds
6b41016032 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (39 commits)
  ACPI: EC: Workaround for optimized controllers (version 3)
  ACPI: EC: use printk_ratelimit(), add some DEBUG mode messages
  Revert "ACPI: EC: Workaround for optimized controllers"
  ACPI: fix two IRQ8 issues in IOAPIC mode
  ACPI: Add missing spaces to printk format
  cpuidle: fix HP nx6125 regression
  cpuidle: add sched_clock_idle_[sleep|wakeup]_event() hooks
  cpuidle: fix C3 for no bus-master control case
  ACPI: thinkpad-acpi: fix oops when a module parameter has no value
  Revert "Fix very high interrupt rate for IRQ8 (rtc) unless pnpacpi=off"
  ACPI: EC: Don't init EC early if it has no _INI
  Revert "acpi: make ACPI_PROCFS default to y"
  Revert "ACPI: add documentation for deprecated /proc/acpi/battery in ACPI_PROCFS"
  ACPI: Split out control for /proc/acpi entries from battery, ac, and sbs.
  ACPI: Video: Increase buffer size for writes to brightness proc file.
  ACPI: EC: Workaround for optimized controllers
  ACPI: SBS: Fix retval warning
  ACPI: Enable MSR (FixedHW) support for T-States
  ACPI: Get throttling info from BIOS only after evaluating _PDC
  ACPI: Use _TSS for throttling control, when present. Add error checks.
  ...
2007-11-26 19:09:58 -08:00
Linus Torvalds
9ccc236269 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] cio: Register/unregister subchannels only from kslowcrw.
  [S390] Add missing die_notifier() call to die().
  [S390] Fix memory detection.
  [S390] Explicitly code allocpercpu calls in iucv
  [S390] Dont overwrite lowcores on smp_send_stop().
  [S390] Optimize storage key handling for anonymous pages
  [S390] Fix kernel preemption.
  [S390] appldata: remove unused binary sysctls.
  [S390] cmm: remove unused binary sysctls.
  [S390] Fix irq tracing and lockdep_sys_exit calls.
  [S390] magic sysrq: check for in_atomic before doing an console_unblank
  [S390] cio: change device sense procedure to work with pav aliases
2007-11-26 19:09:22 -08:00
Linus Torvalds
da457d4b93 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (27 commits)
  [POWERPC] 83xx: Update mpc8349emitx(gp) defconfig for USB
  [POWERPC] 83xx: Update mpc832x_rdb_defconfig to enable MMC-over-SPI
  [POWERPC] 83xx: MPC832x RDB - remove spidev stub, use mmc_spi
  [POWERPC] 8xxx: MDS board RTC fixes
  [POWERPC] Fix 8xx build breakage due to _tlbie changes
  [POWERPC] Fix device tree interrupt map for Freescale ULI1575 boards
  [POWERPC] Fix possible division by zero in scaled time accounting
  [POWERPC] spufs: Fix context destroy vs /spu readdir race
  [POWERPC] Fix RTAS os-term usage on kernel panic
  [POWERPC] 83xx: Handle mpc8360 rev. 2.1 RGMII timing erratum
  [POWERPC] Document rgmii-rxid and rgmii-txid phy-connection-types
  [POWERPC] 83xx: Fix 2nd UCC entry in mpc832x_mds.dts
  [POWERPC] 83xx: mpc832x mds: Fix board PHY reset code
  [POWERPC] Fix potential NULL dereference
  [POWERPC] vdso: Fixes for cache block sizes
  [POWERPC] pasemi: Don't reset mpic at boot
  [POWERPC] Fix kmalloc alignment on non-coherent DMA platforms
  [POWERPC] Fix build failure on legacy iSeries
  [POWERPC] 4xx: Use virtual PVR value to init FPU on arch/ppc 440EP
  [POWERPC] 4xx: UIC add mask_ack callback
  ...
2007-11-26 19:08:35 -08:00
Karsten Keil
0f13864e5b isdn: avoid copying overly-long strings
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9416

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-26 19:08:18 -08:00
Linus Torvalds
552d2f841e Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] vpe: Add missing "space"
  [MIPS] Compliment va_start() with va_end().
  [MIPS] IP22: Fix broken eeprom access by using __raw_readl/__raw_writel
  [MIPS] IP22: Fix broken EISA interrupt setup by switching to generic i8259
  [MIPS] 64-bit Sibyte kernels need DMA32.
  [MIPS] Only build r4k clocksource for systems that work ok with it.
  [MIPS] Handle R4000/R4400 mfc0 from count register.
  [MIPS] Fix possible hang in LL/SC futex loops.
  [MIPS] Fix context DSP context / TLS pointer switching bug for new threads.
  [MIPS] IP32: More interrupt renumbering fixes.
  [MIPS] time: MIPSsim's plat_time_init doesn't need to be irq safe.
  [MIPS] time: Fix negated condition in cevt-r4k driver.
  [MIPS] Fix pcspeaker build.
2007-11-26 19:05:19 -08:00
Linus Torvalds
09cfd92986 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa:
  [ALSA] version 1.0.15
  [ALSA] emu10k1 - Check value ranges in ctl callbacks
  [ALSA] emu10k1: Add mixer controls parameter checking.
  [ALSA] fix private data pointer calculation in CS4270 driver
  [ALSA] portman2x4 - Fix probe error
  [ALSA] ca0106 - Fix write proc assignment
  [ALSA] s3c2443-ac97: compilation fix
  [ALSA] hda-codec - Revert volume knob controls in STAC codecs
  [ALSA] ca0106 - Check value range in ctl callbacks
  [ALSA] hda-codec - Check PINCAP only for PIN widgets
  [ALSA] mpu401: fix recursive locking in timer
  [ALSA] cmipci: fix FLINKON/OFF bits
  [ALSA] hda-codec - Disable shared stream on AD1986A
2007-11-26 19:04:24 -08:00
chas williams
8a8037ac9d [ATM]: [he] initialize lock and tasklet earlier
if you are lucky (unlucky?) enough to have shared interrupts, the
interrupt handler can be called before the tasklet and lock are ready
for use.

Signed-off-by: chas williams <chas@cmf.nrl.navy.mil>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2007-11-27 11:03:16 +08:00
Andreas Herrmann
8c6531f7a9 x86: correctly set UTS_MACHINE for "make ARCH=x86"
For a kernel built with "make ARCH=x86" the following system
information is displayed when running the new kernel

    $ uname -m
    x86

On some i386 systems (e.g. K7) we even have the following information

    $ uname -m
    x66

This is weird. The usual information for "uname -m" should be "x86_64"
on 64-bit and "i386" or "i686" on 32-bit.

This patch fixes the issue by setting UTS_MACHINE to "i386" for 32-bit
kernel builds and to "x86_64" for 64-bit kernel builds. I.e., "x86"
won't be used for UTS_MACHINE anymore.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andreas Herrmann <aherrman@arcor.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-26 17:38:53 -08:00
Chuck Lever
02fe494619 NFS: Clean up new multi-segment direct I/O changes
Simplify calling sequence of nfs_direct_{read,write}_schedule(), and
rename them to reflect their new role.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-11-26 16:32:40 -05:00
Chuck Lever
b9148c6b80 NFS: Ensure we return zero if applications attempt to write zero bytes
A zero byte count direct write request should be a successful no-op, not an
error.

Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-11-26 16:32:38 -05:00
Chuck Lever
c216fd708e NFS: Support multiple segment iovecs in the NFS direct I/O path
Allow applications to perform asynchronous scatter-gather direct I/O
to NFS files.

Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-11-26 16:32:36 -05:00
Chuck Lever
19f737879c NFS: Introduce iovec I/O helpers to fs/nfs/direct.c
Add helpers that iterate over multi-segment iovecs.  These will
be used to support multi-segment scatter/gather direct I/O in a
later patch.

Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-11-26 16:32:35 -05:00
Joe Perches
014313a9d6 SUNRPC: Add missing "space" to net/sunrpc/auth_gss.c
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-11-26 16:24:59 -05:00
Adrian Bunk
483066d62e SUNRPC: make sunrpc/xprtsock.c:xs_setup_{udp,tcp}() static
xs_setup_{udp,tcp}() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-11-26 16:24:50 -05:00
Adrian Bunk
4c30d56edc NFS: fs/nfs/dir.c should #include "internal.h"
Every file should include the headers containing the prototypes for its global
functions (in this case nfs_access_cache_shrinker()).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-11-26 16:24:49 -05:00
Adrian Bunk
5334eb13d4 NFS: make nfs_wb_page_priority() static
nfs_wb_page_priority() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-11-26 16:24:48 -05:00
Russell King
f16c960332 NFS: mount failure causes bad page state
While testing a kernel based upon ecd744eec3
(with wrong boot arguments), I got the following bad page state entry while
NFS was trying to mount it's rootfs:

IP-Config: Complete:
      device=eth0, addr=192.168.1.101, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.1.101, domain=, nis-domain=(none),
     bootserver=192.168.1.100, rootserver=192.168.1.100, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.100
rpcbind: server 192.168.1.100 not responding, timed out
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 192.168.1.100
rpcbind: server 192.168.1.100 not responding, timed out
Root-NFS: Unable to get mountd port number from server, using default
mount: server 192.168.1.100 not responding, timed out
Root-NFS: Server returned error -5 while mounting /nfs/rootfs/
VFS: Unable to mount root fs via NFS, trying floppy.
Bad page state in process 'swapper'
page:c02b1260 flags:0x00000400 mapping:00000000 mapcount:0 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
[<c0023e34>] (dump_stack+0x0/0x14) from [<c0062570>] (bad_page+0x70/0xac)
[<c0062500>] (bad_page+0x0/0xac) from [<c0064914>] (free_hot_cold_page+0x80/0x178)
[<c0064894>] (free_hot_cold_page+0x0/0x178) from [<c0064a74>] (free_hot_page+0x14/0x18)
[<c0064a60>] (free_hot_page+0x0/0x18) from [<c0067078>] (put_page+0xf8/0x154)
[<c0066f80>] (put_page+0x0/0x154) from [<c007dbc8>] (kfree+0xc8/0xd0)
[<c007db00>] (kfree+0x0/0xd0) from [<c00cbb54>] (nfs_get_sb+0x230/0x710)
[<c00cb924>] (nfs_get_sb+0x0/0x710) from [<c0084334>] (vfs_kern_mount+0x58/0xac)[<c00842dc>] (vfs_kern_mount+0x0/0xac) from [<c00843c0>] (do_kern_mount+0x38/0xf4)
[<c0084388>] (do_kern_mount+0x0/0xf4) from [<c0099c7c>] (do_mount+0x1e8/0x614)
...

This seems to be caused by use of an uninitialised structure due to NULL
options being passed to nfs_validate_mount_data().  Ensure that the
parsed mount data is always initialised.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
     (Trond: added fix for the same bug in nfs4_validate_mount_data()).
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-11-26 16:24:22 -05:00
James Lentini
cfcb43ff7c SUNRPC: remove NFS/RDMA client's binary sysctls
Support for binary sysctls is being deprecated in 2.6.24. Since there
are no applications using the NFS/RDMA client's binary sysctls, it
makes sense to remove them. The patch below does this while leaving
the /proc/sys interface unchanged.

Please consider this for 2.6.24.

Signed-off-by: James Lentini <jlentini@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-11-26 16:21:19 -05:00
Ingo Molnar
f7b9329e55 sched: bump version of kernel/sched_debug.c
bump version of kernel/sched_debug.c and remove CFS version
information from it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-26 21:21:49 +01:00
Zou Nan hai
722aab0c3b sched: fix minimum granularity tunings
increase the default minimum granularity some more - this gives us
more performance in aim7 benchmarks.

also correct some comments: we scale with ilog(ncpus) + 1.

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-26 21:21:49 +01:00
Ingo Molnar
58e1010da3 sched: fix RLIMIT_CPU comment
Devan Lippman noticed that the RLIMIT_CPU comment in resource.h is
incorrect: the field is in seconds, not msecs. We used msecs in
earlier versions of the patch but that got changed.

Found-by: Devan Lippman <devan.lippman@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-26 21:21:49 +01:00
Ingo Molnar
bcbe4a0766 sched: fix kernel/acct.c comment
fix kernel/acct.c comment.

noticed by Lin Tan. Comment suggested by Olaf Kirch.

also see:

  http://bugzilla.kernel.org/show_bug.cgi?id=8220

Reported-by: tammy000@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-26 21:21:49 +01:00
Ingo Molnar
08e4570a4a sched: fix prev_stime calculation
Srivatsa Vaddagiri noticed occasionally incorrect CPU usage
values in top and tracked it down to stime going below 0 in
task_stime(). Negative values are possible there due to the
sampled nature of stime/utime.

Fix suggested by Balbir Singh.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Reviewed-by: Balbir Singh <balbir@linux.vnet.ibm.com>
2007-11-26 21:21:49 +01:00
Pavel Emelyanov
5e8869bb69 sched: don't forget to unlock uids_mutex on error paths
The commit

 commit 5cb350baf5
 Author: Dhaval Giani <dhaval@linux.vnet.ibm.com>
 Date:   Mon Oct 15 17:00:14 2007 +0200

    sched: group scheduling, sysfs tunables

introduced the uids_mutex and the helpers to lock/unlock it.
Unfortunately, the error paths of alloc_uid() were not patched
to unlock it.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-26 21:21:49 +01:00
Nicolas Pitre
d28a170d5b [ARM] 4665/1: fix __und_usr wrt accessing the undefined insn in user space
The ldrt fixup code expects r9 to be set.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-26 19:44:02 +00:00
Nicolas Pitre
b49c0f24cf [ARM] 4659/1: remove possibilities for spurious false negative with __kuser_cmpxchg
The ARM __kuser_cmpxchg routine is meant to implement an atomic cmpxchg
in user space.  It however can produce spurious false negative if a
processor exception occurs in the middle of the operation.  Normally
this is not a problem since cmpxchg is typically called in a loop until
it succeeds to implement an atomic increment for example.

Some use cases which don't involve a loop require that the operation be
100% reliable though.  This patch changes the implementation so to
reattempt the operation after an exception has occurred in the critical
section rather than abort it.

Here's a simple program to test the fix (don't use CONFIG_NO_HZ in your
kernel as this depends on a sufficiently high interrupt rate):

	#include <stdio.h>

	typedef int (__kernel_cmpxchg_t)(int oldval, int newval, int *ptr);
	#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *)0xffff0fc0)

	int main()
	{
		int i, x = 0;
		for (i = 0; i < 100000000; i++) {
			int v = x;
			if (__kernel_cmpxchg(v, v+1, &x))
				printf("failed at %d: %d vs %d\n", i, v, x);
		}
		printf("done with %d vs %d\n", i, x);
		return 0;
	}

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-26 19:43:58 +00:00
Nicolas Pitre
aeb747afb3 [ARM] 4661/1: fix do_undefinstr wrt the enabling of IRQs
The lock is acquired with spin_lock_irqsave() and released in the
not-found case with spin_unlock_irqrestore().

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-26 19:43:42 +00:00
Li Zefan
dc49cb2180 [ARM] uengine: fix memset size error
The size passing to memset is wrong.  And here we can replace kmalloc with
kzalloc.

Signed-off-by Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-26 19:43:40 +00:00
Pavel Pisa
1c016b2c72 [ARM] 4648/1: i.MX/MX1 ensure more complete AITC initialization
The AITC code did not allow to start kernel, if bootloader
manipulates with interrupt level mask. The change ensures,
that NIMASK is initialized into correct state and that
interrupts enable registers are cleared.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-26 19:43:37 +00:00
Ingo Molnar
f44d9efd35 x86: fix APIC related bootup crash on Athlon XP CPUs
warmbloodedcreature@gmail.com reported that an APIC-enabled
Asus a7v8x-x with an Athlon XP reboots early in the bootup:

   http://bugzilla.kernel.org/show_bug.cgi?id=8723

after a long marathon of spontaneous-reboot debugging, it turns
out to be caused by sync_Arb_ids(). AMD CPUs never really needed
this sequence anyway, so just return early if we meet an AMD CPU.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-26 20:42:20 +01:00
John Stultz
52bfb36050 time: add ADJ_OFFSET_SS_READ
Michael Kerrisk reported that a long standing bug in the adjtimex()
system call causes glibc's adjtime(3) function to deliver the wrong
results if 'delta' is NULL.

add the ADJ_OFFSET_SS_READ API detail, which will be used by glibc
to fix this API compatibility bug.

Also see: http://bugzilla.kernel.org/show_bug.cgi?id=6761

[ mingo@elte.hu: added patch description and made it backwards compatible ]

NOTE: the new flag is defined 0xa001 so that it returns -EINVAL on
older kernels - this way glibc can use it safely. Suggested by Ulrich
Drepper.

Acked-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-26 20:42:19 +01:00
Theodore Ts'o
8232fd6252 x86: export the symbol empty_zero_page on the 32-bit x86 architecture
The latest KVM driver wants to use the empty_zero_page symbol, and it's
not exported in 32-bit x86 (although it is exported by x86_64, s390, and
uml architectures).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.com
Cc: kvm-devel@lists.sourceforge.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-26 20:42:19 +01:00
Andrew Morton
8645419cdb x86: fix kprobes_64.c inlining borkage
fix:

arch/x86/kernel/kprobes_64.c: In function 'set_current_kprobe':
arch/x86/kernel/kprobes_64.c:152: sorry, unimplemented: inlining failed in call to 'is_IF_modifier': recursive inlining
arch/x86/kernel/kprobes_64.c:166: sorry, unimplemented: called from here

Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: mingo@elte.hu
Cc: akpm@linux-foundation.org
Cc: tglx@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-26 20:42:19 +01:00
Michal Schmidt
c82bc5ad54 pci: use pci=bfsort for HP DL385 G2, DL585 G2
HP ProLiant systems DL385 G2 and DL585 G2 need pci=bfsort to enumerate PCI
devices in the expected order.

Matt sayeth:

  biosdevname is a userspace app I wrote to help solve this so we don't need
  to patch the kernel for future systems.  It's not integrated into any
  distributions properly yet, but is included in openSUSE 10.3 and Fedora 8
  for people who want to download and install it there.  It acts as a udev
  helper.

  For the time being, patching the kernel is necessary.  I really hope
  biosdevname eliminates that need in future distributions.

  http://linux.dell.com/biosdevname/

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Andy Gospodarek <andy@greyhouse.net>
Cc: mingo@elte.hu
Cc: andy@greyhouse.net
Cc: john.cagle@hp.com
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: Greg KH <greg@kroah.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-26 20:42:19 +01:00
Andreas Herrmann
43517854da x86: correctly set UTS_MACHINE for "make ARCH=x86"
x86: correctly set UTS_MACHINE for "make ARCH=x86"

For a kernel built with "make ARCH=x86" the following system
information is displayed when running the new kernel

    $ uname -m
    x86

On some i386 systems (e.g. K7) we even have the following information

    $ uname -m
    x66

This is weird. The usual information for "uname -m" should be "x86_64"
on 64-bit and "i386" or "i686" on 32-bit.

This patch fixes the issue by setting UTS_MACHINE to "i386" for 32-bit
kernel builds and to "x86_64" for 64-bit kernel builds. I.e., "x86"
won't be used for UTS_MACHINE anymore.

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andreas Herrmann <aherrman@arcor.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@redhat.com>
2007-11-26 20:42:19 +01:00
Peter Zijlstra
000f4a9e71 lockdep: annotate do_debug() trap handler
Ensure the hardirq state is consistent before using locks. Use the rare
trace_hardirqs_fixup() because the trap can happen in any context.

resolves this rare lockdep warning:

WARNING: at kernel/lockdep.c:2658 check_flags()
 [<c013571e>] check_flags+0x90/0x140
 [<c0138a69>] lock_release+0x4b/0x1d0
 [<c0507fea>] notifier_call_chain+0x2a/0x47
 [<c050806b>] __atomic_notifier_call_chain+0x64/0x6d
 [<c0508007>] __atomic_notifier_call_chain+0x0/0x6d
 [<c050808b>] atomic_notifier_call_chain+0x17/0x1a
 [<c0131802>] notify_die+0x30/0x34
 [<c0506b09>] do_debug+0x3e/0xd4
 [<c050658f>] debug_stack_correct+0x27/0x2c
 [<c04be389>] tcp_rcv_established+0x1/0x620
 [<c04c38c2>] tcp_v4_do_rcv+0x2b/0x313
 [<c04c56b6>] tcp_v4_rcv+0x467/0x85d
 [<c0505ff2>] _spin_lock_nested+0x27/0x32
 [<c04c5a4d>] tcp_v4_rcv+0x7fe/0x85d
 [<c04c560e>] tcp_v4_rcv+0x3bf/0x85d
 [<c04adbb5>] ip_local_deliver_finish+0x11b/0x1b0
 [<c04adac8>] ip_local_deliver_finish+0x2e/0x1b0
 [<c04ada7b>] ip_rcv_finish+0x27b/0x29a
 [<c04961e5>] netif_receive_skb+0xfb/0x2a6
 [<c04add0f>] ip_rcv+0x0/0x1fb
 [<c0496354>] netif_receive_skb+0x26a/0x2a6
 [<c04961e5>] netif_receive_skb+0xfb/0x2a6
 [<c049872e>] process_backlog+0x7f/0xc6
 [<c04983ba>] net_rx_action+0xb9/0x1ac
 [<c0498348>] net_rx_action+0x47/0x1ac
 [<c01376cb>] trace_hardirqs_on+0x118/0x16b
 [<c01225e2>] __do_softirq+0x49/0xa2
 [<c010595f>] do_softirq+0x60/0xdd
 [<c0506300>] _spin_unlock_irq+0x20/0x2c
 [<c0103e4f>] restore_nocheck+0x12/0x15
 [<c01440e1>] handle_fasteoi_irq+0x0/0x9b
 [<c0105a70>] do_IRQ+0x94/0xaa
 [<c0506300>] _spin_unlock_irq+0x20/0x2c
 [<c0104832>] common_interrupt+0x2e/0x34
 [<c0114703>] native_safe_halt+0x2/0x3
 [<c0102c01>] default_idle+0x44/0x65
 [<c010257f>] cpu_idle+0x42/0x50
 [<c076ea09>] start_kernel+0x26b/0x270
 [<c076e317>] unknown_bootoption+0x0/0x196
 =======================
irq event stamp: 559190
hardirqs last  enabled at (559190): [<c0507316>] kprobe_exceptions_notify+0x299/0x305
hardirqs last disabled at (559189): [<c05067bf>] do_int3+0x1d/0x95
softirqs last  enabled at (559172): [<c010595f>] do_softirq+0x60/0xdd
softirqs last disabled at (559181): [<c010595f>] do_softirq+0x60/0xdd

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-26 20:42:19 +01:00
Ingo Molnar
bc84cf17b5 x86: turn off iommu merge by default
revert this commit for now:

    commit 9480626830
    Author: Andi Kleen <ak@suse.de>
    Date:   Fri Oct 19 20:35:03 2007 +0200

        x86: enable iommu_merge by default

it's causing regressions:

    http://bugzilla.kernel.org/show_bug.cgi?id=9412

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-26 20:42:19 +01:00
Thomas Gleixner
aafab10d3f x86: fix ACPI compile for LOCAL_APIC=n
ACPI processor idle code references local_apic_timer_c2_ok, which
is not available when LOCAL_APIC is disabled.

Define local_apic_timer_c2_ok as a constant, when LOCAL_APIC=n

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-26 20:42:19 +01:00
Arjan van de Ven
57c351de71 x86: printk kernel version in WARN_ON and other dump_stack users
today, all oopses contain a version number of the kernel, which is nice
because the people who actually do bother to read the oops get this
vital bit of information always without having to ask the reporter in
another round trip.

However, WARN_ON() and many other dump_stack() users right now lack this
information; the patch below adds this. This information is essential
for getting people to use their time effectively when looking at these
things; in addition, it's essential for tools that try to collect
statistics about defects.

Please consider, since its so simple and important for long term kernel
quality processes.

The code is identical between 32/64 bit; a lot of this code should be
unified over time, the patch keeps the identical-ness intact.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-26 20:42:19 +01:00
Alexey Starikovskiy
c1c3063446 ACPI: Set max_cstate to 1 for early Opterons.
AMD Opteron processors before CG revision don't like C-states > 1.

This solves the long standing bugzilla #5303 and probably some more
on affected machines:

  http://bugzilla.kernel.org/show_bug.cgi?id=5303

[ tglx@linutronix.de: reworked the patch so it does not wreck ia64 ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-26 20:42:19 +01:00
Maciej W. Rozycki
d4d25deca4 x86: fix NMI watchdog & 'stopped time' problem
More than 3 years ago Niclas Gustafsson reported a 'stopped time'
problem:

> Watching the /proc/interrupts with 10s apart after the "stop".
>
> [root@s151 root]# more /proc/interrupts
>            CPU0
>   0:   66413955  local-APIC-edge  timer
[...]
> LOC:   67355837
> ERR:          0
> MIS:          0
> [root@s151 root]# more /proc/interrupts
>            CPU0
>   0:   66413955  local-APIC-edge  timer
[...]
> LOC:   67379568
> ERR:          0
> MIS:          0

This may be because buggy SMM firmware messes with the 8259A (configured
for a transparent mode -- yes that rare "local-APIC-edge" mode is tricky
;-) ) insanely.

this should resolve:

  http://bugzilla.kernel.org/show_bug.cgi?id=2544
  http://bugzilla.kernel.org/show_bug.cgi?id=6296

Patch-dusted-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-26 20:42:19 +01:00
Andrew Victor
302edfd04e [ARM] 4611/2: AT91: Fix GPIO buttons pins on SAM9261-EK.
The incorrect GPIO pins are being initialized for the buttons on the
Atmel AT91SAM9261-EK board.  This buggy configuration turns LCD screen
blue...

Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-26 19:41:00 +00:00
Andrew Victor
f230d3f53d [ARM] 4650/1: AT91: New-style init of I2C, support for i2c-gpio
The AT91 I2C driver is currently marked as "broken" due to hardware
issues.  This patch enables AT91-based platforms to also use the
bitbanged GPIO for I2C.

This updates platform setup logic (setting up an i2c-gpio device
using the same pins as the i2c-at91 device, unless only the BROKEN
driver is enabled).

Also make use of the new-style initialization of I2C devices using
i2c_register_board_info().

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-26 19:40:47 +00:00
Andrew Victor
a95c729b74 [ARM] 4604/2: AT91: Master clock divistor on SAM9
The calculation for the Master clock divisor (MDIV) is different on the
SAM9 processors than on the AT91RM9200.

Orignal patch from Sascha Erlacher.

Also use the defined AT91_PMC_PRES instead of hard-coded bitmasks.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-26 19:40:25 +00:00
Joe Perches
b1e3afa001 [MIPS] vpe: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-26 17:26:15 +00:00