diff options
author | adrian <adrian@FreeBSD.org> | 2014-09-06 22:38:32 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2014-09-06 22:38:32 +0000 |
commit | e5f8f27ad74b6c82d3e5b272e369673a9521431c (patch) | |
tree | 7d7cf518c5f1230ef914675f8a78e3b5c77219a9 | |
parent | 65ac57de621eb7d24690712b3f4935438bcd73ae (diff) | |
download | FreeBSD-src-e5f8f27ad74b6c82d3e5b272e369673a9521431c.zip FreeBSD-src-e5f8f27ad74b6c82d3e5b272e369673a9521431c.tar.gz |
Implement local sfbuf_map and sfbuf_unmap for MIPS32.
The pre-rework behaviour was not to keep the cached mappings around after
the sfbuf was used but instead to recycle said mappings.
PR: kern/193400
-rw-r--r-- | sys/mips/include/sf_buf.h | 19 | ||||
-rw-r--r-- | sys/mips/include/vmparam.h | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sys/mips/include/sf_buf.h b/sys/mips/include/sf_buf.h index 76fb993..01ecd23 100644 --- a/sys/mips/include/sf_buf.h +++ b/sys/mips/include/sf_buf.h @@ -48,4 +48,23 @@ sf_buf_page(struct sf_buf *sf) } #endif /* __mips_n64 */ + +#ifndef __mips_n64 /* in 32 bit mode we manage our own mappings */ + +static inline void +sf_buf_map(struct sf_buf *sf, int flags) +{ + + pmap_qenter(sf->kva, &sf->m, 1); +} + +static inline int +sf_buf_unmap(struct sf_buf *sf) +{ + pmap_qremove(sf->kva, 1); + return (1); +} + +#endif /* ! __mips_n64 */ + #endif /* !_MACHINE_SF_BUF_H_ */ diff --git a/sys/mips/include/vmparam.h b/sys/mips/include/vmparam.h index d3b833e..756a8a6 100644 --- a/sys/mips/include/vmparam.h +++ b/sys/mips/include/vmparam.h @@ -189,6 +189,7 @@ #ifndef __mips_n64 #define SFBUF +#define SFBUF_MAP #endif #endif /* !_MACHINE_VMPARAM_H_ */ |