Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b3df3468
Commit
b3df3468
authored
Sep 01, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Add sparc64die_chain as on x86{,_64}
parent
59e6ca0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
3 deletions
+59
-3
arch/sparc64/kernel/traps.c
arch/sparc64/kernel/traps.c
+14
-0
include/asm-sparc64/kdebug.h
include/asm-sparc64/kdebug.h
+45
-3
No files found.
arch/sparc64/kernel/traps.c
View file @
b3df3468
...
@@ -36,10 +36,24 @@
...
@@ -36,10 +36,24 @@
#include <asm/psrcompat.h>
#include <asm/psrcompat.h>
#include <asm/processor.h>
#include <asm/processor.h>
#include <asm/timer.h>
#include <asm/timer.h>
#include <asm/kdebug.h>
#ifdef CONFIG_KMOD
#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#include <linux/kmod.h>
#endif
#endif
struct
notifier_block
*
sparc64die_chain
;
static
spinlock_t
die_notifier_lock
=
SPIN_LOCK_UNLOCKED
;
int
register_die_notifier
(
struct
notifier_block
*
nb
)
{
int
err
=
0
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
die_notifier_lock
,
flags
);
err
=
notifier_chain_register
(
&
sparc64die_chain
,
nb
);
spin_unlock_irqrestore
(
&
die_notifier_lock
,
flags
);
return
err
;
}
/* When an irrecoverable trap occurs at tl > 0, the trap entry
/* When an irrecoverable trap occurs at tl > 0, the trap entry
* code logs the trap state registers at every level in the trap
* code logs the trap state registers at every level in the trap
* stack. It is found at (pt_regs + sizeof(pt_regs)) and the layout
* stack. It is found at (pt_regs + sizeof(pt_regs)) and the layout
...
...
include/asm-sparc64/kdebug.h
View file @
b3df3468
#ifndef _SPARC64_KDEBUG_H
#ifndef _SPARC64_KDEBUG_H
#define _SPARC64_KDEBUG_H
#define _SPARC64_KDEBUG_H
/*
/* Nearly identical to x86_64/i386 code. */
* No kernel debugger on sparc64. Kept here because drivers/sbus/char/
* includes it for sparc32 sake.
#include <linux/notifier.h>
struct
pt_regs
;
struct
die_args
{
struct
pt_regs
*
regs
;
const
char
*
str
;
long
err
;
int
trapnr
;
int
signr
;
};
/* Note - you should never unregister because that can race with NMIs.
* If you really want to do it first unregister - then synchronize_kernel
* - then free.
*/
*/
int
register_die_notifier
(
struct
notifier_block
*
nb
);
extern
struct
notifier_block
*
sparc64die_chain
;
/* Grossly misnamed. */
enum
die_val
{
DIE_OOPS
=
1
,
DIE_DEBUG
,
DIE_PANIC
,
DIE_NMI
,
DIE_DIE
,
DIE_KERNELDEBUG
,
DIE_TRAP
,
DIE_GPF
,
DIE_CALL
,
DIE_PAGE_FAULT
,
};
static
inline
int
notify_die
(
enum
die_val
val
,
char
*
str
,
struct
pt_regs
*
regs
,
long
err
,
int
trap
,
int
sig
)
{
struct
die_args
args
=
{
.
regs
=
regs
,
.
str
=
str
,
.
err
=
err
,
.
trapnr
=
trap
,
.
signr
=
sig
};
return
notifier_call_chain
(
&
sparc64die_chain
,
val
,
&
args
);
}
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment