git: c8077ccd70cf - main - acpi_cpu: Make device unit numbers match OS CPU IDs.

John Baldwin jhb at FreeBSD.org
Sat Sep 25 16:30:03 UTC 2021


On 9/24/21 6:24 PM, Alexander Motin wrote:
> The branch main has been updated by mav:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=c8077ccd70cfcbcccb752e89b848f098abcb9309
> 
> commit c8077ccd70cfcbcccb752e89b848f098abcb9309
> Author:     Alexander Motin <mav at FreeBSD.org>
> AuthorDate: 2021-09-25 01:03:02 +0000
> Commit:     Alexander Motin <mav at FreeBSD.org>
> CommitDate: 2021-09-25 01:24:19 +0000
> 
>      acpi_cpu: Make device unit numbers match OS CPU IDs.
>      
>      There are already APIC ID, ACPI ID and OS ID for each CPU.  In perfect
>      world all of those may match, but at least for SuperMicro server boards
>      none of them do.  Plus none of them match the CPU devices listing order
>      by ACPI.  Previous code used the ACPI device listing order to number
>      cpuX devices.  It looked nice from NewBus perspective, but introduced
>      4th different set of IDs. Extremely confusing one, since in some places
>      the device unit numbers were treated as OS CPU IDs (coretemp), but not
>      in others (sysctl dev.cpu.X.%location).

FWIW, the "normal" way to force specific device unit numbers is via
bus_hint_device_unit, but perhaps that is specific to when hints
exits whereas this is specific to a bus property.  Perhaps though this
can't have the unit number assigned by the bus at the BUS_ADD_CHILD
call?  That would be the other way to handle this perhaps vs trying to
change the unit in the probe routine.

-- 
John Baldwin


More information about the dev-commits-src-all mailing list