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
4c9bebab
Commit
4c9bebab
authored
Nov 26, 2002
by
Miles Bader
Committed by
Linus Torvalds
Nov 26, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Shrink v850 exception-trap handling code a bit
Shrink v850 exception-trap handling code a bit
parent
7a3ca027
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
40 deletions
+26
-40
arch/v850/kernel/entry.S
arch/v850/kernel/entry.S
+24
-38
arch/v850/kernel/intv.S
arch/v850/kernel/intv.S
+2
-2
No files found.
arch/v850/kernel/entry.S
View file @
4c9bebab
...
@@ -657,6 +657,12 @@ G_ENTRY(irq):
...
@@ -657,6 +657,12 @@ G_ENTRY(irq):
shl
16
,
r6
//
clear
upper
16
bits
shl
16
,
r6
//
clear
upper
16
bits
shr
20
,
r6
//
shift
back
,
and
remove
lower
nibble
shr
20
,
r6
//
shift
back
,
and
remove
lower
nibble
add
-
8
,
r6
//
remove
bias
for
irqs
add
-
8
,
r6
//
remove
bias
for
irqs
//
If
the
IRQ
index
is
negative
,
it
's actually one of the exception
//
traps
below
0x80
(
currently
,
the
illegal
instruction
trap
,
and
//
the
`
debug
trap
'). Handle these separately.
bn
exception
//
Call
the
high
-
level
interrupt
handling
code
.
//
Call
the
high
-
level
interrupt
handling
code
.
jarl
CSYM
(
handle_irq
),
lp
jarl
CSYM
(
handle_irq
),
lp
//
fall
through
//
fall
through
...
@@ -665,6 +671,23 @@ G_ENTRY(irq):
...
@@ -665,6 +671,23 @@ G_ENTRY(irq):
handlers
,
below
)
.
*/
handlers
,
below
)
.
*/
ret_from_irq
:
ret_from_irq
:
RETURN
(
IRQ
)
RETURN
(
IRQ
)
exception
:
mov
hilo
(
ret_from_irq
),
lp
//
where
the
handler
should
return
cmp
-
2
,
r6
bne
1
f
//
illegal
instruction
exception
addi
SIGILL
,
r0
,
r6
//
Arg
0
:
signal
number
mov
CURRENT_TASK
,
r7
//
Arg
1
:
task
jr
CSYM
(
force_sig
)
//
tail
call
1
:
cmp
-
1
,
r6
bne
bad_trap_wrapper
//
`
dbtrap
' exception
movea
PTO
,
sp
,
r6
//
Arg
0
:
user
regs
jr
CSYM
(
debug_trap
)
//
tail
call
END
(
irq
)
END
(
irq
)
...
@@ -692,44 +715,7 @@ G_ENTRY(nmi):
...
@@ -692,44 +715,7 @@ G_ENTRY(nmi):
jarl
CSYM
(
handle_irq
),
lp
jarl
CSYM
(
handle_irq
),
lp
RETURN
(
NMI
)
RETURN
(
NMI
)
END
(
nmi0
)
END
(
nmi
)
/*
*
Illegal
instruction
trap
.
*
*
The
stack
-
pointer
(
r3
)
should
have
already
been
saved
to
the
memory
*
location
ENTRY_SP
(
the
reason
for
this
is
that
the
interrupt
vectors
may
be
*
beyond
a
22
-
bit
signed
offset
jump
from
the
actual
interrupt
handler
,
and
*
this
allows
them
to
save
the
stack
-
pointer
and
use
that
register
to
do
an
*
indirect
jump
)
.
*/
G_ENTRY
(
illegal_instruction
):
SAVE_STATE
(
IRQ
,
r0
,
ENTRY_SP
)
//
Save
registers
.
ei
addi
SIGILL
,
r0
,
r6
//
Arg
0
:
signal
number
mov
CURRENT_TASK
,
r7
//
Arg
1
:
task
mov
hilo
(
ret_from_irq
),
lp
//
where
the
handler
should
return
jr
CSYM
(
force_sig
)
END
(
illegal_instruction
)
/*
*
`
Debug
' trap
*
*
The
stack
-
pointer
(
r3
)
should
have
already
been
saved
to
the
memory
*
location
ENTRY_SP
(
the
reason
for
this
is
that
the
interrupt
vectors
may
be
*
beyond
a
22
-
bit
signed
offset
jump
from
the
actual
interrupt
handler
,
and
*
this
allows
them
to
save
the
stack
-
pointer
and
use
that
register
to
do
an
*
indirect
jump
)
.
*/
G_ENTRY
(
dbtrap
):
SAVE_STATE
(
IRQ
,
r0
,
ENTRY_SP
)
//
Save
registers
.
ei
movea
PTO
,
sp
,
r6
//
Arg
0
:
user
regs
mov
hilo
(
ret_from_irq
),
lp
//
where
the
handler
should
return
jr
CSYM
(
debug_trap
)
END
(
dbtrap
)
/*
/*
...
...
arch/v850/kernel/intv.S
View file @
4c9bebab
...
@@ -52,10 +52,10 @@
...
@@ -52,10 +52,10 @@
JUMP_TO_HANDLER
(
trap
,
ENTRY_SP
)
//
TRAP1n
JUMP_TO_HANDLER
(
trap
,
ENTRY_SP
)
//
TRAP1n
.
balign
0x10
.
balign
0x10
JUMP_TO_HANDLER
(
i
llegal_instruction
,
ENTRY_SP
)
//
illegal
insn
trap
JUMP_TO_HANDLER
(
i
rq
,
ENTRY_SP
)
//
illegal
insn
trap
.
balign
0x10
.
balign
0x10
JUMP_TO_HANDLER
(
dbtrap
,
ENTRY_SP
)
//
DBTRAP
insn
JUMP_TO_HANDLER
(
irq
,
ENTRY_SP
)
//
DBTRAP
insn
/
*
Hardware
interrupt
vectors
.
*/
/
*
Hardware
interrupt
vectors
.
*/
...
...
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