From owner-dev-commits-src-all@freebsd.org Sat Sep 25 17:20:21 2021 Return-Path: Delivered-To: dev-commits-src-all@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 81A646ACF21; Sat, 25 Sep 2021 17:20:21 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HGwdd2rqCz4srj; Sat, 25 Sep 2021 17:20:21 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-qt1-x836.google.com with SMTP id r1so12583210qta.12; Sat, 25 Sep 2021 10:20:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vo4nL/uHZ67pRqjWuFleC8cgwln/rApcTx2ERfpHp+U=; b=Gn13z4e2L/qUKOVqYQVdNoBSlv9kizJx6F0bsPZwq/DLPM4i/MCUjt2Wk7fhJVI81n pWvVAaZHxye3uHP3Nu2IaLA6YCoVQ7vSQr6396XQ1b4YC21piF5tSVYIqY1V2ZB1ahdZ prS/wghw1R0EMwIH5dn3Gc4Vs4tFYtKG2/bdRLSF/Hf2Mg1rXV4pZXGW37LSdlGsvgUQ 9VfFwldbm8Q4A5DaoUG1wXu//srQ4KCwveRBSEheR5AvbKHwl0/gKUO1IimJo9Rdoh6t goFz1XSVm47GVZMAb1/3kDJcuH+fBik2y/joPTL6zuT3vfTfHxay2EEu243hsFq35TzL Vlyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vo4nL/uHZ67pRqjWuFleC8cgwln/rApcTx2ERfpHp+U=; b=S1+pAaBz9Lj10+d5zzJA6dKixfONJ6IjtDAQjyRqFE4x1R7SUyLvJtFYTuFSfWGp/s CSwA/cXnqrn5vAyfZ3ZacYN9qhv9NAdkopC8QelEZijQ+hYQuqQFgCxPX0Qh9oNjv2+v XXuaJIO3dcPZgN/AujR07zJ4aUtpUIDZndnGpWHZazK0sAMCrfAEqyhndBDlLEDJe68L i9nbQ1YgYyedcJhyuU8mprpaalWIOqBqaICa+idRGotLuLgj66RY0Nfx/5Uvhw7Gay1Z WMV1c6u6MnbzyBVmz1GFRQk1H9EO+TlhJHB62ovcebFm7FRL1Xs8Hh0VWoAhMOj7E5h6 t5jw== X-Gm-Message-State: AOAM532yBU4SWLZAhOFbEw3+nQtbQEoptYqc20sw5QkgvEx8amGqUpEd u2wJoLlndQFrp9Fl9SAteFwlCHSMsUU= X-Google-Smtp-Source: ABdhPJz/6CUo7LWqUKIBKIgtftBIm+4P51bDZ92lxHHMztH75cHwDuy+jLKOjMhhXvGO8fEva5FlPQ== X-Received: by 2002:ac8:615a:: with SMTP id d26mr10514807qtm.318.1632590419874; Sat, 25 Sep 2021 10:20:19 -0700 (PDT) Received: from spectre.mavhome.dp.ua (104-55-12-234.lightspeed.knvltn.sbcglobal.net. [104.55.12.234]) by smtp.gmail.com with ESMTPSA id n20sm8947174qkk.135.2021.09.25.10.20.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Sep 2021 10:20:19 -0700 (PDT) Sender: Alexander Motin Subject: Re: git: c8077ccd70cf - main - acpi_cpu: Make device unit numbers match OS CPU IDs. To: John Baldwin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202109250124.18P1OOP5035829@gitrepo.freebsd.org> <5d4a3f4f-0249-01b6-37ef-9a3dd9a8d7ad@FreeBSD.org> From: Alexander Motin Message-ID: Date: Sat, 25 Sep 2021 13:20:18 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <5d4a3f4f-0249-01b6-37ef-9a3dd9a8d7ad@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4HGwdd2rqCz4srj X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2021 17:20:21 -0000 On 25.09.2021 12:30, John Baldwin wrote: > 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. Doing it in any of proposed ways would require bus to know about the device specifics much more than it should. I've found it better done this way. Setting device unit number by the driver during the probe is not much worse than setting description, and definitely much better than during attach as done by xen/blkfront, which should probably be changed to probe way too. -- Alexander Motin