diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-08 13:10:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-08 13:10:11 -0400 |
commit | 45d7f32c7a43cbb9592886d38190e379e2eb2226 (patch) | |
tree | ea68b67b1d2127527d856248c0485f2ed7e50088 /arch/tile/kernel/reboot.c | |
parent | 53bcef60633086ad73683d01a4ef9ca678484d2d (diff) | |
parent | ab11b487402f97975f3ac1eeea09c82f4431481e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
arch/tile: check kmalloc() result
arch/tile: catch up on various minor cleanups.
arch/tile: avoid erroneous error return for PTRACE_POKEUSR.
tile: set ARCH_KMALLOC_MINALIGN
tile: remove homegrown L1_CACHE_ALIGN macro
arch/tile: Miscellaneous cleanup changes.
arch/tile: Split the icache flush code off to a generic <arch> header.
arch/tile: Fix bug in support for atomic64_xx() ops.
arch/tile: Shrink the tile-opcode files considerably.
arch/tile: Add driver to enable access to the user dynamic network.
arch/tile: Enable more sophisticated IRQ model for 32-bit chips.
Move list types from <linux/list.h> to <linux/types.h>.
Add wait4() back to the set of <asm-generic/unistd.h> syscalls.
Revert adding some arch-specific signal syscalls to <linux/syscalls.h>.
arch/tile: Do not use GFP_KERNEL for dma_alloc_coherent(). Feedback from fujita.tomonori@lab.ntt.co.jp.
arch/tile: core support for Tilera 32-bit chips.
Fix up the "generic" unistd.h ABI to be more useful.
Diffstat (limited to 'arch/tile/kernel/reboot.c')
-rw-r--r-- | arch/tile/kernel/reboot.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/tile/kernel/reboot.c b/arch/tile/kernel/reboot.c new file mode 100644 index 000000000000..acd86d20beba --- /dev/null +++ b/arch/tile/kernel/reboot.c | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #include <linux/stddef.h> | ||
16 | #include <linux/reboot.h> | ||
17 | #include <linux/smp.h> | ||
18 | #include <linux/pm.h> | ||
19 | #include <asm/page.h> | ||
20 | #include <asm/setup.h> | ||
21 | #include <hv/hypervisor.h> | ||
22 | |||
23 | #ifndef CONFIG_SMP | ||
24 | #define smp_send_stop() | ||
25 | #endif | ||
26 | |||
27 | void machine_halt(void) | ||
28 | { | ||
29 | warn_early_printk(); | ||
30 | raw_local_irq_disable_all(); | ||
31 | smp_send_stop(); | ||
32 | hv_halt(); | ||
33 | } | ||
34 | |||
35 | void machine_power_off(void) | ||
36 | { | ||
37 | warn_early_printk(); | ||
38 | raw_local_irq_disable_all(); | ||
39 | smp_send_stop(); | ||
40 | hv_power_off(); | ||
41 | } | ||
42 | |||
43 | void machine_restart(char *cmd) | ||
44 | { | ||
45 | raw_local_irq_disable_all(); | ||
46 | smp_send_stop(); | ||
47 | hv_restart((HV_VirtAddr) "vmlinux", (HV_VirtAddr) cmd); | ||
48 | } | ||
49 | |||
50 | /* No interesting distinction to be made here. */ | ||
51 | void (*pm_power_off)(void) = NULL; | ||