From patchwork Wed Dec 8 21:14:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1565512 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=RFboThBY; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J8WDC3zZYz9sXS for ; Thu, 9 Dec 2021 08:54:51 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mv4HJ-0000WM-5L; Wed, 08 Dec 2021 21:15:05 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-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 1mv4HG-0000W7-Re for kernel-team@lists.ubuntu.com; Wed, 08 Dec 2021 21:15:02 +0000 Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) (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-internal-1.canonical.com (Postfix) with ESMTPS id A7FDE3F1BD for ; Wed, 8 Dec 2021 21:15:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638998102; bh=6N+q4CZVV+aKOp9fC7rFO29U0fLaR98PpEI3Jur1HOw=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=RFboThBYfsZOjwSALR+yIMWrXUWyj5FhpAk/l1fTgJkAApxG2i1l+FcMWx4lbk7XA gIkNXyjH3/+tB7VZFJpQVLQESC+nh/EMgAmBuWgU2jQeJw5TlvywxOA4FigRgP6KkR hvs/DgH7W1TpVLdsJ6oV2xKc4l2UUM4v5aHvTjtxYVqJdQJQOjudhv/K2h3N+KM24I c9xuvDD3CYNSGPJNA/2ErtCkffewyNniTI0jXJb4o6kgLNtdeRfDkq4djWfWYfXz7v Nd/tfK6lhGsTiM2aTmqd0ntNMq2zwtSZkegHA5FPtiDa5K2d+d91ypukMHT7jwtQvP gmylOSBE1akNQ== Received: by mail-pf1-f200.google.com with SMTP id q2-20020a056a00084200b004a2582fcec1so2246248pfk.15 for ; Wed, 08 Dec 2021 13:15:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=6N+q4CZVV+aKOp9fC7rFO29U0fLaR98PpEI3Jur1HOw=; b=BgrcneMs7zx2KkqgSjaMnaqjfnA0MF8+obp7o4S4HQ9L/idpa3xqv1xafEba9ruO88 oQYTdFFW1T4GwMExGPAqOfu9b72pR8+U5Gk11THxxYdn575KnoSXGaSP86FpM0u+d6PT aaPsFZPXm+NLita0w2opi8mIy9YAUCsEQK1liSxCAebfPu3gxblRru+6iMBov8QJQX7v ZnkR3xHWi7wx4vxhn2VSqiw+f82Pd65iSRuVXCzNNTqEU642yXm74+bpvzIfUeu97WZR 2uoKW8NrI0HamCm1SLEAXKo37ZE/8l0No9J7p6+LNSzmL78PivHiNfUGxQ/5Lh+m1JiD /LnA== X-Gm-Message-State: AOAM532EjN7MZAV7kqka/IEHZbP20cW6aWeZrWdjc9QQ2ofvgJvHOYt1 6MXn4QDB8KoLAtESoZ5LHs4czWzKvmSE7RAWFuTYp3pBsEW9XqDMZtFDC8zqFQJoh9JCmsycqLx SF4cnnpwuEvK5B+CVYWS9P0v5pKPSe2jvG5y7g3efJw== X-Received: by 2002:a17:903:300d:b0:142:744f:c74d with SMTP id o13-20020a170903300d00b00142744fc74dmr63532295pla.26.1638998100997; Wed, 08 Dec 2021 13:15:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/vy/IgcAV62mcluNK1xmpLz+Io0DYAAEfcAqGiRWn2aNyDUJbq6Kh1uMYhjS2AmKdL+wfZA== X-Received: by 2002:a17:903:300d:b0:142:744f:c74d with SMTP id o13-20020a170903300d00b00142744fc74dmr63532263pla.26.1638998100625; Wed, 08 Dec 2021 13:15:00 -0800 (PST) Received: from canonical.com (node-1w7jr9yebujeq5th4a1ypmdy2.ipv6.telus.net. [2001:56a:78ed:fb00::11a]) by smtp.gmail.com with ESMTPSA id a18sm4238687pfn.185.2021.12.08.13.14.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Dec 2021 13:15:00 -0800 (PST) From: Alex Hung To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/2][SRU][OEM-5.14][U] Fix power button wakeup with shared IRQs on AMD platforms Date: Wed, 8 Dec 2021 14:14:57 -0700 Message-Id: <20211208211459.1358692-1-alex.hung@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/1953540 [Impact] On some platform designs the the power button wakeup from s0i3 doesn't work even with the existing changes to IRQ handling for the GPIO controller. In these designs the ACPI SCI and GPIO controller share an IRQ. Due to the way the s2idle loop handles the IRQ for the ACPI SCI the GPIO controller driver doesn't get a chance to wake the system in this circumstance. [Fix] To fix this rework the existing IRQ handler function to function as a checker and an IRQ handler depending on the calling arguments. The patches were cherry-picked from 5.16rc3. [Test] This is requested by AMD. The test was done on two systems L15 AMD Gen2 and P14s AMD Gen2 and both can be waken up by power button presses. [Where problems could occur] Risk is low. This only affects AMD platforms with s0i3 enabled. Suspends (S3) and resumes are not affect. Mario Limonciello (2): ACPI: Add stubs for wakeup handler functions pinctrl: amd: Fix wakeups when IRQ is shared with SCI drivers/pinctrl/pinctrl-amd.c | 29 ++++++++++++++++++++++++++--- include/linux/acpi.h | 9 +++++++++ 2 files changed, 35 insertions(+), 3 deletions(-)