On 21 October 2015 at 17:28, Yongbok Kim <yongbok....@imgtec.com> wrote: > On 21/10/2015 17:01, Peter Maydell wrote: >> Should this live in hw/intc/ if it is an interrupt controller?
> Actually I have considered that but I just hesitated to put the files in > the hw/intc as all other MIPS related hw component files are in hw/mips. I > agree with your opinion. From the v2 the mips_gic.{c|h} files will be in > the directory. I think the mips_gcr.{c|h} is quite MIPS specific and it > doesn't fit into any other directory than hw/mips. I think the general approach we've gone for is that if we can find a suitable device-type subdirectory (like intc/) we should use that (the ARM GIC is in hw/intc, for instance). hw/<architecture> should be for top level machine definitions, SoC models, and similar things, rather than individual devices. For mips_gcr, I think putting it in hw/misc/ is probably best (for instance we put the ARM Cortex-A9 snoop control unit here). You might also consider whether it's helpful to provide a "wrapper" object like the hw/cpu/a15mpcore.c etc ones which instantiates a bunch of CPUs and the GCR and the GIC. (I don't know enough about MIPS to know whether that would make sense, so I leave it up to you.) thanks -- PMM