Re: [Qemu-devel] [PATCH 3/7] integratorcp: convert control to memory API

2011-10-18 Thread Peter Maydell
On 18 October 2011 15:32, Avi Kivity wrote: > On 10/18/2011 04:06 PM, Avi Kivity wrote: >> > I didn't spot this the first time round, but this is wrong. >> > We shouldn't be g_malloc0()ing the MemoryRegion -- it should >> > be an element in some suitable device struct. >> > >> > I think the right

Re: [Qemu-devel] [PATCH 3/7] integratorcp: convert control to memory API

2011-10-18 Thread Avi Kivity
On 10/18/2011 04:06 PM, Avi Kivity wrote: > > I didn't spot this the first time round, but this is wrong. > > We shouldn't be g_malloc0()ing the MemoryRegion -- it should > > be an element in some suitable device struct. > > > > I think the right thing to do here is probably first to do the > > (fa

Re: [Qemu-devel] [PATCH 3/7] integratorcp: convert control to memory API

2011-10-18 Thread Avi Kivity
On 10/18/2011 01:44 PM, Peter Maydell wrote: > 2011/10/17 Benoît Canet : > > -static void icp_control_init(uint32_t base) > > +static void icp_control_init(target_phys_addr_t base) > > { > > -int iomemtype; > > +MemoryRegion *io; > > > > -iomemtype = cpu_register_io_memory(icp_control_

Re: [Qemu-devel] [PATCH 3/7] integratorcp: convert control to memory API

2011-10-18 Thread Peter Maydell
2011/10/17 Benoît Canet : > -static void icp_control_init(uint32_t base) > +static void icp_control_init(target_phys_addr_t base) >  { > -    int iomemtype; > +    MemoryRegion *io; > > -    iomemtype = cpu_register_io_memory(icp_control_readfn, > -                                       icp_control

[Qemu-devel] [PATCH 3/7] integratorcp: convert control to memory API

2011-10-17 Thread Benoît Canet
Signed-off-by: Benoit Canet --- hw/integratorcp.c | 31 ++- 1 files changed, 14 insertions(+), 17 deletions(-) diff --git a/hw/integratorcp.c b/hw/integratorcp.c index c7d6596..7f79560 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -392,7 +392,9 @@ static

Re: [Qemu-devel] [PATCH 3/7] integratorcp: convert control to memory API

2011-10-17 Thread Peter Maydell
2011/10/13 Benoît Canet : > --- >  hw/integratorcp.c |   35 --- >  1 files changed, 16 insertions(+), 19 deletions(-) Again, OK except for the trailing whitespace. -- PMM

[Qemu-devel] [PATCH 3/7] integratorcp: convert control to memory API

2011-10-13 Thread Benoît Canet
--- hw/integratorcp.c | 35 --- 1 files changed, 16 insertions(+), 19 deletions(-) diff --git a/hw/integratorcp.c b/hw/integratorcp.c index e3a5f24..9bda94e 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -392,7 +392,9 @@ static int icp_pic_init(SysBusD