From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIMi3-000198-FH for qemu-devel@nongnu.org; Wed, 29 Jun 2016 17:07:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIMhy-0005lR-8s for qemu-devel@nongnu.org; Wed, 29 Jun 2016 17:07:46 -0400 Received: from 1.mo2.mail-out.ovh.net ([46.105.63.121]:46279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIMhx-0005kw-Vn for qemu-devel@nongnu.org; Wed, 29 Jun 2016 17:07:42 -0400 Received: from player760.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo2.mail-out.ovh.net (Postfix) with ESMTP id 02D4D100C0D4 for ; Wed, 29 Jun 2016 23:07:40 +0200 (CEST) Date: Wed, 29 Jun 2016 23:07:12 +0200 From: Greg Kurz Message-ID: <20160629230712.69db03ea@bahia.lan> In-Reply-To: <146723340662.9665.6413150884317978000.stgit@bahia.lan> References: <146723340662.9665.6413150884317978000.stgit@bahia.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/8] ppc: compute cpu_dt_id in the machine code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: Peter Crosthwaite , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Cedric Le Goater , bharata@linux.vnet.ibm.com, Scott Wood , Paolo Bonzini , Richard Henderson On Wed, 29 Jun 2016 22:50:06 +0200 Greg Kurz wrote: > This series is a sequel to the discussion on a patch from Ben's powernv > patchset: > > http://patchwork.ozlabs.org/patch/597153/ > > Indeed, since the DT is a machine abstraction, it should definitely sit > under hw/ppc and not in the target code: > - all machine types are forced to share the same numbering logic > - user mode does not need that => there are #ifdef everywhere > > So this series moves all the current numbering logic to the machine > code. It also provides the ability for each machine type to provide > its own numbering logic instead of using the legacy one. > > The current code computes cpu_dt_id out of cpu_index, both getting > their values during cpu realization. > > The idea is to compute cpu_index at cpu initialization time, so > that the machine can compute cpu_dt_id before realizing the cpu. > > I had to fix some issues and to do some more structural changes to have > this working, hence the RFC tag. The first 4 patches are bug fixes. The > next ones do what the subject says. > Of course I forgot to add the RFC tag in the subject :) but yes, the 4 last patches especially deserve some feedback and are definitely not 2.7 material. > This patchset is based on David's ppc-for-2.7 branch. I could test it plays > nicely with Bharata's CPU hotplug code for sPAPR. > > There are some more places where the cpu_dt_id logic is open coded in the > sPAPR code. It may be worth to consolidate that in follow-up patches. Also > maybe other machine types may provide their own numbering logic if the > current one is not appropriate. > > Please comment. > > --- > > Greg Kurz (8): > spapr: drop reference on child object during core realization > spapr: do proper error propagation in spapr_cpu_core_realize_child() > spapr: drop duplicate variable in spapr_core_release() > exec: add missing conditional compilation > exec: move cpu_index init and exit to their own function > ppc: move cpu index setup to instance_init/finalize > cpu: add initialization helper without realize > hw/ppc: move DT cpu id generation to machine code > > > exec.c | 72 +++++++++++++++++++++++++++++++++---------- > hw/ppc/e500.c | 2 + > hw/ppc/mac_newworld.c | 2 + > hw/ppc/mac_oldworld.c | 2 + > hw/ppc/ppc.c | 60 ++++++++++++++++++++++++++++++++++++ > hw/ppc/ppc440_bamboo.c | 2 + > hw/ppc/ppc4xx_devs.c | 2 + > hw/ppc/prep.c | 2 + > hw/ppc/spapr.c | 2 + > hw/ppc/spapr_cpu_core.c | 23 ++++++++++---- > hw/ppc/virtex_ml507.c | 2 + > include/exec/exec-all.h | 2 + > include/hw/ppc/ppc.h | 4 ++ > include/qom/cpu.h | 14 ++++++++ > qom/cpu.c | 19 ++++++++++- > target-ppc/translate_init.c | 42 ++++++------------------- > 16 files changed, 185 insertions(+), 67 deletions(-) > > -- > Greg > >