Commit Graph

5050 Commits

Author SHA1 Message Date
Eric W. Biederman 4de8b9b760 [PATCH] Update sysrq-B to use emergency_restart()
sysrq calls into the reboot path from an interrupt handler
we can either push the code do into process context and
call kernel_restart and get a clean reboot or we can simply
reboot the machine, and increase our chances of actually
rebooting.  emergency_reboot() seems like the closest match
to what we have previously done, and what we want.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:43 -07:00
Eric W. Biederman 2f048ea81d [PATCH] Call emergency_reboot from panic
We know the system is in trouble so there is no question if this
is an emergecy :)

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:43 -07:00
Eric W. Biederman ff31977782 [PATCH] Use kernel_power_off in sysrq-o
We already do all of the gymnastics to run from process context
to call the power off code so call into the power off code cleanly.

This especially helps acpi as part of it's shutdown logic should
run acpi_shutdown called from device_shutdown which was not
being called from here.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:43 -07:00
Eric W. Biederman 62b3a04d75 [PATCH] x86_64: Implemenent machine_emergency_restart
It is not safe to call set_cpus_allowed() in interrupt
context and disabling the apics is complicated code.
So unconditionally skip machine_shutdown in machine_emergency_reboot
on x86_64.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:42 -07:00
Eric W. Biederman 7c9a90073c [PATCH] x86_64: Fix reboot_force
We only want to shutdown the apics if reboot_force
is not specified.  Be we are doing this both
in machine_shutdown which is called unconditionally
and if (!reboot_force).  So simply call machine_shutdown
if (!reboot_force).  It looks like something
went weird with merging some of the kexec patches for
x86_64, and caused this.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:42 -07:00
Eric W. Biederman 4a1421f81b [PATCH] i386: Implement machine_emergency_reboot
set_cpus_allowed is not safe in interrupt context
and disabling apics is complicated code so don't
call machine_shutdown on i386 from emergency_restart().

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:42 -07:00
Eric W. Biederman 59586e5a26 [PATCH] Don't export machine_restart, machine_halt, or machine_power_off.
machine_restart, machine_halt and machine_power_off are machine
specific hooks deep into the reboot logic, that modules
have no business messing with.  Usually code should be calling
kernel_restart, kernel_halt, kernel_power_off, or
emergency_restart. So don't export machine_restart,
machine_halt, and machine_power_off so we can catch buggy users.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:42 -07:00
Eric W. Biederman 16dcb4bbda [PATCH] Fix the arguments to machine_restart on cris
It appears machine_restart has been working cris just
by luck.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:42 -07:00
Eric W. Biederman 7c9034735e [PATCH] Add emergency_restart()
When the kernel is working well and we want to restart cleanly
kernel_restart is the function to use.   But in many instances
the kernel wants to reboot when thing are expected to be working
very badly such as from panic or a software watchdog handler.

This patch adds the function emergency_restart() so that
callers can be clear what semantics they expect when calling
restart.  emergency_restart() is expected to be callable
from interrupt context and possibly reliable in even more
trying circumstances.

This is an initial generic implementation for all architectures.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:41 -07:00
Eric W. Biederman abcd9e51f5 [PATCH] Make ctrl_alt_del call kernel_restart to get a proper reboot.
It is obvious we wanted to call kernel_restart here
but since we don't have it the code was expanded inline and hasn't
been correct since sometime in 2.4.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:41 -07:00
Eric W. Biederman 4a00ea1e18 [PATCH] Refactor sys_reboot into reusable parts
Because the factors of sys_reboot don't exist people calling
into the reboot path duplicate the code badly, leading to
inconsistent expectations of code in the reboot path.

This patch should is just code motion.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:41 -07:00
Eric W. Biederman 47f61f397c [PATCH] Add missing device_suspsend(PMSG_FREEZE) calls.
In the recent addition of device_suspend calls into
sys_reboot two code paths were missed.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:35:41 -07:00
Andrew Morton a6fa657b9d [PATCH] qla2xxx: Kconfig dependency fix
*** Warning: "fc_remote_port_block" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "scsi_is_fc_rport" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_remote_port_unblock" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_remote_port_rolechg" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_release_transport" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_remove_host" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_remote_port_add" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
*** Warning: "fc_attach_transport" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!

Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:34:18 -07:00
Andrew Morton 9a168bddc2 [PATCH] qla: remove anonymous union
Older gcc's dont support anonymous unions, so this driver gets hundreds of
error.

