tile: use free_bootmem_late() for initrd
[linux-2.6-block.git] / arch / tile / kernel / reboot.c
CommitLineData
867e359b
CM
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>
0707ad30 18#include <linux/pm.h>
7c63e1ee 19#include <linux/export.h>
867e359b
CM
20#include <asm/page.h>
21#include <asm/setup.h>
22#include <hv/hypervisor.h>
23
24#ifndef CONFIG_SMP
25#define smp_send_stop()
26#endif
27
28void machine_halt(void)
29{
5d966115 30 arch_local_irq_disable_all();
867e359b
CM
31 smp_send_stop();
32 hv_halt();
33}
34
35void machine_power_off(void)
36{
5d966115 37 arch_local_irq_disable_all();
867e359b
CM
38 smp_send_stop();
39 hv_power_off();
40}
41
42void machine_restart(char *cmd)
43{
5d966115 44 arch_local_irq_disable_all();
867e359b
CM
45 smp_send_stop();
46 hv_restart((HV_VirtAddr) "vmlinux", (HV_VirtAddr) cmd);
47}
48
0707ad30
CM
49/* No interesting distinction to be made here. */
50void (*pm_power_off)(void) = NULL;
7c63e1ee 51EXPORT_SYMBOL(pm_power_off);