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
Kirill Smelkov
linux
Commits
4c83347c
Commit
4c83347c
authored
Jun 04, 2003
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: Make task allocation/freeing compatible with the improved generic kernel
infrastructure.
parent
02a2a457
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
arch/ia64/kernel/init_task.c
arch/ia64/kernel/init_task.c
+1
-1
include/asm-ia64/thread_info.h
include/asm-ia64/thread_info.h
+16
-7
No files found.
arch/ia64/kernel/init_task.c
View file @
4c83347c
...
...
@@ -36,7 +36,7 @@ union init_thread {
unsigned
long
stack
[
KERNEL_STACK_SIZE
/
sizeof
(
unsigned
long
)];
}
init_thread_union
__attribute__
((
section
(
".data.init_task"
)))
=
{{
.
task
=
INIT_TASK
(
init_thread_union
.
s
.
task
),
.
thread_info
=
INIT_THREAD_INFO
(
init_thread_union
.
s
.
t
hread_info
)
.
thread_info
=
INIT_THREAD_INFO
(
init_thread_union
.
s
.
t
ask
)
}};
asm
(
".global init_task; init_task = init_thread_union"
);
include/asm-ia64/thread_info.h
View file @
4c83347c
...
...
@@ -9,11 +9,13 @@
#include <asm/processor.h>
#include <asm/ptrace.h>
#define TI_EXEC_DOMAIN 0x00
#define TI_FLAGS 0x08
#define TI_CPU 0x0c
#define TI_ADDR_LIMIT 0x10
#define TI_PRE_COUNT 0x18
#define TI_TASK 0x00
#define TI_EXEC_DOMAIN 0x08
#define TI_FLAGS 0x10
#define TI_CPU 0x14
#define TI_ADDR_LIMIT 0x18
#define TI_PRE_COUNT 0x20
#define TI_RESTART_BLOCK 0x28
#define PREEMPT_ACTIVE_BIT 30
#define PREEMPT_ACTIVE (1 << PREEMPT_ACTIVE_BIT)
...
...
@@ -26,6 +28,7 @@
* without having to do pointer masking.
*/
struct
thread_info
{
struct
task_struct
*
task
;
/* XXX not really needed, except for dup_task_struct() */
struct
exec_domain
*
exec_domain
;
/* execution domain */
__u32
flags
;
/* thread_info flags (see TIF_*) */
__u32
cpu
;
/* current CPU */
...
...
@@ -37,8 +40,9 @@ struct thread_info {
#define INIT_THREAD_SIZE
/* tell sched.h not to declare the thread_union */
#define THREAD_SIZE KERNEL_STACK_SIZE
#define INIT_THREAD_INFO(t
i
) \
#define INIT_THREAD_INFO(t
sk
) \
{ \
.task = &tsk, \
.exec_domain = &default_exec_domain, \
.flags = 0, \
.cpu = 0, \
...
...
@@ -50,9 +54,14 @@ struct thread_info {
}
/* how to get the thread information struct from C */
#define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE))
#define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE))
#define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE))
#define free_thread_info(ti)
/* nothing */
#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
#define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL, KERNEL_STACK_SIZE_ORDER))
#define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER)
#endif
/* !__ASSEMBLY */
/*
...
...
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