Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 6dbe7f68 in mainline


Ignore:
Timestamp:
2014-08-25T22:02:52Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
df7f5cea
Parents:
9222f9b
Message:

Only one ppc32 istate_t definition to rule them all.

Location:
kernel
Files:
1 deleted
4 edited

Legend:

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

    r9222f9b r6dbe7f68  
    3636#define KERN_ppc32_INTERRUPT_H_
    3737
    38 #include <arch/exception.h>
     38#include <arch/istate.h>
    3939
    4040#define IVT_ITEMS  16
  • kernel/arch/ppc32/include/arch/istate.h

    r9222f9b r6dbe7f68  
    4040#ifdef KERNEL
    4141
     42#include <typedefs.h>
    4243#include <arch/msr.h>
    4344
    4445#else /* KERNEL */
    4546
     47#include <sys/types.h>
    4648#include <libarch/msr.h>
    4749
     
    8183        uint32_t cr;
    8284        uint32_t pc;
    83         uint32_t msr;
     85        uint32_t srr1;
    8486        uint32_t lr;
    8587        uint32_t ctr;
     
    98100/** Return true if exception happened while in userspace
    99101 *
     102 * The contexts of MSR register was stored in SRR1.
     103 *
    100104 */
    101105NO_TRACE static inline int istate_from_uspace(istate_t *istate)
    102106{
    103         return (istate->msr & MSR_PR) != 0;
     107        return (istate->srr1 & MSR_PR) != 0;
    104108}
    105109
    106 NO_TRACE static inline uintptr_t istate_get_pc(istate_t *istate)
     110NO_TRACE static inline sysarg_t istate_get_pc(istate_t *istate)
    107111{
    108112        return istate->pc;
    109113}
    110114
    111 NO_TRACE static inline uintptr_t istate_get_fp(istate_t *istate)
     115NO_TRACE static inline sysarg_t istate_get_fp(istate_t *istate)
    112116{
    113117        return istate->sp;
    114118}
     119
    115120
    116121#endif
  • kernel/arch/ppc32/src/interrupt.c

    r9222f9b r6dbe7f68  
    3636#include <interrupt.h>
    3737#include <arch/interrupt.h>
     38#include <arch/istate.h>
    3839#include <typedefs.h>
    3940#include <arch.h>
  • kernel/generic/include/interrupt.h

    r9222f9b r6dbe7f68  
    4545#include <ddi/irq.h>
    4646#include <stacktrace.h>
     47#include <arch/istate.h>
    4748
    4849typedef void (* iroutine_t)(unsigned int, istate_t *);
Note: See TracChangeset for help on using the changeset viewer.