From patchwork Wed Feb 28 20:32:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 879374 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ilande.co.uk Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zs6jZ1TH7z9s2B for ; Thu, 1 Mar 2018 07:34:10 +1100 (AEDT) Received: from localhost ([::1]:46703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er8QS-0000bZ-8Y for incoming@patchwork.ozlabs.org; Wed, 28 Feb 2018 15:34:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er8PW-0000Wt-5k for qemu-devel@nongnu.org; Wed, 28 Feb 2018 15:33:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er8PS-00020Y-WF for qemu-devel@nongnu.org; Wed, 28 Feb 2018 15:33:10 -0500 Received: from chuckie.co.uk ([82.165.15.123]:58460 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1er8PS-0001ux-OP; Wed, 28 Feb 2018 15:33:06 -0500 Received: from host109-151-5-120.range109-151.btcentralplus.com ([109.151.5.120] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1er8PV-0003Ba-F1; Wed, 28 Feb 2018 20:33:10 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au Date: Wed, 28 Feb 2018 20:32:31 +0000 Message-Id: <20180228203243.1413-1-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 109.151.5.120 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCHv3 00/12] macio: remove legacy macio_init() function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This patchset eliminates the legacy macio_init() function used to setup the ESCC and PIC memory regions and instead allows the macio device to be instantiated directly via qdev, wiring up the ESCC internally using sysbus MMIO memory regions and the PIC via QOM object links. The biggest surprise in this patchset was the need to QOMify the heathrow device which apparently up until now has never required any of these new-fangled APIs from the last decade such as qdev and QOM. There's still some follow-up work to do with the PCI host bridge wiring but it seems to me that this is a good preparation step. Signed-off-by: Mark Cave-Ayland v3: - Rebase onto master - Add extra R-B tags from David and Philippe - Add patch 8 to move KVM openpic declarations into separate openpic_kvm.h file (fixes compilation of ppc-linux-user) v2: - Rebase onto master - Add R-B tags from David - Rework patch 4 ("heathrow: convert to trace-events") as suggested by David Mark Cave-Ayland (12): macio: embed DBDMA device directly within macio macio: move ESCC device within the macio device heathrow: QOMify heathrow PIC heathrow: convert to trace-events heathrow: change heathrow_pic_init() to return the heathrow device macio: move macio related structures and defines into separate macio.h file mac_oldworld: use object link to pass heathrow PIC object to macio openpic: move KVM-specific declarations into separate openpic_kvm.h file openpic: move OpenPIC state and related definitions to openpic.h mac_newworld: use object link to pass OpenPIC object to macio macio: move setting of CUDA timebase frequency to macio_common_realize() macio: remove macio_init() function hw/intc/heathrow_pic.c | 166 +++++++++++++++++++++-------------------- hw/intc/openpic.c | 157 -------------------------------------- hw/intc/openpic_kvm.c | 1 + hw/intc/trace-events | 5 ++ hw/misc/macio/macio.c | 150 +++++++++++++++++-------------------- hw/ppc/e500.c | 1 + hw/ppc/mac.h | 10 +-- hw/ppc/mac_newworld.c | 56 +++++--------- hw/ppc/mac_oldworld.c | 50 +++++-------- include/hw/intc/heathrow_pic.h | 49 ++++++++++++ include/hw/misc/macio/macio.h | 79 ++++++++++++++++++++ include/hw/ppc/openpic.h | 160 ++++++++++++++++++++++++++++++++++++++- include/hw/ppc/openpic_kvm.h | 7 ++ target/ppc/kvm-stub.c | 2 +- 14 files changed, 494 insertions(+), 399 deletions(-) create mode 100644 include/hw/intc/heathrow_pic.h create mode 100644 include/hw/misc/macio/macio.h create mode 100644 include/hw/ppc/openpic_kvm.h