Deleted Added
full compact
subr_devstat.c (112388) subr_devstat.c (112569)
1/*
2 * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*
2 * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/kern/subr_devstat.c 112388 2003-03-18 23:32:27Z jake $
28 * $FreeBSD: head/sys/kern/subr_devstat.c 112569 2003-03-25 00:07:06Z jake $
29 */
30
31#include <sys/param.h>
32#include <sys/kernel.h>
33#include <sys/systm.h>
34#include <sys/bio.h>
35#include <sys/devicestat.h>
36#include <sys/sysctl.h>

--- 410 unchanged lines hidden (view full) ---

447 struct devstat *stat;
448 u_int nfree;
449};
450
451static TAILQ_HEAD(, statspage) pagelist = TAILQ_HEAD_INITIALIZER(pagelist);
452static MALLOC_DEFINE(M_DEVSTAT, "devstat", "Device statistics");
453
454static int
29 */
30
31#include <sys/param.h>
32#include <sys/kernel.h>
33#include <sys/systm.h>
34#include <sys/bio.h>
35#include <sys/devicestat.h>
36#include <sys/sysctl.h>

--- 410 unchanged lines hidden (view full) ---

447 struct devstat *stat;
448 u_int nfree;
449};
450
451static TAILQ_HEAD(, statspage) pagelist = TAILQ_HEAD_INITIALIZER(pagelist);
452static MALLOC_DEFINE(M_DEVSTAT, "devstat", "Device statistics");
453
454static int
455devstat_mmap(dev_t dev, vm_offset_t offset, vm_offset_t *paddr, int nprot)
455devstat_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
456{
457 struct statspage *spp;
458
459 if (nprot != VM_PROT_READ)
460 return (-1);
461 TAILQ_FOREACH(spp, &pagelist, list) {
462 if (offset == 0) {
463 *paddr = vtophys(spp->stat);

--- 77 unchanged lines hidden ---
456{
457 struct statspage *spp;
458
459 if (nprot != VM_PROT_READ)
460 return (-1);
461 TAILQ_FOREACH(spp, &pagelist, list) {
462 if (offset == 0) {
463 *paddr = vtophys(spp->stat);

--- 77 unchanged lines hidden ---