Deleted Added
full compact
busdma_machdep.c (289716) busdma_machdep.c (290082)
1/*-
2 * Copyright (c) 2006 Oleksandr Tymoshenko
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

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

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 * From i386/busdma_machdep.c,v 1.26 2002/04/19 22:58:09 alfred
27 */
28
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 Oleksandr Tymoshenko
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

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

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 * From i386/busdma_machdep.c,v 1.26 2002/04/19 22:58:09 alfred
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/mips/mips/busdma_machdep.c 289716 2015-10-21 19:24:20Z ian $");
30__FBSDID("$FreeBSD: head/sys/mips/mips/busdma_machdep.c 290082 2015-10-27 23:11:22Z adrian $");
31
32/*
33 * MIPS bus dma support routines
34 */
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/malloc.h>

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

1123 if (size_cl)
1124 mips_dcache_wbinv_range(buf_cl, size_cl);
1125 if (size_clend && (size_cl == 0 ||
1126 buf_clend - buf_cl > mips_pdcache_linesize))
1127 mips_dcache_wbinv_range(buf_clend, size_clend);
1128 break;
1129
1130 case BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE:
31
32/*
33 * MIPS bus dma support routines
34 */
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/malloc.h>

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

1123 if (size_cl)
1124 mips_dcache_wbinv_range(buf_cl, size_cl);
1125 if (size_clend && (size_cl == 0 ||
1126 buf_clend - buf_cl > mips_pdcache_linesize))
1127 mips_dcache_wbinv_range(buf_clend, size_clend);
1128 break;
1129
1130 case BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE:
1131 mips_dcache_wbinv_range(buf_cl, len);
1131 mips_dcache_wbinv_range(buf, len);
1132 break;
1133
1134 case BUS_DMASYNC_PREREAD:
1135 /*
1136 * Save buffers that might be modified by invalidation
1137 */
1138 if (size_cl)
1139 memcpy (tmp_cl, (void *)buf_cl, size_cl);

--- 353 unchanged lines hidden ---
1132 break;
1133
1134 case BUS_DMASYNC_PREREAD:
1135 /*
1136 * Save buffers that might be modified by invalidation
1137 */
1138 if (size_cl)
1139 memcpy (tmp_cl, (void *)buf_cl, size_cl);

--- 353 unchanged lines hidden ---