From nobody Mon Feb 07 21:22:56 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 C07FD19AA040; Mon, 7 Feb 2022 21:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JszdD4tshz4vMl; Mon, 7 Feb 2022 21:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644268976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b2IW5VSFxu9pR277k+zMMsv36I7RIQaTilGlAIKKNtY=; b=fV58ZkuQieojmwbkkQ4io8Xbu7IStYgG03RpIJREwPtz6IA7j3E53DLRVabok+ikETUoGi pH/A2LA6IEeIbukPoM960atDYL/2eOChYUMcDe59RC4nEZ7QTZr+PfAHn0NzwhugBoSoDs d8lGFdAB5kBli3vivNCJ8YzSwua8Qc+hyzprj/yWaahUO7MO0wqPiin9LgT23UQUm6xdrK Zi4qbHL/M5MEr9WM+sHpyDIVLWBwAgaoaRdZxDLhcpQoKzzP8wlgdg8G9RRcctoV7ea0bl tRebwS6tMQd4iLLBs4/0r7KuhKN8BjCnTAJ5FKQI6n25PLokrrsjIG1rC/gHTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 875DB529B; Mon, 7 Feb 2022 21:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 217LMugF091385; Mon, 7 Feb 2022 21:22:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 217LMuZ7091384; Mon, 7 Feb 2022 21:22:56 GMT (envelope-from git) Date: Mon, 7 Feb 2022 21:22:56 GMT Message-Id: <202202072122.217LMuZ7091384@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3ec0dc367bff - main - kern_ntptime.c: Remove ntp_init() 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=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ec0dc367bff27c345ad83240625b2057af391b9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644268976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b2IW5VSFxu9pR277k+zMMsv36I7RIQaTilGlAIKKNtY=; b=cgSn4xYI9TrKQcJ6LGlkzTwJ4ALHd2DtGg9C5+7VoP988J8CkxBA52heigTT0i0rl1ep5Z JCaPr0COsDc++OEVay10m8iFxSiLV6VD+KH6qqcCLyBM5twXvPBNNhDA3xF8oOuwan8Fc7 VFGciD8fu+GYr8ydZHtkQbJfx0Ln86osk+tSB+nhAAAwCIaRwJBp2sAzCdrL9YF69uoyPQ HWdQ/aADhhql35WW8pcAcY6cAQREmWz17Zn0d/Sl6Ld7ErQwdrLA20k7genAN3H9bC8RE4 JopoBoCpepJNDNyEToKBa5Bkw/149ZiKbyF7XS0ynoACC1qtkEln7jJSLCP/XQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644268976; a=rsa-sha256; cv=none; b=hBwd8dCgzIiei7nkgzKEjVFhHsotfn3gfWmjGY2AdnLgss1VADaTcLAXsTPS8BHzfY3AtD 3FozwoOFcPsu18YSzK9A42LItQtkFw8m+kCw5T7b9kqntPXcU4egggIlffkDVrOnH6P2sq icfcNMuNvMjOta0tODmfS3+A7bcm035I1pRh9Bkgan7w0LDvL0uoo1fW+dIk2pg2uTKSeU IRtIuk+4X8bGUn2NKveiaHTmvIHEE8gA4nj7rNpHfvxTFeayRL+FgOjAfAXIK9oXHKh2+p Cje9HignPs6k6BdYRpHuLNalKrXjj91QPrJeYrEtX65lncYCkbU5cZzIsaklfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3ec0dc367bff27c345ad83240625b2057af391b9 commit 3ec0dc367bff27c345ad83240625b2057af391b9 Author: Sebastian Huber AuthorDate: 2022-02-07 21:16:16 +0000 Commit: Warner Losh CommitDate: 2022-02-07 21:16:16 +0000 kern_ntptime.c: Remove ntp_init() The ntp_init() function did set a couple of global objects to zero. These objects are in the .bss section and already initialized to zero during kernel or module loading. --- sys/kern/kern_ntptime.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c index a8418248abd7..96f14a408bcb 100644 --- a/sys/kern/kern_ntptime.c +++ b/sys/kern/kern_ntptime.c @@ -207,7 +207,6 @@ static long pps_errcnt; /* calibration errors */ * End of phase/frequency-lock loop (PLL/FLL) definitions */ -static void ntp_init(void); static void hardupdate(long offset); static void ntp_gettime1(struct ntptimeval *ntvp); static bool ntp_is_time_error(int tsl); @@ -632,39 +631,6 @@ ntp_update_second(int64_t *adjustment, time_t *newsec) NTP_UNLOCK(); } -/* - * ntp_init() - initialize variables and structures - * - * This routine must be called after the kernel variables hz and tick - * are set or changed and before the next tick interrupt. In this - * particular implementation, these values are assumed set elsewhere in - * the kernel. The design allows the clock frequency and tick interval - * to be changed while the system is running. So, this routine should - * probably be integrated with the code that does that. - */ -static void -ntp_init(void) -{ - - /* - * The following variables are initialized only at startup. Only - * those structures not cleared by the compiler need to be - * initialized, and these only in the simulator. In the actual - * kernel, any nonzero values here will quickly evaporate. - */ - L_CLR(time_offset); - L_CLR(time_freq); -#ifdef PPS_SYNC - pps_tf[0].tv_sec = pps_tf[0].tv_nsec = 0; - pps_tf[1].tv_sec = pps_tf[1].tv_nsec = 0; - pps_tf[2].tv_sec = pps_tf[2].tv_nsec = 0; - pps_fcount = 0; - L_CLR(pps_freq); -#endif /* PPS_SYNC */ -} - -SYSINIT(ntpclocks, SI_SUB_CLOCKS, SI_ORDER_MIDDLE, ntp_init, NULL); - /* * hardupdate() - local clock update *