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
743d380c
Commit
743d380c
authored
Dec 27, 2002
by
Geert Uytterhoeven
Committed by
Linus Torvalds
Dec 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] M68k module list updates
M68k module list updates, inspired by ia32 traps.c in 2.5.48
parent
d4dd6eb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
18 deletions
+35
-18
arch/m68k/kernel/traps.c
arch/m68k/kernel/traps.c
+19
-8
arch/m68k/mm/extable.c
arch/m68k/mm/extable.c
+16
-10
No files found.
arch/m68k/kernel/traps.c
View file @
743d380c
...
...
@@ -820,32 +820,43 @@ asmlinkage void buserr_c(struct frame *fp)
static
int
kstack_depth_to_print
=
48
;
extern
struct
module
kernel_module
;
extern
char
_stext
,
_etext
;
#ifdef CONFIG_MODULES
/* FIXME: Accessed without a lock --RR */
extern
struct
list_head
modules
;
static
inline
int
kernel_text_address
(
unsigned
long
addr
)
{
#ifdef CONFIG_MODULES
struct
module
*
mod
;
#endif
extern
char
_stext
,
_etext
;
if
(
addr
>=
(
unsigned
long
)
&
_stext
&&
addr
<=
(
unsigned
long
)
&
_etext
)
return
1
;
#ifdef CONFIG_MODULES
for
(
mod
=
module_list
;
mod
!=
&
kernel_module
;
mod
=
mod
->
next
)
{
list_for_each_entry
(
mod
,
&
modules
,
list
)
{
/* mod_bound tests for addr being inside the vmalloc'ed
* module area. Of course it'd be better to test only
* for the .text subset... */
if
(
mod_bound
(
addr
,
0
,
mod
))
if
(
mod_bound
(
(
void
*
)
addr
,
0
,
mod
))
return
1
;
}
#endif
return
0
;
}
#else // !CONFIG_MODULES
static
inline
int
kernel_text_address
(
unsigned
long
addr
)
{
return
(
addr
>=
(
unsigned
long
)
&
_stext
&&
addr
<=
(
unsigned
long
)
&
_etext
);
}
#endif // !CONFIG_MODULES
void
show_trace
(
unsigned
long
*
stack
)
{
unsigned
long
*
endstack
;
...
...
arch/m68k/mm/extable.c
View file @
743d380c
...
...
@@ -33,23 +33,29 @@ search_one_table(const struct exception_table_entry *first,
unsigned
long
search_exception_table
(
unsigned
long
addr
)
{
unsigned
long
ret
;
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
);
if
(
ret
)
return
ret
;
return
ret
;
#else
unsigned
long
flags
;
struct
list_head
*
i
;
/* The kernel is the last "module" -- no need to treat it special. */
struct
module
*
mp
;
for
(
mp
=
module_list
;
mp
!=
NULL
;
mp
=
mp
->
next
)
{
if
(
mp
->
ex_table_start
==
NULL
)
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
(
mp
->
ex_table_start
,
mp
->
ex_table_end
-
1
,
addr
);
if
(
ret
)
return
ret
;
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
return
0
;
}
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