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
5687580b
Commit
5687580b
authored
Sep 22, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c6x: switch to generic kernel_thread()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
680a1453
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
21 deletions
+6
-21
arch/c6x/Kconfig
arch/c6x/Kconfig
+1
-0
arch/c6x/include/asm/processor.h
arch/c6x/include/asm/processor.h
+0
-2
arch/c6x/kernel/process.c
arch/c6x/kernel/process.c
+5
-19
No files found.
arch/c6x/Kconfig
View file @
5687580b
...
...
@@ -17,6 +17,7 @@ config C6X
select OF
select OF_EARLY_FLATTREE
select GENERIC_CLOCKEVENTS
select GENERIC_KERNEL_THREAD
config MMU
def_bool n
...
...
arch/c6x/include/asm/processor.h
View file @
5687580b
...
...
@@ -92,8 +92,6 @@ static inline void release_thread(struct task_struct *dead_task)
{
}
extern
int
kernel_thread
(
int
(
*
fn
)(
void
*
),
void
*
arg
,
unsigned
long
flags
);
#define copy_segments(tsk, mm) do { } while (0)
#define release_segments(mm) do { } while (0)
...
...
arch/c6x/kernel/process.c
View file @
5687580b
...
...
@@ -104,22 +104,6 @@ void machine_power_off(void)
halt_loop
();
}
/*
* Create a kernel thread
*/
int
kernel_thread
(
int
(
*
fn
)(
void
*
),
void
*
arg
,
unsigned
long
flags
)
{
struct
pt_regs
regs
=
{
.
a0
=
(
unsigned
long
)
fn
,
.
a1
=
(
unsigned
long
)
arg
,
.
tsr
=
0
,
/* kernel mode */
};
/* Ok, create the new process.. */
return
do_fork
(
flags
|
CLONE_VM
|
CLONE_UNTRACED
,
-
1
,
&
regs
,
0
,
NULL
,
NULL
);
}
void
flush_thread
(
void
)
{
}
...
...
@@ -177,14 +161,16 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
childregs
=
task_pt_regs
(
p
);
*
childregs
=
*
regs
;
if
(
usp
==
-
1
)
{
if
(
!
regs
)
{
/* case of __kernel_thread: we return to supervisor space */
memset
(
childregs
,
0
,
sizeof
(
struct
pt_regs
));
childregs
->
sp
=
(
unsigned
long
)(
childregs
+
1
);
p
->
thread
.
pc
=
(
unsigned
long
)
ret_from_kernel_thread
;
childregs
->
a0
=
usp
;
/* function */
childregs
->
a1
=
ustk_size
;
/* argument */
}
else
{
/* Otherwise use the given stack */
*
childregs
=
*
regs
;
childregs
->
sp
=
usp
;
p
->
thread
.
pc
=
(
unsigned
long
)
ret_from_fork
;
}
...
...
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