Skip to contentSkip to conversation

of apci_1_compatible in CPUHotplugFeatures

Qemu-devel Dr. David Alan Gilbert 3 participants 7 messages Jan 22, 2019 – Jan 28, 2019

lore
Share & tools
lore
#0 lore raw

Hi,
I noticed that the acpi_1_compatible flag was misspelt as
apci_1_compatible

so have a trivial patch to fix that, but looking at it - are thre any cases where a[cp]i_1_compatible can possibly be false?

Dave
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#1 lore raw
Quoted 8 lines · Dr. David Alan Gilbert

Hi,
I noticed that the acpi_1_compatible flag was misspelt as
apci_1_compatible

so have a trivial patch to fix that, but looking at it - are thre any cases where a[cp]i_1_compatible can possibly be false?

Dave

legacy_cpu_hotplug so machine 2.6 and older - no?

Quoted 2 lines

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#2 lore raw
Quoted 11 lines · * Michael S. Tsirkin ([email protected]) wrote:
Quoted 8 lines · Dr. David Alan Gilbert

Hi,
I noticed that the acpi_1_compatible flag was misspelt as
apci_1_compatible

so have a trivial patch to fix that, but looking at it - are thre any cases where a[cp]i_1_compatible can possibly be false?

Dave

legacy_cpu_hotplug so machine 2.6 and older - no?

That doesn't seem to affect that flag by my reading; the only place I see legacy_cpu_hotplug checked is acpi-build.c:build_dsdt and we have:

    if (pcmc->legacy_cpu_hotplug) {
        build_legacy_cpu_hotplug_aml(dsdt, machine, pm->cpu_hp_io_base);
    } else {
        CPUHotplugFeatures opts = {
            .acpi_1_compatible = true, .has_legacy_cphp = true
        };
        build_cpus_aml(dsdt, machine, opts, pm->cpu_hp_io_base,
                       "\\_SB.PCI0", "\\_GPE._E02");
    }

so the 'opts' field is only used in the non-legacy case.

That's the only caller of build_cpus_aml, and I'm not seeing another user of CPUHotplugFeatures.

Dave

Quoted 2 lines
Quoted 2 lines

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#3 lore raw
Quoted 7 lines · On Wed, 23 Jan 2019 18:28:59 +0000 "Dr. David Alan Gilbert"…
Quoted 6 lines · * Michael S. Tsirkin ([email protected]) wrote:
Quoted 5 lines · Dr. David Alan Gilbert

Hi,
I noticed that the acpi_1_compatible flag was misspelt as
apci_1_compatible

so have a trivial patch to fix that,

pls post it.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

but looking at it - are
thre any cases where a[cp]i_1_compatible can possibly be false?

ATM it's not possible, but I've wrote it with intent to reuse build_cpus_aml() in arm/virt board and there we shall use newer aml_device() instead of legacy aml_processor(), hence a feature flag to toggle behavior.

Quoted 30 lines
Quoted 4 lines
Quoted 2 lines

Dave

legacy_cpu_hotplug so machine 2.6 and older - no?

That doesn't seem to affect that flag by my reading; the only place I see legacy_cpu_hotplug checked is acpi-build.c:build_dsdt and we have:

    if (pcmc->legacy_cpu_hotplug) {
        build_legacy_cpu_hotplug_aml(dsdt, machine, pm->cpu_hp_io_base);
    } else {
        CPUHotplugFeatures opts = {
            .acpi_1_compatible = true, .has_legacy_cphp = true
        };
        build_cpus_aml(dsdt, machine, opts, pm->cpu_hp_io_base,
                       "\\_SB.PCI0", "\\_GPE._E02");
    }

so the 'opts' field is only used in the non-legacy case.

That's the only caller of build_cpus_aml, and I'm not seeing another user of CPUHotplugFeatures.

Dave

Quoted 2 lines
Quoted 2 lines

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#4 lore raw
Quoted 11 lines · * Igor Mammedov ([email protected]) wrote:
Quoted 7 lines · On Wed, 23 Jan 2019 18:28:59 +0000 "Dr. David Alan Gilbert"…
Quoted 6 lines · * Michael S. Tsirkin ([email protected]) wrote:
Quoted 5 lines · Dr. David Alan Gilbert

Hi,
I noticed that the acpi_1_compatible flag was misspelt as
apci_1_compatible

so have a trivial patch to fix that,

pls post it.

Done.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

but looking at it - are
thre any cases where a[cp]i_1_compatible can possibly be false?

ATM it's not possible, but I've wrote it with intent to reuse build_cpus_aml() in arm/virt board and there we shall use newer aml_device() instead of legacy aml_processor(), hence a feature flag to toggle behavior.

OK, that's fine, I just couldn't see why the flag was there given the current uses.

Dave

Quoted 25 lines
Quoted 25 lines
Quoted 5 lines
Quoted 3 lines

Dave

