comparison rathaxes_samples_e1000_use_the_dma_abstraction_in_socket.patch @ 118:ad21d8a182ad

WIP: put up (hopefully the last) some touches on the dma abstraction
author Louis Opter <louis@lse.epita.fr>
date Fri, 26 Jul 2013 16:44:08 -0700
parents f3c7e9b0c5cf
children d84bc9a46771
comparison
equal deleted inserted replaced
117:f3c7e9b0c5cf 118:ad21d8a182ad
1 # HG changeset patch 1 # HG changeset patch
2 # Parent 3cea76c8dbc4e341f3ff42e42532bdbd3f06fcac 2 # Parent 0645a1612cc02ac70c718cabeaaa726cb2ecfdfd
3 Replace Linux specific code in Socket by DMA calls 3 Replace Linux specific code in Socket by DMA calls
4 4
5 diff --git a/rathaxes/samples/e1000/socket.blt b/rathaxes/samples/e1000/socket.blt 5 diff --git a/rathaxes/samples/e1000/socket.blt b/rathaxes/samples/e1000/socket.blt
6 --- a/rathaxes/samples/e1000/socket.blt 6 --- a/rathaxes/samples/e1000/socket.blt
7 +++ b/rathaxes/samples/e1000/socket.blt 7 +++ b/rathaxes/samples/e1000/socket.blt
14 @@ -14,7 +14,7 @@ 14 @@ -14,7 +14,7 @@
15 15
16 map 16 map
17 { 17 {
18 - k_sk_buff: ((struct sk_buff *)${self}); 18 - k_sk_buff: ((struct sk_buff *)${self});
19 + k_sk_buff: (struct sk_buff *)(${self}); 19 + k_sk_buff: ((struct sk_buff *)(${self}));
20 } 20 }
21 } 21 }
22 22
23 @@ -22,35 +22,34 @@ 23 @@ -22,35 +22,34 @@
24 { 24 {
193 + // XXX: We need to cast here so we can do things like 193 + // XXX: We need to cast here so we can do things like
194 + // var.dma_handle = 0; but the type shouldn't be hardcoded (at the 194 + // var.dma_handle = 0; but the type shouldn't be hardcoded (at the
195 + // same time ${DMA:AbstractDMAHandle} couldn't be used because that 195 + // same time ${DMA:AbstractDMAHandle} couldn't be used because that
196 + // would yield to a struct type which you can't assign directly; 196 + // would yield to a struct type which you can't assign directly;
197 + // but maybe doing the ->data in that case would be acceptable). 197 + // but maybe doing the ->data in that case would be acceptable).
198 + dma_handle: (dma_addr_t)((${self})->dma_handle); 198 + dma_handle: (*((dma_addr_t *)&(${self})->dma_handle));
199 } 199 }
200 } 200 }
201 } 201 }
202 diff --git a/rathaxes/samples/e1000/socket.rti b/rathaxes/samples/e1000/socket.rti 202 diff --git a/rathaxes/samples/e1000/socket.rti b/rathaxes/samples/e1000/socket.rti
203 --- a/rathaxes/samples/e1000/socket.rti 203 --- a/rathaxes/samples/e1000/socket.rti