Path: blob/master/arch/ia64/sn/kernel/sn2/timer_interrupt.c
17531 views
/*1*2*3* Copyright (c) 2005, 2006 Silicon Graphics, Inc. All Rights Reserved.4*5* This program is free software; you can redistribute it and/or modify it6* under the terms of version 2 of the GNU General Public License7* as published by the Free Software Foundation.8*9* This program is distributed in the hope that it would be useful, but10* WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.12*13* Further, this software is distributed without any warranty that it is14* free of the rightful claim of any third person regarding infringement15* or the like. Any license provided herein, whether implied or16* otherwise, applies only to this software file. Patent licenses, if17* any, provided herein do not apply to combinations of this program with18* other software, or any other product whatsoever.19*20* You should have received a copy of the GNU General Public21* License along with this program; if not, write the Free Software22* Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.23*24* For further information regarding this notice, see:25*26* http://oss.sgi.com/projects/GenInfo/NoticeExplan27*/2829#include <linux/interrupt.h>30#include <asm/sn/pda.h>31#include <asm/sn/leds.h>3233extern void sn_lb_int_war_check(void);34extern irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs);3536#define SN_LB_INT_WAR_INTERVAL 1003738void sn_timer_interrupt(int irq, void *dev_id)39{40/* LED blinking */41if (!pda->hb_count--) {42pda->hb_count = HZ / 2;43set_led_bits(pda->hb_state ^=44LED_CPU_HEARTBEAT, LED_CPU_HEARTBEAT);45}4647if (is_shub1()) {48if (enable_shub_wars_1_1()) {49/* Bugfix code for SHUB 1.1 */50if (pda->pio_shub_war_cam_addr)51*pda->pio_shub_war_cam_addr = 0x8000000000000010UL;52}53if (pda->sn_lb_int_war_ticks == 0)54sn_lb_int_war_check();55pda->sn_lb_int_war_ticks++;56if (pda->sn_lb_int_war_ticks >= SN_LB_INT_WAR_INTERVAL)57pda->sn_lb_int_war_ticks = 0;58}59}606162