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
c02a5119
Commit
c02a5119
authored
Aug 04, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparc64: Disable local interrupts around xcall_deliver_impl() invocation.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
deb16999
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
arch/sparc64/kernel/smp.c
arch/sparc64/kernel/smp.c
+15
-17
No files found.
arch/sparc64/kernel/smp.c
View file @
c02a5119
...
@@ -611,7 +611,7 @@ static void cheetah_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpumask
...
@@ -611,7 +611,7 @@ static void cheetah_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpumask
static
void
hypervisor_xcall_deliver
(
u64
data0
,
u64
data1
,
u64
data2
,
const
cpumask_t
*
mask
)
static
void
hypervisor_xcall_deliver
(
u64
data0
,
u64
data1
,
u64
data2
,
const
cpumask_t
*
mask
)
{
{
int
cnt
,
retries
,
this_cpu
,
prev_sent
,
i
;
int
cnt
,
retries
,
this_cpu
,
prev_sent
,
i
;
unsigned
long
flags
,
status
;
unsigned
long
status
;
cpumask_t
error_mask
;
cpumask_t
error_mask
;
struct
trap_per_cpu
*
tb
;
struct
trap_per_cpu
*
tb
;
u16
*
cpu_list
;
u16
*
cpu_list
;
...
@@ -620,18 +620,6 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpum
...
@@ -620,18 +620,6 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpum
if
(
cpus_empty
(
*
mask
))
if
(
cpus_empty
(
*
mask
))
return
;
return
;
/* We have to do this whole thing with interrupts fully disabled.
* Otherwise if we send an xcall from interrupt context it will
* corrupt both our mondo block and cpu list state.
*
* One consequence of this is that we cannot use timeout mechanisms
* that depend upon interrupts being delivered locally. So, for
* example, we cannot sample jiffies and expect it to advance.
*
* Fortunately, udelay() uses %stick/%tick so we can use that.
*/
local_irq_save
(
flags
);
this_cpu
=
smp_processor_id
();
this_cpu
=
smp_processor_id
();
tb
=
&
trap_block
[
this_cpu
];
tb
=
&
trap_block
[
this_cpu
];
...
@@ -720,8 +708,6 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpum
...
@@ -720,8 +708,6 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpum
}
}
}
while
(
1
);
}
while
(
1
);
local_irq_restore
(
flags
);
if
(
unlikely
(
!
cpus_empty
(
error_mask
)))
if
(
unlikely
(
!
cpus_empty
(
error_mask
)))
goto
fatal_mondo_cpu_error
;
goto
fatal_mondo_cpu_error
;
...
@@ -738,14 +724,12 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpum
...
@@ -738,14 +724,12 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpum
return
;
return
;
fatal_mondo_timeout:
fatal_mondo_timeout:
local_irq_restore
(
flags
);
printk
(
KERN_CRIT
"CPU[%d]: SUN4V mondo timeout, no forward "
printk
(
KERN_CRIT
"CPU[%d]: SUN4V mondo timeout, no forward "
" progress after %d retries.
\n
"
,
" progress after %d retries.
\n
"
,
this_cpu
,
retries
);
this_cpu
,
retries
);
goto
dump_cpu_list_and_out
;
goto
dump_cpu_list_and_out
;
fatal_mondo_error:
fatal_mondo_error:
local_irq_restore
(
flags
);
printk
(
KERN_CRIT
"CPU[%d]: Unexpected SUN4V mondo error %lu
\n
"
,
printk
(
KERN_CRIT
"CPU[%d]: Unexpected SUN4V mondo error %lu
\n
"
,
this_cpu
,
status
);
this_cpu
,
status
);
printk
(
KERN_CRIT
"CPU[%d]: Args were cnt(%d) cpulist_pa(%lx) "
printk
(
KERN_CRIT
"CPU[%d]: Args were cnt(%d) cpulist_pa(%lx) "
...
@@ -763,7 +747,21 @@ static void (*xcall_deliver_impl)(u64, u64, u64, const cpumask_t *);
...
@@ -763,7 +747,21 @@ static void (*xcall_deliver_impl)(u64, u64, u64, const cpumask_t *);
static
void
xcall_deliver
(
u64
data0
,
u64
data1
,
u64
data2
,
const
cpumask_t
*
mask
)
static
void
xcall_deliver
(
u64
data0
,
u64
data1
,
u64
data2
,
const
cpumask_t
*
mask
)
{
{
unsigned
long
flags
;
/* We have to do this whole thing with interrupts fully disabled.
* Otherwise if we send an xcall from interrupt context it will
* corrupt both our mondo block and cpu list state.
*
* One consequence of this is that we cannot use timeout mechanisms
* that depend upon interrupts being delivered locally. So, for
* example, we cannot sample jiffies and expect it to advance.
*
* Fortunately, udelay() uses %stick/%tick so we can use that.
*/
local_irq_save
(
flags
);
xcall_deliver_impl
(
data0
,
data1
,
data2
,
mask
);
xcall_deliver_impl
(
data0
,
data1
,
data2
,
mask
);
local_irq_restore
(
flags
);
}
}
/* Send cross call to all processors mentioned in MASK_P
/* Send cross call to all processors mentioned in MASK_P
...
...
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