Deleted Added
full compact
busdma_bounce.c (169799) busdma_bounce.c (170086)
1/*-
2 * Copyright (c) 1997, 1998 Justin T. Gibbs.
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 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997, 1998 Justin T. Gibbs.
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 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/i386/i386/busdma_machdep.c 169799 2007-05-20 16:53:45Z mjacob $");
28__FBSDID("$FreeBSD: head/sys/i386/i386/busdma_machdep.c 170086 2007-05-29 06:30:26Z yongari $");
29
30#include <sys/param.h>
31#include <sys/kdb.h>
32#include <ddb/ddb.h>
33#include <ddb/db_output.h>
34#include <sys/systm.h>
35#include <sys/malloc.h>
36#include <sys/bus.h>

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

669 curaddr = pmap_extract(pmap, vaddr);
670 else
671 curaddr = pmap_kextract(vaddr);
672
673 /*
674 * Compute the segment size, and adjust counts.
675 */
676 sgsize = PAGE_SIZE - ((u_long)curaddr & PAGE_MASK);
29
30#include <sys/param.h>
31#include <sys/kdb.h>
32#include <ddb/ddb.h>
33#include <ddb/db_output.h>
34#include <sys/systm.h>
35#include <sys/malloc.h>
36#include <sys/bus.h>

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

669 curaddr = pmap_extract(pmap, vaddr);
670 else
671 curaddr = pmap_kextract(vaddr);
672
673 /*
674 * Compute the segment size, and adjust counts.
675 */
676 sgsize = PAGE_SIZE - ((u_long)curaddr & PAGE_MASK);
677 if (sgsize > dmat->maxsegsz)
678 sgsize = dmat->maxsegsz;
677 if (buflen < sgsize)
678 sgsize = buflen;
679
680 /*
681 * Make sure we don't cross any boundaries.
682 */
683 if (dmat->boundary > 0) {
684 baddr = (curaddr + dmat->boundary) & bmask;

--- 510 unchanged lines hidden ---
679 if (buflen < sgsize)
680 sgsize = buflen;
681
682 /*
683 * Make sure we don't cross any boundaries.
684 */
685 if (dmat->boundary > 0) {
686 baddr = (curaddr + dmat->boundary) & bmask;

--- 510 unchanged lines hidden ---