Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/powerpc Use ptoa(x) instead of x << PGSHIFT
details: https://anonhg.NetBSD.org/src/rev/7517dccda38f
branches: trunk
changeset: 766025:7517dccda38f
user: matt <matt%NetBSD.org@localhost>
date: Mon Jun 13 21:19:38 2011 +0000
description:
Use ptoa(x) instead of x << PGSHIFT
diffstat:
sys/arch/powerpc/powerpc/bus_dma.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (33 lines):
diff -r 2aa37a387dad -r 7517dccda38f sys/arch/powerpc/powerpc/bus_dma.c
--- a/sys/arch/powerpc/powerpc/bus_dma.c Mon Jun 13 21:19:01 2011 +0000
+++ b/sys/arch/powerpc/powerpc/bus_dma.c Mon Jun 13 21:19:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.39 2011/06/08 15:19:57 matt Exp $ */
+/* $NetBSD: bus_dma.c,v 1.40 2011/06/13 21:19:38 matt Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#define _POWERPC_BUS_DMA_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.39 2011/06/08 15:19:57 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.40 2011/06/13 21:19:38 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -547,10 +547,10 @@
int bank;
for (bank = 0; bank < vm_nphysseg; bank++) {
- if (start > VM_PHYSMEM_PTR(bank)->avail_start << PGSHIFT)
- start = VM_PHYSMEM_PTR(bank)->avail_start << PGSHIFT;
- if (end < VM_PHYSMEM_PTR(bank)->avail_end << PGSHIFT)
- end = VM_PHYSMEM_PTR(bank)->avail_end << PGSHIFT;
+ if (start > ptoa(VM_PHYSMEM_PTR(bank)->avail_start))
+ start = ptoa(VM_PHYSMEM_PTR(bank)->avail_start);
+ if (end < ptoa(VM_PHYSMEM_PTR(bank)->avail_end))
+ end = ptoa(VM_PHYSMEM_PTR(bank)->avail_end);
}
return _bus_dmamem_alloc_range(t, size, alignment, boundary, segs,
Home |
Main Index |
Thread Index |
Old Index