| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: rumpdma.c,v 1.1 2010/02/09 18:57:03 pooka Exp $ */ | | 1 | /* $NetBSD: rumpdma.c,v 1.2 2010/03/01 13:01:16 pooka Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | | 4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. |
5 | * | | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | | 6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions | | 7 | * modification, are permitted provided that the following conditions |
8 | * are met: | | 8 | * are met: |
9 | * 1. Redistributions of source code must retain the above copyright | | 9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. | | 10 | * notice, this list of conditions and the following disclaimer. |
11 | * 2. Redistributions in binary form must reproduce the above copyright | | 11 | * 2. Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the | | 12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. | | 13 | * documentation and/or other materials provided with the distribution. |
14 | * | | 14 | * |
| @@ -98,15 +98,15 @@ int | | | @@ -98,15 +98,15 @@ int |
98 | bus_dmamem_map(bus_dma_tag_t tag, bus_dma_segment_t *segs, int nsegs, | | 98 | bus_dmamem_map(bus_dma_tag_t tag, bus_dma_segment_t *segs, int nsegs, |
99 | size_t size, void **kvap, int flags) | | 99 | size_t size, void **kvap, int flags) |
100 | { | | 100 | { |
101 | | | 101 | |
102 | KASSERT(nsegs == 1); | | 102 | KASSERT(nsegs == 1); |
103 | *kvap = kmem_alloc(size, KM_SLEEP); | | 103 | *kvap = kmem_alloc(size, KM_SLEEP); |
104 | return 0; | | 104 | return 0; |
105 | } | | 105 | } |
106 | | | 106 | |
107 | void | | 107 | void |
108 | bus_dmamem_unmap(bus_dma_tag_t a, void *kva, size_t b) | | 108 | bus_dmamem_unmap(bus_dma_tag_t a, void *kva, size_t b) |
109 | { | | 109 | { |
110 | | | 110 | |
111 | panic("unimplemented %s", __func__); | | 111 | kmem_free(kva, b); |
112 | } | | 112 | } |