OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [kernel/] [softirq.c] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1634 jcastillo
/*
2
 *      linux/kernel/softirq.c
3
 *
4
 *      Copyright (C) 1992 Linus Torvalds
5
 *
6
 * do_bottom_half() runs at normal kernel priority: all interrupts
7
 * enabled.  do_bottom_half() is atomic with respect to itself: a
8
 * bottom_half handler need not be re-entrant.
9
 */
10
 
11
#include <linux/ptrace.h>
12
#include <linux/errno.h>
13
#include <linux/kernel_stat.h>
14
#include <linux/signal.h>
15
#include <linux/sched.h>
16
#include <linux/interrupt.h>
17
#include <linux/mm.h>
18
 
19
#include <asm/system.h>
20
#include <asm/io.h>
21
#include <asm/irq.h>
22
#include <asm/bitops.h>
23
 
24
unsigned long intr_count = 0;
25
 
26
int bh_mask_count[32];
27
unsigned long bh_active = 0;
28
unsigned long bh_mask = 0;
29
void (*bh_base[32])(void);
30
 
31
 
32
asmlinkage void do_bottom_half(void)
33
{
34
        unsigned long active;
35
        unsigned long mask, left;
36
        void (**bh)(void);
37
 
38
        sti();
39
        bh = bh_base;
40
        active = bh_active & bh_mask;
41
        for (mask = 1, left = ~0 ; left & active ; bh++,mask += mask,left += left) {
42
                if (mask & active) {
43
                        void (*fn)(void);
44
                        bh_active &= ~mask;
45
                        fn = *bh;
46
                        if (!fn)
47
                                goto bad_bh;
48
                        fn();
49
                }
50
        }
51
/* SIMON: forbidden change of source file - execution error */
52
cli();
53
 
54
        return;
55
bad_bh:
56
        printk ("irq.c:bad bottom half entry %08lx\n", mask);
57
/* SIMON: forbidden change of source file - execution error */
58
cli();
59
 
60
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.