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
25da13c0
Commit
25da13c0
authored
Oct 08, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: use generic debugger hooks in smp_call_function, busy loop instead of udelay
parent
f2febd06
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
23 deletions
+25
-23
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+4
-0
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/smp.c
+21
-23
No files found.
arch/ppc64/kernel/process.c
View file @
25da13c0
...
...
@@ -456,6 +456,10 @@ unsigned long get_wchan(struct task_struct *p)
return
0
;
if
(
count
>
0
)
{
ip
=
*
(
unsigned
long
*
)(
sp
+
16
);
/*
* XXX we mask the upper 32 bits until procps
* gets fixed.
*/
if
(
ip
<
first_sched
||
ip
>=
last_sched
)
return
(
ip
&
0xFFFFFFFF
);
}
...
...
arch/ppc64/kernel/smp.c
View file @
25da13c0
/*
*
*
* SMP support for ppc.
*
* Written by Cort Dougan (cort@cs.nmt.edu) borrowing a great
...
...
@@ -449,6 +447,9 @@ static struct call_data_struct {
int
wait
;
}
*
call_data
;
/* delay of at least 8 seconds on 1GHz cpu */
#define SMP_CALL_TIMEOUT (1UL << (30 + 3))
/*
* This function sends a 'generic call function' IPI to all other CPUs
* in the system.
...
...
@@ -469,7 +470,7 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
{
struct
call_data_struct
data
;
int
ret
=
-
1
,
cpus
=
num_online_cpus
()
-
1
;
int
timeout
;
unsigned
long
timeout
;
if
(
!
cpus
)
return
0
;
...
...
@@ -483,47 +484,44 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
spin_lock
(
&
call_lock
);
call_data
=
&
data
;
wmb
();
/* Send a message to all other CPUs and wait for them to respond */
smp_message_pass
(
MSG_ALL_BUT_SELF
,
PPC_MSG_CALL_FUNCTION
,
0
,
0
);
/* Wait for response */
timeout
=
8000000
;
timeout
=
SMP_CALL_TIMEOUT
;
while
(
atomic_read
(
&
data
.
started
)
!=
cpus
)
{
HMT_low
();
if
(
--
timeout
==
0
)
{
printk
(
"smp_call_function on cpu %d: other cpus not responding (%d)
\n
"
,
smp_processor_id
(),
atomic_read
(
&
data
.
started
));
#ifdef CONFIG_XMON
xmon
(
0
);
#endif
#ifdef CONFIG_PPC_ISERIES
HvCall_terminateMachineSrc
();
#endif
if
(
debugger
)
debugger
(
0
);
printk
(
"smp_call_function on cpu %d: other cpus not "
"responding (%d)
\n
"
,
smp_processor_id
(),
atomic_read
(
&
data
.
started
));
goto
out
;
}
barrier
();
udelay
(
1
);
}
if
(
wait
)
{
timeout
=
1000000
;
timeout
=
SMP_CALL_TIMEOUT
;
while
(
atomic_read
(
&
data
.
finished
)
!=
cpus
)
{
HMT_low
();
if
(
--
timeout
==
0
)
{
printk
(
"smp_call_function on cpu %d: other cpus not finishing (%d/%d)
\n
"
,
smp_processor_id
(),
atomic_read
(
&
data
.
finished
),
atomic_read
(
&
data
.
started
));
#ifdef CONFIG_PPC_ISERIES
HvCall_terminateMachineSrc
();
#endif
if
(
debugger
)
debugger
(
0
);
printk
(
"smp_call_function on cpu %d: other "
"cpus not finishing (%d/%d)
\n
"
,
smp_processor_id
(),
atomic_read
(
&
data
.
finished
),
atomic_read
(
&
data
.
started
));
goto
out
;
}
barrier
();
udelay
(
1
);
}
}
ret
=
0
;
out:
out:
HMT_medium
();
spin_unlock
(
&
call_lock
);
return
ret
;
...
...
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