From c39819f05f7d5fa2a92a821ea0f6615b8c0f8e11 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 2 May 2007 15:40:15 +0000 Subject: MFC: Add 'pmap_invalidate_cache()'. --- sys/i386/include/apicvar.h | 7 ++++--- sys/i386/include/pmap.h | 1 + sys/i386/include/smp.h | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'sys/i386/include') diff --git a/sys/i386/include/apicvar.h b/sys/i386/include/apicvar.h index 1f9755a..f74c578 100644 --- a/sys/i386/include/apicvar.h +++ b/sys/i386/include/apicvar.h @@ -116,9 +116,10 @@ #define IPI_INVLTLB (APIC_IPI_INTS + 1) /* TLB Shootdown IPIs */ #define IPI_INVLPG (APIC_IPI_INTS + 2) #define IPI_INVLRNG (APIC_IPI_INTS + 3) -#define IPI_LAZYPMAP (APIC_IPI_INTS + 4) /* Lazy pmap release. */ +#define IPI_INVLCACHE (APIC_IPI_INTS + 4) +#define IPI_LAZYPMAP (APIC_IPI_INTS + 5) /* Lazy pmap release. */ /* Vector to handle bitmap based IPIs */ -#define IPI_BITMAP_VECTOR (APIC_IPI_INTS + 5) +#define IPI_BITMAP_VECTOR (APIC_IPI_INTS + 6) /* IPIs handled by IPI_BITMAPED_VECTOR (XXX ups is there a better place?) */ #define IPI_AST 0 /* Generate software trap. */ @@ -126,7 +127,7 @@ #define IPI_BITMAP_LAST IPI_PREEMPT #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) -#define IPI_STOP (APIC_IPI_INTS + 6) /* Stop CPU until restarted. */ +#define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ /* * The spurious interrupt can share the priority class with the IPIs since diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 0324658..1190809 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -366,6 +366,7 @@ void pmap_set_pg(void); void pmap_invalidate_page(pmap_t, vm_offset_t); void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); void pmap_invalidate_all(pmap_t); +void pmap_invalidate_cache(void); #endif /* _KERNEL */ diff --git a/sys/i386/include/smp.h b/sys/i386/include/smp.h index 4c9ae76..095fa8a 100644 --- a/sys/i386/include/smp.h +++ b/sys/i386/include/smp.h @@ -55,6 +55,7 @@ inthand_t IDTVEC(invltlb), /* TLB shootdowns - global */ IDTVEC(invlpg), /* TLB shootdowns - 1 page */ IDTVEC(invlrng), /* TLB shootdowns - page range */ + IDTVEC(invlcache), /* Write back and invalidate cache */ IDTVEC(ipi_intr_bitmap_handler), /* Bitmap based IPIs */ IDTVEC(cpustop), /* CPU stops & waits to be restarted */ IDTVEC(rendezvous), /* handle CPU rendezvous */ @@ -71,6 +72,7 @@ void ipi_bitmap_handler(struct clockframe frame); u_int mp_bootaddress(u_int); int mp_grab_cpu_hlt(void); void mp_topology(void); +void smp_cache_flush(void); void smp_invlpg(vm_offset_t addr); void smp_masked_invlpg(u_int mask, vm_offset_t addr); void smp_invlpg_range(vm_offset_t startva, vm_offset_t endva); -- cgit v1.1