Commit e4a9a730 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.0-20180618' into staging



ppc patch queue 2018-06-18

Next batch of ppc and spapr related patches for the 3.0 release.
    * Improved handling of Spectre/Meltdown mitigations for POWER8
    * Numerous Mac machine type cleanups and improvements
    * Cleanup to cpu realize/unrealize path for spapr
    * Create a place for machine-specific per-cpu information, and
      start moving some things to it
    * Assorted bugfixes

# gpg: Signature made Mon 18 Jun 2018 04:52:37 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.0-20180618: (28 commits)
  spapr: fix xics_system_init() error path
  target/ppc, spapr: Move VPA information to machine_data
  ppc/pnv: introduce a pnv_chip_core_realize() routine
  spapr_cpu_core: introduce spapr_create_vcpu()
  spapr_cpu_core: add missing rollback on realization path
  spapr_cpu_core: fix potential leak in spapr_cpu_core_realize()
  spapr_cpu_core: convert last snprintf() to g_strdup_printf()
  pnv: Add cpu unrealize path
  pnv: Clean up cpu realize path
  pnv_core: Allocate cpu thread objects individually
  pnv: Fix some error handling cpu realize()
  spapr: Clean up cpu realize/unrealize paths
  sm501: Do not clear read only bits when writing registers
  mos6522: expose mos6522_update_irq() through MOS6522DeviceClass
  mos6522: remove additional interrupt flag filter from mos6522_update_irq()
  mos6522: only clear the shift register interrupt upon write
  xics_kvm: fix a build break
  mac_newworld: add PMU device
  adb: add property to disable direct reg 3 writes
  adb: fix read reg 3 byte ordering
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents c5ee5cd9 844afc54
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -31,12 +31,14 @@ CONFIG_I2C=y
CONFIG_MAC=y
CONFIG_ESCC=y
CONFIG_MACIO=y
CONFIG_MACIO_GPIO=y
CONFIG_SUNGEM=y
CONFIG_MOS6522=y
CONFIG_CUDA=y
CONFIG_ADB=y
CONFIG_MAC_NVRAM=y
CONFIG_MAC_DBDMA=y
CONFIG_MAC_PMU=y
CONFIG_HEATHROW_PIC=y
CONFIG_GRACKLE_PCI=y
CONFIG_UNIN_PCI=y
+9 −6
Original line number Diff line number Diff line
@@ -836,27 +836,30 @@ static void sm501_system_config_write(void *opaque, hwaddr addr,

    switch (addr) {
    case SM501_SYSTEM_CONTROL:
        s->system_control = value & 0xE300B8F7;
        s->system_control &= 0x10DB0000;
        s->system_control |= value & 0xEF00B8F7;
        break;
    case SM501_MISC_CONTROL:
        s->misc_control = value & 0xFF7FFF20;
        s->misc_control &= 0xEF;
        s->misc_control |= value & 0xFF7FFF10;
        break;
    case SM501_GPIO31_0_CONTROL:
        s->gpio_31_0_control = value;
        break;
    case SM501_GPIO63_32_CONTROL:
        s->gpio_63_32_control = value;
        s->gpio_63_32_control = value & 0xFF80FFFF;
        break;
    case SM501_DRAM_CONTROL:
        s->local_mem_size_index = (value >> 13) & 0x7;
        /* TODO : check validity of size change */
        s->dram_control &= 0x80000000;
        s->dram_control |= value & 0x7FFFFFC3;
        break;
    case SM501_ARBTRTN_CONTROL:
        s->arbitration_control = value & 0x37777777;
        break;
    case SM501_IRQ_MASK:
        s->irq_mask = value;
        s->irq_mask = value & 0xFFDF3F5F;
        break;
    case SM501_MISC_TIMING:
        s->misc_timing = value & 0xF31F1FFF;
+16 −13
Original line number Diff line number Diff line
@@ -261,7 +261,9 @@ static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,
                trace_adb_kbd_request_change_addr(d->devaddr);
                break;
            default:
                if (!d->disable_direct_reg3_writes) {
                    d->devaddr = buf[1] & 0xf;

                    /* we support handlers:
                     * 1: Apple Standard Keyboard
                     * 2: Apple Extended Keyboard (LShift = RShift)
@@ -273,6 +275,7 @@ static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,

                    trace_adb_kbd_request_change_addr_and_handler(d->devaddr,
                                                                  d->handler);
                }
                break;
            }
        }
@@ -290,8 +293,8 @@ static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,
            olen = 2;
            break;
        case 3:
            obuf[0] = d->handler;
            obuf[1] = d->devaddr;
            obuf[0] = d->devaddr;
            obuf[1] = d->handler;
            olen = 2;
            break;
        }
+22 −19
Original line number Diff line number Diff line
@@ -142,7 +142,9 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,
                trace_adb_mouse_request_change_addr(d->devaddr);
                break;
            default:
                if (!d->disable_direct_reg3_writes) {
                    d->devaddr = buf[1] & 0xf;

                    /* we support handlers:
                     * 0x01: Classic Apple Mouse Protocol / 100 cpi operations
                     * 0x02: Classic Apple Mouse Protocol / 200 cpi operations
@@ -158,8 +160,9 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,
                        d->handler = buf[2];
                    }

                trace_adb_mouse_request_change_addr_and_handler(d->devaddr,
                                                                d->handler);
                    trace_adb_mouse_request_change_addr_and_handler(
                        d->devaddr, d->handler);
                }
                break;
            }
        }
@@ -172,8 +175,8 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,
        case 1:
            break;
        case 3:
            obuf[0] = d->handler;
            obuf[1] = d->devaddr;
            obuf[0] = d->devaddr;
            obuf[1] = d->handler;
            olen = 2;
            break;
        }
+7 −0
Original line number Diff line number Diff line
@@ -113,11 +113,18 @@ static void adb_device_realizefn(DeviceState *dev, Error **errp)
    bus->devices[bus->nb_devices++] = d;
}

static Property adb_device_properties[] = {
    DEFINE_PROP_BOOL("disable-direct-reg3-writes", ADBDevice,
                     disable_direct_reg3_writes, false),
    DEFINE_PROP_END_OF_LIST(),
};

static void adb_device_class_init(ObjectClass *oc, void *data)
{
    DeviceClass *dc = DEVICE_CLASS(oc);

    dc->realize = adb_device_realizefn;
    dc->props = adb_device_properties;
    dc->bus_type = TYPE_ADB_BUS;
}

Loading