Mercurial > archived > louis > epitech > mq > rathaxes
changeset 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 |
files | rathaxes_samples_e1000_add_a_dma_abstraction.patch rathaxes_samples_e1000_use_the_dma_abstraction_in_socket.patch |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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}); + } + } +
--- 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)); } } }