Changeset 49a39c2 in mainline for arch/mips32/src/exception.c


Ignore:
Timestamp:
2006-02-06T21:14:29Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8a1da55
Parents:
7febdde5
Message:

Preliminary work on AMD userspace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/src/exception.c

    r7febdde5 r49a39c2  
    7979}
    8080
    81 static void unhandled_exception(int n, void *data)
    82 {
    83         struct exception_regdump *pstate = (struct exception_regdump *)data;
    84 
     81static void unhandled_exception(int n, struct exception_regdump *pstate)
     82{
    8583        print_regdump(pstate);
    8684        panic("unhandled exception %s\n", exctable[n]);
    8785}
    8886
    89 static void breakpoint_exception(int n, void *data)
    90 {
    91         struct exception_regdump *pstate = (struct exception_regdump *)data;
    92 
     87static void breakpoint_exception(int n, struct exception_regdump *pstate)
     88{
    9389#ifdef CONFIG_DEBUG
    9490        debugger_bpoint(pstate);
     
    10197}
    10298
    103 static void tlbmod_exception(int n, void *data)
    104 {
    105         struct exception_regdump *pstate = (struct exception_regdump *)data;
     99static void tlbmod_exception(int n, struct exception_regdump *pstate)
     100{
    106101        tlb_modified(pstate);
    107102}
    108103
    109 static void tlbinv_exception(int n, void *data)
    110 {
    111         struct exception_regdump *pstate = (struct exception_regdump *)data;
     104static void tlbinv_exception(int n, struct exception_regdump *pstate)
     105{
    112106        tlb_invalid(pstate);
    113107}
    114108
    115109#ifdef CONFIG_FPU_LAZY
    116 static void cpuns_exception(int n, void *data)
     110static void cpuns_exception(int n, struct exception_regdump *pstate)
    117111{
    118112        if (cp0_cause_coperr(cp0_cause_read()) == fpu_cop_id)
     
    123117#endif
    124118
    125 static void interrupt_exception(int n, void *pstate)
     119static void interrupt_exception(int n, struct exception_regdump *pstate)
    126120{
    127121        __u32 cause;
     
    138132#include <debug.h>
    139133/** Handle syscall userspace call */
    140 static void syscall_exception(int n, void *data)
    141 {
    142         struct exception_regdump *pstate = (struct exception_regdump *)data;
    143        
     134static void syscall_exception(int n, struct exception_regdump *pstate)
     135{
    144136        if (pstate->a3 < SYSCALL_END)
    145137                pstate->v0 = syscall_table[pstate->a3](pstate->a0,
     
    198190        /* Clear exception table */
    199191        for (i=0;i < IVT_ITEMS; i++)
    200                 exc_register(i, "undef", unhandled_exception);
    201         exc_register(EXC_Bp, "bkpoint", breakpoint_exception);
    202         exc_register(EXC_Mod, "tlb_mod", tlbmod_exception);
    203         exc_register(EXC_TLBL, "tlbinvl", tlbinv_exception);
    204         exc_register(EXC_TLBS, "tlbinvl", tlbinv_exception);
    205         exc_register(EXC_Int, "interrupt", interrupt_exception);
     192                exc_register(i, "undef", (iroutine) unhandled_exception);
     193        exc_register(EXC_Bp, "bkpoint", (iroutine) breakpoint_exception);
     194        exc_register(EXC_Mod, "tlb_mod", (iroutine) tlbmod_exception);
     195        exc_register(EXC_TLBL, "tlbinvl", (iroutine) tlbinv_exception);
     196        exc_register(EXC_TLBS, "tlbinvl", (iroutine) tlbinv_exception);
     197        exc_register(EXC_Int, "interrupt", (iroutine) interrupt_exception);
    206198#ifdef CONFIG_FPU_LAZY
    207         exc_register(EXC_CpU, "cpunus", cpuns_exception);
     199        exc_register(EXC_CpU, "cpunus", (iroutine) cpuns_exception);
    208200#endif
    209         exc_register(EXC_Sys, "syscall", syscall_exception);
    210 }
     201        exc_register(EXC_Sys, "syscall", (iroutine) syscall_exception);
     202}
Note: See TracChangeset for help on using the changeset viewer.