Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2226541/?format=api
{ "id": 2226541, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2226541/?format=api", "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/patch/3414608.aeNJFYEL58@rafael.j.wysocki/", "project": { "id": 9, "url": "http://patchwork.ozlabs.org/api/1.1/projects/9/?format=api", "name": "Linux RTC development", "link_name": "rtc-linux", "list_id": "linux-rtc.vger.kernel.org", "list_email": "linux-rtc@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<3414608.aeNJFYEL58@rafael.j.wysocki>", "date": "2026-04-22T15:26:49", "name": "[v1,3/4] ACPI: TAD: RTC: Refine timer value computations and checks", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "827dcf54675b50b1296f26d1376f1527c065345d", "submitter": { "id": 64267, "url": "http://patchwork.ozlabs.org/api/1.1/people/64267/?format=api", "name": "Rafael J. Wysocki", "email": "rafael@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/rtc-linux/patch/3414608.aeNJFYEL58@rafael.j.wysocki/mbox/", "series": [ { "id": 501033, "url": "http://patchwork.ozlabs.org/api/1.1/series/501033/?format=api", "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/list/?series=501033", "date": "2026-04-22T15:25:46", "name": "ACPI: TAD: Fixes and cleanups on top of recent changes", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501033/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226541/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226541/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-rtc+bounces-6392-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-rtc@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=fUeuHMAw;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-rtc+bounces-6392-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"fUeuHMAw\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "Received": [ "from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g136q1lvyz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 01:29:23 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 469BE302E8A7\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 15:28:01 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9BBCC3469E6;\n\tWed, 22 Apr 2026 15:27:58 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 78CF832861F;\n\tWed, 22 Apr 2026 15:27:58 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 27F3EC19425;\n\tWed, 22 Apr 2026 15:27:56 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776871678; cv=none;\n b=YLTd7JqZ01N735TTFsf454u59ug59U9Xq324HVun7IZMo4bGyfBQJJGibG1nPWZ7dCaDoKCVNreyp2h5Mi5mbXXPUSfTvn70cXU+Wx6rr08d9KWEXrKZbvNRaetdRf9JE2f1AliRUxH4JcQDuwA4IWqFg+pgG4n5HWiWn/tBULw=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776871678; c=relaxed/simple;\n\tbh=SdhQbESNFDH1bXcdLQC9jBBaB9HVX2mb7A0M6v65Zac=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=LnUiWoU2Lo/rpmcw3tIfEKKUuftEUt+j5di1gn2UA4SkJrePm/EOu1hS1VP5hSNDSAg1Q3FRbdegD8rYDH9dBiK8zS2usDP1DSuMGZzgoPpVpBHTqUEYuOvioH5PQ/JHt9Ii2yuXGQkGdE+gMbQwQSoTtePRkA/Kh+3tXfLURgs=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=fUeuHMAw; arc=none smtp.client-ip=10.30.226.201", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1776871678;\n\tbh=SdhQbESNFDH1bXcdLQC9jBBaB9HVX2mb7A0M6v65Zac=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=fUeuHMAwGFWxQzn7hChqoj5FxnmYgwICxcAVpRaKMgRBPbxdKbWjdNgZDJDkrTWJl\n\t 69hQvzBEy5J7rGipctEyus+rGgw4i7acmoRYB0oVB//DblgiOsI3h2h5IhNT+dkDm5\n\t xeFNGBrdcJClie9W7y5pw0esuuyQ/1QLUBox+ZXIWxzY3z3EYOmXYJIJhISZH09f5W\n\t Bdn60CLX7bJtLgqVENp3ika0+MteK3ZuECXqAuG46gFmzJSoO9Cdt1p+TYpN143LqW\n\t dvW9xuEx0gj5ghEnUzY2nlBIkRVT4mKFEE0aU/GFxIg3AGaH0sawIGGPYS3tDgD9/X\n\t gMUN72HFtl3UA==", "From": "\"Rafael J. Wysocki\" <rafael@kernel.org>", "To": "Linux ACPI <linux-acpi@vger.kernel.org>", "Cc": "linux-rtc@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,\n Alexandre Belloni <alexandre.belloni@bootlin.com>", "Subject": "\n [PATCH v1 3/4] ACPI: TAD: RTC: Refine timer value computations and checks", "Date": "Wed, 22 Apr 2026 17:26:49 +0200", "Message-ID": "<3414608.aeNJFYEL58@rafael.j.wysocki>", "Organization": "Linux Kernel Development", "In-Reply-To": "<2415066.ElGaqSPkdT@rafael.j.wysocki>", "References": "<2415066.ElGaqSPkdT@rafael.j.wysocki>", "Precedence": "bulk", "X-Mailing-List": "linux-rtc@vger.kernel.org", "List-Id": "<linux-rtc.vger.kernel.org>", "List-Subscribe": "<mailto:linux-rtc+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-rtc+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "7Bit", "Content-Type": "text/plain; charset=\"UTF-8\"" }, "content": "From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>\n\nSince rtc_tm_to_ktime() may overflow for large RTC time values and\nfull second granularity is sufficient in timer value computations\nin acpi_tad_rtc_set_alarm() and acpi_tad_rtc_read_alarm(), use\nrtc_tm_to_time64() instead of that function, which also allows the\ncomputations to be simplified.\n\nMoreover, U32_MAX is a special \"timer disabled\" value, so make\nacpi_tad_rtc_set_alarm() reject it when attempting to program the\nalarm timers.\n\nFixes: 7572dcabe38d (\"ACPI: TAD: Add alarm support to the RTC class device interface\")\nSigned-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>\n---\n drivers/acpi/acpi_tad.c | 8 +++-----\n 1 file changed, 3 insertions(+), 5 deletions(-)", "diff": "--- a/drivers/acpi/acpi_tad.c\n+++ b/drivers/acpi/acpi_tad.c\n@@ -680,9 +680,8 @@ static int acpi_tad_rtc_set_alarm(struct\n \n \t\tacpi_tad_rt_to_tm(&rt, &tm_now);\n \n-\t\tvalue = ktime_divns(ktime_sub(rtc_tm_to_ktime(t->time),\n-\t\t\t\t\t rtc_tm_to_ktime(tm_now)), NSEC_PER_SEC);\n-\t\tif (value <= 0 || value > U32_MAX)\n+\t\tvalue = rtc_tm_to_time64(&t->time) - rtc_tm_to_time64(&tm_now);\n+\t\tif (value <= 0 || value >= U32_MAX)\n \t\t\treturn -EINVAL;\n \t}\n \n@@ -745,8 +744,7 @@ static int acpi_tad_rtc_read_alarm(struc\n \n \tif (retval != ACPI_TAD_WAKE_DISABLED) {\n \t\tt->enabled = 1;\n-\t\tt->time = rtc_ktime_to_tm(ktime_add_ns(rtc_tm_to_ktime(tm_now),\n-\t\t\t\t\t\t (u64)retval * NSEC_PER_SEC));\n+\t\trtc_time64_to_tm(rtc_tm_to_time64(&tm_now) + retval, &t->time);\n \t} else {\n \t\tt->enabled = 0;\n \t\tt->time = tm_now;\n", "prefixes": [ "v1", "3/4" ] }