/* * Derived from "arch/i386/kernel/process.c" * Copyright (C) 1995 Linus Torvalds * * Updated and modified by Cort Dougan (cort@cs.nmt.edu) and * Paul Mackerras (paulus@cs.anu.edu.au) * * PowerPC version * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */#include<linux/errno.h>#include<linux/sched.h>#include<linux/kernel.h>#include<linux/mm.h>#include<linux/smp.h>#include<linux/stddef.h>#include<linux/unistd.h>#include<linux/ptrace.h>#include<linux/slab.h>#include<linux/user.h>#include<linux/elf.h>#include<linux/init.h>#include<linux/prctl.h>#include<linux/init_task.h>#include<linux/export.h>#include<linux/kallsyms.h>#include<linux/mqueue.h>#include<linux/hardirq.h>#include<linux/utsname.h>#include<linux/ftrace.h>#include<linux/kernel_stat.h>#include<linux/personality.h>#include<linux/random.h>#include<linux/hw_breakpoint.h>#include<asm/pgtable.h>#include<asm/uaccess.h>#include<asm/io.h>#include<asm/processor.h>#include<asm/mmu.h>#include<asm/prom.h>#include<asm/machdep.h>#include<asm/time.h>#include<asm/runlatch.h>#include<asm/syscalls.h>#include<asm/switch_to.h>#include<asm/tm.h>#include<asm/debug.h>#ifdef CONFIG_PPC64#include<asm/firmware.h>#endif#include<linux/kprobes.h>#include<linux/kdebug.h>/* Transactional Memory debug */#ifdef TM_DEBUG_SW#define TM_DEBUG(x...) printk(KERN_INFO x)#else#define TM_DEBUG(x...) do { } while(0)#endifexternunsignedlong_get_SP(void);#ifndef CONFIG_SMPstructtask_struct*last_task_used_math=NULL;structtask_struct*last_task_used_altivec=NULL;structtask_