From owner-dev-commits-src-main@freebsd.org Sat Sep 25 16:30:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9EA986AC59B; Sat, 25 Sep 2021 16:30:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HGvWb479Nz4mgR; Sat, 25 Sep 2021 16:30:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:e948:53aa:fce5:d12d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 009B9C3B4; Sat, 25 Sep 2021 16:30:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: c8077ccd70cf - main - acpi_cpu: Make device unit numbers match OS CPU IDs. To: Alexander Motin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202109250124.18P1OOP5035829@gitrepo.freebsd.org> From: John Baldwin Message-ID: <5d4a3f4f-0249-01b6-37ef-9a3dd9a8d7ad@FreeBSD.org> Date: Sat, 25 Sep 2021 09:30:01 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <202109250124.18P1OOP5035829@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2021 16:30:03 -0000 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 > AuthorDate: 2021-09-25 01:03:02 +0000 > Commit: Alexander Motin > 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