blob: fe9ee7612beab8b956907d12dfa9c049b4e46f85 [file] [log] [blame]
Raghu Gandham82fa43f2012-03-27 11:37:17 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _ASM_PROCESSOR_H
20#define _ASM_PROCESSOR_H
21#include <linux/cpumask.h>
22#include <linux/threads.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <asm/cachectl.h>
25#include <asm/cpu.h>
26#include <asm/cpu-info.h>
27#include <asm/mipsregs.h>
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#include <asm/prefetch.h>
30#include <asm/system.h>
31#define current_text_addr() ({ __label__ _l; _l: &&_l;})
Raghu Gandham988ff8f2012-09-21 17:13:25 -070032#define TASK_SIZE 0x7fff8000UL
Raghu Gandham82fa43f2012-03-27 11:37:17 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham988ff8f2012-09-21 17:13:25 -070034#define STACK_TOP TASK_SIZE
35#define TASK_UNMAPPED_BASE ((TASK_SIZE / 3) & ~(PAGE_SIZE))
36#define NUM_FPU_REGS 32
Raghu Gandham82fa43f2012-03-27 11:37:17 -070037typedef __u64 fpureg_t;
Raghu Gandham988ff8f2012-09-21 17:13:25 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham82fa43f2012-03-27 11:37:17 -070039struct mips_fpu_struct {
40 fpureg_t fpr[NUM_FPU_REGS];
41 unsigned int fcr31;
Raghu Gandham82fa43f2012-03-27 11:37:17 -070042};
Raghu Gandham988ff8f2012-09-21 17:13:25 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham82fa43f2012-03-27 11:37:17 -070044#define NUM_DSP_REGS 6
45typedef __u32 dspreg_t;
46struct mips_dsp_state {
Raghu Gandham82fa43f2012-03-27 11:37:17 -070047 dspreg_t dspr[NUM_DSP_REGS];
Raghu Gandham988ff8f2012-09-21 17:13:25 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham82fa43f2012-03-27 11:37:17 -070049 unsigned int dspcontrol;
50};
51#define INIT_CPUMASK { {0,} }
Raghu Gandham82fa43f2012-03-27 11:37:17 -070052typedef struct {
Raghu Gandham988ff8f2012-09-21 17:13:25 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham82fa43f2012-03-27 11:37:17 -070054 unsigned long seg;
55} mm_segment_t;
56#define ARCH_MIN_TASKALIGN 8
Raghu Gandham82fa43f2012-03-27 11:37:17 -070057struct mips_abi;
Raghu Gandham988ff8f2012-09-21 17:13:25 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham82fa43f2012-03-27 11:37:17 -070059struct thread_struct {
60 unsigned long reg16;
61 unsigned long reg17, reg18, reg19, reg20, reg21, reg22, reg23;
Raghu Gandham82fa43f2012-03-27 11:37:17 -070062 unsigned long reg29, reg30, reg31;
Raghu Gandham988ff8f2012-09-21 17:13:25 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham82fa43f2012-03-27 11:37:17 -070064 unsigned long cp0_status;
65 struct mips_fpu_struct fpu;
66 struct mips_dsp_state dsp;
Raghu Gandham82fa43f2012-03-27 11:37:17 -070067 unsigned long cp0_badvaddr;
Raghu Gandham988ff8f2012-09-21 17:13:25 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham82fa43f2012-03-27 11:37:17 -070069 unsigned long cp0_baduaddr;
70 unsigned long error_code;
71 unsigned long trap_no;
Raghu Gandham82fa43f2012-03-27 11:37:17 -070072 unsigned long irix_trampoline;
Raghu Gandham988ff8f2012-09-21 17:13:25 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham82fa43f2012-03-27 11:37:17 -070074 unsigned long irix_oldctx;
75 struct mips_abi *abi;
76};
Raghu Gandham82fa43f2012-03-27 11:37:17 -070077#define FPAFF_INIT
Raghu Gandham988ff8f2012-09-21 17:13:25 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham82fa43f2012-03-27 11:37:17 -070079#define INIT_THREAD { .reg16 = 0, .reg17 = 0, .reg18 = 0, .reg19 = 0, .reg20 = 0, .reg21 = 0, .reg22 = 0, .reg23 = 0, .reg29 = 0, .reg30 = 0, .reg31 = 0, .cp0_status = 0, .fpu = { .fpr = {0,}, .fcr31 = 0, }, FPAFF_INIT .dsp = { .dspr = {0, }, .dspcontrol = 0, }, .cp0_badvaddr = 0, .cp0_baduaddr = 0, .error_code = 0, .trap_no = 0, .irix_trampoline = 0, .irix_oldctx = 0, }
80struct task_struct;
81#define release_thread(thread) do { } while(0)
Raghu Gandham82fa43f2012-03-27 11:37:17 -070082#define prepare_to_copy(tsk) do { } while (0)
Raghu Gandham988ff8f2012-09-21 17:13:25 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham82fa43f2012-03-27 11:37:17 -070084#define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + THREAD_SIZE - 32)
85#define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk) - 1)
86#define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc)
Raghu Gandham82fa43f2012-03-27 11:37:17 -070087#define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29])
Raghu Gandham988ff8f2012-09-21 17:13:25 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Raghu Gandham82fa43f2012-03-27 11:37:17 -070089#define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status)
90#define cpu_relax() barrier()
91#define return_address() ({__asm__ __volatile__("":::"$31");__builtin_return_address(0);})
Raghu Gandham82fa43f2012-03-27 11:37:17 -070092#endif
Raghu Gandham988ff8f2012-09-21 17:13:25 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */