Subversion Repositories HelenOS

Rev

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

Rev 2089 Rev 2133
Line 76... Line 76...
76
 * @param type Type describing scope of shootdown.
76
 * @param type Type describing scope of shootdown.
77
 * @param asid Address space, if required by type.
77
 * @param asid Address space, if required by type.
78
 * @param page Virtual page address, if required by type.
78
 * @param page Virtual page address, if required by type.
79
 * @param count Number of pages, if required by type.
79
 * @param count Number of pages, if required by type.
80
 */
80
 */
81
void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, uintptr_t page, count_t count)
81
void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid,
-
 
82
    uintptr_t page, count_t count)
82
{
83
{
83
    int i;
84
    int i;
84
 
85
 
85
    CPU->tlb_active = 0;
86
    CPU->tlb_active = 0;
86
    spinlock_lock(&tlblock);
87
    spinlock_lock(&tlblock);
Line 105... Line 106...
105
            cpu->tlb_messages[0].count = 0;
106
            cpu->tlb_messages[0].count = 0;
106
        } else {
107
        } else {
107
            /*
108
            /*
108
             * Enqueue the message.
109
             * Enqueue the message.
109
             */
110
             */
110
            cpu->tlb_messages[cpu->tlb_messages_count].type = type;
111
            index_t idx = cpu->tlb_messages_count++;
111
            cpu->tlb_messages[cpu->tlb_messages_count].asid = asid;
112
            cpu->tlb_messages[idx].type = type;
112
            cpu->tlb_messages[cpu->tlb_messages_count].page = page;
113
            cpu->tlb_messages[idx].asid = asid;
113
            cpu->tlb_messages[cpu->tlb_messages_count].count = count;
114
            cpu->tlb_messages[idx].page = page;
114
            cpu->tlb_messages_count++;
115
            cpu->tlb_messages[idx].count = count;
115
        }
116
        }
116
        spinlock_unlock(&cpu->lock);
117
        spinlock_unlock(&cpu->lock);
117
    }
118
    }
118
   
119
   
119
    tlb_shootdown_ipi_send();
120
    tlb_shootdown_ipi_send();