Changeset 169587a in mainline for arch/ia32/src


Ignore:
Timestamp:
2005-02-21T21:47:22Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b109ebb
Parents:
0ded477
Message:

TLB shootdown.

Location:
arch/ia32/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/ia32.c

    r0ded477 r169587a  
    5757               
    5858                trap_register(VECTOR_SYSCALL, syscall);
     59               
     60                #ifdef __SMP__
     61                trap_register(VECTOR_TLB_SHUTDOWN, tlb_shutdown_ipi);
     62                #endif /* __SMP__ */
    5963        }
    6064}
  • arch/ia32/src/interrupt.c

    r0ded477 r169587a  
    3434#include <cpu.h>
    3535#include <arch/asm.h>
     36#include <mm/tlb.h>
    3637
    3738/*
     
    9495}
    9596
     97void tlb_shutdown_ipi(__u8 n, __u32 stack[])
     98{
     99        trap_virtual_eoi();
     100        tlb_shutdown_ipi_recv();
     101}
     102
    96103void trap_virtual_enable_irqs(__u16 irqmask)
    97104{
  • arch/ia32/src/mm/page.c

    r0ded477 r169587a  
    135135        pt[pte].uaccessible = (flags & PAGE_USER) != 0;
    136136        pt[pte].writeable = (flags & PAGE_WRITE) != 0; 
    137        
    138         tlb_invalidate(0);
    139137}
  • arch/ia32/src/mm/tlb.c

    r0ded477 r169587a  
    3030#include <arch/asm.h>
    3131
     32#ifdef __SMP__
     33#include <arch/apic.h>
     34#include <arch/interrupt.h>
     35#endif /* __SMP__ */
     36
    3237void tlb_invalidate(int asid)
    3338{
    3439        cpu_write_dba(cpu_read_dba());
    3540}
     41
     42#ifdef __SMP__
     43void tlb_shutdown_ipi_send(void)
     44{
     45        (void) l_apic_broadcast_custom_ipi(VECTOR_TLB_SHUTDOWN);
     46}
     47#endif /* __SMP__ */
  • arch/ia32/src/smp/apic.c

    r0ded477 r169587a  
    143143
    144144/*
     145 * Send all CPUs excluding the->cpu IPI vector.
     146 */
     147int l_apic_broadcast_custom_ipi(__u8 vector)
     148{
     149        __u32 lo;
     150
     151        /*
     152         * Read the ICR register in and zero all non-reserved fields.
     153         */
     154        lo = l_apic[ICRlo] & ICRloClear;
     155
     156        lo |= DLVRMODE_FIXED | DESTMODE_LOGIC | LEVEL_ASSERT | SHORTHAND_EXCL | TRGRMODE_LEVEL | vector;
     157       
     158        l_apic[ICRlo] = lo;
     159
     160        lo = l_apic[ICRlo] & ICRloClear;
     161        if (lo & SEND_PENDING)
     162                printf("IPI is pending.\n");
     163
     164        return apic_poll_errors();
     165}
     166
     167/*
    145168 * Universal Start-up Algorithm for bringing up the AP processors.
    146169 */
Note: See TracChangeset for help on using the changeset viewer.