From nobody Sat Nov 6 15:45:36 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 6EB7317DCE29; Sat, 6 Nov 2021 15:45:38 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (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 4HmhXy2VGGz4gqw; Sat, 6 Nov 2021 15:45:38 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-qk1-x72e.google.com with SMTP id c20so1519634qko.10; Sat, 06 Nov 2021 08:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mRGa7237yGXvKFxbS0Vk5p++Rip/FNAm6c5lyxezwPs=; b=F2pGVDSHfoicWYbWuiWc/T0o6VfQBz1svc4M5wMKIeBFAGFY+srnxY+KOgq3uD7de1 ojY9VeV22Tfp+NN2vHq7FXu2FS2aKg2giwneBTVLCzwDamLXUtI6r6zXpQMYrSt1CwR9 4Sd6dX8LH7G6MWdCGeSS5dfdZUXtsvU89kwpzzne9CeZDPZDJl4MXNpBViG4UAKcLEcj OePO+Z8ShdFpJRevhCHyHbZrRY4q7tNdikA+VF5KN5LT1NjfjVTDqo8QTAjbIfDEvC3T LrM29/V9pAz8OvUmFh4KnFMfuFLPFB5ivL9HQYGDe4FDgpIFHbfP80sxX7ZAHvB6nZbS nizA== 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:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mRGa7237yGXvKFxbS0Vk5p++Rip/FNAm6c5lyxezwPs=; b=E2xxADtTXUL10J4D1pOp4eldgzl+rnjcq96HaPluHFRnIUGBT1k43SM0EQQT9BMTTf Miltj6EqKkMlk/4KWNFM5udMGKZlbgm4JHRpP7OK7ESn6y4/0xRaGOPwWxNOjEMVhmnd pFePpb+TVtcxNVHhN5nVi6EFT5nJJIP2JLDnd01nwjXmskv5uogWRJpyjGdbdI74QrKK x8Kf8NyIYNDkQxUkbsblLwFnC+1fobXv88KGorrMZ99oquDHU8odYV8f2jb7hqAOm2Rp g7fjBm2fYGRyNtFqvarUmMxTBtG1enVFG5JUYxh34Js3VK2/Iu8uXlPwfKZzG9D7wk9i BzDA== X-Gm-Message-State: AOAM533ivI4U7AQGit9ahYzB87CpgmNCt9AXeA58/6phljgcFLP5qRZr VSHelpd+XbOBPB6lU76tMqm9ajVvjcM= X-Google-Smtp-Source: ABdhPJy7gxh4V39+dDVOu58JYPWrnSGpV3eOvq+LnffQ9/hfhkOinhuFlSwVFFAs9XHjduK9BGoiaA== X-Received: by 2002:a05:620a:4550:: with SMTP id u16mr32559019qkp.112.1636213537576; Sat, 06 Nov 2021 08:45:37 -0700 (PDT) Received: from mavoffice.ixsystems.com ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id v18sm1921868qta.56.2021.11.06.08.45.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 Nov 2021 08:45:36 -0700 (PDT) Sender: Alexander Motin Subject: Re: git: 6badb512a94d - main - Prefer CPUID leaf 1Fh for Intel CPU topology detection. To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202111061516.1A6FGuAe038007@gndrsh.dnsmgr.net> From: Alexander Motin Message-ID: <2eeb65b1-4f75-9c92-f885-0a9bb2b6cf99@FreeBSD.org> Date: Sat, 6 Nov 2021 11:45:36 -0400 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: <202111061516.1A6FGuAe038007@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4HmhXy2VGGz4gqw 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 Rodney, On 06.11.2021 11:16, Rodney W. Grimes wrote: >> /* We only support three levels for now. */ >> for (i = 0; ; i++) { >> - cpuid_count(0x0b, i, p); >> + cpuid_count(leaf, i, p); >> >> bits = p[0] & 0x1f; >> type = (p[2] >> 8) & 0xff; >> @@ -412,13 +422,12 @@ topo_probe_intel_0xb(void) >> if (type == 0) >> break; >> >> - /* TODO: check for duplicate (re-)assignment */ >> if (type == CPUID_TYPE_SMT) >> core_id_shift = bits; >> else if (type == CPUID_TYPE_CORE) >> pkg_id_shift = bits; >> - else >> - printf("unknown CPU level type %d\n", type); > > Why do we loose this potential diagnostic message, Because it is not an error and not important for average user. New specifications list addition of such levels as Module, Tile and Die, meaning of which and OS use is unclear at this point. I've actually made the new message more informative under the bootverbose to help later developers when the time of those types come. > and isnt its trailing \n needed to close the probe message? > It would need to be come an else of the if (bootverbose) if > I am reading things correctly. It does not close any probe message, it is a full line, so there is nothing for "else". >> + else if (bootverbose) >> + printf("Topology level type %d shift: %d\n", type, bits); >> } >> >> if (pkg_id_shift < core_id_shift) { >> > -- Alexander Motin