Commit 9c36281b authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.1-20180907' into staging



ppc patch queue 2018-09-07

Here's another pull request for qemu-3.1.  No real theme here, just an
assortment of various fixes.  Probably the most notable thing is the
removal of the ppcemb target which has been deprecated for some time
now.

# gpg: Signature made Fri 07 Sep 2018 08:30:02 BST
# gpg:                using RSA key 6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
# gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-3.1-20180907:
  target-ppc: Extend HWCAP2 bits for ISA 3.0
  target/ppc/kvm: set vcpu as online/offline
  Fix a deadlock case in the CPU hotplug flow
  spapr: Correct reference count on spapr-cpu-core
  mac_newworld: implement custom FWPathProvider
  uninorth: add ofw-addr property to allow correct fw path generation
  mac_oldworld: implement custom FWPathProvider
  grackle: set device fw_name and address for correct fw path generation
  macio: add addr property to macio IDE object
  macio: add macio bus to help with fw path generation
  macio: move MACIOIDEState type declarations to macio.h
  spapr_pci: fix potential NULL pointer dereference
  spapr: fix leak of rev array
  ppc: Remove deprecated ppcemb target

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents ee4402ea be0c46d4
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -195,8 +195,7 @@ supported_kvm_target() {
        i386:i386 | i386:x86_64 | i386:x32 | \
        x86_64:i386 | x86_64:x86_64 | x86_64:x32 | \
        mips:mips | mipsel:mips | \
        ppc:ppc | ppcemb:ppc | ppc64:ppc | \
        ppc:ppc64 | ppcemb:ppc64 | ppc64:ppc64 | \
        ppc:ppc | ppc64:ppc | ppc:ppc64 | ppc64:ppc64 | \
        s390x:s390x)
            return 0
        ;;
@@ -6951,7 +6950,7 @@ if test "$linux" = "yes" ; then
  i386|x86_64|x32)
    linux_arch=x86
    ;;
  ppcemb|ppc|ppc64)
  ppc|ppc64)
    linux_arch=powerpc
    ;;
  s390x)
@@ -6981,7 +6980,7 @@ target_name=$(echo $target | cut -d '-' -f 1)
target_bigendian="no"

case "$target_name" in
  armeb|aarch64_be|hppa|lm32|m68k|microblaze|mips|mipsn32|mips64|moxie|or1k|ppc|ppcemb|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus|xtensaeb)
  armeb|aarch64_be|hppa|lm32|m68k|microblaze|mips|mipsn32|mips64|moxie|or1k|ppc|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus|xtensaeb)
  target_bigendian=yes
  ;;
esac
@@ -7109,12 +7108,6 @@ case "$target_name" in
    gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
    target_compiler=$cross_cc_powerpc
  ;;
  ppcemb)
    TARGET_BASE_ARCH=ppc
    TARGET_ABI_DIR=ppc
    gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
    target_compiler=$cross_cc_ppcemb
  ;;
  ppc64)
    TARGET_BASE_ARCH=ppc
    TARGET_ABI_DIR=ppc
+0 −1
Original line number Diff line number Diff line
@@ -2251,7 +2251,6 @@ static CpuInfoArch sysemu_target_to_cpuinfo_arch(SysEmuTarget target)
        return CPU_INFO_ARCH_X86;

    case SYS_EMU_TARGET_PPC:
    case SYS_EMU_TARGET_PPCEMB:
    case SYS_EMU_TARGET_PPC64:
        return CPU_INFO_ARCH_PPC;

+0 −23
Original line number Diff line number Diff line
# Default configuration for ppcemb-softmmu

include pci.mak
include sound.mak
include usb.mak
CONFIG_PPC4XX=y
CONFIG_M48T59=y
CONFIG_SERIAL=y
CONFIG_SERIAL_ISA=y
CONFIG_I8257=y
CONFIG_OPENPIC=y
CONFIG_PFLASH_CFI01=y
CONFIG_PFLASH_CFI02=y
CONFIG_PTIMER=y
CONFIG_I8259=y
CONFIG_XILINX=y
CONFIG_XILINX_ETHLITE=y
CONFIG_USB_EHCI_SYSBUS=y
CONFIG_SM501=y
CONFIG_DDC=y
CONFIG_IDE_SII3112=y
CONFIG_I2C=y
CONFIG_BITBANG_I2C=y
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#include "hw/hw.h"
#include "hw/ppc/mac.h"
#include "hw/ppc/mac_dbdma.h"
#include "hw/misc/macio/macio.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"

@@ -460,6 +461,7 @@ static void macio_ide_initfn(Object *obj)

static Property macio_ide_properties[] = {
    DEFINE_PROP_UINT32("channel", MACIOIDEState, channel, 0),
    DEFINE_PROP_UINT32("addr", MACIOIDEState, addr, -1),
    DEFINE_PROP_END_OF_LIST(),
};

+31 −11
Original line number Diff line number Diff line
@@ -90,6 +90,15 @@ static void macio_bar_setup(MacIOState *s)
    macio_escc_legacy_setup(s);
}

