[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] RE: [PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform.
From: |
Liu Yu-B13201 |
Subject: |
[Qemu-devel] RE: [PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform. |
Date: |
Fri, 27 Feb 2009 10:00:24 +0800 |
> -----Original Message-----
> From: Blue Swirl [mailto:address@hidden
> Sent: Friday, February 27, 2009 2:47 AM
> To: Liu Yu-B13201
> Cc: address@hidden; address@hidden;
> address@hidden; address@hidden
> Subject: Re: [PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform.
>
> On 2/26/09, Liu Yu <address@hidden> wrote:
> > MPIC and OpenPIC have very similar design.
> > So a lot of code can be reused.
> >
> > Modification mainly include:
> > 1. keep struct openpic_t to the maximum size of both MPIC
> and OpenPIC.
> > 2. endianess swap.
> > MPIC has the same endianess as target, so no need to
> swap for MPIC.
> > 3. using different init functions and function pointers
> for reset and irq raise.
> >
> > Haven't test OpenPIC.
> >
> > Signed-off-by: Liu Yu <address@hidden>
>
> > + struct {
> > + CPUReadMemoryFunc **read;
> > + CPUWriteMemoryFunc **write;
> > + target_phys_addr_t start_addr;
> > + ram_addr_t size;
> > + } list[] = {
> > + {mpic_glb_read, mpic_glb_write,
> MPIC_GLB_REG_START, MPIC_GLB_REG_SIZE},
> > + {mpic_tmr_read, mpic_tmr_write,
> MPIC_TMR_REG_START, MPIC_TMR_REG_SIZE},
> > + {mpic_ext_read, mpic_ext_write,
> MPIC_EXT_REG_START, MPIC_EXT_REG_SIZE},
> > + {mpic_int_read, mpic_int_write,
> MPIC_INT_REG_START, MPIC_INT_REG_SIZE},
> > + {mpic_msg_read, mpic_msg_write,
> MPIC_MSG_REG_START, MPIC_MSG_REG_SIZE},
> > + {mpic_msi_read, mpic_msi_write,
> MPIC_MSI_REG_START, MPIC_MSI_REG_SIZE},
> > + {mpic_cpu_read, mpic_cpu_write,
> MPIC_CPU_REG_START, MPIC_CPU_REG_SIZE},
> > + };
>
> "static const" ?
>
Why static? It's allocated on stack and will be free when function return.
- [Qemu-devel] [PATCH v4 0/5] powerpc/kvm: Add MPC8544DS board support, Liu Yu, 2009/02/26
- [Qemu-devel] [PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform., Liu Yu, 2009/02/26
- [Qemu-devel] [PATCH 2/5] kvm/powerpc: Add freescale pci controller's support, Liu Yu, 2009/02/26
- [Qemu-devel] [PATCH 3/5] kvm/powerpc: Add irq support for E500 core, Liu Yu, 2009/02/26
- [Qemu-devel] [PATCH 4/5] kvm/powerpc: Add MPC8544DS board support, Liu Yu, 2009/02/26
- [Qemu-devel] [PATCH 5/5] kvm/powerpc: flat device tree files for MPC8544DS, Liu Yu, 2009/02/26
- [Qemu-devel] Re: [PATCH 5/5] kvm/powerpc: flat device tree files for MPC8544DS, Hollis Blanchard, 2009/02/26
- [Qemu-devel] Re: [PATCH 4/5] kvm/powerpc: Add MPC8544DS board support, Hollis Blanchard, 2009/02/26
- [Qemu-devel] Re: [PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform., Blue Swirl, 2009/02/26