Date: Sun, 24 Aug 2014 10:33:48 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r270449 - projects/arm64/sys/arm64/include Message-ID: <201408241033.s7OAXm7R026225@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Sun Aug 24 10:33:48 2014 New Revision: 270449 URL: http://svnweb.freebsd.org/changeset/base/270449 Log: Update sf_buf.h to be a straight copy of the amd64 version. Modified: projects/arm64/sys/arm64/include/sf_buf.h Modified: projects/arm64/sys/arm64/include/sf_buf.h ============================================================================== --- projects/arm64/sys/arm64/include/sf_buf.h Sun Aug 24 09:47:39 2014 (r270448) +++ projects/arm64/sys/arm64/include/sf_buf.h Sun Aug 24 10:33:48 2014 (r270449) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> + * Copyright (c) 2003, 2005 Alan L. Cox <alc@cs.rice.edu> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,28 +29,23 @@ #ifndef _MACHINE_SF_BUF_H_ #define _MACHINE_SF_BUF_H_ -#include <sys/queue.h> - -struct vm_page; - -struct sf_buf { - SLIST_ENTRY(sf_buf) free_list; /* list of free buffer slots */ - struct vm_page *m; /* currently mapped page */ - vm_offset_t kva; /* va of mapping */ -}; - -static __inline vm_offset_t +/* + * On this machine, the only purpose for which sf_buf is used is to implement + * an opaque pointer required by the machine-independent parts of the kernel. + * That pointer references the vm_page that is "mapped" by the sf_buf. The + * actual mapping is provided by the direct virtual-to-physical mapping. + */ +static inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { - return (sf->kva); + return (PHYS_TO_DMAP(VM_PAGE_TO_PHYS((vm_page_t)sf))); } -static __inline struct vm_page * +static inline vm_page_t sf_buf_page(struct sf_buf *sf) { - return (sf->m); + return ((vm_page_t)sf); } - #endif /* !_MACHINE_SF_BUF_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408241033.s7OAXm7R026225>