Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jan.koester
Linux
Commits
f94d9a8e
Commit
f94d9a8e
authored
11 years ago
by
Ralf Baechle
Browse files
Options
Downloads
Patches
Plain Diff
MIPS: Idle: Do address fiddlery in helper functions.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
bdc92d74
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arch/mips/include/asm/idle.h
+11
-0
11 additions, 0 deletions
arch/mips/include/asm/idle.h
arch/mips/kernel/smtc.c
+1
-2
1 addition, 2 deletions
arch/mips/kernel/smtc.c
arch/mips/kernel/traps.c
+3
-4
3 additions, 4 deletions
arch/mips/kernel/traps.c
with
15 additions
and
6 deletions
arch/mips/include/asm/idle.h
+
11
−
0
View file @
f94d9a8e
...
@@ -8,4 +8,15 @@ extern asmlinkage void r4k_wait(void);
...
@@ -8,4 +8,15 @@ extern asmlinkage void r4k_wait(void);
extern
void
r4k_wait_irqoff
(
void
);
extern
void
r4k_wait_irqoff
(
void
);
extern
void
__pastwait
(
void
);
extern
void
__pastwait
(
void
);
static
inline
int
using_rollback_handler
(
void
)
{
return
cpu_wait
==
r4k_wait
;
}
static
inline
int
address_is_in_r4k_wait_irqoff
(
unsigned
long
addr
)
{
return
addr
>=
(
unsigned
long
)
r4k_wait_irqoff
&&
addr
<
(
unsigned
long
)
__pastwait
;
}
#endif
/* __ASM_IDLE_H */
#endif
/* __ASM_IDLE_H */
This diff is collapsed.
Click to expand it.
arch/mips/kernel/smtc.c
+
1
−
2
View file @
f94d9a8e
...
@@ -914,8 +914,7 @@ void smtc_send_ipi(int cpu, int type, unsigned int action)
...
@@ -914,8 +914,7 @@ void smtc_send_ipi(int cpu, int type, unsigned int action)
*/
*/
if
(
cpu_wait
==
r4k_wait_irqoff
)
{
if
(
cpu_wait
==
r4k_wait_irqoff
)
{
tcrestart
=
read_tc_c0_tcrestart
();
tcrestart
=
read_tc_c0_tcrestart
();
if
(
tcrestart
>=
(
unsigned
long
)
r4k_wait_irqoff
if
(
address_is_in_r4k_wait_irqoff
(
tcrestart
))
{
&&
tcrestart
<
(
unsigned
long
)
__pastwait
)
{
write_tc_c0_tcrestart
(
__pastwait
);
write_tc_c0_tcrestart
(
__pastwait
);
tcstatus
&=
~
TCSTATUS_IXMT
;
tcstatus
&=
~
TCSTATUS_IXMT
;
write_tc_c0_tcstatus
(
tcstatus
);
write_tc_c0_tcstatus
(
tcstatus
);
...
...
This diff is collapsed.
Click to expand it.
arch/mips/kernel/traps.c
+
3
−
4
View file @
f94d9a8e
...
@@ -1542,7 +1542,7 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)
...
@@ -1542,7 +1542,7 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)
extern
char
except_vec_vi
,
except_vec_vi_lui
;
extern
char
except_vec_vi
,
except_vec_vi_lui
;
extern
char
except_vec_vi_ori
,
except_vec_vi_end
;
extern
char
except_vec_vi_ori
,
except_vec_vi_end
;
extern
char
rollback_except_vec_vi
;
extern
char
rollback_except_vec_vi
;
char
*
vec_start
=
(
cpu_wait
==
r4k_wait
)
?
char
*
vec_start
=
using_rollback_handler
(
)
?
&
rollback_except_vec_vi
:
&
except_vec_vi
;
&
rollback_except_vec_vi
:
&
except_vec_vi
;
#ifdef CONFIG_MIPS_MT_SMTC
#ifdef CONFIG_MIPS_MT_SMTC
/*
/*
...
@@ -1812,10 +1812,8 @@ void __init trap_init(void)
...
@@ -1812,10 +1812,8 @@ void __init trap_init(void)
extern
char
except_vec4
;
extern
char
except_vec4
;
extern
char
except_vec3_r4000
;
extern
char
except_vec3_r4000
;
unsigned
long
i
;
unsigned
long
i
;
int
rollback
;
check_wait
();
check_wait
();
rollback
=
(
cpu_wait
==
r4k_wait
);
#if defined(CONFIG_KGDB)
#if defined(CONFIG_KGDB)
if
(
kgdb_early_setup
)
if
(
kgdb_early_setup
)
...
@@ -1892,7 +1890,8 @@ void __init trap_init(void)
...
@@ -1892,7 +1890,8 @@ void __init trap_init(void)
if
(
board_be_init
)
if
(
board_be_init
)
board_be_init
();
board_be_init
();
set_except_vector
(
0
,
rollback
?
rollback_handle_int
:
handle_int
);
set_except_vector
(
0
,
using_rollback_handler
()
?
rollback_handle_int
:
handle_int
);
set_except_vector
(
1
,
handle_tlbm
);
set_except_vector
(
1
,
handle_tlbm
);
set_except_vector
(
2
,
handle_tlbl
);
set_except_vector
(
2
,
handle_tlbl
);
set_except_vector
(
3
,
handle_tlbs
);
set_except_vector
(
3
,
handle_tlbs
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment