# HG changeset patch # User Louis Opter # Date 1374882248 25200 # Node ID ad21d8a182add372225a44eafd7b62fc84dcb0ac # Parent f3c7e9b0c5cfe82c6bff8887176e57b807ed51a4 WIP: put up (hopefully the last) some touches on the dma abstraction diff -r f3c7e9b0c5cf -r ad21d8a182ad rathaxes_samples_e1000_add_a_dma_abstraction.patch --- a/rathaxes_samples_e1000_add_a_dma_abstraction.patch Thu Jul 25 16:45:13 2013 -0700 +++ b/rathaxes_samples_e1000_add_a_dma_abstraction.patch Fri Jul 26 16:44:08 2013 -0700 @@ -52,7 +52,7 @@ + + map + { -+ k_dma_handle: (dma_addr_t)(${self}); ++ k_dma_handle: (*(dma_addr_t *)&(${self})); + } + } + @@ -66,7 +66,7 @@ + map + { + /* XXX: we should use ${DMA::AbstractDMAHandle} here: */ -+ dma_handle: (dma_addr_t)(${self}); ++ dma_handle: (*(dma_addr_t *)&(${self})); + } + } + @@ -79,7 +79,7 @@ + + map + { -+ k_dma_direction: (enum dma_data_direction)(${self}); ++ k_dma_direction: ((enum dma_data_direction)(${self})); + } + } + @@ -103,7 +103,7 @@ + { + chunk ::CALL() + { -+ ((${DMA::DMAHandle})dma_map_single(${dev.k_device}, ${buf}, ${size}, ${dir.dma_direction})); ++ dma_map_single(${dev.k_device}, ${buf}, ${size}, ${dir.dma_direction}); + } + } + diff -r f3c7e9b0c5cf -r ad21d8a182ad rathaxes_samples_e1000_use_the_dma_abstraction_in_socket.patch --- a/rathaxes_samples_e1000_use_the_dma_abstraction_in_socket.patch Thu Jul 25 16:45:13 2013 -0700 +++ b/rathaxes_samples_e1000_use_the_dma_abstraction_in_socket.patch Fri Jul 26 16:44:08 2013 -0700 @@ -1,5 +1,5 @@ # HG changeset patch -# Parent 3cea76c8dbc4e341f3ff42e42532bdbd3f06fcac +# Parent 0645a1612cc02ac70c718cabeaaa726cb2ecfdfd Replace Linux specific code in Socket by DMA calls diff --git a/rathaxes/samples/e1000/socket.blt b/rathaxes/samples/e1000/socket.blt @@ -16,7 +16,7 @@ map { - k_sk_buff: ((struct sk_buff *)${self}); -+ k_sk_buff: (struct sk_buff *)(${self}); ++ k_sk_buff: ((struct sk_buff *)(${self})); } } @@ -195,7 +195,7 @@ + // same time ${DMA:AbstractDMAHandle} couldn't be used because that + // would yield to a struct type which you can't assign directly; + // but maybe doing the ->data in that case would be acceptable). -+ dma_handle: (dma_addr_t)((${self})->dma_handle); ++ dma_handle: (*((dma_addr_t *)&(${self})->dma_handle)); } } }