From 2ee9b44caecce2aaba4fb6f3d3353c74b935ad97 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Fri, 6 Sep 2013 17:44:13 +0000 Subject: [PATCH] Fix build with gcc. Move sf_buf_alloc()/sf_buf_free() declarations to MD headers. --- sys/arm/include/sf_buf.h | 2 ++ sys/i386/include/sf_buf.h | 3 +++ sys/mips/include/sf_buf.h | 3 +++ sys/powerpc/include/sf_buf.h | 3 +++ sys/sparc64/include/sf_buf.h | 3 +++ sys/sys/sf_buf.h | 3 --- 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/arm/include/sf_buf.h b/sys/arm/include/sf_buf.h index 2225d5824939..65087444e95c 100644 --- a/sys/arm/include/sf_buf.h +++ b/sys/arm/include/sf_buf.h @@ -40,6 +40,8 @@ struct vm_page; struct sf_buf; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) diff --git a/sys/i386/include/sf_buf.h b/sys/i386/include/sf_buf.h index 415dcbb86e63..20296b3c1537 100644 --- a/sys/i386/include/sf_buf.h +++ b/sys/i386/include/sf_buf.h @@ -45,6 +45,9 @@ struct sf_buf { #endif }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { diff --git a/sys/mips/include/sf_buf.h b/sys/mips/include/sf_buf.h index 00502a06d6e2..e5d981f3b789 100644 --- a/sys/mips/include/sf_buf.h +++ b/sys/mips/include/sf_buf.h @@ -78,6 +78,9 @@ struct sf_buf { vm_offset_t kva; /* va of mapping */ }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { diff --git a/sys/powerpc/include/sf_buf.h b/sys/powerpc/include/sf_buf.h index 7ddb981bdc3a..f8a5936f8054 100644 --- a/sys/powerpc/include/sf_buf.h +++ b/sys/powerpc/include/sf_buf.h @@ -45,6 +45,9 @@ struct sf_buf { int ref_count; /* usage of this mapping */ }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + /* * On 32-bit OEA, the only purpose for which sf_buf is used is to implement * an opaque pointer required by the machine-independent parts of the kernel. diff --git a/sys/sparc64/include/sf_buf.h b/sys/sparc64/include/sf_buf.h index b6ee1cc20b69..ebbbea8389ce 100644 --- a/sys/sparc64/include/sf_buf.h +++ b/sys/sparc64/include/sf_buf.h @@ -39,6 +39,9 @@ struct sf_buf { vm_offset_t kva; /* va of mapping */ }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { diff --git a/sys/sys/sf_buf.h b/sys/sys/sf_buf.h index 61643b0a02b5..2e85bc87a9e3 100644 --- a/sys/sys/sf_buf.h +++ b/sys/sys/sf_buf.h @@ -65,9 +65,6 @@ extern counter_u64_t sfstat[sizeof(struct sfstat) / sizeof(uint64_t)]; #define SFSTAT_INC(name) SFSTAT_ADD(name, 1) #endif /* _KERNEL */ -struct sf_buf * - sf_buf_alloc(struct vm_page *m, int flags); -void sf_buf_free(struct sf_buf *sf); int sf_buf_mext(struct mbuf *mb, void *addr, void *args); #endif /* !_SYS_SF_BUF_H_ */