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
e1f3359e
Commit
e1f3359e
authored
Mar 26, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: cacheline align each XICS IPI bitmask.
parent
acb21e41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
20 deletions
+17
-20
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/smp.c
+7
-14
arch/ppc64/kernel/xics.c
arch/ppc64/kernel/xics.c
+10
-6
No files found.
arch/ppc64/kernel/smp.c
View file @
e1f3359e
...
...
@@ -86,7 +86,11 @@ void xics_cause_IPI(int cpu);
/*
* XICS only has a single IPI, so encode the messages per CPU
*/
volatile
unsigned
long
xics_ipi_message
[
NR_CPUS
]
=
{
0
};
struct
xics_ipi_struct
{
volatile
unsigned
long
value
;
}
____cacheline_aligned
;
struct
xics_ipi_struct
xics_ipi_message
[
NR_CPUS
]
__cacheline_aligned
;
#define smp_message_pass(t,m,d,w) ppc_md.smp_message_pass((t),(m),(d),(w))
...
...
@@ -322,10 +326,10 @@ smp_xics_message_pass(int target, int msg, unsigned long data, int wait)
if
(
target
==
MSG_ALL
||
target
==
i
||
(
target
==
MSG_ALL_BUT_SELF
&&
i
!=
smp_processor_id
()))
{
set_bit
(
msg
,
&
xics_ipi_message
[
i
]);
set_bit
(
msg
,
&
xics_ipi_message
[
i
]
.
value
);
mb
();
xics_cause_IPI
(
i
);
}
}
}
}
...
...
@@ -389,17 +393,6 @@ void smp_message_recv(int msg, struct pt_regs *regs)
void
smp_send_reschedule
(
int
cpu
)
{
/*
* This is only used if `cpu' is running an idle task,
* so it will reschedule itself anyway...
*
* This isn't the case anymore since the other CPU could be
* sleeping and won't reschedule until the next interrupt (such
* as the timer).
* -- Cort
*/
/* This is only used if `cpu' is running an idle task,
so it will reschedule itself anyway... */
smp_message_pass
(
cpu
,
PPC_MSG_RESCHEDULE
,
0
,
0
);
}
...
...
arch/ppc64/kernel/xics.c
View file @
e1f3359e
...
...
@@ -239,31 +239,35 @@ xics_get_irq(struct pt_regs *regs)
return
irq
;
}
struct
xics_ipi_struct
{
volatile
unsigned
long
value
;
}
____cacheline_aligned
;
extern
struct
xics_ipi_struct
xics_ipi_message
[
NR_CPUS
]
__cacheline_aligned
;
#ifdef CONFIG_SMP
void
xics_ipi_action
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
extern
volatile
unsigned
long
xics_ipi_message
[];
int
cpu
=
smp_processor_id
();
ops
->
qirr_info
(
cpu
,
0xff
);
while
(
xics_ipi_message
[
cpu
])
{
if
(
test_and_clear_bit
(
PPC_MSG_CALL_FUNCTION
,
&
xics_ipi_message
[
cpu
]))
{
while
(
xics_ipi_message
[
cpu
]
.
value
)
{
if
(
test_and_clear_bit
(
PPC_MSG_CALL_FUNCTION
,
&
xics_ipi_message
[
cpu
]
.
value
))
{
mb
();
smp_message_recv
(
PPC_MSG_CALL_FUNCTION
,
regs
);
}
if
(
test_and_clear_bit
(
PPC_MSG_RESCHEDULE
,
&
xics_ipi_message
[
cpu
]))
{
if
(
test_and_clear_bit
(
PPC_MSG_RESCHEDULE
,
&
xics_ipi_message
[
cpu
]
.
value
))
{
mb
();
smp_message_recv
(
PPC_MSG_RESCHEDULE
,
regs
);
}
#if 0
if (test_and_clear_bit(PPC_MSG_MIGRATE_TASK, &xics_ipi_message[cpu])) {
if (test_and_clear_bit(PPC_MSG_MIGRATE_TASK, &xics_ipi_message[cpu]
.value
)) {
mb();
smp_message_recv(PPC_MSG_MIGRATE_TASK, regs);
}
#endif
#ifdef CONFIG_XMON
if
(
test_and_clear_bit
(
PPC_MSG_XMON_BREAK
,
&
xics_ipi_message
[
cpu
]))
{
if
(
test_and_clear_bit
(
PPC_MSG_XMON_BREAK
,
&
xics_ipi_message
[
cpu
]
.
value
))
{
mb
();
smp_message_recv
(
PPC_MSG_XMON_BREAK
,
regs
);
}
...
...
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