Fortunately the fix is easy...

Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:34:18 -07:00
Andrew Morton 89373de7dd [PATCH] inotify: fix oops fix
Cc: Robert Love <rml@novell.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 14:34:18 -07:00
Robert Love 725b38ab54 [PATCH] inotify: add x86-64 syscall entries
Add inotify syscall entries to x86-64.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 13:37:22 -07:00
Robert Love d25cb934b0 [PATCH] inotify: add missing hook to sys32_open
Add missing fsnotify_open() hook to sys32_open().

Add fsnotify_open() hook to sys32_open() on x86-64.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 13:37:22 -07:00
Robert Love e5ca844a9d [PATCH] inotify: check retval in init
Check for (unlikely) errors in the filesystem initialization stuff in
our module_init() function.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 13:37:22 -07:00
Robert Love 1b2ccf0cc1 [PATCH] inotify: change default limits
Change default inotify limits: Maximum instances per user to 128 and
maximum events per queue to 16k.  The max instances used to be 128; the
change to 8 was a mistake.  Memory consumption is fine.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 13:37:22 -07:00
Robert Love 5eb22cbcdb [PATCH] inotify: exit path cleanups
Handle error out paths better.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 13:37:22 -07:00
Robert Love 783bc29bbc [PATCH] inotify: oops fix
Bug fix: Ensure that the fd passed to inotify_add_watch() and
inotify_rm_watch() belongs to inotify.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 13:37:21 -07:00
Robert Love 33ea2f52b8 [PATCH] inotify: use fget_light
As an optimization, use fget_light() and fput_light() where possible.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 13:31:57 -07:00
Robert Love b680716ed2 [PATCH] inotify: misc. cleanup
Miscellaneous invariant clean up, comment fixes, and so on.  Trivial
stuff.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-26 13:31:57 -07:00
Linus Torvalds 2d986010ad Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 2005-07-26 13:28:47 -07:00
Linus Torvalds 6b6a93c687 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2005-07-24 20:39:30 -07:00
Linus Torvalds e89227889c Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2005-07-24 20:38:44 -07:00
Patrick McHardy 7686ee1ad9 [EMATCH]: Remove feature ifdefs in meta ematch.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:44:23 -07:00
David S. Miller db7d9a4eb7 [SPARC64]: Move syscall success and newchild state out of thread flags.
These two bits were accesses non-atomically from assembler
code.  So, in order to eliminate any potential races resulting
from that, move these pieces of state into two bytes elsewhere
in struct thread_info.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:36:26 -07:00
David S. Miller cdd5186f75 [SPARC64]: Privatize sun5_timer.
It is only used by some localized code in irq.c, and also
delete enable_prom_timer() as that is totally unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:36:13 -07:00
David S. Miller c5019a578f [SPARC64]: Kill totally unused inline functions from asm/spitfire.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:35:56 -07:00
David S. Miller 620de54675 [SPARC64]: Simplify asm/rwsem.h slightly.
rwsem_atomic_update and rwsem_atomic_add can be implemented
straightly using atomic_*() routines.

Also, rwsem_cmpxchgw() is totally unused, kill it.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:35:42 -07:00
David S. Miller 6593eaed81 [SPARC64]: Non-atomic bitops do not need volatile operations
Noticed this while comparing sparc64's bitops.h to ppc64's.
We can cast the volatile memory argument to be non-volatile.

