On Wed, Mar 16, 2011 at 05:12:17PM +0100, Alexander Graf wrote: > On 03/16/2011 05:56 AM, David Gibson wrote: [snip] > >+#include "hw.h" > >+#include "net.h" > >+#include "hw/qdev.h" > >+#include "hw/spapr.h" > >+#include "hw/spapr_vio.h" > >+ > >+#include<libfdt.h> > > Hrm - might be good to protect compilation against existence of fdt > then?
Ah, yeah, you've reminded me. So this appears in a number of places. We basically have to have fdt support for the pseries platform. What's the right way to make the whole machine definition conditional upon libfdt? Incidentally, can I suggest it might be a good idea to include libfdt in the qemu tree and make it always-on instead of configurable. [snip] > >+ lbuf = qemu_mallocz(total_len); > > Do you really need the zeroing here? In fact, this looks like a good > candidate for alloca :). Ah, good idea. [snip] > >-#define SPAPR_VIO_TCE_PAGE_SHIFT 12 > >-#define SPAPR_VIO_TCE_PAGE_SIZE (1ULL<< > >SPAPR_VIO_TCE_PAGE_SHIFT) > >-#define SPAPR_VIO_TCE_PAGE_MASK (SPAPR_VIO_TCE_PAGE_SIZE - 1) > >+#define SPAPR_VIO_TCE_PAGE_SHIFT 12 > >+#define SPAPR_VIO_TCE_PAGE_SIZE (1ULL<< SPAPR_VIO_TCE_PAGE_SHIFT) > >+#define SPAPR_VIO_TCE_PAGE_MASK (SPAPR_VIO_TCE_PAGE_SIZE - 1) > > Those shouldn't have been tabs in the first place :) Fixed in the original patch now. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson