On 10 April 2015 at 10:58, Christoffer Dall <christoffer.d...@linaro.org> wrote: > On Fri, Apr 10, 2015 at 11:16:57AM +0200, Eric Auger wrote: >> Hi Christoffer, >> On 04/08/2015 11:20 PM, Christoffer Dall wrote: >> > The ARM GICv2m widget is a little device that handle MSI interrupt >> > writes to a trigger register and ties them to a range of interrupt lines >> > wires to the GIC. It has a few status/id registers and the interrupt wires, >> > and that's about it. >> > >> > A board instantiates the device by setting the base SPI number and >> > number SPIs for the frame. The base-spi parameter is indexed in the SPI >> > number space only, so base-spi == 0, means IRQ number 32. When a device >> > (the PCI host controller) writes to the trigger register, the payload is >> > the GIC IRQ number, so we have to subtract 32 from that and then index >> > into our frame of SPIs. >> > >> > When instantiating a GICv2m device, tell PCI that we have instantiated >> > something that can deal with MSIs. We rely on the board actually wiring >> > up the GICv2m to the PCI host controller. >> > >> > Signed-off-by: Christoffer Dall <christoffer.d...@linaro.org> >> > --- >> > hw/intc/Makefile.objs | 1 + >> > hw/intc/arm_gicv2m.c | 180 ++++++++++++++++++++++++++++++++++++++++++++++++++ >> > 2 files changed, 181 insertions(+) >> > create mode 100644 hw/intc/arm_gicv2m.c >> > >> > diff --git a/hw/intc/Makefile.objs b/hw/intc/Makefile.objs >> > index 843864a..6b63dfc 100644 >> > --- a/hw/intc/Makefile.objs >> > +++ b/hw/intc/Makefile.objs >> > @@ -15,6 +15,7 @@ common-obj-$(CONFIG_OPENPIC) += openpic.o >> > >> > obj-$(CONFIG_APIC) += apic.o apic_common.o >> > obj-$(CONFIG_ARM_GIC_KVM) += arm_gic_kvm.o >> > +obj-$(CONFIG_ARM_GIC) += arm_gicv2m.o >> we could put this above close to the other common-obj-$(CONFIG_ARM_GIC) >> objects? > > I'm honestly not quite sure what the difference between common-obj-y and > obj-y is?
common-obj-y is for object files which can be built once and then linked into any qemu-*-softmmu binary, ie they have no dependencies on details of the target CPU. obj-y is for objects which get built for every target CPU they're going to be used for (in this case that would mean separate .o files for arm-softmmu and aarch64-softmmu). common-obj-y is preferred unless there's something that absolutely requires the code to be built per-cpu. In this case there probably isn't anything like that. -- PMM