While we're here, __inline__ --> inline.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:35:28 -07:00
David S. Miller 4b502421aa [SPARC]: Fix __KERNEL_SYSCALLS__ defining in envctrl.c and bbc_envctrl.c
It needs to happen before any header includes because nowadays
some things implicitly include asm/unistd.h which ends up being
before the __KERNEL_SYSCALLS__ define gets done.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:35:08 -07:00
Nishanth Aravamudan 2d1aea8dd0 [SPARC]: sbus/vfc_i2c: remove sleep_on() usage
Use wait-queue directly instead of the deprecated sleep_on()
function. This required adding a local wait-queue. Also use new (added in
separate patch to K-J) usecs to jiffies function to convert value.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:34:47 -07:00
Nishanth Aravamudan cb39d263e7 [SPARC]: sbus/envctrl: replace schedule_timeout() with msleep_interruptible()
Use msleep_interruptible() instead of schedule_timeout() to guarantee
the task delays as expected. Change the units of poll_interval to
msecs as it is only used in this delay.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:34:33 -07:00
Nishanth Aravamudan 70c83375bb [SPARC]: sbus/aurora: replace schedule_timeout() with msleep_interruptible()
Use msleep_interruptible() instead of
schedule_timeout() to guarantee the task delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Domen Puncer <domen@coderock.org>
2005-07-24 19:34:19 -07:00
Adrian Bunk 4564203d76 [SPARC]: Remvoe APM_RTC_IS_GMT from config.
I can't see any effect of this option outside the i386-specific APM code.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:33:55 -07:00
David S. Miller 48647feed9 [W1]: Do not use NFLOG netlink number.
Use the reserved by never used NETLINK_SKIP value instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:30:28 -07:00
Cal Peake 227510c7f1 [IPV6]: fix implicit declaration of function `xfrm6_tunnel_unregister'
Signed-off-by: Cal Peake <cp@absolutedigital.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-24 19:30:06 -07:00
Russell King 4e8fd22bd4 [PATCH] ARM SMP: Fix ARMv6 spinlock and semaphore implementations
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-07-24 12:13:40 +01:00
Linus Torvalds 2c2a68b847 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2005-07-23 17:01:26 -07:00
Linus Torvalds c94c0d201f Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-07-23 16:59:55 -07:00
Lucas Correia Villa Real 53776eb4ac [PATCH] ARM: 2825/1: S3C2410: turns %d into %ld on DMA printk
Patch from Lucas Correia Villa Real

This patch replaces the sizeof()'s %d specifier by %ld on a S3C2410 DMA
printk.

Signed-off-by: Lucas Correia Villa Real <lucasvr@gobolinux.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-07-24 00:15:46 +01:00
Luming Yu 8ed693d29b /home/lenb/linux-2.6 branch 'acpi-2.6.12' 2005-07-23 00:34:41 -04:00
Luming Yu 668d74c04c ACPI: delete unnecessary EC console messages
http://bugzilla.kernel.org/show_bug.cgi?id=4534

Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-07-23 00:26:33 -04:00
Linus Torvalds 72538d8565 Remove "noreplacement" kernel command line option.
It is no longer valid to not replace instructions, since we depend on
different behaviour depending on CPU capabilities.

If you need to limit the capabilities of the replacements (because the
boot CPU has features that non-boot CPU's do not have, for example), you
need to explicitly disable those capabilities that are not shared across
all CPU's.

For example, if your boot CPU has FXSR, but other CPU's in your system
do not, you need to use the "nofxsr" kernel command line, not disable
instruction replacement per se.
2005-07-22 18:29:40 -04:00
Linus Torvalds 2847e3478c x86: use alternative instructions for fnsave/fxsave too
This one ends up using an inline asm format that claims to read memory
and then clobber it (rather than just write it directly), which made it
easier to use the existing "alternative_input()" infrastructure support.

Now the fxsave code matches the fxrstor.
2005-07-22 18:19:20 -04:00
Linus Torvalds 38afd6adf6 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2005-07-22 16:33:00 -07:00
David S. Miller 261688d01e [PKT_SCHED]: em_meta: Kill TCF_META_ID_{INDEV,SECURITY,TCVERDICT}
More unusable TCF_META_* match types that need to get eliminated
before 2.6.13 goes out the door.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Thomas Graf <tgraf@suug.ch>
2005-07-22 14:43:52 -07:00
Linus Torvalds 8ed1383fb7 x86: make restore_fpu() use alternative assembler instructions
It's really just a single instruction, conditional on whether the CPU
supports FXSR or not, so implement it as such instead of making it a
function that queries FXSR dynamically.

This means that the instruction just gets automatically rewritten to the
correct one at boot-time.
2005-07-22 16:06:16 -04:00