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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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-or-later */
  2 /*
  3  * OpenRISC Linux
  4  *
  5  * Linux architectural port borrowing liberally from similar works of
  6  * others.  All original copyrights apply as per the original source
  7  * declaration.
  8  *
  9  * OpenRISC implementation:
 10  * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
 11  * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
 12  * et al.
 13  */
 14 
 15 #ifndef __ASM_OPENRISC_PROCESSOR_H
 16 #define __ASM_OPENRISC_PROCESSOR_H
 17 
 18 #include <asm/spr_defs.h>
 19 #include <asm/page.h>
 20 #include <asm/ptrace.h>
 21 
 22 #define STACK_TOP       TASK_SIZE
 23 #define STACK_TOP_MAX   STACK_TOP
 24 /* Kernel and user SR register setting */
 25 #define KERNEL_SR (SPR_SR_DME | SPR_SR_IME | SPR_SR_ICE \
 26                    | SPR_SR_DCE | SPR_SR_SM)
 27 #define USER_SR   (SPR_SR_DME | SPR_SR_IME | SPR_SR_ICE \
 28                    | SPR_SR_DCE | SPR_SR_IEE | SPR_SR_TEE)
 29 
 30 /*
 31  * User space process size. This is hardcoded into a few places,
 32  * so don't change it unless you know what you are doing.
 33  */
 34 
 35 #define TASK_SIZE       (0x80000000UL)
 36 
 37 /* This decides where the kernel will search for a free chunk of vm
 38  * space during mmap's.
 39  */
 40 #define TASK_UNMAPPED_BASE      (TASK_SIZE / 8 * 3)
 41 
 42 #ifndef __ASSEMBLY__
 43 
 44 struct task_struct;
 45 
 46 struct thread_struct {
 47         long fpcsr;             /* Floating point control status register. */
 48 };
 49 
 50 /*
 51  * At user->kernel entry, the pt_regs struct is stacked on the top of the
 52  * kernel-stack.  This macro allows us to find those regs for a task.
 53  * Notice that subsequent pt_regs stackings, like recursive interrupts
 54  * occurring while we're in the kernel, won't affect this - only the first
 55  * user->kernel transition registers are reached by this (i.e. not regs
 56  * for running signal handler)
 57  */
 58 #define user_regs(thread_info)  (((struct pt_regs *)((unsigned long)(thread_info) + THREAD_SIZE - STACK_FRAME_OVERHEAD)) - 1)
 59 
 60 /*
 61  * Dito but for the currently running task
 62  */
 63 
 64 #define task_pt_regs(task) user_regs(task_thread_info(task))
 65 
 66 #define INIT_SP         (sizeof(init_stack) + (unsigned long) &init_stack)
 67 
 68 #define INIT_THREAD  { }
 69 
 70 
 71 #define KSTK_EIP(tsk)   (task_pt_regs(tsk)->pc)
 72 #define KSTK_ESP(tsk)   (task_pt_regs(tsk)->sp)
 73 
 74 
 75 void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp);
 76 unsigned long __get_wchan(struct task_struct *p);
 77 void show_registers(struct pt_regs *regs);
 78 
 79 #define cpu_relax()     barrier()
 80 
 81 #endif /* __ASSEMBLY__ */
 82 #endif /* __ASM_OPENRISC_PROCESSOR_H */
 83 

~ [ 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