Message ID | 20250114114653.48778-6-npiggin@gmail.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Z2uk4/ax; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4YXS6J0hQ6z1xpT for <incoming@patchwork.ozlabs.org>; Tue, 14 Jan 2025 22:47:20 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4YXS6G5mVyz30Lt for <incoming@patchwork.ozlabs.org>; Tue, 14 Jan 2025 22:47:18 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2607:f8b0:4864:20::62f" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1736855237; cv=none; b=B3RrPYEvZmLNQWU6Glef7HVor2Xa+3PJsliHk8fWoIW7bNo5bHZx7CDsA2ngFdBXAWJpWtKKbT5FgfvMvlAr0qgAT4TVB0EzLUFOY6OJ9TbRvpJxya4V8h6FkZ3PRUeUYSRcHntAVBXuf08qgoZbTABmOqplhStlqoheZ+Ktic+2UWQ0pyv1neHfz7yw1ONC1u2u4b8gsbYmxDpPwVw1S3oV5UmZ4hUOyg0zf7zBHRIP5Mcw3y0Enno1NcbNWqzyDhr5oZPJgqx6nWFU1rljwVDuKV+JDvYvxfDd4+dY+DRYZtcy737njtDWE4xM1n6kkhLQaiofPonYMvNkEbyY0Q== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1736855237; c=relaxed/relaxed; bh=bpwq9KWvSeE6G0hlirzZyBD1l7fChS4ix4+dCNdtKpM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hNSt+tx4I06ChUDlKjWbsumDCPyq9OzYTIhpCE1AAk7+6MDIBaKtGdTsOdjsFs7SQ+CgX6uo0bU5vXep7DQFgm0POpOy5AK8BFP0jMQkYB2sCscnfkcOGWK1Cw6SGlP0n7XSnApVWDVPmBW9N5MmxHmnQuQ0AWXRM/jH5vEDGrlxGVL6QPpkzNBIhu7Riu7W7crT7HWNejnw+OaSUKzBUZpOx+Qb3Dh0txM+/vnGT2uQTsuZbXXK3A1BlPiSliq8jQ08c8oSpTJk8VzsdtNWmU4aq2YSjqIJ8rpyu/c9FGOWVe5dI0tWVSZjUssOU8i3+Zjx0ad7LAxzQwtxxnDUgg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Z2uk4/ax; dkim-atps=neutral; spf=pass (client-ip=2607:f8b0:4864:20::62f; helo=mail-pl1-x62f.google.com; envelope-from=npiggin@gmail.com; receiver=lists.ozlabs.org) smtp.mailfrom=gmail.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Z2uk4/ax; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::62f; helo=mail-pl1-x62f.google.com; envelope-from=npiggin@gmail.com; receiver=lists.ozlabs.org) Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4YXS6D4YKSz30RG for <skiboot@lists.ozlabs.org>; Tue, 14 Jan 2025 22:47:16 +1100 (AEDT) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-216395e151bso64950615ad.0 for <skiboot@lists.ozlabs.org>; Tue, 14 Jan 2025 03:47:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736855234; x=1737460034; darn=lists.ozlabs.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bpwq9KWvSeE6G0hlirzZyBD1l7fChS4ix4+dCNdtKpM=; b=Z2uk4/axYAdUFINhjD4wmI3kh6AHAzQXP9vnYkWzydyNCdnlPurTxcvWlw+ysmexzk YVxNlj6srOwD7ueieN1af8f3ouDAzDNo82u+fB7xJ9HpaZiN2SIsCnzXZDfIieKjPy/5 kFcIQRih/Q2++GagOJHsBL9vXaeQR1iYkGi4FHHjNUGGEo8OFCcCBeY625HgvDd6shhA Qd/Gr/BGhBrnWlxYvdy8vn+jinnV6XVGwEL44zfwYcrRmICoFVbaYbMqC4x2RJCos2zF SzbfJkQkfZ4Lix0WjXk22VXJSUa5ahKch+OrYPtbKuO/A8bsS4YgspcAJr6r6I20yyKi AnqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736855234; x=1737460034; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bpwq9KWvSeE6G0hlirzZyBD1l7fChS4ix4+dCNdtKpM=; b=xCODhpJRddjVy3JYe8U/soTsIdSxxYEgIVb/45zqz1DuC9zLTJUCxPnD24W2x0brIY SL45QjUy0Sx4u6WMSg4y0d+6nzfFMy0eJ4KKk1B/SrWOUPSKbQVEScxpQ+7/3bAmtoyI DT/elBKzqRYOo9D8BWJ35I/FSAuyGhK4AeJLaolsL4sfCwjYXbHwWKCuzZrnYg8cK8+F Uzep4d6NUH+sYcXMHuAbT1vZLJ5DTixJHuBvv9Uv2ghfHEjiLoE3VdTHin06L8HPsqCx 921hHdOl71jtizuKk6AuUIHF8AYZ9UMls6DMayjS/bMC392PHO66XXTy4b8/TDfxfcLL nuHQ== X-Gm-Message-State: AOJu0Yx7zTGSECZf9aMj0rFgGAfxIQzI+d2rp7NxmnIGDT1gTGEs+Jl/ Uy9jy+8ti3vSpOcY7LBTKqr0ZGIs/q7qHEmPPsoHw0DZHX1XmEjCJxcuog== X-Gm-Gg: ASbGncvEjOEgBITaXA9ZSVe2iPjRJhdE7By1lgtN1qTUtXK8HXGLBUlIc+pUBvY7ocD hRnpz6e9w3qWz/qmtz/6C1p/xeZgk+YjgcLQLqDDT4BZ5DUnNq2ocH7Z9DOlZZVOTCKWprlCloM BsbL2eJ4eLDrsFTbFgOCeIXqB1tojK71Wyd1Oey6N4U8WZd8ki3oW/W8EU+l2MEW2n2TCnYUkaw ndpXZyib8/NUGrPe2ouS78CD+zHX1l0mfTUcoLcCJOTHSkN5pszPyGniEtyTw== X-Google-Smtp-Source: AGHT+IHL6TbJM1RKHuFgSKk4ue0yTCRsDcaPjcaN7S1xXmHOlXB82UwLjzXXFQtfovBM6E53Gpt+Yw== X-Received: by 2002:a17:902:e84f:b0:216:5cc8:44e7 with SMTP id d9443c01a7336-21a8d6e9869mr302495345ad.25.1736855233473; Tue, 14 Jan 2025 03:47:13 -0800 (PST) Received: from wheely.local0.net ([118.210.104.29]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21a9f256e44sm65986305ad.216.2025.01.14.03.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 03:47:13 -0800 (PST) From: Nicholas Piggin <npiggin@gmail.com> To: skiboot@lists.ozlabs.org Date: Tue, 14 Jan 2025 21:46:46 +1000 Message-ID: <20250114114653.48778-6-npiggin@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250114114653.48778-1-npiggin@gmail.com> References: <20250114114653.48778-1-npiggin@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on lists.ozlabs.org Subject: [Skiboot] [PATCH v2 05/11] hw/sbe-p9: Re-set the SBE timer after SBE interrupt X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development <skiboot.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/skiboot/> List-Post: <mailto:skiboot@lists.ozlabs.org> List-Help: <mailto:skiboot-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
Timer improvements series
|
expand
|
diff --git a/hw/sbe-p9.c b/hw/sbe-p9.c index 4eafd24fd..f164ff8a7 100644 --- a/hw/sbe-p9.c +++ b/hw/sbe-p9.c @@ -548,6 +548,8 @@ static void p9_sbe_timer_response(struct p9_sbe *sbe) * we can schedule next timer request. */ timer_update_cnt = 0; + sbe_timer_target = ~0ull; + has_new_target = false; unlock(&sbe_timer_lock); check_timers(true); @@ -958,7 +960,7 @@ static void p9_sbe_timer_init(void) assert(timer_ctrl_msg); init_lock(&sbe_timer_lock); sbe_has_timer = true; - sbe_timer_target = mftb(); + sbe_timer_target = ~0ull; sbe_last_gen_stamp = ~0ull; sbe_timer_def_tb = usecs_to_tb(SBE_TIMER_DEFAULT_US); prlog(PR_INFO, "Timer facility on chip %x\n", sbe_default_chip_id);
When the SBE interrupt fires, clear the previous sbe_timer_target and has_new_target variables, because the timer code will send us an updated timer expiry after running check_timers(). This allows for example, a case where the SBE timer has fired too early to reschedule the SBE timer again rather than leaving it to be picked up by polling. SBE timer can fire early if the timer exceeds its maximum timeout, or of the SBE timing is a little off. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- hw/sbe-p9.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)