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
This commit is contained in:
parent
0ee7262a72
commit
14fb217784
@ -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_ */
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user