ia64/linux-2.6.18-xen.hg

view include/asm-h8300/thread_info.h @ 452:c7ed6fe5dca0

kexec: dont initialise regions in reserve_memory()

There is no need to initialise efi_memmap_res and boot_param_res in
reserve_memory() for the initial xen domain as it is done in
machine_kexec_setup_resources() using values from the kexec hypercall.

Signed-off-by: Simon Horman <horms@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 28 10:55:18 2008 +0000 (2008-02-28)
parents 831230e53067
children
line source
1 /* thread_info.h: h8300 low-level thread information
2 * adapted from the i386 and PPC versions by Yoshinori Sato <ysato@users.sourceforge.jp>
3 *
4 * Copyright (C) 2002 David Howells (dhowells@redhat.com)
5 * - Incorporating suggestions made by Linus Torvalds and Dave Miller
6 */
8 #ifndef _ASM_THREAD_INFO_H
9 #define _ASM_THREAD_INFO_H
11 #include <asm/page.h>
13 #ifdef __KERNEL__
15 #ifndef __ASSEMBLY__
17 /*
18 * low level task data.
19 * If you change this, change the TI_* offsets below to match.
20 */
21 struct thread_info {
22 struct task_struct *task; /* main task structure */
23 struct exec_domain *exec_domain; /* execution domain */
24 unsigned long flags; /* low level flags */
25 int cpu; /* cpu we're on */
26 int preempt_count; /* 0 => preemptable, <0 => BUG */
27 struct restart_block restart_block;
28 };
30 /*
31 * macros/functions for gaining access to the thread information structure
32 */
33 #define INIT_THREAD_INFO(tsk) \
34 { \
35 .task = &tsk, \
36 .exec_domain = &default_exec_domain, \
37 .flags = 0, \
38 .cpu = 0, \
39 .preempt_count = 1, \
40 .restart_block = { \
41 .fn = do_no_restart_syscall, \
42 }, \
43 }
45 #define init_thread_info (init_thread_union.thread_info)
46 #define init_stack (init_thread_union.stack)
49 /*
50 * Size of kernel stack for each process. This must be a power of 2...
51 */
52 #define THREAD_SIZE 8192 /* 2 pages */
55 /* how to get the thread information struct from C */
56 static inline struct thread_info *current_thread_info(void)
57 {
58 struct thread_info *ti;
59 __asm__(
60 "mov.l sp, %0 \n\t"
61 "and.l %1, %0"
62 : "=&r"(ti)
63 : "i" (~(THREAD_SIZE-1))
64 );
65 return ti;
66 }
68 /* thread information allocation */
69 #define alloc_thread_info(tsk) ((struct thread_info *) \
70 __get_free_pages(GFP_KERNEL, 1))
71 #define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
72 #endif /* __ASSEMBLY__ */
74 /*
75 * Offsets in thread_info structure, used in assembly code
76 */
77 #define TI_TASK 0
78 #define TI_EXECDOMAIN 4
79 #define TI_FLAGS 8
80 #define TI_CPU 12
81 #define TI_PRE_COUNT 16
83 #define PREEMPT_ACTIVE 0x4000000
85 /*
86 * thread information flag bit numbers
87 */
88 #define TIF_SYSCALL_TRACE 0 /* syscall trace active */
89 #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */
90 #define TIF_SIGPENDING 2 /* signal pending */
91 #define TIF_NEED_RESCHED 3 /* rescheduling necessary */
92 #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling
93 TIF_NEED_RESCHED */
94 #define TIF_MEMDIE 5
96 /* as above, but as bit values */
97 #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
98 #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
99 #define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
100 #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
101 #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
103 #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
105 #endif /* __KERNEL__ */
107 #endif /* _ASM_THREAD_INFO_H */