• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

コミットメタ情報

リビジョンba49190107ee9803fb2f336b15283b457384b178 (tree)
日時2022-01-18 20:56:31
作者Cédric Le Goater <clg@kaod...>
コミッターCédric Le Goater

ログメッセージ

ppc/pnv: Remove PHB4 version property

Grab the PHB version from the PEC class directly when needed.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220117122753.1655504-4-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>

変更サマリ

差分

--- a/hw/pci-host/pnv_phb4.c
+++ b/hw/pci-host/pnv_phb4.c
@@ -672,7 +672,7 @@ static uint64_t pnv_phb4_reg_read(void *opaque, hwaddr off, unsigned size)
672672
673673 switch (off) {
674674 case PHB_VERSION:
675- return phb->version;
675+ return PNV_PHB4_PEC_GET_CLASS(phb->pec)->version;
676676
677677 /* Read-only */
678678 case PHB_PHB4_GEN_CAP:
@@ -1575,7 +1575,6 @@ static void pnv_phb4_realize(DeviceState *dev, Error **errp)
15751575 if (!phb->pec) {
15761576 PnvMachineState *pnv = PNV_MACHINE(qdev_get_machine());
15771577 PnvChip *chip = pnv_get_chip(pnv, phb->chip_id);
1578- PnvPhb4PecClass *pecc;
15791578 BusState *s;
15801579
15811580 if (!chip) {
@@ -1589,11 +1588,6 @@ static void pnv_phb4_realize(DeviceState *dev, Error **errp)
15891588 return;
15901589 }
15911590
1592- /* All other phb properties are already set */
1593- pecc = PNV_PHB4_PEC_GET_CLASS(phb->pec);
1594- object_property_set_int(OBJECT(phb), "version", pecc->version,
1595- &error_fatal);
1596-
15971591 /*
15981592 * Reparent user created devices to the chip to build
15991593 * correctly the device tree.
@@ -1688,7 +1682,6 @@ static void pnv_phb4_xive_notify(XiveNotifier *xf, uint32_t srcno)
16881682 static Property pnv_phb4_properties[] = {
16891683 DEFINE_PROP_UINT32("index", PnvPHB4, phb_id, 0),
16901684 DEFINE_PROP_UINT32("chip-id", PnvPHB4, chip_id, 0),
1691- DEFINE_PROP_UINT64("version", PnvPHB4, version, 0),
16921685 DEFINE_PROP_LINK("pec", PnvPHB4, pec, TYPE_PNV_PHB4_PEC,
16931686 PnvPhb4PecState *),
16941687 DEFINE_PROP_END_OF_LIST(),
--- a/hw/pci-host/pnv_phb4_pec.c
+++ b/hw/pci-host/pnv_phb4_pec.c
@@ -117,7 +117,6 @@ static void pnv_pec_default_phb_realize(PnvPhb4PecState *pec,
117117 Error **errp)
118118 {
119119 PnvPHB4 *phb = PNV_PHB4(qdev_new(TYPE_PNV_PHB4));
120- PnvPhb4PecClass *pecc = PNV_PHB4_PEC_GET_CLASS(pec);
121120 int phb_id = pnv_phb4_pec_get_phb_id(pec, stack_no);
122121
123122 object_property_set_link(OBJECT(phb), "pec", OBJECT(pec),
@@ -126,8 +125,6 @@ static void pnv_pec_default_phb_realize(PnvPhb4PecState *pec,
126125 &error_fatal);
127126 object_property_set_int(OBJECT(phb), "index", phb_id,
128127 &error_fatal);
129- object_property_set_int(OBJECT(phb), "version", pecc->version,
130- &error_fatal);
131128
132129 if (!sysbus_realize(SYS_BUS_DEVICE(phb), errp)) {
133130 return;