Add MKWATCHDOG option

This commit is contained in:
Arun Thomas
2011-07-29 20:36:42 +02:00
parent 89f0baab63
commit 1a8cf59d04
11 changed files with 30 additions and 23 deletions

View File

@@ -7,7 +7,7 @@ PROG= kernel
SRCS= mpx.S
SRCS+= start.c table.c main.c proc.c \
system.c clock.c utility.c debug.c interrupt.c \
watchdog.c cpulocals.c
cpulocals.c
.ifdef CONFIG_SMP
SRCS += smp.c
@@ -44,6 +44,11 @@ MAN=
.include "system/Makefile.inc"
.include "arch/${ARCH}/Makefile.inc"
.if ${USE_WATCHDOG} != "no"
SRCS+= watchdog.c arch_watchdog.c
CPPFLAGS+= -DUSE_WATCHDOG
.endif
# These come last, so the profiling buffer is at the end of the data segment
SRCS+= profile.c do_sprofile.c

View File

@@ -29,7 +29,6 @@ SRCS+= arch_do_vmctl.c \
arch_system.c \
apic.c \
apic_asm.S \
arch_watchdog.c \
pre_init.c \
acpi.c

View File

@@ -24,7 +24,7 @@
#include "acpi.h"
#ifdef CONFIG_WATCHDOG
#ifdef USE_WATCHDOG
#include "kernel/watchdog.h"
#endif

View File

@@ -22,7 +22,7 @@
#ifdef CONFIG_APIC
#include "apic.h"
#ifdef CONFIG_WATCHDOG
#ifdef USE_WATCHDOG
#include "kernel/watchdog.h"
#endif
#endif
@@ -1046,7 +1046,7 @@ PUBLIC int arch_enable_paging(struct proc * caller, const message * m_ptr)
#endif
#endif
#ifdef CONFIG_WATCHDOG
#ifdef USE_WATCHDOG
/*
* We make sure that we don't enable the watchdog until paging is turned
* on as we might get an NMI while switching and we might still use wrong

View File

@@ -507,7 +507,7 @@ LABEL(single_step_exception)
EXCEPTION_NO_ERR_CODE(DEBUG_VECTOR)
LABEL(nmi)
#ifndef CONFIG_WATCHDOG
#ifndef USE_WATCHDOG
EXCEPTION_NO_ERR_CODE(NMI_VECTOR)
#else
/*

View File

@@ -36,7 +36,7 @@
#include "clock.h"
#ifdef CONFIG_WATCHDOG
#ifdef USE_WATCHDOG
#include "watchdog.h"
#endif
@@ -74,7 +74,7 @@ PUBLIC int timer_int_handler(void)
struct proc * p, * billp;
/* FIXME watchdog for slave cpus! */
#ifdef CONFIG_WATCHDOG
#ifdef USE_WATCHDOG
/*
* we need to know whether local timer ticks are happening or whether
* the kernel is locked up. We don't care about overflows as we only

View File

@@ -7,11 +7,6 @@
#endif
/* boot verbose */
#define CONFIG_BOOT_VERBOSE
/*
* compile in the nmi watchdog by default. It is not enabled until watchdog=1
* (non-zero) is set in monitor
*/
#define CONFIG_WATCHDOG
#ifndef CONFIG_MAX_CPUS
#define CONFIG_MAX_CPUS 1

View File

@@ -25,7 +25,7 @@
#ifdef CONFIG_SMP
#include "smp.h"
#endif
#ifdef CONFIG_WATCHDOG
#ifdef USE_WATCHDOG
#include "watchdog.h"
#endif
#include "spinlock.h"

View File

@@ -7,7 +7,7 @@
#include <string.h>
#include "proto.h"
#ifdef CONFIG_WATCHDOG
#ifdef USE_WATCHDOG
#include "watchdog.h"
#endif
@@ -106,7 +106,7 @@ PUBLIC void cstart(
config_apic_timer_x = 1;
#endif
#ifdef CONFIG_WATCHDOG
#ifdef USE_WATCHDOG
value = env_get("watchdog");
if (value)
watchdog_enabled = atoi(value);