From nobody Tue Mar 14 11:09:37 2023 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 4PbW4y2HVnz3y7Nw; Tue, 14 Mar 2023 11:09:38 +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 4PbW4y1TzRz3mm0; Tue, 14 Mar 2023 11:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678792178; 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=hBeiiDNeJ54zW1F7zIqpy3KJ6ZouEzNl+EF8RrVji0g=; b=WRheklgPQcmo0/X+PYmFGhCLQPwQICBo4XuDO8CtXMtIxFN6yzvnOolrqg0ln06/KPvB02 XI10VGxlETJxndfFchskd1gObTb7/eo0v7LZgRikNWhdau/0od6nYmg6eMnQcY41xo3r/v eP8ZW2J9iI1IdfBiHdCABMHSE1JmBAaaZET7IlNVuJSe6oySdSKdE5Omhd2pEGmKBa1Kr9 pwJ+z8kDfAaH2dmtcv25UpJSXEoFA+g8nNK27dDXg2dlD6J8rM0U1v1Fu/ztdf+EUeObY3 gX2CddiBn3N5B0RU/mgs0dHOOebRtM0ZxC3I8RzTJdi+5uNPZWHt89M7zAHSwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678792178; 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=hBeiiDNeJ54zW1F7zIqpy3KJ6ZouEzNl+EF8RrVji0g=; b=EdfzIszDCL2nlbvRhJCYXZM6JzWvIDSmsDREHK7Cwcj6R6EGUNI49lzzxH07DNkHpxlD1V I4L1UVJ3Aiq/TLReyT3YDmHEtbjjcvH+moI6uMeHUqKrB1/evIkVbWCoo6YeO4z5IfZT+1 o9QBrezU9B+H9O7CHIDcoDzXzMGhi3CybYJDWNuDyKRfSnVKMvfW5zSnIa6vQFAKAPQ+WP FZK4Va5nURZUC+WPYfg8Dr8KKK5kY27PZiFGUGA6+eWPlYjL6gWXABRIgWl8xgfa81qPU0 zenhmQ/2l0AsuZjV5vJlb3uRuZUNgp7rslMep7UKviqYjNPEUobtH3aUSAUDGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678792178; a=rsa-sha256; cv=none; b=d6zQ6YGwaq4+45vaMSjRPCNxMedYjkgfE+Q++fjNi4ipfC3Ar2vn0D/O6XtRHh3AZEPp/R dvfjAql4plH63CP06czrt7sqG9wygbVh7+sgLUsSGADJa1uAGGKxREkyOuWg8SZwtBOaPr mN4l/6D5Q6C8jiC7TngD/1qAXCNdL2ZjoqtLHIgkZYTtH6CfUXZMrmo4utgUMFXqTPq9t3 jNgoBzKRG/aYaz4MlY7E8Uv9twTjqAmFuJbr+mXOzVinIAY0L/3W6jrh/Uk4q87Ba4Holc kcGJWsD/S5LODbBry+sWeUPfvgxn0nyaH4DVWjxwhGI8djufHLnyL3J5oZDVTg== 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 4PbW4y0b6nzY19; Tue, 14 Mar 2023 11:09:38 +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 32EB9baA032765; Tue, 14 Mar 2023 11:09:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32EB9blR032764; Tue, 14 Mar 2023 11:09:37 GMT (envelope-from git) Date: Tue, 14 Mar 2023 11:09:37 GMT Message-Id: <202303141109.32EB9blR032764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 93d574ea957d - main - Always enable the virtual timer for userspace 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93d574ea957decec1c95dea9bfa8bc72457cc60d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=93d574ea957decec1c95dea9bfa8bc72457cc60d commit 93d574ea957decec1c95dea9bfa8bc72457cc60d Author: Andrew Turner AuthorDate: 2023-03-10 12:43:59 +0000 Commit: Andrew Turner CommitDate: 2023-03-14 10:37:36 +0000 Always enable the virtual timer for userspace We always have it, some languages assume it's present, e.g. go before 1.20. Enable it by default on arm and arm64. PR: 269070 Reviewed by: kevans Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D39059 --- sys/arm/arm/generic_timer.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index 5d694e8e9660..0b48841c9960 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -270,13 +270,12 @@ setup_user_access(void *arg __unused) cntkctl = get_el1(cntkctl); cntkctl &= ~(GT_CNTKCTL_PL0PTEN | GT_CNTKCTL_PL0VTEN | - GT_CNTKCTL_EVNTEN); + GT_CNTKCTL_EVNTEN | GT_CNTKCTL_PL0PCTEN); + /* Always enable the virtual timer */ + cntkctl |= GT_CNTKCTL_PL0VCTEN; + /* Enable the physical timer if supported */ if (arm_tmr_sc->physical) { cntkctl |= GT_CNTKCTL_PL0PCTEN; - cntkctl &= ~GT_CNTKCTL_PL0VCTEN; - } else { - cntkctl |= GT_CNTKCTL_PL0VCTEN; - cntkctl &= ~GT_CNTKCTL_PL0PCTEN; } set_el1(cntkctl, cntkctl); isb();