From nobody Sun Jan 29 14:59:52 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 4P4ZGx0DRfz3cjP6; Sun, 29 Jan 2023 14:59:53 +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 4P4ZGw6lCFz4BrN; Sun, 29 Jan 2023 14:59:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675004393; 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=GCfaJbjNl+XPlQvvHQOYFkjWfT9KO3YbMLN7537auTg=; b=UvNTbKBvZdlqx/LRA1Q6OcdKJ5wT4VO4DmpTcRAzTYaX3BZM6ByXF/L0x4oEs49Slnrrpm xm8Aq2nKirzF/CuDZQ9e/QnxiJX/FKdKZwd/wb/kT4hcfYd47uW9DHJasNozb74Eco+5za 2t4t1tBqeR8Z3oL6PPMJLbWKpVqYDq6ziYeGhMc7ow+ohoioxUY/lMXoX6hJC0+8F0B9tf ZgO1hDGSgLS/30HyVIiUse7D3ErTP8Oyn/WSGNMCSWM1MbIKYcaFDrlBIvEQet7g3MlJ2/ 3tbCmusaB0sMb/j85CzEBjOjiNiOjlQfd3F6dcQTMZR2ZIQnVc7kNb5DHwZWaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675004392; 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=GCfaJbjNl+XPlQvvHQOYFkjWfT9KO3YbMLN7537auTg=; b=shu7r/xkYO6bTadBmse1twdldXnJN2+0VPEOib6QHeGYQxrWGj31H1gctbMGn7OzKd2oVS CoUS53vjxFiBm75HssZEugafwiUGvHs9OIcmeJgAz2X1k+QMyn3Jl1om08TMMXmsaapX3d atTKkj/iW5Z/6AdPpCvoxcLw3qyTMW0mGOjOTebNRqA9rGFYHpkx8e+FDv4uiSPRW+Lyi7 W5PjWQoVFmr1SY6Bnr6LKhNFNpYjFK0A8pU7zicid8QHULZw4dZcy47ovLH7NnuOJRvgry tUttK6yj7d+96isrBpkL7U/k3yKiBr8y/0Ly2a4MZVPGEVXGA3X2PolLreW4vA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675004392; a=rsa-sha256; cv=none; b=u94a2f3sVWxGnMLJPwTc9Y/afDztXBlFe9fEPPcFvhOYnFHoQw/uyLgohuY8vXOlhZhmH0 JNN+MQKnY7R89loV6EEkbkUZJmUY6gg2nY5fjfkXUxy1fuVIjgJ8NCAP9pEO6CQue5XLA9 iI2bg7Q8lWMz7uvzzLwQGBe1o8j6HxhU/N9xg3spP5GVEN4Sim7yum+GMo69Br3BXGNdG+ gGL14wfu22ftKQPy5rcjrew9W4v20PtBBEms6zzbI1PIedsBSW2rLxxFSUvEJhPYXAdzv3 kVk5PAj77JO0KXEhWSIrwI9GbeLlnEVAwdW/+rZpbqSsu0mZ93hrUvy+Bfl/ag== 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 4P4ZGw5m1ZzXYd; Sun, 29 Jan 2023 14:59:52 +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 30TExqXl050356; Sun, 29 Jan 2023 14:59:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30TExq6D050355; Sun, 29 Jan 2023 14:59:52 GMT (envelope-from git) Date: Sun, 29 Jan 2023 14:59:52 GMT Message-Id: <202301291459.30TExq6D050355@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: c57694ce9471 - main - Disable the arm physical timer when an irq exists 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: c57694ce94712ce1fe0341ae51d70446a7dbbfa2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c57694ce94712ce1fe0341ae51d70446a7dbbfa2 commit c57694ce94712ce1fe0341ae51d70446a7dbbfa2 Author: Andrew Turner AuthorDate: 2023-01-28 17:36:24 +0000 Commit: Andrew Turner CommitDate: 2023-01-29 14:58:24 +0000 Disable the arm physical timer when an irq exists Some firmware leaves the timers enabled. Ensure they are disabled if there are any physical timer interrupt resources to ensure we don't receive any unexpected interrupts from them. --- sys/arm/arm/generic_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index 2527af9b9068..0556643032c2 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -521,7 +521,8 @@ arm_tmr_attach(device_t dev) if (sc->res[GT_VIRT] != NULL) arm_tmr_disable(false); /* And the physical */ - if (sc->physical) + if (sc->res[GT_PHYS_SECURE] != NULL || + sc->res[GT_PHYS_NONSECURE] != NULL) arm_tmr_disable(true); arm_tmr_timecount.tc_frequency = sc->clkfreq;