Re: [Qemu-devel] [PATCH v4 1/3] util/fifo8: implement push/pop of multiple bytes

2014-01-29 Thread Peter Crosthwaite
On Wed, Jan 29, 2014 at 4:48 AM, Beniamino Galvani b.galv...@gmail.com wrote: On Tue, Jan 28, 2014 at 10:43:28AM +, Peter Maydell wrote: On 28 January 2014 00:04, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: On Tue, Jan 28, 2014 at 4:32 AM, Peter Maydell peter.mayd...@linaro.org

Re: [Qemu-devel] [PATCH v4 1/3] util/fifo8: implement push/pop of multiple bytes

2014-01-28 Thread Peter Maydell
On 28 January 2014 00:04, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: On Tue, Jan 28, 2014 at 4:32 AM, Peter Maydell peter.mayd...@linaro.org wrote: void fifo8_reset(Fifo8 *fifo) { fifo-num = 0; +fifo-head = 0; This is a bug fix, right? It should go in its own patch.

Re: [Qemu-devel] [PATCH v4 1/3] util/fifo8: implement push/pop of multiple bytes

2014-01-28 Thread Beniamino Galvani
On Tue, Jan 28, 2014 at 10:04:09AM +1000, Peter Crosthwaite wrote: On Tue, Jan 28, 2014 at 4:32 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 26 January 2014 21:39, Beniamino Galvani b.galv...@gmail.com wrote: In some circumstances it is useful to be able to push the entire content

Re: [Qemu-devel] [PATCH v4 1/3] util/fifo8: implement push/pop of multiple bytes

2014-01-28 Thread Beniamino Galvani
On Tue, Jan 28, 2014 at 10:43:28AM +, Peter Maydell wrote: On 28 January 2014 00:04, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: On Tue, Jan 28, 2014 at 4:32 AM, Peter Maydell peter.mayd...@linaro.org wrote: void fifo8_reset(Fifo8 *fifo) { fifo-num = 0; +

Re: [Qemu-devel] [PATCH v4 1/3] util/fifo8: implement push/pop of multiple bytes

2014-01-27 Thread Peter Maydell
On 26 January 2014 21:39, Beniamino Galvani b.galv...@gmail.com wrote: In some circumstances it is useful to be able to push the entire content of a memory buffer to the fifo or to pop multiple bytes with a single operation. The functions fifo8_has_space() and fifo8_push_all() added by this

Re: [Qemu-devel] [PATCH v4 1/3] util/fifo8: implement push/pop of multiple bytes

2014-01-27 Thread Peter Crosthwaite
On Tue, Jan 28, 2014 at 4:32 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 26 January 2014 21:39, Beniamino Galvani b.galv...@gmail.com wrote: In some circumstances it is useful to be able to push the entire content of a memory buffer to the fifo or to pop multiple bytes with a single

[Qemu-devel] [PATCH v4 1/3] util/fifo8: implement push/pop of multiple bytes

2014-01-26 Thread Beniamino Galvani
In some circumstances it is useful to be able to push the entire content of a memory buffer to the fifo or to pop multiple bytes with a single operation. The functions fifo8_has_space() and fifo8_push_all() added by this patch allow to perform the first kind of operation efficiently. The