From 403c36ea1fc7c08a4e775a396e757e7f45fb9704 Mon Sep 17 00:00:00 2001 From: Jordan Gordeev Date: Sat, 4 Jul 2009 22:38:53 +0300 Subject: [PATCH] amd64: Change the way I/O APIC's are mapped. --- sys/platform/pc64/amd64/mp_machdep.c | 30 +--------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/sys/platform/pc64/amd64/mp_machdep.c b/sys/platform/pc64/amd64/mp_machdep.c index 64e31cf79a..3155e0c91d 100644 --- a/sys/platform/pc64/amd64/mp_machdep.c +++ b/sys/platform/pc64/amd64/mp_machdep.c @@ -2042,37 +2042,9 @@ default_mp_table(int type) void * permanent_io_mapping(vm_paddr_t pa) { - vm_offset_t vaddr; - int pgeflag; - int i; - KKASSERT(pa < 0x100000000LL); - pgeflag = 0; /* not used for SMP yet */ - - /* - * If the requested physical address has already been incidently - * mapped, just use the existing mapping. Otherwise create a new - * mapping. - */ - for (i = IO_MAPPING_START_INDEX; i < SMPpt_alloc_index; ++i) { - if (((vm_offset_t)SMPpt[i] & PG_FRAME) == - ((vm_offset_t)pa & PG_FRAME)) { - break; - } - } - if (i == SMPpt_alloc_index) { - if (i == NPTEPG - 2) { - panic("permanent_io_mapping: We ran out of space" - " in SMPpt[]!"); - } - SMPpt[i] = (pt_entry_t)(PG_V | PG_RW | pgeflag | - ((vm_offset_t)pa & PG_FRAME)); - ++SMPpt_alloc_index; - } - vaddr = (vm_offset_t)CPU_prvspace + (i * PAGE_SIZE) + - ((vm_offset_t)pa & PAGE_MASK); - return ((void *)vaddr); + return pmap_mapdev_uncacheable(pa, PAGE_SIZE); } /* -- 2.41.0