Re: [Qemu-devel] [PATCH 2/4] linuxboot_dma: move common functions in a new header

2019-01-12 Thread Eric Blake
On 1/12/19 12:25 PM, Stefano Garzarella wrote: >>> Better to just pull in qemu/osdep.h >> >> Except that qemu/osdep.h should already have been pulled in by whatever >> .c file is including this header. We specifically document that .h files >> shouldn't need to include osdep.h (and in turn, anythi

Re: [Qemu-devel] [PATCH 2/4] linuxboot_dma: move common functions in a new header

2019-01-12 Thread Stefano Garzarella
On Fri, Jan 11, 2019 at 6:55 PM Eric Blake wrote: > > On 1/11/19 11:48 AM, Michael S. Tsirkin wrote: > > >>> > diff --git a/pc-bios/optionrom/optrom.h b/pc-bios/optionrom/optrom.h > new file mode 100644 > index 00..36f43b43fd > --- /dev/null > +++ b/pc-bios/optionr

Re: [Qemu-devel] [PATCH 2/4] linuxboot_dma: move common functions in a new header

2019-01-12 Thread Stefano Garzarella
On Fri, Jan 11, 2019 at 6:48 PM Michael S. Tsirkin wrote: > > > > +#include "../../include/standard-headers/linux/qemu_fw_cfg.h" > > > > > > This depends on , please include it first. > > Better to just pull in qemu/osdep.h This header is used in the option roms that are bare-metal, so IMHO I can

Re: [Qemu-devel] [PATCH 2/4] linuxboot_dma: move common functions in a new header

2019-01-11 Thread Eric Blake
On 1/11/19 11:48 AM, Michael S. Tsirkin wrote: >>> diff --git a/pc-bios/optionrom/optrom.h b/pc-bios/optionrom/optrom.h new file mode 100644 index 00..36f43b43fd --- /dev/null +++ b/pc-bios/optionrom/optrom.h +#include "../../include/standard-headers/linux/qe

Re: [Qemu-devel] [PATCH 2/4] linuxboot_dma: move common functions in a new header

2019-01-11 Thread Michael S. Tsirkin
On Fri, Jan 11, 2019 at 06:42:25PM +0100, Stefano Garzarella wrote: > On Fri, Jan 11, 2019 at 5:27 PM Stefan Hajnoczi wrote: > > > > On Fri, Jan 11, 2019 at 02:18:34PM +0100, Stefano Garzarella wrote: > > > In order to allow other option roms to use these common > > > useful functions and definiti

Re: [Qemu-devel] [PATCH 2/4] linuxboot_dma: move common functions in a new header

2019-01-11 Thread Stefano Garzarella
On Fri, Jan 11, 2019 at 5:27 PM Stefan Hajnoczi wrote: > > On Fri, Jan 11, 2019 at 02:18:34PM +0100, Stefano Garzarella wrote: > > In order to allow other option roms to use these common > > useful functions and definitions, this patch put them > > in a new C header file called optrom.h, and also

Re: [Qemu-devel] [PATCH 2/4] linuxboot_dma: move common functions in a new header

2019-01-11 Thread Stefan Hajnoczi
On Fri, Jan 11, 2019 at 02:18:34PM +0100, Stefano Garzarella wrote: > In order to allow other option roms to use these common > useful functions and definitions, this patch put them > in a new C header file called optrom.h, and also add > useful out*() in*() functions for different size. It's usua

[Qemu-devel] [PATCH 2/4] linuxboot_dma: move common functions in a new header

2019-01-11 Thread Stefano Garzarella
In order to allow other option roms to use these common useful functions and definitions, this patch put them in a new C header file called optrom.h, and also add useful out*() in*() functions for different size. Signed-off-by: Stefano Garzarella --- pc-bios/optionrom/linuxboot_dma.c | 98 -