]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.17-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Apr 2022 09:42:01 +0000 (11:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Apr 2022 09:42:01 +0000 (11:42 +0200)
added patches:
revert-acpi-processor-idle-only-flush-cache-on-entering-c3.patch

queue-5.17/revert-acpi-processor-idle-only-flush-cache-on-entering-c3.patch [new file with mode: 0644]
queue-5.17/series
queue-5.17/sunrpc-ensure-we-flush-any-closed-sockets-before-xs_xprt_free.patch

diff --git a/queue-5.17/revert-acpi-processor-idle-only-flush-cache-on-entering-c3.patch b/queue-5.17/revert-acpi-processor-idle-only-flush-cache-on-entering-c3.patch
new file mode 100644 (file)
index 0000000..6840e3f
--- /dev/null
@@ -0,0 +1,44 @@
+From dfbba2518aac4204203b0697a894d3b2f80134d3 Mon Sep 17 00:00:00 2001
+From: Akihiko Odaki <akihiko.odaki@gmail.com>
+Date: Sun, 3 Apr 2022 15:23:22 +0900
+Subject: Revert "ACPI: processor: idle: Only flush cache on entering C3"
+
+From: Akihiko Odaki <akihiko.odaki@gmail.com>
+
+commit dfbba2518aac4204203b0697a894d3b2f80134d3 upstream.
+
+Revert commit 87ebbb8c612b ("ACPI: processor: idle: Only flush cache
+on entering C3") that broke the assumptions of the acpi_idle_play_dead()
+callers.
+
+Namely, the CPU cache must always be flushed in acpi_idle_play_dead(),
+regardless of the target C-state that is going to be requested, because
+this is likely to be part of a CPU offline procedure or preparation for
+entering a system-wide sleep state and the lack of synchronization
+between the CPU cache and RAM may lead to problems going forward, for
+example when the CPU is brought back online.
+
+In particular, it breaks resume from suspend-to-RAM on Lenovo ThinkPad
+C13 which fails occasionally until the problematic commit is reverted.
+
+Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
+[ rjw: Changelog ]
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Cc: Ketsui <esgwpl@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/acpi/processor_idle.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/acpi/processor_idle.c
++++ b/drivers/acpi/processor_idle.c
+@@ -570,8 +570,7 @@ static int acpi_idle_play_dead(struct cp
+ {
+       struct acpi_processor_cx *cx = per_cpu(acpi_cstate[index], dev->cpu);
+-      if (cx->type == ACPI_STATE_C3)
+-              ACPI_FLUSH_CPU_CACHE();
++      ACPI_FLUSH_CPU_CACHE();
+       while (1) {
index e29aaff38d0276093b34fd336944bccc48b3f0ed..1a1f1a8cdc0e2311a9ddfe5e534d4f21a3effbe0 100644 (file)
@@ -310,3 +310,4 @@ drm-nouveau-pmu-add-missing-callbacks-for-tegra-devices.patch
 drm-amdkfd-create-file-descriptor-after-client-is-added-to-smi_clients-list.patch
 drm-amdgpu-don-t-use-baco-for-reset-in-s3.patch
 sunrpc-ensure-we-flush-any-closed-sockets-before-xs_xprt_free.patch
+revert-acpi-processor-idle-only-flush-cache-on-entering-c3.patch
index be1a7a4f6115b3a491c555cf408568a0bc486d60..87a31d0b4302036939da957eb6ecc8e741e409b4 100644 (file)
@@ -24,14 +24,12 @@ Cc: stable@vger.kernel.org # 5.1.x
 Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- fs/file_table.c               |  1 +
- include/trace/events/sunrpc.h |  1 -
- net/sunrpc/xprt.c             |  7 +------
- net/sunrpc/xprtsock.c         | 16 +++++++++++++---
+ fs/file_table.c               |    1 +
+ include/trace/events/sunrpc.h |    1 -
+ net/sunrpc/xprt.c             |    7 +------
+ net/sunrpc/xprtsock.c         |   16 +++++++++++++---
  4 files changed, 15 insertions(+), 10 deletions(-)
 
-diff --git a/fs/file_table.c b/fs/file_table.c
-index 7d2e692b66a9..ada8fe814db9 100644
 --- a/fs/file_table.c
 +++ b/fs/file_table.c
 @@ -412,6 +412,7 @@ void __fput_sync(struct file *file)
@@ -42,11 +40,9 @@ index 7d2e692b66a9..ada8fe814db9 100644
  
  void __init files_init(void)
  {
-diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
-index ac33892da411..a4848c7bab80 100644
 --- a/include/trace/events/sunrpc.h
 +++ b/include/trace/events/sunrpc.h
-@@ -1004,7 +1004,6 @@ DEFINE_RPC_XPRT_LIFETIME_EVENT(connect);
+@@ -1005,7 +1005,6 @@ DEFINE_RPC_XPRT_LIFETIME_EVENT(connect);
  DEFINE_RPC_XPRT_LIFETIME_EVENT(disconnect_auto);
  DEFINE_RPC_XPRT_LIFETIME_EVENT(disconnect_done);
  DEFINE_RPC_XPRT_LIFETIME_EVENT(disconnect_force);
@@ -54,11 +50,9 @@ index ac33892da411..a4848c7bab80 100644
  DEFINE_RPC_XPRT_LIFETIME_EVENT(destroy);
  
  DECLARE_EVENT_CLASS(rpc_xprt_event,
-diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
-index 73344ffb2692..ad62eba540a4 100644
 --- a/net/sunrpc/xprt.c
 +++ b/net/sunrpc/xprt.c
-@@ -930,12 +930,7 @@ void xprt_connect(struct rpc_task *task)
+@@ -929,12 +929,7 @@ void xprt_connect(struct rpc_task *task)
        if (!xprt_lock_write(xprt, task))
                return;
  
@@ -72,11 +66,9 @@ index 73344ffb2692..ad62eba540a4 100644
                task->tk_rqstp->rq_connect_cookie = xprt->connect_cookie;
                rpc_sleep_on_timeout(&xprt->pending, task, NULL,
                                xprt_request_timeout(task->tk_rqstp));
-diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
-index 9b75891b3cc0..c6a13893e308 100644
 --- a/net/sunrpc/xprtsock.c
 +++ b/net/sunrpc/xprtsock.c
-@@ -879,7 +879,7 @@ static int xs_local_send_request(struct rpc_rqst *req)
+@@ -880,7 +880,7 @@ static int xs_local_send_request(struct
  
        /* Close the stream if the previous transmission was incomplete */
        if (xs_send_request_was_aborted(transport, req)) {
@@ -85,7 +77,7 @@ index 9b75891b3cc0..c6a13893e308 100644
                return -ENOTCONN;
        }
  
-@@ -915,7 +915,7 @@ static int xs_local_send_request(struct rpc_rqst *req)
+@@ -918,7 +918,7 @@ static int xs_local_send_request(struct
                        -status);
                fallthrough;
        case -EPIPE:
@@ -94,7 +86,7 @@ index 9b75891b3cc0..c6a13893e308 100644
                status = -ENOTCONN;
        }
  
-@@ -1185,6 +1185,16 @@ static void xs_reset_transport(struct sock_xprt *transport)
+@@ -1203,6 +1203,16 @@ static void xs_reset_transport(struct so
  
        if (sk == NULL)
                return;
@@ -111,7 +103,7 @@ index 9b75891b3cc0..c6a13893e308 100644
  
        if (atomic_read(&transport->xprt.swapper))
                sk_clear_memalloc(sk);
-@@ -1208,7 +1218,7 @@ static void xs_reset_transport(struct sock_xprt *transport)
+@@ -1226,7 +1236,7 @@ static void xs_reset_transport(struct so
        mutex_unlock(&transport->recv_mutex);
  
        trace_rpc_socket_close(xprt, sock);
@@ -120,6 +112,3 @@ index 9b75891b3cc0..c6a13893e308 100644
  
        xprt_disconnect_done(xprt);
  }
--- 
-2.35.1
-