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

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

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Process/processor support for the Hexagon architecture
  4  *
  5  * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
  6  */
  7 
  8 #ifndef _ASM_PROCESSOR_H
  9 #define _ASM_PROCESSOR_H
 10 
 11 #ifndef __ASSEMBLY__
 12 
 13 #include <asm/mem-layout.h>
 14 #include <asm/registers.h>
 15 #include <asm/hexagon_vm.h>
 16 
 17 /*  task_struct, defined elsewhere, is the "process descriptor" */
 18 struct task_struct;
 19 
 20 extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
 21 
 22 /*
 23  * thread_struct is supposed to be for context switch data.
 24  * Specifically, to hold the state necessary to perform switch_to...
 25  */
 26 struct thread_struct {
 27         void *switch_sp;
 28 };
 29 
 30 /*
 31  * initializes thread_struct
 32  * The only thing we have in there is switch_sp
 33  * which doesn't really need to be initialized.
 34  */
 35 
 36 #define INIT_THREAD { \
 37 }
 38 
 39 #define cpu_relax() __vmyield()
 40 
 41 /*
 42  * Decides where the kernel will search for a free chunk of vm space during
 43  * mmaps.
 44  * See also arch_get_unmapped_area.
 45  * Doesn't affect if you have MAX_FIXED in the page flags set though...
 46  *
 47  * Apparently the convention is that ld.so will ask for "unmapped" private
 48  * memory to be allocated SOMEWHERE, but it also asks for memory explicitly
 49  * via MAP_FIXED at the lower * addresses starting at VA=0x0.
 50  *
 51  * If the two requests collide, you get authentic segfaulting action, so
 52  * you have to kick the "unmapped" base requests higher up.
 53  */
 54 #define TASK_UNMAPPED_BASE      (PAGE_ALIGN(TASK_SIZE/3))
 55 
 56 
 57 #define task_pt_regs(task) \
 58         ((struct pt_regs *)(task_stack_page(task) + THREAD_SIZE) - 1)
 59 
 60 #define KSTK_EIP(tsk) (pt_elr(task_pt_regs(tsk)))
 61 #define KSTK_ESP(tsk) (pt_psp(task_pt_regs(tsk)))
 62 
 63 extern unsigned long __get_wchan(struct task_struct *p);
 64 
 65 /*  The following stuff is pretty HEXAGON specific.  */
 66 
 67 /*  This is really just here for __switch_to.
 68     Offsets are pulled via asm-offsets.c  */
 69 
 70 /*
 71  * No real reason why VM and native switch stacks should be different.
 72  * Ultimately this should merge.  Note that Rev C. ABI called out only
 73  * R24-27 as callee saved GPRs needing explicit attention (R29-31 being
 74  * dealt with automagically by allocframe), but the current ABI has
 75  * more, R16-R27.  By saving more, the worst case is that we waste some
 76  * cycles if building with the old compilers.
 77  */
 78 
 79 struct hexagon_switch_stack {
 80         union {
 81                 struct {
 82                         unsigned long r16;
 83                         unsigned long r17;
 84                 };
 85                 unsigned long long      r1716;
 86         };
 87         union {
 88                 struct {
 89                         unsigned long r18;
 90                         unsigned long r19;
 91                 };
 92                 unsigned long long      r1918;
 93         };
 94         union {
 95                 struct {
 96                         unsigned long r20;
 97                         unsigned long r21;
 98                 };
 99                 unsigned long long      r2120;
100         };
101         union {
102                 struct {
103                         unsigned long r22;
104                         unsigned long r23;
105                 };
106                 unsigned long long      r2322;
107         };
108         union {
109                 struct {
110                         unsigned long r24;
111                         unsigned long r25;
112                 };
113                 unsigned long long      r2524;
114         };
115         union {
116                 struct {
117                         unsigned long r26;
118                         unsigned long r27;
119                 };
120                 unsigned long long      r2726;
121         };
122 
123         unsigned long           fp;
124         unsigned long           lr;
125 };
126 
127 #endif /* !__ASSEMBLY__ */
128 
129 #endif
130 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php