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
Kirill Smelkov
linux
Commits
0f6f2c78
Commit
0f6f2c78
authored
Aug 16, 2003
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ALPHA] Convert DEBUG_MCHECK define to runtime variable.
From Jay Estabrook <Jay.Estabrook@compaq.com>.
parent
789448b7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
111 additions
and
35 deletions
+111
-35
arch/alpha/Kconfig
arch/alpha/Kconfig
+18
-0
arch/alpha/kernel/core_cia.c
arch/alpha/kernel/core_cia.c
+6
-2
arch/alpha/kernel/core_lca.c
arch/alpha/kernel/core_lca.c
+3
-3
arch/alpha/kernel/core_t2.c
arch/alpha/kernel/core_t2.c
+26
-20
arch/alpha/kernel/err_titan.c
arch/alpha/kernel/err_titan.c
+3
-2
arch/alpha/kernel/irq_alpha.c
arch/alpha/kernel/irq_alpha.c
+8
-6
arch/alpha/kernel/proto.h
arch/alpha/kernel/proto.h
+3
-2
arch/alpha/kernel/setup.c
arch/alpha/kernel/setup.c
+44
-0
No files found.
arch/alpha/Kconfig
View file @
0f6f2c78
...
@@ -556,6 +556,24 @@ config ALPHA_LARGE_VMALLOC
...
@@ -556,6 +556,24 @@ config ALPHA_LARGE_VMALLOC
config VERBOSE_MCHECK
config VERBOSE_MCHECK
bool "Verbose Machine Checks"
bool "Verbose Machine Checks"
config VERBOSE_MCHECK_ON
int "Verbose Printing Mode (0=off, 1=on, 2=all)"
depends on VERBOSE_MCHECK
default 1
---help---
This option allows the default printing mode to be set, and then
possibly overridden by a boot command argument.
For example, if one wanted the option of printing verbose
machine checks, but wanted the default to be as if verbose
machine check printing was turned off, then one would choose
the printing mode to be 0. Then, upon reboot, one could add
the boot command line "verbose_mcheck=1" to get the normal
verbose machine check printing, or "verbose_mcheck=2" to get
the maximum information available.
Take the default (1) unless you want more control or more info.
source "drivers/pci/Kconfig"
source "drivers/pci/Kconfig"
source "drivers/eisa/Kconfig"
source "drivers/eisa/Kconfig"
...
...
arch/alpha/kernel/core_cia.c
View file @
0f6f2c78
...
@@ -1099,7 +1099,8 @@ cia_decode_parity_error(struct el_CIA_sysdata_mcheck *cia)
...
@@ -1099,7 +1099,8 @@ cia_decode_parity_error(struct el_CIA_sysdata_mcheck *cia)
printk
(
KERN_CRIT
" Command: %s, Parity bit: %d
\n
"
,
cmd
,
par
);
printk
(
KERN_CRIT
" Command: %s, Parity bit: %d
\n
"
,
cmd
,
par
);
printk
(
KERN_CRIT
" Address: %#010lx, Mask: %#lx
\n
"
,
addr
,
mask
);
printk
(
KERN_CRIT
" Address: %#010lx, Mask: %#lx
\n
"
,
addr
,
mask
);
}
}
#endif
#endif
/* CONFIG_VERBOSE_MCHECK */
static
int
static
int
cia_decode_mchk
(
unsigned
long
la_ptr
)
cia_decode_mchk
(
unsigned
long
la_ptr
)
...
@@ -1114,6 +1115,9 @@ cia_decode_mchk(unsigned long la_ptr)
...
@@ -1114,6 +1115,9 @@ cia_decode_mchk(unsigned long la_ptr)
return
0
;
return
0
;
#ifdef CONFIG_VERBOSE_MCHECK
#ifdef CONFIG_VERBOSE_MCHECK
if
(
!
alpha_verbose_mcheck
)
return
1
;
switch
(
ffs
(
cia
->
cia_err
&
0xfff
)
-
1
)
{
switch
(
ffs
(
cia
->
cia_err
&
0xfff
)
-
1
)
{
case
0
:
/* CIA_ERR_COR_ERR */
case
0
:
/* CIA_ERR_COR_ERR */
cia_decode_ecc_error
(
cia
,
"Corrected ECC error"
);
cia_decode_ecc_error
(
cia
,
"Corrected ECC error"
);
...
@@ -1186,7 +1190,7 @@ cia_decode_mchk(unsigned long la_ptr)
...
@@ -1186,7 +1190,7 @@ cia_decode_mchk(unsigned long la_ptr)
if
(
cia
->
cia_err
&
CIA_ERR_LOST_IOA_TIMEOUT
)
if
(
cia
->
cia_err
&
CIA_ERR_LOST_IOA_TIMEOUT
)
printk
(
KERN_CRIT
"CIA lost machine check: "
printk
(
KERN_CRIT
"CIA lost machine check: "
"I/O timeout
\n
"
);
"I/O timeout
\n
"
);
#endif
#endif
/* CONFIG_VERBOSE_MCHECK */
return
1
;
return
1
;
}
}
...
...
arch/alpha/kernel/core_lca.c
View file @
0f6f2c78
...
@@ -460,8 +460,8 @@ lca_machine_check(unsigned long vector, unsigned long la_ptr,
...
@@ -460,8 +460,8 @@ lca_machine_check(unsigned long vector, unsigned long la_ptr,
}
}
/* Dump the logout area to give all info. */
/* Dump the logout area to give all info. */
#if
DEBUG_MCHECK > 1
#if
def CONFIG_VERBOSE_MCHECK
{
if
(
alpha_verbose_mcheck
>
1
)
{
unsigned
long
*
ptr
=
(
unsigned
long
*
)
la_ptr
;
unsigned
long
*
ptr
=
(
unsigned
long
*
)
la_ptr
;
long
i
;
long
i
;
for
(
i
=
0
;
i
<
el
.
c
->
size
/
sizeof
(
long
);
i
+=
2
)
{
for
(
i
=
0
;
i
<
el
.
c
->
size
/
sizeof
(
long
);
i
+=
2
)
{
...
@@ -469,7 +469,7 @@ lca_machine_check(unsigned long vector, unsigned long la_ptr,
...
@@ -469,7 +469,7 @@ lca_machine_check(unsigned long vector, unsigned long la_ptr,
i
*
sizeof
(
long
),
ptr
[
i
],
ptr
[
i
+
1
]);
i
*
sizeof
(
long
),
ptr
[
i
],
ptr
[
i
+
1
]);
}
}
}
}
#endif
#endif
/* CONFIG_VERBOSE_MCHECK */
}
}
/*
/*
...
...
arch/alpha/kernel/core_t2.c
View file @
0f6f2c78
...
@@ -557,9 +557,9 @@ t2_machine_check(unsigned long vector, unsigned long la_ptr,
...
@@ -557,9 +557,9 @@ t2_machine_check(unsigned long vector, unsigned long la_ptr,
struct
pt_regs
*
regs
)
struct
pt_regs
*
regs
)
{
{
int
cpu
=
smp_processor_id
();
int
cpu
=
smp_processor_id
();
#if
DEBUG_MCHECK > 0
#if
def CONFIG_VERBOSE_MCHECK
struct
el_common
*
mchk_header
=
(
struct
el_common
*
)
la_ptr
;
struct
el_common
*
mchk_header
=
(
struct
el_common
*
)
la_ptr
;
#endif
/* DEBUG_MCHECK */
#endif
/* Clear the error before any reporting. */
/* Clear the error before any reporting. */
mb
();
mb
();
...
@@ -580,39 +580,45 @@ t2_machine_check(unsigned long vector, unsigned long la_ptr,
...
@@ -580,39 +580,45 @@ t2_machine_check(unsigned long vector, unsigned long la_ptr,
*
*
* Just dismiss it for now on this CPU...
* Just dismiss it for now on this CPU...
*/
*/
#if DEBUG_MCHECK > 0
#ifdef CONFIG_VERBOSE_MCHECK
printk
(
"t2_machine_check(cpu%d): any_expected 0x%x -"
if
(
alpha_verbose_mcheck
>
1
)
{
" (assumed) spurious -"
printk
(
"t2_machine_check(cpu%d): any_expected 0x%x -"
" code 0x%x
\n
"
,
cpu
,
t2_mcheck_any_expected
,
" (assumed) spurious -"
(
unsigned
int
)
mchk_header
->
code
);
" code 0x%x
\n
"
,
cpu
,
t2_mcheck_any_expected
,
#endif
/* DEBUG_MCHECK */
(
unsigned
int
)
mchk_header
->
code
);
}
#endif
return
;
return
;
}
}
if
(
!
mcheck_expected
(
cpu
)
&&
!
t2_mcheck_any_expected
)
{
if
(
!
mcheck_expected
(
cpu
)
&&
!
t2_mcheck_any_expected
)
{
if
(
t2_mcheck_last_taken
&
(
1
<<
cpu
))
{
if
(
t2_mcheck_last_taken
&
(
1
<<
cpu
))
{
#if DEBUG_MCHECK > 0
#ifdef CONFIG_VERBOSE_MCHECK
if
(
alpha_verbose_mcheck
>
1
)
{
printk
(
"t2_machine_check(cpu%d): last_taken 0x%x - "
printk
(
"t2_machine_check(cpu%d): last_taken 0x%x - "
"unexpected mcheck - code 0x%x
\n
"
,
"unexpected mcheck - code 0x%x
\n
"
,
cpu
,
t2_mcheck_last_taken
,
cpu
,
t2_mcheck_last_taken
,
(
unsigned
int
)
mchk_header
->
code
);
(
unsigned
int
)
mchk_header
->
code
);
#endif
/* DEBUG_MCHECK */
}
t2_mcheck_last_taken
=
0
;
#endif
mb
();
t2_mcheck_last_taken
=
0
;
return
;
mb
();
return
;
}
else
{
}
else
{
t2_mcheck_last_taken
=
0
;
t2_mcheck_last_taken
=
0
;
mb
();
mb
();
}
}
}
}
#if DEBUG_MCHECK > 0
#ifdef CONFIG_VERBOSE_MCHECK
printk
(
"%s t2_mcheck(cpu%d): last_taken 0x%x - "
if
(
alpha_verbose_mcheck
>
1
)
{
"any_expected 0x%x - code 0x%x
\n
"
,
printk
(
"%s t2_mcheck(cpu%d): last_taken 0x%x - "
(
mcheck_expected
(
cpu
)
?
"EX"
:
"UN"
),
cpu
,
"any_expected 0x%x - code 0x%x
\n
"
,
t2_mcheck_last_taken
,
t2_mcheck_any_expected
,
(
mcheck_expected
(
cpu
)
?
"EX"
:
"UN"
),
cpu
,
(
unsigned
int
)
mchk_header
->
code
);
t2_mcheck_last_taken
,
t2_mcheck_any_expected
,
#endif
/* DEBUG_MCHECK */
(
unsigned
int
)
mchk_header
->
code
);
}
#endif
process_mcheck_info
(
vector
,
la_ptr
,
regs
,
"T2"
,
mcheck_expected
(
cpu
));
process_mcheck_info
(
vector
,
la_ptr
,
regs
,
"T2"
,
mcheck_expected
(
cpu
));
}
}
arch/alpha/kernel/err_titan.c
View file @
0f6f2c78
...
@@ -438,8 +438,9 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
...
@@ -438,8 +438,9 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
(
unsigned
int
)
vector
,
(
int
)
smp_processor_id
());
(
unsigned
int
)
vector
,
(
int
)
smp_processor_id
());
#ifdef CONFIG_VERBOSE_MCHECK
#ifdef CONFIG_VERBOSE_MCHECK
titan_process_logout_frame
(
mchk_header
,
1
);
titan_process_logout_frame
(
mchk_header
,
alpha_verbose_mcheck
);
dik_show_regs
(
regs
,
NULL
);
if
(
alpha_verbose_mcheck
)
dik_show_regs
(
regs
,
NULL
);
#endif
/* CONFIG_VERBOSE_MCHECK */
#endif
/* CONFIG_VERBOSE_MCHECK */
err_print_prefix
=
saved_err_prefix
;
err_print_prefix
=
saved_err_prefix
;
...
...
arch/alpha/kernel/irq_alpha.c
View file @
0f6f2c78
...
@@ -130,9 +130,11 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
...
@@ -130,9 +130,11 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
* ignore it.
* ignore it.
*/
*/
#if DEBUG_MCHECK > 0
#ifdef CONFIG_VERBOSE_MCHECK
printk
(
KERN_CRIT
"%s machine check %s
\n
"
,
machine
,
if
(
alpha_verbose_mcheck
>
1
)
{
expected
?
"expected."
:
"NOT expected!!!"
);
printk
(
KERN_CRIT
"%s machine check %s
\n
"
,
machine
,
expected
?
"expected."
:
"NOT expected!!!"
);
}
#endif
#endif
if
(
expected
)
{
if
(
expected
)
{
...
@@ -188,8 +190,8 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
...
@@ -188,8 +190,8 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
dik_show_regs
(
regs
,
NULL
);
dik_show_regs
(
regs
,
NULL
);
#if
DEBUG_MCHECK > 1
#if
def CONFIG_VERBOSE_MCHECK
{
if
(
alpha_verbose_mcheck
>
1
)
{
/* Dump the logout area to give all info. */
/* Dump the logout area to give all info. */
unsigned
long
*
ptr
=
(
unsigned
long
*
)
la_ptr
;
unsigned
long
*
ptr
=
(
unsigned
long
*
)
la_ptr
;
long
i
;
long
i
;
...
@@ -198,7 +200,7 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
...
@@ -198,7 +200,7 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
i
*
sizeof
(
long
),
ptr
[
i
],
ptr
[
i
+
1
]);
i
*
sizeof
(
long
),
ptr
[
i
],
ptr
[
i
+
1
]);
}
}
}
}
#endif
#endif
/* CONFIG_VERBOSE_MCHECK */
}
}
/*
/*
...
...
arch/alpha/kernel/proto.h
View file @
0f6f2c78
...
@@ -110,6 +110,9 @@ extern unsigned long wildfire_node_mem_size(int);
...
@@ -110,6 +110,9 @@ extern unsigned long wildfire_node_mem_size(int);
/* setup.c */
/* setup.c */
extern
unsigned
long
srm_hae
;
extern
unsigned
long
srm_hae
;
extern
int
boot_cpuid
;
extern
int
boot_cpuid
;
#ifdef CONFIG_VERBOSE_MCHECK
extern
unsigned
long
alpha_verbose_mcheck
;
#endif
/* srmcons.c */
/* srmcons.c */
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
...
@@ -205,8 +208,6 @@ extern struct mcheck_info
...
@@ -205,8 +208,6 @@ extern struct mcheck_info
#define mcheck_extra(cpu) ((void)(cpu), __mcheck_info.extra)
#define mcheck_extra(cpu) ((void)(cpu), __mcheck_info.extra)
#endif
#endif
#define DEBUG_MCHECK 0
/* 0 = minimal, 1 = debug, 2 = debug+dump. */
extern
void
process_mcheck_info
(
unsigned
long
vector
,
unsigned
long
la_ptr
,
extern
void
process_mcheck_info
(
unsigned
long
vector
,
unsigned
long
la_ptr
,
struct
pt_regs
*
regs
,
const
char
*
machine
,
struct
pt_regs
*
regs
,
const
char
*
machine
,
int
expected
);
int
expected
);
arch/alpha/kernel/setup.c
View file @
0f6f2c78
...
@@ -63,6 +63,12 @@ static struct notifier_block alpha_panic_block = {
...
@@ -63,6 +63,12 @@ static struct notifier_block alpha_panic_block = {
struct
hwrpb_struct
*
hwrpb
;
struct
hwrpb_struct
*
hwrpb
;
unsigned
long
srm_hae
;
unsigned
long
srm_hae
;
#ifdef CONFIG_VERBOSE_MCHECK
/* 0=minimum, 1=verbose, 2=all */
/* These can be overridden via the command line, ie "verbose_mcheck=2") */
unsigned
long
alpha_verbose_mcheck
=
CONFIG_VERBOSE_MCHECK_ON
;
#endif
/* Which processor we booted from. */
/* Which processor we booted from. */
int
boot_cpuid
;
int
boot_cpuid
;
...
@@ -538,6 +544,12 @@ setup_arch(char **cmdline_p)
...
@@ -538,6 +544,12 @@ setup_arch(char **cmdline_p)
get_mem_size_limit
(
p
+
9
)
<<
PAGE_SHIFT
;
get_mem_size_limit
(
p
+
9
)
<<
PAGE_SHIFT
;
continue
;
continue
;
}
}
#ifdef CONFIG_VERBOSE_MCHECK
if
(
strncmp
(
p
,
"verbose_mcheck="
,
15
)
==
0
)
{
alpha_verbose_mcheck
=
simple_strtol
(
p
+
15
,
NULL
,
0
);
continue
;
}
#endif
}
}
/* Replace the command line, now that we've killed it with strsep. */
/* Replace the command line, now that we've killed it with strsep. */
...
@@ -597,6 +609,38 @@ setup_arch(char **cmdline_p)
...
@@ -597,6 +609,38 @@ setup_arch(char **cmdline_p)
var_name
,
alpha_mv
.
vector_name
,
var_name
,
alpha_mv
.
vector_name
,
(
alpha_using_srm
?
"SRM"
:
"MILO"
));
(
alpha_using_srm
?
"SRM"
:
"MILO"
));
printk
(
"Major Options: "
#ifdef CONFIG_SMP
"SMP "
#endif
#ifdef CONFIG_ALPHA_EV56
"EV56 "
#endif
#ifdef CONFIG_ALPHA_EV67
"EV67 "
#endif
#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
"LEGACY_START "
#endif
#ifdef CONFIG_VERBOSE_MCHECK
"VERBOSE_MCHECK "
#endif
#ifdef CONFIG_DISCONTIGMEM
"DISCONTIGMEM "
#ifdef CONFIG_NUMA
"NUMA "
#endif
#endif
#ifdef CONFIG_DEBUG_SPINLOCK
"DEBUG_SPINLOCK "
#endif
#ifdef CONFIG_MAGIC_SYSRQ
"MAGIC_SYSRQ "
#endif
"
\n
"
);
printk
(
"Command line: %s
\n
"
,
command_line
);
printk
(
"Command line: %s
\n
"
,
command_line
);
/*
/*
...
...
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