linux/arch/mn10300/kernel/mn10300-watchdog-low.S
<<
>>
Prefs
   1###############################################################################
   2#
   3# MN10300 Watchdog interrupt handler
   4#
   5# Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
   6# Written by David Howells (dhowells@redhat.com)
   7#
   8# This program is free software; you can redistribute it and/or
   9# modify it under the terms of the GNU General Public Licence
  10# as published by the Free Software Foundation; either version
  11# 2 of the Licence, or (at your option) any later version.
  12#
  13###############################################################################
  14#include <linux/sys.h>
  15#include <linux/linkage.h>
  16#include <asm/intctl-regs.h>
  17#include <asm/timer-regs.h>
  18#include <asm/frame.inc>
  19#include <linux/threads.h>
  20
  21        .text
  22
  23###############################################################################
  24#
  25# Watchdog handler entry point
  26# - special non-maskable interrupt
  27#
  28###############################################################################
  29        .globl  watchdog_handler
  30        .type   watchdog_handler,@function
  31watchdog_handler:
  32        add     -4,sp
  33        SAVE_ALL
  34
  35        mov     0xffffffff,d0
  36        mov     d0,(REG_ORIG_D0,fp)
  37
  38        mov     fp,d0
  39        lsr     2,d1
  40        call    watchdog_interrupt[],0          # watchdog_interrupt(regs,irq)
  41
  42        jmp     ret_from_intr
  43
  44        .size   watchdog_handler,.-watchdog_handler
  45
  46###############################################################################
  47#
  48# Watchdog touch entry point
  49# - kept to absolute minimum (unfortunately, it's prototyped in linux/nmi.h so
  50#   we can't inline it)
  51#
  52###############################################################################
  53        .globl  touch_nmi_watchdog
  54        .type   touch_nmi_watchdog,@function
  55touch_nmi_watchdog:
  56        clr     d0
  57        clr     d1
  58        mov     watchdog_alert_counter, a0
  59        setlb
  60        mov     d0, (a0+)
  61        inc     d1
  62        cmp     NR_CPUS, d1
  63        lne
  64        ret     [],0
  65
  66        .size   touch_nmi_watchdog,.-touch_nmi_watchdog
  67