static void ghes_iounmap_irq(void __iomem *vaddr_ptr) { unsigned long vaddr = (unsigned long __force)vaddr_ptr; void *base = ghes_ioremap_area->addr; BUG_ON(vaddr != (unsigned long)GHES_IOREMAP_IRQ_PAGE(base)); unmap_kernel_range_noflush(vaddr, PAGE_SIZE); __flush_tlb_one(vaddr); }
static void __iomem *ghes_ioremap_pfn_irq(u64 pfn) { unsigned long vaddr; vaddr = (unsigned long)GHES_IOREMAP_IRQ_PAGE(ghes_ioremap_area->addr); ioremap_page_range(vaddr, vaddr + PAGE_SIZE, pfn << PAGE_SHIFT, PAGE_KERNEL); return (void __iomem *)vaddr; }
static void __iomem *ghes_ioremap_pfn_irq(u64 pfn) { unsigned long vaddr, paddr; pgprot_t prot; vaddr = (unsigned long)GHES_IOREMAP_IRQ_PAGE(ghes_ioremap_area->addr); paddr = pfn << PAGE_SHIFT; prot = arch_apei_get_mem_attribute(paddr); ioremap_page_range(vaddr, vaddr + PAGE_SIZE, paddr, prot); return (void __iomem *)vaddr; }