/*1* Copyright 2010 Tilera Corporation. All Rights Reserved.2*3* This program is free software; you can redistribute it and/or4* modify it under the terms of the GNU General Public License5* as published by the Free Software Foundation, version 2.6*7* This program is distributed in the hope that it will be useful, but8* WITHOUT ANY WARRANTY; without even the implied warranty of9* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or10* NON INFRINGEMENT. See the GNU General Public License for11* more details.12*/1314#include <linux/stddef.h>15#include <linux/reboot.h>16#include <linux/smp.h>17#include <linux/pm.h>18#include <asm/page.h>19#include <asm/setup.h>20#include <hv/hypervisor.h>2122#ifndef CONFIG_SMP23#define smp_send_stop()24#endif2526void machine_halt(void)27{28warn_early_printk();29arch_local_irq_disable_all();30smp_send_stop();31hv_halt();32}3334void machine_power_off(void)35{36warn_early_printk();37arch_local_irq_disable_all();38smp_send_stop();39hv_power_off();40}4142void machine_restart(char *cmd)43{44arch_local_irq_disable_all();45smp_send_stop();46hv_restart((HV_VirtAddr) "vmlinux", (HV_VirtAddr) cmd);47}4849/* No interesting distinction to be made here. */50void (*pm_power_off)(void) = NULL;515253