legacy_cpu_hotplug so machine 2.6 and older - no?

That doesn't seem to affect that flag by my reading; the only place I see legacy_cpu_hotplug checked is acpi-build.c:build_dsdt and we have:

    if (pcmc->legacy_cpu_hotplug) {
        build_legacy_cpu_hotplug_aml(dsdt, machine, pm->cpu_hp_io_base);
    } else {
        CPUHotplugFeatures opts = {
            .acpi_1_compatible = true, .has_legacy_cphp = true
        };
        build_cpus_aml(dsdt, machine, opts, pm->cpu_hp_io_base,
                       "\\_SB.PCI0", "\\_GPE._E02");
    }

so the 'opts' field is only used in the non-legacy case.

That's the only caller of build_cpus_aml, and I'm not seeing another user of CPUHotplugFeatures.

Quoted 7 lines
Quoted 6 lines

Dave

Quoted 2 lines
Quoted 2 lines

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#5 lore raw
In reply to Igor Mammedov
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Wed, 23 Jan 2019 18:28:59 +0000 "Dr. David Alan Gilbert"…
Quoted 6 lines · * Michael S. Tsirkin ([email protected]) wrote:
Quoted 5 lines · Dr. David Alan Gilbert

Hi,
I noticed that the acpi_1_compatible flag was misspelt as
apci_1_compatible

so have a trivial patch to fix that,

Quoted 8 lines

pls post it.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

but looking at it - are
thre any cases where a[cp]i_1_compatible can possibly be false?

ATM it's not possible, but I've wrote it with intent to reuse build_cpus_aml() in arm/virt board and there we shall use newer aml_device() instead of legacy aml_processor(), hence a feature flag to toggle behavior.

Are there imminent plans to do this? If not why don't we drop unused code? One can always bring it back from git history if need arises but for now there's no guarantee it's not broken as it never runs.

Quoted 31 lines
Quoted 31 lines
Quoted 5 lines
Quoted 3 lines

Dave

legacy_cpu_hotplug so machine 2.6 and older - no?

That doesn't seem to affect that flag by my reading; the only place I see legacy_cpu_hotplug checked is acpi-build.c:build_dsdt and we have:

    if (pcmc->legacy_cpu_hotplug) {
        build_legacy_cpu_hotplug_aml(dsdt, machine, pm->cpu_hp_io_base);
    } else {
        CPUHotplugFeatures opts = {
            .acpi_1_compatible = true, .has_legacy_cphp = true
        };
        build_cpus_aml(dsdt, machine, opts, pm->cpu_hp_io_base,
                       "\\_SB.PCI0", "\\_GPE._E02");
    }

so the 'opts' field is only used in the non-legacy case.

That's the only caller of build_cpus_aml, and I'm not seeing another user of CPUHotplugFeatures.

Dave

Quoted 2 lines
Quoted 2 lines

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#6 lore raw
Quoted 20 lines · On Fri, 25 Jan 2019 14:49:28 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Wed, 23 Jan 2019 18:28:59 +0000 "Dr. David Alan Gilbert"…
Quoted 6 lines · * Michael S. Tsirkin ([email protected]) wrote:
Quoted 5 lines · Dr. David Alan Gilbert

Hi,
I noticed that the acpi_1_compatible flag was misspelt as
apci_1_compatible

so have a trivial patch to fix that,

Quoted 8 lines

pls post it.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

but looking at it - are
thre any cases where a[cp]i_1_compatible can possibly be false?

ATM it's not possible, but I've wrote it with intent to reuse build_cpus_aml() in arm/virt board and there we shall use newer aml_device() instead of legacy aml_processor(), hence a feature flag to toggle behavior.

Quoted 4 lines

Are there imminent plans to do this? If not why don't we drop unused code? One can always bring it back from git history if need arises but for now there's no guarantee it's not broken as it never runs.

I'm working on it (I mean adding CPU hotplug support for ARM (QEMU side of it)), so I'd keep it.

Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 5 lines
Quoted 3 lines

Dave

legacy_cpu_hotplug so machine 2.6 and older - no?

That doesn't seem to affect that flag by my reading; the only place I see legacy_cpu_hotplug checked is acpi-build.c:build_dsdt and we have:

    if (pcmc->legacy_cpu_hotplug) {
        build_legacy_cpu_hotplug_aml(dsdt, machine, pm->cpu_hp_io_base);
    } else {
        CPUHotplugFeatures opts = {
            .acpi_1_compatible = true, .has_legacy_cphp = true
        };
        build_cpus_aml(dsdt, machine, opts, pm->cpu_hp_io_base,
                       "\\_SB.PCI0", "\\_GPE._E02");
    }

so the 'opts' field is only used in the non-legacy case.

That's the only caller of build_cpus_aml, and I'm not seeing another user of CPUHotplugFeatures.

Dave

Quoted 2 lines
Quoted 2 lines

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK