Changeset 8e7c9fe in mainline for kernel/arch/ppc32/src/interrupt.c


Ignore:
Timestamp:
2014-09-12T03:45:25Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c53b58e
Parents:
3eb0c85 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

most usb changes were reverted. blink and usbmass were fixed
known problems:
ehci won't initialize
usbmast asserts on unmount (happens on mainline too)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/interrupt.c

    r3eb0c85 r8e7c9fe  
    3636#include <interrupt.h>
    3737#include <arch/interrupt.h>
     38#include <arch/istate.h>
    3839#include <typedefs.h>
    3940#include <arch.h>
    40 #include <time/clock.h>
    4141#include <ipc/sysipc.h>
    4242#include <arch/drivers/pic.h>
     
    4646#include <log.h>
    4747
    48 void start_decrementer(void)
     48static uint32_t decrementer_value;
     49
     50void decrementer_start(uint32_t val)
     51{
     52        decrementer_value = val;
     53        decrementer_restart();
     54}
     55
     56void decrementer_restart(void)
    4957{
    5058        asm volatile (
    5159                "mtdec %[dec]\n"
    52                 :: [dec] "r" (1000)
     60                :: [dec] "r" (decrementer_value)
    5361        );
    5462}
     
    104112{
    105113        uint8_t inum;
    106        
     114
    107115        while ((inum = pic_get_pending()) != 255) {
    108116                irq_t *irq = irq_dispatch_and_lock(inum);
     
    138146}
    139147
     148static void exception_fp_unavailable(unsigned int n, istate_t *istate)
     149{
     150#ifdef CONFIG_FPU_LAZY
     151        scheduler_fpu_lazy_request();
     152        /*
     153         * Propagate MSR_FP from MSR back to istate's SRR1, which will become
     154         * the next MSR.
     155         */
     156        istate->srr1 |= msr_read() & MSR_FP;
     157#else
     158        fault_if_from_uspace(istate, "FPU fault.");
     159        panic_badtrap(istate, n, "FPU fault.");
     160#endif
     161}
     162
    140163static void exception_decrementer(unsigned int n, istate_t *istate)
    141164{
    142         start_decrementer();
     165        decrementer_restart();
    143166        clock();
    144167}
     
    153176        exc_register(VECTOR_EXTERNAL, "external", true,
    154177            exception_external);
     178        exc_register(VECTOR_FP_UNAVAILABLE, "fp_unavailable", true,
     179            exception_fp_unavailable);
    155180        exc_register(VECTOR_DECREMENTER, "timer", true,
    156181            exception_decrementer);
Note: See TracChangeset for help on using the changeset viewer.