ppc patch queue for 2021-03-31
Here's another set of patches for the ppc target and associated machine types. I'd hoped to send this closer to the hard freeze, but got caught up for some time chasing what looked like a strange regression, before finally concluding it was due to unrelated failures on the CI. This is just a handful of fairly straightforward fixes, plus one performance improvement that's simple and beneficial enough that I'm considering it a "performance bug fix". -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAmBkFRkACgkQbDjKyiDZ s5JrbBAAlaiADr4H0nx6XcNXdDCru+ceG1kc9xVMRIg3oSex4hhMkUH4kNqEVAVT pfekIRlv2I5jlth4ogxHY5SqAJ9/NqZBMT9NxgSoDQAZtSIvW/6PegcdbbcdSnGT afBYJH/Tw4aqu2K92knTX7meVxlmhcQF/we1tYkUkO1iEfRSSz7Ubdb5QxTbuAch 1aOWg9RPw47DqLsPDnEZ+VLkRZI6m02uFy8Bl4DOM9DuugY+qKrCnWR1wgnWFMty lbYzKRnoDtrs/ginAY8uzNEonoeAhLOYO1vgAbSE0sastueNhLx4tBhB5Q6Wxw1e gETP1/a/+RNOIf3ua4zucVcDswqgxw0TPZYIjesn498eFxTggy2au2Rlwkg+lQt1 jS258BFfOPKkL/cmVWC84nVZhIasE3uA6A7A5tQjFEyaAPOijIRwg6nwx46zTTeO kFZLBoc5T9933sXaXlsj1dB/bSZ0aBPOZBBhL5eIgeLsfTAcJGNfwT8k2qBpWRqn pX7ZbFvqgUm3bLtY+GIbCa8hHLrmdxfPhfh+J+NrM75lQrjKKBsToDI2fBF+5iIc UYoRFngqSP0rGq4H/zLlFNjN5J9wYfjKxA4fA+1ghB7LmUSABoOGOCmrLNnjvis6 5iy8CbUZ0fHxoABbma3hb2vaMYgKyxE0pD83v7TysjpyW6IQ9uY= =jEq4 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.0-20210331' into staging ppc patch queue for 2021-03-31 Here's another set of patches for the ppc target and associated machine types. I'd hoped to send this closer to the hard freeze, but got caught up for some time chasing what looked like a strange regression, before finally concluding it was due to unrelated failures on the CI. This is just a handful of fairly straightforward fixes, plus one performance improvement that's simple and beneficial enough that I'm considering it a "performance bug fix". # gpg: Signature made Wed 31 Mar 2021 07:22:17 BST # gpg: using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full] # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full] # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full] # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown] # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dg-gitlab/tags/ppc-for-6.0-20210331: hw/net: fsl_etsec: Tx padding length should exclude CRC spapr: Fix typo in the patb_entry comment spapr: Assert DIMM unplug state in spapr_memory_unplug() target/ppc/kvm: Cache timebase frequency hw/ppc: e500: Add missing #address-cells and #size-cells in the eTSEC node Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
6ee55e1d10
@ -259,7 +259,7 @@ static void process_tx_bd(eTSEC *etsec,
|
||||
|| etsec->regs[MACCFG2].value & MACCFG2_PADCRC) {
|
||||
|
||||
/* Padding and CRC (Padding implies CRC) */
|
||||
tx_padding_and_crc(etsec, 64);
|
||||
tx_padding_and_crc(etsec, 60);
|
||||
|
||||
} else if (etsec->first_bd.flags & BD_TX_TC
|
||||
|| etsec->regs[MACCFG2].value & MACCFG2_CRC_EN) {
|
||||
|
@ -237,6 +237,8 @@ static int create_devtree_etsec(SysBusDevice *sbdev, PlatformDevtreeData *data)
|
||||
qemu_fdt_setprop_string(fdt, node, "model", "eTSEC");
|
||||
qemu_fdt_setprop(fdt, node, "local-mac-address", etsec->conf.macaddr.a, 6);
|
||||
qemu_fdt_setprop_cells(fdt, node, "fixed-link", 0, 1, 1000, 0, 0);
|
||||
qemu_fdt_setprop_cells(fdt, node, "#size-cells", 1);
|
||||
qemu_fdt_setprop_cells(fdt, node, "#address-cells", 1);
|
||||
|
||||
qemu_fdt_add_subnode(fdt, group);
|
||||
qemu_fdt_setprop_cells(fdt, group, "reg", mmio0, 0x1000);
|
||||
|
@ -3660,6 +3660,9 @@ static void spapr_memory_unplug(HotplugHandler *hotplug_dev, DeviceState *dev)
|
||||
SpaprMachineState *spapr = SPAPR_MACHINE(hotplug_dev);
|
||||
SpaprDimmState *ds = spapr_pending_dimm_unplugs_find(spapr, PC_DIMM(dev));
|
||||
|
||||
/* We really shouldn't get this far without anything to unplug */
|
||||
g_assert(ds);
|
||||
|
||||
pc_dimm_unplug(PC_DIMM(dev), MACHINE(hotplug_dev));
|
||||
qdev_unrealize(dev);
|
||||
spapr_pending_dimm_unplugs_remove(spapr, ds);
|
||||
|
@ -168,7 +168,7 @@ struct SpaprMachineState {
|
||||
SpaprResizeHpt resize_hpt;
|
||||
void *htab;
|
||||
uint32_t htab_shift;
|
||||
uint64_t patb_entry; /* Process tbl registed in H_REGISTER_PROCESS_TABLE */
|
||||
uint64_t patb_entry; /* Process tbl registed in H_REGISTER_PROC_TBL */
|
||||
SpaprPendingHpt *pending_hpt; /* in-progress resize */
|
||||
|
||||
hwaddr rma_size;
|
||||
|
@ -1815,24 +1815,37 @@ static int read_cpuinfo(const char *field, char *value, int len)
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint32_t kvmppc_get_tbfreq(void)
|
||||
static uint32_t kvmppc_get_tbfreq_procfs(void)
|
||||
{
|
||||
char line[512];
|
||||
char *ns;
|
||||
uint32_t retval = NANOSECONDS_PER_SECOND;
|
||||
uint32_t tbfreq_fallback = NANOSECONDS_PER_SECOND;
|
||||
uint32_t tbfreq_procfs;
|
||||
|
||||
if (read_cpuinfo("timebase", line, sizeof(line))) {
|
||||
return retval;
|
||||
return tbfreq_fallback;
|
||||
}
|
||||
|
||||
ns = strchr(line, ':');
|
||||
if (!ns) {
|
||||
return retval;
|
||||
return tbfreq_fallback;
|
||||
}
|
||||
|
||||
ns++;
|
||||
tbfreq_procfs = atoi(++ns);
|
||||
|
||||
return atoi(ns);
|
||||
/* 0 is certainly not acceptable by the guest, return fallback value */
|
||||
return tbfreq_procfs ? tbfreq_procfs : tbfreq_fallback;
|
||||
}
|
||||
|
||||
uint32_t kvmppc_get_tbfreq(void)
|
||||
{
|
||||
static uint32_t cached_tbfreq;
|
||||
|
||||
if (!cached_tbfreq) {
|
||||
cached_tbfreq = kvmppc_get_tbfreq_procfs();
|
||||
}
|
||||
|
||||
return cached_tbfreq;
|
||||
}
|
||||
|
||||
bool kvmppc_get_host_serial(char **value)
|
||||
|
Loading…
Reference in New Issue
Block a user