Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Sep 2021 09:30:01 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        Alexander Motin <mav@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: c8077ccd70cf - main - acpi_cpu: Make device unit numbers match OS CPU IDs.
Message-ID:  <5d4a3f4f-0249-01b6-37ef-9a3dd9a8d7ad@FreeBSD.org>
In-Reply-To: <202109250124.18P1OOP5035829@gitrepo.freebsd.org>
References:  <202109250124.18P1OOP5035829@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@FreeBSD.org>
> AuthorDate: 2021-09-25 01:03:02 +0000
> Commit:     Alexander Motin <mav@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5d4a3f4f-0249-01b6-37ef-9a3dd9a8d7ad>