File: [Development] / linux-2.6-xfs / arch / ia64 / kdb / kdba_pod.c (download)
Revision 1.10, Tue Mar 14 14:38:59 2006 UTC (11 years, 7 months ago) by nathans.longdrop.melbourne.sgi.com
Branch: MAIN
Changes since 1.9: +0 -0
lines
Merge up to 2.6.16-rc6.
Merge of 2.6.x-xfs-melb:linux:25443a by kenmcd.
|
/*
* Kernel Debugger Architecture Dependent POD functions.
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (c) 1999-2006 Silicon Graphics, Inc. All Rights Reserved.
*/
#include <linux/types.h>
#include <linux/kdb.h>
#include <linux/kdbprivate.h>
#include <linux/module.h>
#include <asm/sal.h>
#include <asm/sn/sn_sal.h>
MODULE_AUTHOR("Jesse Barnes");
MODULE_DESCRIPTION("Enter POD through KDB");
MODULE_LICENSE("GPL");
/**
* kdba_pod - enter POD mode from kdb
* @argc: arg count
* @argv: arg values
* @envp: kdb env. vars
* @regs: current register state
*
* Enter POD mode from kdb using SGI SN specific SAL function call.
*/
static int
kdba_pod(int argc, const char **argv, const char **envp, struct pt_regs *regs)
{
kdb_printf("WARNING: pod commands are dangerous unless you know exactly\n"
"what you are doing. If in doubt, type exit immediately.\n");
return ia64_sn_pod_mode();
}
/**
* kdba_pod_init - register 'pod' command with kdb
*
* Register the 'pod' command with kdb at load time.
*/
static int __init
kdba_pod_init(void)
{
if (ia64_platform_is("sn2"))
kdb_register("pod", kdba_pod, 0, "Enter POD", 0);
return 0;
}
/**
* kdba_pod_exit - unregister the 'pod' command
*
* Tell kdb that the 'pod' command is no longer available.
*/
static void __exit
kdba_pod_exit(void)
{
if (ia64_platform_is("sn2"))
kdb_unregister("pod");
}
kdb_module_init(kdba_pod_init)
kdb_module_exit(kdba_pod_exit)