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
6642779d
Commit
6642779d
authored
Jan 12, 2003
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Update extable.c for 2.5.55 exception table / module changes.
parent
216886db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
45 deletions
+6
-45
arch/arm/mm/extable.c
arch/arm/mm/extable.c
+6
-45
No files found.
arch/arm/mm/extable.c
View file @
6642779d
/*
* linux/arch/arm/mm/extable.c
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <asm/uaccess.h>
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
,
const
struct
exception_table_entry
*
search_extable
(
const
struct
exception_table_entry
*
first
,
const
struct
exception_table_entry
*
last
,
unsigned
long
value
)
{
...
...
@@ -22,44 +16,11 @@ search_one_table(const struct exception_table_entry *first,
mid
=
(
last
-
first
)
/
2
+
first
;
diff
=
mid
->
insn
-
value
;
if
(
diff
==
0
)
return
mid
->
fixup
;
return
mid
;
else
if
(
diff
<
0
)
first
=
mid
+
1
;
else
last
=
mid
-
1
;
}
return
0
;
}
extern
spinlock_t
modlist_lock
;
unsigned
long
search_exception_table
(
unsigned
long
addr
)
{
unsigned
long
ret
;
#ifndef CONFIG_MODULES
/* There is only the kernel to search. */
ret
=
search_one_table
(
__start___ex_table
,
__stop___ex_table
-
1
,
addr
);
#else
unsigned
long
flags
;
struct
list_head
*
l
;
ret
=
0
;
/* The kernel is the last "module" -- no need to treat it special. */
spin_lock_irqsave
(
&
modlist_lock
,
flags
);
list_for_each
(
l
,
&
extables
)
{
struct
exception_table
*
ex
=
list_entry
(
l
,
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
);
#endif
return
ret
;
return
NULL
;
}
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