~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/microblaze/include/asm/processor.h

Version: ~ [ linux-5.12 ] ~ [ linux-5.11.16 ] ~ [ linux-5.10.32 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.114 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.188 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.231 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.267 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.267 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
  3  * Copyright (C) 2008-2009 PetaLogix
  4  * Copyright (C) 2006 Atmark Techno, Inc.
  5  *
  6  * This file is subject to the terms and conditions of the GNU General Public
  7  * License. See the file "COPYING" in the main directory of this archive
  8  * for more details.
  9  */
 10 
 11 #ifndef _ASM_MICROBLAZE_PROCESSOR_H
 12 #define _ASM_MICROBLAZE_PROCESSOR_H
 13 
 14 #include <asm/ptrace.h>
 15 #include <asm/setup.h>
 16 #include <asm/registers.h>
 17 #include <asm/entry.h>
 18 #include <asm/current.h>
 19 
 20 # ifndef __ASSEMBLY__
 21 /* from kernel/cpu/mb.c */
 22 extern const struct seq_operations cpuinfo_op;
 23 
 24 # define cpu_relax()            barrier()
 25 
 26 #define task_pt_regs(tsk) \
 27                 (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1)
 28 
 29 /* Do necessary setup to start up a newly executed thread. */
 30 void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp);
 31 
 32 extern void ret_from_fork(void);
 33 extern void ret_from_kernel_thread(void);
 34 
 35 # endif /* __ASSEMBLY__ */
 36 
 37 # ifndef CONFIG_MMU
 38 /*
 39  * User space process size: memory size
 40  *
 41  * TASK_SIZE on MMU cpu is usually 1GB. However, on no-MMU arch, both
 42  * user processes and the kernel is on the same memory region. They
 43  * both share the memory space and that is limited by the amount of
 44  * physical memory. thus, we set TASK_SIZE == amount of total memory.
 45  */
 46 # define TASK_SIZE      (0x81000000 - 0x80000000)
 47 
 48 /*
 49  * Default implementation of macro that returns current
 50  * instruction pointer ("program counter").
 51  */
 52 # define current_text_addr() ({ __label__ _l; _l: &&_l; })
 53 
 54 /*
 55  * This decides where the kernel will search for a free chunk of vm
 56  * space during mmap's. We won't be using it
 57  */
 58 # define TASK_UNMAPPED_BASE     0
 59 
 60 /* definition in include/linux/sched.h */
 61 struct task_struct;
 62 
 63 /* thread_struct is gone. use thread_info instead. */
 64 struct thread_struct { };
 65 # define INIT_THREAD    { }
 66 
 67 /* Free all resources held by a thread. */
 68 static inline void release_thread(struct task_struct *dead_task)
 69 {
 70 }
 71 
 72 /* Free all resources held by a thread. */
 73 static inline void exit_thread(void)
 74 {
 75 }
 76 
 77 extern unsigned long thread_saved_pc(struct task_struct *t);
 78 
 79 extern unsigned long get_wchan(struct task_struct *p);
 80 
 81 # define KSTK_EIP(tsk)  (0)
 82 # define KSTK_ESP(tsk)  (0)
 83 
 84 # else /* CONFIG_MMU */
 85 
 86 /*
 87  * This is used to define STACK_TOP, and with MMU it must be below
 88  * kernel base to select the correct PGD when handling MMU exceptions.
 89  */
 90 # define TASK_SIZE      (CONFIG_KERNEL_START)
 91 
 92 /*
 93  * This decides where the kernel will search for a free chunk of vm
 94  * space during mmap's.
 95  */
 96 # define TASK_UNMAPPED_BASE     (TASK_SIZE / 8 * 3)
 97 
 98 # define THREAD_KSP     0
 99 
100 #  ifndef __ASSEMBLY__
101 
102 /*
103  * Default implementation of macro that returns current
104  * instruction pointer ("program counter").
105  */
106 #  define current_text_addr()   ({ __label__ _l; _l: &&_l; })
107 
108 /* If you change this, you must change the associated assembly-languages
109  * constants defined below, THREAD_*.
110  */
111 struct thread_struct {
112         /* kernel stack pointer (must be first field in structure) */
113         unsigned long   ksp;
114         unsigned long   ksp_limit;      /* if ksp <= ksp_limit stack overflow */
115         void            *pgdir;         /* root of page-table tree */
116         struct pt_regs  *regs;          /* Pointer to saved register state */
117 };
118 
119 #  define INIT_THREAD { \
120         .ksp   = sizeof init_stack + (unsigned long)init_stack, \
121         .pgdir = swapper_pg_dir, \
122 }
123 
124 /* Free all resources held by a thread. */
125 extern inline void release_thread(struct task_struct *dead_task)
126 {
127 }
128 
129 /* Free current thread data structures etc.  */
130 static inline void exit_thread(void)
131 {
132 }
133 
134 /* Return saved (kernel) PC of a blocked thread.  */
135 #  define thread_saved_pc(tsk)  \
136         ((tsk)->thread.regs ? (tsk)->thread.regs->r15 : 0)
137 
138 unsigned long get_wchan(struct task_struct *p);
139 
140 /* The size allocated for kernel stacks. This _must_ be a power of two! */
141 # define KERNEL_STACK_SIZE      0x2000
142 
143 /* Return some info about the user process TASK.  */
144 #  define task_tos(task)        ((unsigned long)(task) + KERNEL_STACK_SIZE)
145 #  define task_regs(task) ((struct pt_regs *)task_tos(task) - 1)
146 
147 #  define task_pt_regs_plus_args(tsk) \
148         ((void *)task_pt_regs(tsk))
149 
150 #  define task_sp(task) (task_regs(task)->r1)
151 #  define task_pc(task) (task_regs(task)->pc)
152 /* Grotty old names for some.  */
153 #  define KSTK_EIP(task)        (task_pc(task))
154 #  define KSTK_ESP(task)        (task_sp(task))
155 
156 /* FIXME */
157 #  define deactivate_mm(tsk, mm)        do { } while (0)
158 
159 #  define STACK_TOP     TASK_SIZE
160 #  define STACK_TOP_MAX STACK_TOP
161 
162 #ifdef CONFIG_DEBUG_FS
163 extern struct dentry *of_debugfs_root;
164 #endif
165 
166 #  endif /* __ASSEMBLY__ */
167 # endif /* CONFIG_MMU */
168 #endif /* _ASM_MICROBLAZE_PROCESSOR_H */
169 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp