root/include/asm-sparc/processor.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. thread_saved_pc

   1 /* $Id: processor.h,v 1.29 1995/11/26 05:01:29 davem Exp $
   2  * include/asm-sparc/processor.h
   3  *
   4  * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
   5  */
   6 
   7 #ifndef __ASM_SPARC_PROCESSOR_H
   8 #define __ASM_SPARC_PROCESSOR_H
   9 
  10 #include <linux/string.h>
  11 
  12 #include <asm/psr.h>
  13 #include <asm/ptrace.h>
  14 #include <asm/head.h>
  15 #include <asm/signal.h>
  16 
  17 /*
  18  * Bus types
  19  */
  20 #define EISA_bus 0
  21 #define EISA_bus__is_a_macro /* for versions in ksyms.c */
  22 #define MCA_bus 0
  23 #define MCA_bus__is_a_macro /* for versions in ksyms.c */
  24 
  25 /*
  26  * Write Protection works right in supervisor mode on the Sparc...
  27  * And then there came the Swift module, which isn't so swift...
  28  */
  29 extern char wp_works_ok;
  30 
  31 /* Whee, this is STACK_TOP and the lowest kernel address too... */
  32 #define TASK_SIZE       (KERNBASE)
  33 
  34 /* The Sparc processor specific thread struct. */
  35 struct thread_struct {
  36         unsigned long uwinmask __attribute__ ((aligned (8)));
  37 
  38         /* For signal handling */
  39         unsigned long sig_address __attribute__ ((aligned (8)));
  40         unsigned long sig_desc;
  41 
  42         /* Context switch saved kernel state. */
  43         unsigned long ksp __attribute__ ((aligned (8)));
  44         unsigned long kpc;
  45         unsigned long kpsr;
  46         unsigned long kwim;
  47 
  48         /* A place to store user windows and stack pointers
  49          * when the stack needs inspection.
  50          */
  51 #define NSWINS 8
  52         struct reg_window reg_window[NSWINS] __attribute__ ((aligned (8)));
  53         unsigned long rwbuf_stkptrs[NSWINS] __attribute__ ((aligned (8)));
  54         unsigned long w_saved;
  55 
  56         /* Where our page table lives. */
  57         unsigned long pgd_ptr;
  58 
  59         /* The context currently allocated to this process
  60          * or -1 if no context has been allocated to this
  61          * task yet.
  62          */
  63         int context;
  64 
  65         /* Floating point regs */
  66         unsigned long   float_regs[64] __attribute__ ((aligned (8)));
  67         unsigned long   fsr;
  68         unsigned long   fpqdepth;
  69         struct fpq {
  70                 unsigned long *insn_addr;
  71                 unsigned long insn;
  72         } fpqueue[16];
  73         struct sigstack sstk_info;
  74 };
  75 
  76 #define INIT_MMAP { &init_mm, (0xf0000000UL), (0xfe100000UL), \
  77                     __pgprot(0x0) , VM_READ | VM_WRITE | VM_EXEC }
  78 
  79 #define INIT_TSS  { \
  80 /* uwinmask, sig_address, sig_desc, ksp, kpc, kpsr, kwim */ \
  81    0,        0,           0,        0,   0,   0,    0, \
  82 /* reg_window */  \
  83 { { { 0, }, { 0, } }, }, \
  84 /* rwbuf_stkptrs */  \
  85 { 0, 0, 0, 0, 0, 0, 0, 0, }, \
  86 /* w_saved, pgd_ptr,                context */  \
  87    0,       (long) &swapper_pg_dir, -1, \
  88 /* FPU regs */   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
  89                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
  90                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
  91                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, \
  92 /* FPU status, FPU qdepth, FPU queue */ \
  93    0,          0,  { { 0, 0, }, }, \
  94 /* sstk_info */ \
  95 { 0, 0, }, \
  96 }
  97 
  98 /* Return saved PC of a blocked thread. */
  99 extern inline unsigned long thread_saved_pc(struct thread_struct *t)
     /* [previous][next][first][last][top][bottom][index][help] */
 100 {
 101         return ((struct pt_regs *)
 102                 ((t->ksp&(~0xfff))+(0x1000-TRACEREG_SZ)))->pc;
 103 }
 104 
 105 /*
 106  * Do necessary setup to start up a newly executed thread.
 107  */
 108 extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp);
 109 
 110 #endif /* __ASM_SPARC_PROCESSOR_H */
 111 

/* [previous][next][first][last][top][bottom][index][help] */