From nobody Fri Mar 04 15:13:54 2022 X-Original-To: dev-commits-src-main@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 71CC419FFDB1; Fri, 4 Mar 2022 15:14:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (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 4K9BG52b0Fz3jRY; Fri, 4 Mar 2022 15:14:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x82b.google.com with SMTP id c4so7618605qtx.1; Fri, 04 Mar 2022 07:14:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jAYO4YAsK1056aWtNwlVoIdUd9Ju2J5ykYSvH5NCiXI=; b=my8UO23blLCC8FiTrGmkUXAcfG7jGYJp9kGjfCQWK0ff3F48lwb2kOOvHgc1dN3awE 0IUoJqV2pitxlnngC0ebMnBpIOE5EDN4I9POW4xeA63Jv97qU8eizh2xHypkIV/0q0ej BtlUdWLl/41rYcshtMsoY/K0vQDJqN+WmQ5RodcWptoJPUI3NhNcuO995lo+DMSQteN5 Ax0GtxFeBRMgu+MvPt/gsJGYItQBq9bQWk38NY6t/CsER+C2AQVZ2K2f6GPfzYB+EHdQ 88g9y7srw6Q1mi1RmXynq+F1WLwuusw77v1Nx1MiGefGuMtib7A6/ZuU4jbEG130MmHH 2IaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=jAYO4YAsK1056aWtNwlVoIdUd9Ju2J5ykYSvH5NCiXI=; b=wtf7nd6nM/BN0ClD9RwGPo/ray6wCYQYU1Pbsgr/cTA73/ug7CxwYfNIWg52AnFG4u pTJ0F/R1MEgcU6zbSaEl/Acem8YlFlzRXfbfPudvvQSINfDkb1Xny7eN8QeY7axot2GY xvYkF0fopuhrU+Isl8HLwDxErgYQOwP0kpfgt5FTMxjSEWsgbAOq8h/Tdl5ZqHUmjsRy kDJpvkZx6mANJOAUy9wSPTqNm4eMCbG3RG5nW0uKCCGILK56bvSmD6mUkhEzgidymQWB C2ypRlKkWKQ5j1NQvW+mwTsSMJrJUzyyVCaIB14GUw0+mzwbTpIbA5Ecd618l7q4mScs X69Q== X-Gm-Message-State: AOAM533pax3oLZbp4CyajpkvbUctAH5g0ymbmOp80jqzzOLCYyZls53w CYrNZjpFZ/WR/rwfTI/RE0u3ZA11z1Q= X-Google-Smtp-Source: ABdhPJzzBlbibHxGGEmvDuaAIiz8rfJ14+axfT9apyykJKmD3I+ZT7JcvDoeTtQV+3/+uZhXdH5xOQ== X-Received: by 2002:ac8:5ac6:0:b0:2de:4b60:688 with SMTP id d6-20020ac85ac6000000b002de4b600688mr32322873qtd.251.1646406838732; Fri, 04 Mar 2022 07:13:58 -0800 (PST) Received: from nuc (198-84-189-58.cpe.teksavvy.com. [198.84.189.58]) by smtp.gmail.com with ESMTPSA id f4-20020a05622a1a0400b002de1b1dda9fsm3332211qtb.94.2022.03.04.07.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 07:13:57 -0800 (PST) Date: Fri, 4 Mar 2022 10:13:54 -0500 From: Mark Johnston To: Shawn Webb Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 84369dd52369 - main - x86: Probe the TSC frequency earlier Message-ID: References: <202203011439.221EdtpY038505@gitrepo.freebsd.org> <20220304142447.bmo7r6syd6gsunnt@mutt-hbsd> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220304142447.bmo7r6syd6gsunnt@mutt-hbsd> X-Rspamd-Queue-Id: 4K9BG52b0Fz3jRY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Fri, Mar 04, 2022 at 09:24:47AM -0500, Shawn Webb wrote: > On Tue, Mar 01, 2022 at 02:39:55PM +0000, Mark Johnston wrote: > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=84369dd52369cbae28970dca20a53d3de1719907 > > > > commit 84369dd52369cbae28970dca20a53d3de1719907 > > Author: Mark Johnston > > AuthorDate: 2022-03-01 14:39:35 +0000 > > Commit: Mark Johnston > > CommitDate: 2022-03-01 14:39:35 +0000 > > > > x86: Probe the TSC frequency earlier > > > > This lets us use the TSC to implement early DELAY, limiting the use of > > the sometimes-unreliable 8254 PIT. > > > > PR: 262155 > > Reviewed by: emaste > > Tested by: emaste, mike tancsa , Stefan Hegnauer > > MFC after: 1 month > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D34367 > > --- > > sys/amd64/amd64/machdep.c | 14 +++++- > > sys/i386/i386/machdep.c | 11 ++++- > > sys/x86/include/clock.h | 3 +- > > sys/x86/isa/clock.c | 4 +- > > sys/x86/x86/tsc.c | 123 +++++++++++++++++++++++++--------------------- > > 5 files changed, 94 insertions(+), 61 deletions(-) > > Hey Mark, > > Something about this commit breaks booting in Hyper-V. Reverting this > particular commit makes Hyper-V happy again. The patch below might be sufficient. I'll test it in Azure but it'll take me some time. diff --git a/sys/x86/x86/delay.c b/sys/x86/x86/delay.c index c767250954da..95b994b15f81 100644 --- a/sys/x86/x86/delay.c +++ b/sys/x86/x86/delay.c @@ -89,7 +89,7 @@ delay_tc(int n) return (1); } tc = timecounter; - if (tc->tc_quality <= 0) + if (tc == NULL || tc->tc_quality <= 0) return (0); func = tc->tc_get_timecount; mask = tc->tc_counter_mask;