static void macio_init_child_obj(MacIOState *s, const char *childname,
                                 void *child, size_t childsize,
                                 const char *childtype)
{
    object_initialize_child(OBJECT(s), childname, child, childsize, childtype,
                            &error_abort, NULL);
    qdev_set_parent_bus(DEVICE(child), BUS(&s->macio_bus));
}

static void macio_common_realize(PCIDevice *d, Error **errp)
{
    MacIOState *s = MACIO(d);
@@ -210,10 +219,11 @@ static void macio_init_ide(MacIOState *s, MACIOIDEState *ide, size_t ide_size,
                           int index)
{
    gchar *name = g_strdup_printf("ide[%i]", index);
    uint32_t addr = 0x1f000 + ((index + 1) * 0x1000);

    sysbus_init_child_obj(OBJECT(s), name, ide, ide_size, TYPE_MACIO_IDE);
    memory_region_add_subregion(&s->bar, 0x1f000 + ((index + 1) * 0x1000),
                                &ide->mem);
    macio_init_child_obj(s, name, ide, ide_size, TYPE_MACIO_IDE);
    qdev_prop_set_uint32(DEVICE(ide), "addr", addr);
    memory_region_add_subregion(&s->bar, addr, &ide->mem);
    g_free(name);
}

@@ -229,7 +239,7 @@ static void macio_oldworld_init(Object *obj)
                             qdev_prop_allow_set_link_before_realize,
                             0, NULL);

    sysbus_init_child_obj(obj, "cuda", &s->cuda, sizeof(s->cuda), TYPE_CUDA);
    macio_init_child_obj(s, "cuda", &s->cuda, sizeof(s->cuda), TYPE_CUDA);

    object_initialize(&os->nvram, sizeof(os->nvram), TYPE_MACIO_NVRAM);
    dev = DEVICE(&os->nvram);
@@ -340,7 +350,7 @@ static void macio_newworld_realize(PCIDevice *d, Error **errp)
        object_property_set_link(OBJECT(&s->pmu), OBJECT(sysbus_dev), "gpio",
                                 &error_abort);
        qdev_prop_set_bit(DEVICE(&s->pmu), "has-adb", ns->has_adb);
        qdev_set_parent_bus(DEVICE(&s->pmu), sysbus_get_default());
        qdev_set_parent_bus(DEVICE(&s->pmu), BUS(&s->macio_bus));
        object_property_add_child(OBJECT(s), "pmu", OBJECT(&s->pmu), NULL);

        object_property_set_bool(OBJECT(&s->pmu), true, "realized", &err);
@@ -356,7 +366,7 @@ static void macio_newworld_realize(PCIDevice *d, Error **errp)
    } else {
        /* CUDA */
        object_initialize(&s->cuda, sizeof(s->cuda), TYPE_CUDA);
        qdev_set_parent_bus(DEVICE(&s->cuda), sysbus_get_default());
        qdev_set_parent_bus(DEVICE(&s->cuda), BUS(&s->macio_bus));
        object_property_add_child(OBJECT(s), "cuda", OBJECT(&s->cuda), NULL);
        qdev_prop_set_uint64(DEVICE(&s->cuda), "timebase-frequency",
                             s->frequency);
@@ -385,7 +395,7 @@ static void macio_newworld_init(Object *obj)
                             qdev_prop_allow_set_link_before_realize,
                             0, NULL);

    sysbus_init_child_obj(obj, "gpio", &ns->gpio, sizeof(ns->gpio),
    macio_init_child_obj(s, "gpio", &ns->gpio, sizeof(ns->gpio),
                         TYPE_MACIO_GPIO);

    for (i = 0; i < 2; i++) {
@@ -399,10 +409,13 @@ static void macio_instance_init(Object *obj)

    memory_region_init(&s->bar, obj, "macio", 0x80000);

    sysbus_init_child_obj(obj, "dbdma", &s->dbdma, sizeof(s->dbdma),
    qbus_create_inplace(&s->macio_bus, sizeof(s->macio_bus), TYPE_MACIO_BUS,
                        DEVICE(obj), "macio.0");

    macio_init_child_obj(s, "dbdma", &s->dbdma, sizeof(s->dbdma),
                         TYPE_MAC_DBDMA);

    sysbus_init_child_obj(obj, "escc", &s->escc, sizeof(s->escc), TYPE_ESCC);
    macio_init_child_obj(s, "escc", &s->escc, sizeof(s->escc), TYPE_ESCC);
}

static const VMStateDescription vmstate_macio_oldworld = {
@@ -470,6 +483,12 @@ static void macio_class_init(ObjectClass *klass, void *data)
    dc->user_creatable = false;
}

static const TypeInfo macio_bus_info = {
    .name = TYPE_MACIO_BUS,
    .parent = TYPE_BUS,
    .instance_size = sizeof(MacIOBusState),
};

static const TypeInfo macio_oldworld_type_info = {
    .name          = TYPE_OLDWORLD_MACIO,
    .parent        = TYPE_MACIO,
@@ -501,6 +520,7 @@ static const TypeInfo macio_type_info = {

static void macio_register_types(void)
{
    type_register_static(&macio_bus_info);
    type_register_static(&macio_type_info);
    type_register_static(&macio_oldworld_type_info);
    type_register_static(&macio_newworld_type_info);
Loading