aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/processor.h')
-rw-r--r--arch/powerpc/include/asm/processor.h122
1 files changed, 2 insertions, 120 deletions
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 6fbe8c46b3..e03ab21f59 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -1203,129 +1203,11 @@ int fsl_qoriq_dsp_core_to_cluster(unsigned int core);
1203#endif 1203#endif
1204#endif 1204#endif
1205 1205
1206
1207/* what kind of prep workstation we are */
1208extern int _prep_type;
1209/*
1210 * This is used to identify the board type from a given PReP board
1211 * vendor. Board revision is also made available.
1212 */
1213extern unsigned char ucSystemType;
1214extern unsigned char ucBoardRev;
1215extern unsigned char ucBoardRevMaj, ucBoardRevMin;
1216
1217struct task_struct; 1206struct task_struct;
1218void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp);
1219void release_thread(struct task_struct *);
1220
1221/*
1222 * Create a new kernel thread.
1223 */
1224extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
1225
1226/*
1227 * Bus types
1228 */
1229#define EISA_bus 0
1230#define EISA_bus__is_a_macro /* for versions in ksyms.c */
1231#define MCA_bus 0
1232#define MCA_bus__is_a_macro /* for versions in ksyms.c */
1233
1234/* Lazy FPU handling on uni-processor */
1235extern struct task_struct *last_task_used_math;
1236extern struct task_struct *last_task_used_altivec;
1237
1238/*
1239 * this is the minimum allowable io space due to the location
1240 * of the io areas on prep (first one at 0x80000000) but
1241 * as soon as I get around to remapping the io areas with the BATs
1242 * to match the mac we can raise this. -- Cort
1243 */
1244#define TASK_SIZE (0x80000000UL)
1245
1246/* This decides where the kernel will search for a free chunk of vm
1247 * space during mmap's.
1248 */
1249#define TASK_UNMAPPED_BASE (TASK_SIZE / 8 * 3)
1250
1251typedef struct {
1252 unsigned long seg;
1253} mm_segment_t;
1254
1255struct thread_struct {
1256 unsigned long ksp; /* Kernel stack pointer */
1257 unsigned long wchan; /* Event task is sleeping on */
1258 struct pt_regs *regs; /* Pointer to saved register state */
1259 mm_segment_t fs; /* for get_fs() validation */
1260 void *pgdir; /* root of page-table tree */
1261 signed long last_syscall;
1262 double fpr[32]; /* Complete floating point set */
1263 unsigned long fpscr_pad; /* fpr ... fpscr must be contiguous */
1264 unsigned long fpscr; /* Floating point status */
1265#ifdef CONFIG_ALTIVEC
1266 vector128 vr[32]; /* Complete AltiVec set */
1267 vector128 vscr; /* AltiVec status */
1268 unsigned long vrsave;
1269#endif /* CONFIG_ALTIVEC */
1270};
1271
1272#define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack)
1273
1274#define INIT_THREAD { \
1275 INIT_SP, /* ksp */ \
1276 0, /* wchan */ \
1277 (struct pt_regs *)INIT_SP - 1, /* regs */ \
1278 KERNEL_DS, /*fs*/ \
1279 swapper_pg_dir, /* pgdir */ \
1280 0, /* last_syscall */ \
1281 {0}, 0, 0 \
1282}
1283
1284/*
1285 * Note: the vm_start and vm_end fields here should *not*
1286 * be in kernel space. (Could vm_end == vm_start perhaps?)
1287 */
1288#define INIT_MMAP { &init_mm, 0, 0x1000, NULL, \
1289 PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, \
1290 1, NULL, NULL }
1291
1292/*
1293 * Return saved PC of a blocked thread. For now, this is the "user" PC
1294 */
1295static inline unsigned long thread_saved_pc(struct thread_struct *t)
1296{
1297 return (t->regs) ? t->regs->nip : 0;
1298}
1299
1300#define copy_segments(tsk, mm) do { } while (0)
1301#define release_segments(mm) do { } while (0)
1302#define forget_segments() do { } while (0)
1303
1304unsigned long get_wchan(struct task_struct *p);
1305
1306#define KSTK_EIP(tsk) ((tsk)->thread.regs->nip)
1307#define KSTK_ESP(tsk) ((tsk)->thread.regs->gpr[1])
1308
1309/*
1310 * NOTE! The task struct and the stack go together
1311 */
1312#define THREAD_SIZE (2*PAGE_SIZE)
1313#define alloc_task_struct() \
1314 ((struct task_struct *) __get_free_pages(GFP_KERNEL,1))
1315#define free_task_struct(p) free_pages((unsigned long)(p),1)
1316#define get_task_struct(tsk) atomic_inc(&mem_map[MAP_NR(tsk)].count)
1317
1318/* in process.c - for early bootup debug -- Cort */
1319int ll_printk(const char *, ...);
1320void ll_puts(const char *);
1321
1322#define init_task (init_task_union.task)
1323#define init_stack (init_task_union.stack)
1324
1325/* In misc.c */
1326void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
1327 1207
1208#ifndef CONFIG_CPU_MPC83XX
1328int prt_83xx_rsr(void); 1209int prt_83xx_rsr(void);
1210#endif
1329 1211
1330#endif /* ndef ASSEMBLY*/ 1212#endif /* ndef ASSEMBLY*/
1331 1213