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

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

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

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