diff options
author | kib <kib@FreeBSD.org> | 2014-08-20 08:02:38 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-08-20 08:02:38 +0000 |
commit | e273edb6ddab14a888af34cde6cc897d3d2e0adc (patch) | |
tree | 6928c16bf61998fe6b84e3c36b876ce1fd2d3751 /sys | |
parent | bbcdd78a0ad0cb703a014b8d139d53bc72469b67 (diff) | |
download | FreeBSD-src-e273edb6ddab14a888af34cde6cc897d3d2e0adc.zip FreeBSD-src-e273edb6ddab14a888af34cde6cc897d3d2e0adc.tar.gz |
Add arch-specific macro SFBUF_PHYS_DMAP(), which should translate the
physical address of the page to direct map address, in case
SFBUF_OPTIONAL_DIRECT_MAP returns true. The case of PowerPC AIM
64bit, where the page physical address is identical to the direct map
address, is accidental.
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys')
-rw-r--r-- | sys/powerpc/include/vmparam.h | 1 | ||||
-rw-r--r-- | sys/sys/sf_buf.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h index c46f395..965f8e4 100644 --- a/sys/powerpc/include/vmparam.h +++ b/sys/powerpc/include/vmparam.h @@ -210,5 +210,6 @@ struct pmap_physseg { #define SFBUF #define SFBUF_NOMD #define SFBUF_OPTIONAL_DIRECT_MAP hw_direct_map +#define SFBUF_PHYS_DMAP(x) (x) #endif /* _MACHINE_VMPARAM_H_ */ diff --git a/sys/sys/sf_buf.h b/sys/sys/sf_buf.h index 7ab9443..d3bb037 100644 --- a/sys/sys/sf_buf.h +++ b/sys/sys/sf_buf.h @@ -113,7 +113,7 @@ sf_buf_kva(struct sf_buf *sf) { #ifdef SFBUF_OPTIONAL_DIRECT_MAP if (SFBUF_OPTIONAL_DIRECT_MAP) - return (VM_PAGE_TO_PHYS((vm_page_t)sf)); + return (SFBUF_PHYS_DMAP(VM_PAGE_TO_PHYS((vm_page_t)sf))); #endif return (sf->kva); |