1 /* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Copyright (c) 2001-2003 Silicon Graphics, Inc. All rights reserved. 7 */ 8 9 #include <linux/config.h> 10 #include <asm/sn/leds.h> 11 #include <asm/sn/simulator.h> 12 snidle(int state)13void snidle(int state) { 14 if (state) { 15 if (pda.idle_flag == 0) { 16 /* 17 * Turn the activity LED off. 18 */ 19 set_led_bits(0, LED_CPU_ACTIVITY); 20 } 21 22 #ifdef CONFIG_IA64_SGI_SN_SIM 23 if (IS_RUNNING_ON_SIMULATOR()) 24 SIMULATOR_SLEEP(); 25 #endif 26 27 pda.idle_flag = 1; 28 } else { 29 /* 30 * Turn the activity LED on. 31 */ 32 set_led_bits(LED_CPU_ACTIVITY, LED_CPU_ACTIVITY); 33 34 pda.idle_flag = 0; 35 } 36 } 37