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
b594deb0
Commit
b594deb0
authored
Dec 25, 2008
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'core/debug' into core/core
parents
0b271ef4
ec5679e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
24 deletions
+15
-24
include/asm-generic/bug.h
include/asm-generic/bug.h
+3
-4
kernel/panic.c
kernel/panic.c
+12
-20
No files found.
include/asm-generic/bug.h
View file @
b594deb0
...
...
@@ -33,15 +33,14 @@ struct bug_entry {
#ifndef __WARN
#ifndef __ASSEMBLY__
extern
void
warn_on_slowpath
(
const
char
*
file
,
const
int
line
);
extern
void
warn_slowpath
(
const
char
*
file
,
const
int
line
,
const
char
*
fmt
,
...)
__attribute__
((
format
(
printf
,
3
,
4
)));
#define WANT_WARN_ON_SLOWPATH
#endif
#define __WARN()
warn_on_slowpath(__FILE__, __LINE__
)
#define __WARN_printf(arg...)
warn_slowpath(__FILE__, __LINE__, arg)
#define __WARN()
warn_slowpath(__FILE__, __LINE__, NULL
)
#define __WARN_printf(arg...)
warn_slowpath(__FILE__, __LINE__, arg)
#else
#define __WARN_printf(arg...)
do { printk(arg); __WARN(); } while (0)
#define __WARN_printf(arg...)
do { printk(arg); __WARN(); } while (0)
#endif
#ifndef WARN_ON
...
...
kernel/panic.c
View file @
b594deb0
...
...
@@ -21,6 +21,7 @@
#include <linux/debug_locks.h>
#include <linux/random.h>
#include <linux/kallsyms.h>
#include <linux/dmi.h>
int
panic_on_oops
;
static
unsigned
long
tainted_mask
;
...
...
@@ -321,36 +322,27 @@ void oops_exit(void)
}
#ifdef WANT_WARN_ON_SLOWPATH
void
warn_on_slowpath
(
const
char
*
file
,
int
line
)
{
char
function
[
KSYM_SYMBOL_LEN
];
unsigned
long
caller
=
(
unsigned
long
)
__builtin_return_address
(
0
);
sprint_symbol
(
function
,
caller
);
printk
(
KERN_WARNING
"------------[ cut here ]------------
\n
"
);
printk
(
KERN_WARNING
"WARNING: at %s:%d %s()
\n
"
,
file
,
line
,
function
);
print_modules
();
dump_stack
();
print_oops_end_marker
();
add_taint
(
TAINT_WARN
);
}
EXPORT_SYMBOL
(
warn_on_slowpath
);
void
warn_slowpath
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...)
{
va_list
args
;
char
function
[
KSYM_SYMBOL_LEN
];
unsigned
long
caller
=
(
unsigned
long
)
__builtin_return_address
(
0
);
const
char
*
board
;
sprint_symbol
(
function
,
caller
);
printk
(
KERN_WARNING
"------------[ cut here ]------------
\n
"
);
printk
(
KERN_WARNING
"WARNING: at %s:%d %s()
\n
"
,
file
,
line
,
function
);
va_start
(
args
,
fmt
);
vprintk
(
fmt
,
args
);
va_end
(
args
);
board
=
dmi_get_system_info
(
DMI_PRODUCT_NAME
);
if
(
board
)
printk
(
KERN_WARNING
"Hardware name: %s
\n
"
,
board
);
if
(
fmt
)
{
va_start
(
args
,
fmt
);
vprintk
(
fmt
,
args
);
va_end
(
args
);
}
print_modules
();
dump_stack
();
...
...
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