Date: Tue, 19 Sep 2006 21:15:00 GMT From: Suleiman Souhlal <ssouhlal@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 106360 for review Message-ID: <200609192115.k8JLF0Yc012703@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=106360 Change 106360 by ssouhlal@ssouhlal-maho on 2006/09/19 21:14:52 Implement the sf_buf functions on mips. Affected files ... .. //depot/projects/mips2/src/sys/mips/include/sf_buf.h#3 edit .. //depot/projects/mips2/src/sys/mips/mips/vm_machdep.c#8 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/include/sf_buf.h#3 (text+ko) ==== @@ -28,30 +28,26 @@ #ifndef _MACHINE_SF_BUF_H_ #define _MACHINE_SF_BUF_H_ -#include <sys/queue.h> +#include <vm/vm.h> +#include <vm/vm_param.h> +#include <vm/vm_page.h> struct vm_page; -struct sf_buf { - LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ - TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ - struct vm_page *m; /* currently mapped page */ - vm_offset_t kva; /* va of mapping */ - int ref_count; /* usage of this mapping */ -}; +struct sf_buf; static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { - return (sf->kva); + return (MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS((vm_page_t)sf))); } static __inline struct vm_page * sf_buf_page(struct sf_buf *sf) { - return (sf->m); + return ((vm_page_t)sf); } #endif /* !_MACHINE_SF_BUF_H_ */ ==== //depot/projects/mips2/src/sys/mips/mips/vm_machdep.c#8 (text+ko) ==== @@ -118,7 +118,7 @@ panic("%s: should not be reached", __func__); } } - + void cpu_thread_swapin(struct thread *td) { @@ -134,7 +134,6 @@ void sf_buf_free(struct sf_buf *sf) { - panic("%s", __func__); } #if 0 static void @@ -147,8 +146,7 @@ struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags) { - panic("%s", __func__); - return (NULL); + return ((struct sf_buf *)m); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609192115.k8JLF0Yc012703>