Ifdef out label used only by !__HAVE_MM_MD_DIRECT_MAPPED_PHYS.

This commit is contained in:
riastradh 2018-08-27 15:28:53 +00:00
parent e2c32ec7df
commit e77f4c01ec
1 changed files with 14 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_kmap.c,v 1.15 2018/08/27 15:13:17 riastradh Exp $ */
/* $NetBSD: linux_kmap.c,v 1.16 2018/08/27 15:28:53 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_kmap.c,v 1.15 2018/08/27 15:13:17 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_kmap.c,v 1.16 2018/08/27 15:28:53 riastradh Exp $");
#include <sys/types.h>
#include <sys/kmem.h>
@ -166,7 +166,10 @@ kmap_atomic(struct page *page)
pmap_kenter_pa(vaddr, paddr, (VM_PROT_READ | VM_PROT_WRITE), 0);
pmap_update(pmap_kernel());
out: SDT_PROBE2(sdt, linux, kmap, map__atomic, paddr, vaddr);
#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
out:
#endif
SDT_PROBE2(sdt, linux, kmap, map__atomic, paddr, vaddr);
return (void *)vaddr;
}
@ -231,7 +234,10 @@ kmap(struct page *page)
pmap_kenter_pa(vaddr, paddr, (VM_PROT_READ | VM_PROT_WRITE), 0);
pmap_update(pmap_kernel());
out: SDT_PROBE2(sdt, linux, kmap, map, paddr, vaddr);
#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
out:
#endif
SDT_PROBE2(sdt, linux, kmap, map, paddr, vaddr);
return (void *)vaddr;
}
@ -265,5 +271,8 @@ kunmap(struct page *page)
uvm_km_free(kernel_map, vaddr, PAGE_SIZE, UVM_KMF_VAONLY);
out: SDT_PROBE2(sdt, linux, kmap, unmap, paddr, vaddr);
#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
out:
#endif
SDT_PROBE2(sdt, linux, kmap, unmap, paddr, vaddr);
}