Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/interrupt.h

    r6d7f9bfe r598f90e  
    3737#define KERN_sparc64_INTERRUPT_H_
    3838
    39 #include <arch/types.h>
    40 #include <arch/regdef.h>
     39#include <typedefs.h>
     40#include <arch/istate.h>
    4141
    42 #define IVT_ITEMS       15
    43 #define IVT_FIRST       1
     42#define IVT_ITEMS  15
     43#define IVT_FIRST  1
    4444
    4545/* This needs to be defined for inter-architecture API portability. */
    46 #define VECTOR_TLB_SHOOTDOWN_IPI        0
     46#define VECTOR_TLB_SHOOTDOWN_IPI  0
    4747
    4848enum {
    4949        IPI_TLB_SHOOTDOWN = VECTOR_TLB_SHOOTDOWN_IPI
    50 };             
    51 
    52 typedef struct istate {
    53         uint64_t        tnpc;
    54         uint64_t        tpc;
    55         uint64_t        tstate;
    56 } istate_t;
    57 
    58 static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr)
    59 {
    60         istate->tpc = retaddr;
    61 }
    62 
    63 static inline int istate_from_uspace(istate_t *istate)
    64 {
    65         return !(istate->tstate & TSTATE_PRIV_BIT);
    66 }
    67 
    68 static inline unative_t istate_get_pc(istate_t *istate)
    69 {
    70         return istate->tpc;
    71 }
    72 
    73 static inline unative_t istate_get_fp(istate_t *istate)
    74 {
    75         return 0;       /* TODO */
    76 }
     50};
    7751
    7852#endif
Note: See TracChangeset for help on using the changeset viewer.