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
320516b7
Commit
320516b7
authored
Nov 26, 2007
by
Haavard Skinnemoen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AVR32] Implement irqflags trace and lockdep support
Signed-off-by:
Haavard Skinnemoen
<
hskinnemoen@atmel.com
>
parent
2f026037
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
19 deletions
+43
-19
arch/avr32/Kconfig
arch/avr32/Kconfig
+6
-0
arch/avr32/kernel/entry-avr32b.S
arch/avr32/kernel/entry-avr32b.S
+35
-19
include/asm-avr32/sysreg.h
include/asm-avr32/sysreg.h
+2
-0
No files found.
arch/avr32/Kconfig
View file @
320516b7
...
@@ -27,6 +27,12 @@ config GENERIC_HARDIRQS
...
@@ -27,6 +27,12 @@ config GENERIC_HARDIRQS
config STACKTRACE_SUPPORT
config STACKTRACE_SUPPORT
def_bool y
def_bool y
config LOCKDEP_SUPPORT
def_bool y
config TRACE_IRQFLAGS_SUPPORT
def_bool y
config HARDIRQS_SW_RESEND
config HARDIRQS_SW_RESEND
def_bool y
def_bool y
...
...
arch/avr32/kernel/entry-avr32b.S
View file @
320516b7
...
@@ -527,15 +527,14 @@ fault_exit_work:
...
@@ -527,15 +527,14 @@ fault_exit_work:
/
*
If
we
get
a
debug
trap
from
privileged
context
we
end
up
here
*/
/
*
If
we
get
a
debug
trap
from
privileged
context
we
end
up
here
*/
handle_debug_priv
:
handle_debug_priv
:
/
*
Fix
up
LR
and
SP
in
regs
.
r11
contains
the
mode
we
came
from
*/
/
*
Fix
up
LR
and
SP
in
regs
.
r1
contains
the
mode
we
came
from
*/
mfsr
r8
,
SYSREG_SR
mfsr
r2
,
SYSREG_SR
mov
r9
,
r8
mov
r3
,
r2
andh
r8
,
hi
(
~
MODE_MASK
)
bfins
r2
,
r1
,
SYSREG_MODE_OFFSET
,
SYSREG_MODE_SIZE
or
r8
,
r11
mtsr
SYSREG_SR
,
r2
mtsr
SYSREG_SR
,
r8
sub
pc
,
-
2
sub
pc
,
-
2
stdsp
sp
[
REG_LR
],
lr
stdsp
sp
[
REG_LR
],
lr
mtsr
SYSREG_SR
,
r
9
mtsr
SYSREG_SR
,
r
3
sub
pc
,
-
2
sub
pc
,
-
2
sub
r10
,
sp
,
-
FRAME_SIZE_FULL
sub
r10
,
sp
,
-
FRAME_SIZE_FULL
stdsp
sp
[
REG_SP
],
r10
stdsp
sp
[
REG_SP
],
r10
...
@@ -547,15 +546,19 @@ handle_debug_priv:
...
@@ -547,15 +546,19 @@ handle_debug_priv:
popm
r10
,
r11
popm
r10
,
r11
mtsr
SYSREG_RAR_DBG
,
r10
mtsr
SYSREG_RAR_DBG
,
r10
mtsr
SYSREG_RSR_DBG
,
r11
mtsr
SYSREG_RSR_DBG
,
r11
mfsr
r8
,
SYSREG_SR
#ifdef CONFIG_TRACE_IRQFLAGS
mov
r9
,
r8
bld
r11
,
SYSREG_GM_OFFSET
andh
r8
,
hi
(
~
MODE_MASK
)
brcc
1
f
andh
r11
,
hi
(
MODE_MASK
)
rcall
trace_hardirqs_on
or
r8
,
r11
1
:
mtsr
SYSREG_SR
,
r8
#endif
mfsr
r2
,
SYSREG_SR
mov
r3
,
r2
bfins
r2
,
r1
,
SYSREG_MODE_OFFSET
,
SYSREG_MODE_SIZE
mtsr
SYSREG_SR
,
r2
sub
pc
,
-
2
sub
pc
,
-
2
popm
lr
popm
lr
mtsr
SYSREG_SR
,
r
9
mtsr
SYSREG_SR
,
r
3
sub
pc
,
-
2
sub
pc
,
-
2
sub
sp
,
-
4
/*
skip
SP
*/
sub
sp
,
-
4
/*
skip
SP
*/
popm
r0
-
r12
popm
r0
-
r12
...
@@ -572,11 +575,14 @@ handle_debug_priv:
...
@@ -572,11 +575,14 @@ handle_debug_priv:
handle_debug
:
handle_debug
:
sub
sp
,
4
/*
r12_orig
*/
sub
sp
,
4
/*
r12_orig
*/
stmts
--
sp
,
r0
-
lr
stmts
--
sp
,
r0
-
lr
mfsr
r10
,
SYSREG_RAR_DBG
mfsr
r0
,
SYSREG_RAR_DBG
mfsr
r11
,
SYSREG_RSR_DBG
mfsr
r1
,
SYSREG_RSR_DBG
#ifdef CONFIG_TRACE_IRQFLAGS
rcall
trace_hardirqs_off
#endif
unmask_exceptions
unmask_exceptions
pushm
r10
,
r1
1
stm
--
sp
,
r0
,
r
1
andh
r11
,
(
MODE_MASK
>>
16
),
COH
bfextu
r1
,
r1
,
SYSREG_MODE_OFFSET
,
SYSREG_MODE_SIZE
brne
handle_debug_priv
brne
handle_debug_priv
mov
r12
,
sp
mov
r12
,
sp
...
@@ -591,6 +597,12 @@ debug_restore_all:
...
@@ -591,6 +597,12 @@ debug_restore_all:
mask_exceptions
mask_exceptions
mtsr
SYSREG_RSR_DBG
,
r11
mtsr
SYSREG_RSR_DBG
,
r11
mtsr
SYSREG_RAR_DBG
,
r10
mtsr
SYSREG_RAR_DBG
,
r10
#ifdef CONFIG_TRACE_IRQFLAGS
bld
r11
,
SYSREG_GM_OFFSET
brcc
1
f
rcall
trace_hardirqs_on
1
:
#endif
ldmts
sp
++,
r0
-
lr
ldmts
sp
++,
r0
-
lr
sub
sp
,
-
4
sub
sp
,
-
4
retd
retd
...
@@ -675,7 +687,11 @@ irq_level\level:
...
@@ -675,7 +687,11 @@ irq_level\level:
andl
r1
,
_TIF_WORK_MASK
,
COH
andl
r1
,
_TIF_WORK_MASK
,
COH
brne
irq_exit_work
brne
irq_exit_work
1
:
popm
r8
-
r9
1
:
#ifdef CONFIG_TRACE_IRQFLAGS
rcall
trace_hardirqs_on
#endif
popm
r8
-
r9
mtsr
rar_int
\
level
,
r8
mtsr
rar_int
\
level
,
r8
mtsr
rsr_int
\
level
,
r9
mtsr
rsr_int
\
level
,
r9
ldmts
sp
++,
r0
-
lr
ldmts
sp
++,
r0
-
lr
...
...
include/asm-avr32/sysreg.h
View file @
320516b7
...
@@ -93,6 +93,8 @@
...
@@ -93,6 +93,8 @@
#define SYSREG_I3M_SIZE 1
#define SYSREG_I3M_SIZE 1
#define SYSREG_EM_OFFSET 21
#define SYSREG_EM_OFFSET 21
#define SYSREG_EM_SIZE 1
#define SYSREG_EM_SIZE 1
#define SYSREG_MODE_OFFSET 22
#define SYSREG_MODE_SIZE 3
#define SYSREG_M0_OFFSET 22
#define SYSREG_M0_OFFSET 22
#define SYSREG_M0_SIZE 1
#define SYSREG_M0_SIZE 1
#define SYSREG_M1_OFFSET 23
#define SYSREG_M1_OFFSET 23
...
...
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