From nobody Wed Dec 01 14:23:29 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7FCB518C7D3F; Wed, 1 Dec 2021 14:23:37 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J41Xn2fQQz4lZ9; Wed, 1 Dec 2021 14:23:37 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-qk1-x736.google.com with SMTP id i9so31081662qki.3; Wed, 01 Dec 2021 06:23:37 -0800 (PST) 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=hWbq/IDEOLeNA+9wFv8ZygnV8U/vaADXvFAMKygzlGE=; b=RtSO9DIJdBthCkFqCA6FsJqciPGsa3OJnngfYR4ruGfUcjrtW/36PnVpOPLgeIZa7A VVuheGEsH5W9yWdqmgmewOhw0BW3tD3pWvdI0hgnnxSjEoS2Qr0zHTQ+Azfp4iUfYjNH pRNhW9rQEZaKr9/79sSmDSRpVfTqfjsaHPuBxJm34gXmPmKT3IQmU8fS1Q4y5+lIejpd ISJZEZAJG8ZG6QE6c0aV2d6n2W5neITtJIdy1vO1ZmoI4Xzg7zNWYGhHf66Jf3Ttgzo+ HC06MgYRQt56b+BwvTCUycGOHzj7Orpo5O0+OFoTEpNGuk5ieDaCSuFpp4KDQybKvg9i yLHQ== 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=hWbq/IDEOLeNA+9wFv8ZygnV8U/vaADXvFAMKygzlGE=; b=SjD+tJTa9Cmhuzn253LiQYg/thdLljhN34yqy9Q2tiXOrrwb/ac9E6eHksHAwZOOQd 982hjxYKxonkT9bqtO0UtSF9nZnfwe4WJrB6vloNOp6S394jRKIDsCA8OGbVKH+CVMKI jioRz3/ieEHhEKcP2I3bMQxGMd43/vlDN4Et5shWF/rlfCAv7wlZWmAmJUMfycsdgAKq 4FFuEmgvIJCUlfQcvwFS3rpGMz8XgXvUSRm7rbOeSLU19a+py6lOYyciWOc8jFmhnhET oHGb6oOyPXTubJF0FvMOdIZkuVGD9V7vqRZGUVvURLAaF1LQLbshSyyvpzms9xXoaPwD 3r2Q== X-Gm-Message-State: AOAM533DzgRI1akaBRFll9kwXemoauZyu5urMUdsKkglqYjYCcNfpwQ5 VyZPNEEnQsMDS/Kh3DOCnA2sQho7h4k= X-Google-Smtp-Source: ABdhPJzLRaN4F00YyrSAH2mfjrQxa5oFGYCu66ln35TzgGEncO8aBb42E/7nBraq5ccJA9X5OFR9JA== X-Received: by 2002:a05:620a:1423:: with SMTP id k3mr6542172qkj.248.1638368610826; Wed, 01 Dec 2021 06:23:30 -0800 (PST) Received: from mavoffice.ixsystems.com ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id o20sm12709658qkp.114.2021.12.01.06.23.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Dec 2021 06:23:30 -0800 (PST) Sender: Alexander Motin Subject: Re: git: d3a8f98acbf5 - main - Make CPU children explicitly share parent unit numbers. To: Andriy Gapon , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202109250332.18P3W9UM008783@gitrepo.freebsd.org> <3c211281-ce4a-3d99-ab45-4d8a6fbdbe55@FreeBSD.org> From: Alexander Motin Message-ID: Date: Wed, 1 Dec 2021 09:23:29 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 In-Reply-To: <3c211281-ce4a-3d99-ab45-4d8a6fbdbe55@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4J41Xn2fQQz4lZ9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi Andriy, On 01.12.2021 01:39, Andriy Gapon wrote: > On 25/09/2021 06:32, Alexander Motin wrote: >> The branch main has been updated by mav: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=d3a8f98acbf51e728411f10c5f179a30b9ca683c >> >> >> commit d3a8f98acbf51e728411f10c5f179a30b9ca683c >> Author:     Alexander Motin >> AuthorDate: 2021-09-25 03:25:46 +0000 >> Commit:     Alexander Motin >> CommitDate: 2021-09-25 03:31:51 +0000 >> >>      Make CPU children explicitly share parent unit numbers. >>           Before this device unit number match was coincidental and >> broke if I >>      disabled some CPU device(s).  Aside of cosmetics, for some drivers >>      (may be considered broken) it caused talking to wrong CPUs. >> --- >>   sys/dev/acpica/acpi_perf.c       | 3 ++- >>   sys/dev/acpica/acpi_throttle.c   | 3 ++- >>   sys/dev/amdtemp/amdtemp.c        | 3 ++- > > It seems that the amdtemp part of this change broke creation of > dev.cpu.0.temperature sysctl node on my (old hardware) system. > > I have 4 cores and amdtemp attaches under hostb4: >     cpu0 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P001 >       acpi_perf0 >       acpi_throttle0 >       hwpstate0 >       cpufreq0 >     cpu1 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P002 >       acpi_perf1 >       hwpstate1 >     cpu2 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P003 >       acpi_perf2 >       hwpstate2 >     cpu3 pnpinfo _HID=none _UID=0 _CID=none at handle=\_PR_.P004 >       acpi_perf3 >       hwpstate3 > ... >     pcib0 pnpinfo _HID=PNP0A03 _UID=0 _CID=none at handle=\_SB_.PCI0 >       pci0 > ... >         hostb4 pnpinfo vendor=0x1022 device=0x1203 subvendor=0x0000 > subdevice=0x0000 class=0x060000 at slot=24 function=3 dbsf=pci0:0:24:3 >           amdtemp4 > > > As you can see amdtemp attaches in a different sub-tree from cpus and > its parent's unit number does not have any relation to any processor. It seems you are right about the parent. But I see that the driver does care about its unit number when adding sysctls to CPUs. I am not sure that default sequential numbering is working by more than coincidence. -- Alexander Motin