Subversion Repositories HelenOS

Rev

Rev 6 | Rev 11 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6 Rev 7
Line 25... Line 25...
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
#include <mm/tlb.h>
29
#include <mm/tlb.h>
-
 
30
#include <smp/ipi.h>
30
#include <synch/spinlock.h>
31
#include <synch/spinlock.h>
31
#include <typedefs.h>
32
#include <typedefs.h>
32
#include <arch/atomic.h>
33
#include <arch/atomic.h>
-
 
34
#include <arch/interrupt.h>
33
#include <config.h>
35
#include <config.h>
34
 
36
 
35
#ifdef __SMP__
37
#ifdef __SMP__
36
static spinlock_t tlblock;
38
static spinlock_t tlblock;
37
static volatile int tlb_shootdown_cnt;
39
static volatile int tlb_shootdown_cnt;
Line 57... Line 59...
57
void tlb_shootdown_finalize(void)
59
void tlb_shootdown_finalize(void)
58
{
60
{
59
    spinlock_unlock(&tlblock);
61
    spinlock_unlock(&tlblock);
60
}
62
}
61
 
63
 
-
 
64
void tlb_shootdown_ipi_send(void)
-
 
65
{
-
 
66
    ipi_broadcast(VECTOR_TLB_SHOOTDOWN_IPI);
-
 
67
}
-
 
68
 
62
void tlb_shootdown_ipi_recv(void)
69
void tlb_shootdown_ipi_recv(void)
63
{
70
{
64
    atomic_inc((int *) &tlb_shootdown_cnt);
71
    atomic_inc((int *) &tlb_shootdown_cnt);
65
    spinlock_lock(&tlblock);
72
    spinlock_lock(&tlblock);
66
    spinlock_unlock(&tlblock);
73
    spinlock_unlock(&tlblock);