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
9a5a65eb
Commit
9a5a65eb
authored
Jan 15, 2003
by
Geert Uytterhoeven
Committed by
Linus Torvalds
Jan 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] M68k exception table updates
M68k exception table updates to compensate for changes in 2.5.55
parent
4c942d72
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
41 deletions
+11
-41
arch/m68k/mm/extable.c
arch/m68k/mm/extable.c
+7
-35
arch/m68k/mm/fault.c
arch/m68k/mm/fault.c
+4
-3
include/asm-m68k/uaccess.h
include/asm-m68k/uaccess.h
+0
-3
No files found.
arch/m68k/mm/extable.c
View file @
9a5a65eb
...
...
@@ -9,8 +9,9 @@
extern
const
struct
exception_table_entry
__start___ex_table
[];
extern
const
struct
exception_table_entry
__stop___ex_table
[];
static
inline
unsigned
long
search_one_table
(
const
struct
exception_table_entry
*
first
,
/* Simple binary search */
const
struct
exception_table_entry
*
search_extable
(
const
struct
exception_table_entry
*
first
,
const
struct
exception_table_entry
*
last
,
unsigned
long
value
)
{
...
...
@@ -21,41 +22,12 @@ search_one_table(const struct exception_table_entry *first,
mid
=
(
last
-
first
)
/
2
+
first
;
diff
=
value
-
mid
->
insn
;
if
(
diff
>=
0
&&
diff
<=
2
)
return
mid
->
fixup
;
return
mid
;
else
if
(
diff
>
0
)
first
=
mid
+
1
;
else
last
=
mid
-
1
;
}
return
0
;
return
NULL
;
}
unsigned
long
search_exception_table
(
unsigned
long
addr
)
{
unsigned
long
ret
=
0
;
#ifndef CONFIG_MODULES
/* There is only the kernel to search. */
ret
=
search_one_table
(
__start___ex_table
,
__stop___ex_table
-
1
,
addr
);
return
ret
;
#else
unsigned
long
flags
;
struct
list_head
*
i
;
/* The kernel is the last "module" -- no need to treat it special. */
spin_lock_irqsave
(
&
modlist_lock
,
flags
);
list_for_each
(
i
,
&
extables
)
{
struct
exception_table
*
ex
=
list_entry
(
i
,
struct
exception_table
,
list
);
if
(
ex
->
num_entries
==
0
)
continue
;
ret
=
search_one_table
(
ex
->
entry
,
ex
->
entry
+
ex
->
num_entries
-
1
,
addr
);
if
(
ret
)
break
;
}
spin_unlock_irqrestore
(
&
modlist_lock
,
flags
);
return
ret
;
#endif
}
arch/m68k/mm/fault.c
View file @
9a5a65eb
...
...
@@ -9,6 +9,7 @@
#include <linux/kernel.h>
#include <linux/ptrace.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <asm/setup.h>
#include <asm/traps.h>
...
...
@@ -34,10 +35,10 @@ int send_fault_sig(struct pt_regs *regs)
force_sig_info
(
siginfo
.
si_signo
,
&
siginfo
,
current
);
}
else
{
unsigned
long
fixup
;
const
struct
exception_table_entry
*
fixup
;
/* Are we prepared to handle this kernel fault? */
if
((
fixup
=
search_exception_table
(
regs
->
pc
)))
{
if
((
fixup
=
search_exception_table
s
(
regs
->
pc
)))
{
struct
pt_regs
*
tregs
;
/* Create a new four word stack frame, discarding the old
one. */
...
...
@@ -45,7 +46,7 @@ int send_fault_sig(struct pt_regs *regs)
tregs
=
(
struct
pt_regs
*
)((
ulong
)
regs
+
regs
->
stkadj
);
tregs
->
vector
=
regs
->
vector
;
tregs
->
format
=
0
;
tregs
->
pc
=
fixup
;
tregs
->
pc
=
fixup
->
fixup
;
tregs
->
sr
=
regs
->
sr
;
return
-
1
;
}
...
...
include/asm-m68k/uaccess.h
View file @
9a5a65eb
...
...
@@ -37,9 +37,6 @@ struct exception_table_entry
unsigned
long
insn
,
fixup
;
};
/* Returns 0 if exception not found and fixup otherwise. */
extern
unsigned
long
search_exception_table
(
unsigned
long
);
/*
* These are the main single-value transfer routines. They automatically
...
...
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