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
a8b87f60
Commit
a8b87f60
authored
Feb 21, 2008
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs
into merge
parents
9c033852
61b36fc1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
22 deletions
+8
-22
arch/powerpc/platforms/cell/spu_base.c
arch/powerpc/platforms/cell/spu_base.c
+0
-12
arch/powerpc/platforms/cell/spufs/run.c
arch/powerpc/platforms/cell/spufs/run.c
+1
-0
arch/powerpc/platforms/cell/spufs/sched.c
arch/powerpc/platforms/cell/spufs/sched.c
+3
-5
arch/powerpc/platforms/cell/spufs/switch.c
arch/powerpc/platforms/cell/spufs/switch.c
+3
-3
include/asm-powerpc/spu.h
include/asm-powerpc/spu.h
+1
-2
No files found.
arch/powerpc/platforms/cell/spu_base.c
View file @
a8b87f60
...
...
@@ -160,13 +160,6 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
pr_debug
(
"%s
\n
"
,
__FUNCTION__
);
if
(
test_bit
(
SPU_CONTEXT_SWITCH_ACTIVE
,
&
spu
->
flags
))
{
/* SLBs are pre-loaded for context switch, so
* we should never get here!
*/
printk
(
"%s: invalid access during switch!
\n
"
,
__func__
);
return
1
;
}
slb
.
esid
=
(
ea
&
ESID_MASK
)
|
SLB_ESID_V
;
switch
(
REGION_ID
(
ea
))
{
...
...
@@ -226,11 +219,6 @@ static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr)
return
0
;
}
if
(
test_bit
(
SPU_CONTEXT_SWITCH_ACTIVE
,
&
spu
->
flags
))
{
printk
(
"%s: invalid access during switch!
\n
"
,
__func__
);
return
1
;
}
spu
->
class_0_pending
=
0
;
spu
->
dar
=
ea
;
spu
->
dsisr
=
dsisr
;
...
...
arch/powerpc/platforms/cell/spufs/run.c
View file @
a8b87f60
...
...
@@ -234,6 +234,7 @@ static int spu_run_fini(struct spu_context *ctx, u32 *npc,
*
npc
=
ctx
->
ops
->
npc_read
(
ctx
);
spuctx_switch_state
(
ctx
,
SPU_UTIL_IDLE_LOADED
);
ctx
->
policy
=
SCHED_IDLE
;
spu_release
(
ctx
);
if
(
signal_pending
(
current
))
...
...
arch/powerpc/platforms/cell/spufs/sched.c
View file @
a8b87f60
...
...
@@ -856,21 +856,18 @@ static noinline void spusched_tick(struct spu_context *ctx)
{
struct
spu_context
*
new
=
NULL
;
struct
spu
*
spu
=
NULL
;
u32
status
;
if
(
spu_acquire
(
ctx
))
BUG
();
/* a kernel thread never has signals pending */
if
(
ctx
->
state
!=
SPU_STATE_RUNNABLE
)
goto
out
;
if
(
spu_stopped
(
ctx
,
&
status
))
goto
out
;
if
(
ctx
->
flags
&
SPU_CREATE_NOSCHED
)
goto
out
;
if
(
ctx
->
policy
==
SCHED_FIFO
)
goto
out
;
if
(
--
ctx
->
time_slice
)
if
(
--
ctx
->
time_slice
&&
ctx
->
policy
!=
SCHED_IDLE
)
goto
out
;
spu
=
ctx
->
spu
;
...
...
@@ -880,7 +877,8 @@ static noinline void spusched_tick(struct spu_context *ctx)
new
=
grab_runnable_context
(
ctx
->
prio
+
1
,
spu
->
node
);
if
(
new
)
{
spu_unschedule
(
spu
,
ctx
);
spu_add_to_rq
(
ctx
);
if
(
ctx
->
policy
!=
SCHED_IDLE
)
spu_add_to_rq
(
ctx
);
}
else
{
spu_context_nospu_trace
(
spusched_tick__newslice
,
ctx
);
ctx
->
time_slice
++
;
...
...
arch/powerpc/platforms/cell/spufs/switch.c
View file @
a8b87f60
...
...
@@ -720,8 +720,9 @@ static inline void set_switch_active(struct spu_state *csa, struct spu *spu)
* Restore, Step 23.
* Change the software context switch pending flag
* to context switch active.
*
* This implementation does not uses a switch active flag.
*/
set_bit
(
SPU_CONTEXT_SWITCH_ACTIVE
,
&
spu
->
flags
);
clear_bit
(
SPU_CONTEXT_SWITCH_PENDING
,
&
spu
->
flags
);
mb
();
}
...
...
@@ -1739,9 +1740,8 @@ static inline void reset_switch_active(struct spu_state *csa, struct spu *spu)
{
/* Restore, Step 74:
* Reset the "context switch active" flag.
* Not performed by this implementation.
*/
clear_bit
(
SPU_CONTEXT_SWITCH_ACTIVE
,
&
spu
->
flags
);
mb
();
}
static
inline
void
reenable_interrupts
(
struct
spu_state
*
csa
,
struct
spu
*
spu
)
...
...
include/asm-powerpc/spu.h
View file @
a8b87f60
...
...
@@ -98,9 +98,8 @@
#define MFC_PRIV_ATTN_EVENT 0x00000800
#define MFC_MULTI_SRC_EVENT 0x00001000
/* Flag
s
indicating progress during context switch. */
/* Flag indicating progress during context switch. */
#define SPU_CONTEXT_SWITCH_PENDING 0UL
#define SPU_CONTEXT_SWITCH_ACTIVE 1UL
struct
spu_context
;
struct
spu_runqueue
;
...
...
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