Deleted Added
full compact
busdma_bounce.c (246713) busdma_bounce.c (248968)
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/x86/x86/busdma_machdep.c 246713 2013-02-12 16:57:20Z kib $");
28__FBSDID("$FreeBSD: head/sys/x86/x86/busdma_machdep.c 248968 2013-04-01 09:57:46Z kib $");
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/malloc.h>
33#include <sys/bus.h>
34#include <sys/interrupt.h>
35#include <sys/kernel.h>
36#include <sys/ktr.h>

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

246
247 /* Return a NULL tag on failure */
248 *dmat = NULL;
249
250 newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF,
251 M_ZERO | M_NOWAIT);
252 if (newtag == NULL) {
253 CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/malloc.h>
33#include <sys/bus.h>
34#include <sys/interrupt.h>
35#include <sys/kernel.h>
36#include <sys/ktr.h>

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

246
247 /* Return a NULL tag on failure */
248 *dmat = NULL;
249
250 newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF,
251 M_ZERO | M_NOWAIT);
252 if (newtag == NULL) {
253 CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
254 __func__, newtag, 0, error);
254 __func__, newtag, 0, ENOMEM);
255 return (ENOMEM);
256 }
257
258 newtag->parent = parent;
259 newtag->alignment = alignment;
260 newtag->boundary = boundary;
261 newtag->lowaddr = trunc_page((vm_paddr_t)lowaddr) + (PAGE_SIZE - 1);
262 newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + (PAGE_SIZE - 1);

--- 932 unchanged lines hidden ---
255 return (ENOMEM);
256 }
257
258 newtag->parent = parent;
259 newtag->alignment = alignment;
260 newtag->boundary = boundary;
261 newtag->lowaddr = trunc_page((vm_paddr_t)lowaddr) + (PAGE_SIZE - 1);
262 newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + (PAGE_SIZE - 1);

--- 932 unchanged lines hidden ---