[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 01/27 v10] xen/arm: vpl011: Define common ring buffer helper functions in console.h


On 23 September 2017 at 18:55, Julien Grall <julien.grall@xxxxxxx> wrote:
> Hi,
> On 09/22/2017 11:44 PM, Stefano Stabellini wrote:
>> Adding Jan
>> On Fri, 22 Sep 2017, Bhupinder Thakur wrote:
>>> DEFINE_XEN_FLEX_RING(xencons) defines common helper functions such as
>>> xencons_queued() to tell the current size of the ring buffer,
>>> xencons_mask() to mask off the index, which are useful helper functions.
>>> pl011 emulation code will use these helper functions.
>>> io/console.h includes io/ring.h which defines DEFINE_XEN_FLEX_RING.
>>> In console/daemon/io.c, string.h had to be included before io/console.h
>>> because ring.h uses string functions.
>>> Signed-off-by: Bhupinder Thakur <bhupinder.thakur@xxxxxxxxxx>
>>> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>>> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
>>> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
>> Unfortunately this patch breaks the build on x86.
> I am a bit surprised that this breaks only build on x86. I was expecting the
> header checks to be done on all the architecture ... hmmm... looking at the
> Makefile, the checks is only done when building natively. I guess you are
> cross-compiling?

> It might be interesting to look at getting headers check in cross-compile
> environment given that this is the main way to build the hypervisor today.
Yes I am doing cross-compilation.

>> The reason is that
>> DEFINE_XEN_FLEX_RING requires C99, and the current header checks in
>> xen/include/Makefile use ANSI C.
> I was not able to spot why DEFINE_XEN_FLEX_RING would require C99. Can you
> detail it?
This macro expands to generate inline functions, which I believe
require C99 to compile.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.