From patchwork Wed Aug 23 08:35:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 1824536 Return-Path: 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=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=T+Tpqgbf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RW01l6sKMz1yg8 for ; Wed, 23 Aug 2023 18:36:42 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qYjLp-00055O-2S; Wed, 23 Aug 2023 08:36:29 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qYjLn-00055H-Ht for kernel-team@lists.ubuntu.com; Wed, 23 Aug 2023 08:36:27 +0000 Received: from localhost.localdomain (unknown [10.101.196.174]) (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 smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 5A4A9400E8 for ; Wed, 23 Aug 2023 08:36:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1692779787; bh=GtSDlWBaM63JdRSmRnqY0usyYtbnVw3KqwuTPTIStfI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=T+Tpqgbfk8Y41CB99fjyqE0p0JwlZfXZ0giLGHqLIUwxcWrCdtHx9M68b3L+wLjse jwVZr5jak8OP7OKWoyKVS6mvsK57XqEy+X7QsHxSU8hSYPy9hE94IzWaOXpZipAJFS tmeoMKNd+jgBVzEogh+KfDxrCRMlxaBD6ml4+OETc62dPxXlMCq9jbaMFewTSgYhRB HDeJmzt3i1qeuMIFhTVUdV1e4BgllJFKElerPfnaLrd7VSntkaUZ0q+KrpJt2OLisV JoYWhqeU8sz+henfpDJ46aDTRMSKWu27G1n0dIa6a+yJWGpYJLrvDkXvusK62cvf3Z 9TRdnEeNqI6cA== From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [SRU] [L/M] [PATCH 0/1] Fix ACPI TAD on some Intel based systems Date: Wed, 23 Aug 2023 16:35:41 +0800 Message-Id: <20230823083542.388502-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2032767 [Impact] ACPI TAD doesn't really work on several systems. When accessing TAD interface via sysfs, like setting/getting realtime, it also causes errors: [ 478.255453] ACPI Error: No handler for Region [RTCM] (00000000a8d2dd39) [SystemCMOS] (20230331/evregion-130) [ 478.255458] ACPI Error: Region SystemCMOS (ID=5) has no handler (20230331/exfldio-261) [ 478.255461] Initialized Local Variables for Method [_GRT]: [ 478.255461] Local1: 00000000f182542c Integer 0000000000000000 [ 478.255464] No Arguments are initialized for method [_GRT] [ 478.255465] ACPI Error: Aborting method \_SB.AWAC._GRT due to previous error (AE_NOT_EXIST) (20230331/psparse-529) [Fix] Let the driver to install a handler for its SystemCMOS region. The spec on whether certain devices can use SystemCMOS or not is quite vague, so follow the de facto implementation, Windows :) [Test] Once the patch is applied, setting and getting realtime through TAD sysfs work, and there's no more error in dmesg. [Where problems could occur] Now ACPI TAD driver also depends on ACPI RTC driver, so the memory usage will go up slightly. Zhang Rui (1): ACPI: TAD: Install SystemCMOS address space handler for ACPI000E drivers/acpi/acpi_cmos_rtc.c | 25 ++++++++++++++++++------- drivers/acpi/acpi_tad.c | 27 ++++++++++++++++++++++----- include/acpi/acpi_bus.h | 9 +++++++++ 3 files changed, 49 insertions(+), 12 deletions(-) Acked-by: Tim Gardner Acked-by: Roxana Nicolescu