|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH 07/12] hw/acpi/piix4: introduce piix4_pm_init() instance init function |
Date: | Mon, 30 May 2022 12:44:24 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 |
On 29/5/22 21:06, Bernhard Beschow wrote:
Am 28. Mai 2022 09:19:29 UTC schrieb Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>:Use the new piix4_pm_init() instance init function to initialise 2 separate qdev gpios for the SCI and SMI IRQs. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> --- hw/acpi/piix4.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index d897d2dee6..454fa34df1 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -497,6 +497,14 @@ static void piix4_pm_realize(PCIDevice *dev, Error **errp) piix4_pm_add_properties(s); } +static void piix4_pm_init(Object *obj) +{ + PIIX4PMState *s = PIIX4_PM(obj); + + qdev_init_gpio_out(DEVICE(obj), &s->irq, 1); + qdev_init_gpio_out_named(DEVICE(obj), &s->smi_irq, "smi-irq", 1); +}The two IRQs still get connected internally. Doesn't this create the risk of double connections until patches 8 and 9 are applied?
The same field is initialized twice indeed, but we shouldn't have "double connections". It could be cleaner to split this patch
and squash in the following 2 patches. Can do.
[Prev in Thread] | Current Thread | [Next in Thread] |