]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Nov 2023 19:11:23 +0000 (19:11 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Nov 2023 19:11:23 +0000 (19:11 +0000)
queue-4.14/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch [deleted file]
queue-4.14/series
queue-4.19/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch [deleted file]
queue-4.19/series
queue-5.10/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch [deleted file]
queue-5.10/series
queue-5.15/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch [deleted file]
queue-5.15/series
queue-5.4/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch [deleted file]
queue-5.4/series

diff --git a/queue-4.14/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch b/queue-4.14/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch
deleted file mode 100644 (file)
index 63119a4..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-From 0ec7731655de196bc1e4af99e495b38778109d22 Mon Sep 17 00:00:00 2001
-From: Mark Brown <broonie@kernel.org>
-Date: Thu, 26 Oct 2023 16:49:19 +0100
-Subject: regmap: Ensure range selector registers are updated after cache sync
-
-From: Mark Brown <broonie@kernel.org>
-
-commit 0ec7731655de196bc1e4af99e495b38778109d22 upstream.
-
-When we sync the register cache we do so with the cache bypassed in order
-to avoid overhead from writing the synced values back into the cache. If
-the regmap has ranges and the selector register for those ranges is in a
-register which is cached this has the unfortunate side effect of meaning
-that the physical and cached copies of the selector register can be out of
-sync after a cache sync. The cache will have whatever the selector was when
-the sync started and the hardware will have the selector for the register
-that was synced last.
-
-Fix this by rewriting all cached selector registers after every sync,
-ensuring that the hardware and cache have the same content. This will
-result in extra writes that wouldn't otherwise be needed but is simple
-so hopefully robust. We don't read from the hardware since not all
-devices have physical read support.
-
-Given that nobody noticed this until now it is likely that we are rarely if
-ever hitting this case.
-
-Reported-by: Hector Martin <marcan@marcan.st>
-Cc: stable@vger.kernel.org
-Signed-off-by: Mark Brown <broonie@kernel.org>
-Link: https://lore.kernel.org/r/20231026-regmap-fix-selector-sync-v1-1-633ded82770d@kernel.org
-Signed-off-by: Mark Brown <broonie@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/base/regmap/regcache.c |   30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
-
---- a/drivers/base/regmap/regcache.c
-+++ b/drivers/base/regmap/regcache.c
-@@ -329,6 +329,11 @@ static int regcache_default_sync(struct
-       return 0;
- }
-+static int rbtree_all(const void *key, const struct rb_node *node)
-+{
-+      return 0;
-+}
-+
- /**
-  * regcache_sync - Sync the register cache with the hardware.
-  *
-@@ -346,6 +351,7 @@ int regcache_sync(struct regmap *map)
-       unsigned int i;
-       const char *name;
-       bool bypass;
-+      struct rb_node *node;
-       if (WARN_ON(map->cache_type == REGCACHE_NONE))
-               return -EINVAL;
-@@ -390,6 +396,30 @@ out:
-       map->async = false;
-       map->cache_bypass = bypass;
-       map->no_sync_defaults = false;
-+
-+      /*
-+       * If we did any paging with cache bypassed and a cached
-+       * paging register then the register and cache state might
-+       * have gone out of sync, force writes of all the paging
-+       * registers.
-+       */
-+      rb_for_each(node, 0, &map->range_tree, rbtree_all) {
-+              struct regmap_range_node *this =
-+                      rb_entry(node, struct regmap_range_node, node);
-+
-+              /* If there's nothing in the cache there's nothing to sync */
-+              ret = regcache_read(map, this->selector_reg, &i);
-+              if (ret != 0)
-+                      continue;
-+
-+              ret = _regmap_write(map, this->selector_reg, i);
-+              if (ret != 0) {
-+                      dev_err(map->dev, "Failed to write %x = %x: %d\n",
-+                              this->selector_reg, i, ret);
-+                      break;
-+              }
-+      }
-+
-       map->unlock(map->lock_arg);
-       regmap_async_complete(map);
index d1f458de1bf2261b1e94496200ebd8cc2f69f5d9..4785485dcb70951258aaf5ef25619c9c9afd3c6b 100644 (file)
@@ -31,6 +31,5 @@ audit-don-t-take-task_lock-in-audit_exe_compare-code-path.patch
 audit-don-t-warn_on_once-current-mm-in-audit_exe_compare.patch
 hvc-xen-fix-error-path-in-xen_hvc_init-to-always-register-frontend-driver.patch
 pci-sysfs-protect-driver-s-d3cold-preference-from-user-space.patch
-regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch
 mmc-meson-gx-remove-setting-of-cmd_cfg_error.patch
 genirq-generic_chip-make-irq_remove_generic_chip-irqdomain-aware.patch
diff --git a/queue-4.19/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch b/queue-4.19/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch
deleted file mode 100644 (file)
index 63119a4..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-From 0ec7731655de196bc1e4af99e495b38778109d22 Mon Sep 17 00:00:00 2001
-From: Mark Brown <broonie@kernel.org>
-Date: Thu, 26 Oct 2023 16:49:19 +0100
-Subject: regmap: Ensure range selector registers are updated after cache sync
-
-From: Mark Brown <broonie@kernel.org>
-
-commit 0ec7731655de196bc1e4af99e495b38778109d22 upstream.
-
-When we sync the register cache we do so with the cache bypassed in order
-to avoid overhead from writing the synced values back into the cache. If
-the regmap has ranges and the selector register for those ranges is in a
-register which is cached this has the unfortunate side effect of meaning
-that the physical and cached copies of the selector register can be out of
-sync after a cache sync. The cache will have whatever the selector was when
-the sync started and the hardware will have the selector for the register
-that was synced last.
-
-Fix this by rewriting all cached selector registers after every sync,
-ensuring that the hardware and cache have the same content. This will
-result in extra writes that wouldn't otherwise be needed but is simple
-so hopefully robust. We don't read from the hardware since not all
-devices have physical read support.
-
-Given that nobody noticed this until now it is likely that we are rarely if
-ever hitting this case.
-
-Reported-by: Hector Martin <marcan@marcan.st>
-Cc: stable@vger.kernel.org
-Signed-off-by: Mark Brown <broonie@kernel.org>
-Link: https://lore.kernel.org/r/20231026-regmap-fix-selector-sync-v1-1-633ded82770d@kernel.org
-Signed-off-by: Mark Brown <broonie@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/base/regmap/regcache.c |   30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
-
---- a/drivers/base/regmap/regcache.c
-+++ b/drivers/base/regmap/regcache.c
-@@ -329,6 +329,11 @@ static int regcache_default_sync(struct
-       return 0;
- }
-+static int rbtree_all(const void *key, const struct rb_node *node)
-+{
-+      return 0;
-+}
-+
- /**
-  * regcache_sync - Sync the register cache with the hardware.
-  *
-@@ -346,6 +351,7 @@ int regcache_sync(struct regmap *map)
-       unsigned int i;
-       const char *name;
-       bool bypass;
-+      struct rb_node *node;
-       if (WARN_ON(map->cache_type == REGCACHE_NONE))
-               return -EINVAL;
-@@ -390,6 +396,30 @@ out:
-       map->async = false;
-       map->cache_bypass = bypass;
-       map->no_sync_defaults = false;
-+
-+      /*
-+       * If we did any paging with cache bypassed and a cached
-+       * paging register then the register and cache state might
-+       * have gone out of sync, force writes of all the paging
-+       * registers.
-+       */
-+      rb_for_each(node, 0, &map->range_tree, rbtree_all) {
-+              struct regmap_range_node *this =
-+                      rb_entry(node, struct regmap_range_node, node);
-+
-+              /* If there's nothing in the cache there's nothing to sync */
-+              ret = regcache_read(map, this->selector_reg, &i);
-+              if (ret != 0)
-+                      continue;
-+
-+              ret = _regmap_write(map, this->selector_reg, i);
-+              if (ret != 0) {
-+                      dev_err(map->dev, "Failed to write %x = %x: %d\n",
-+                              this->selector_reg, i, ret);
-+                      break;
-+              }
-+      }
-+
-       map->unlock(map->lock_arg);
-       regmap_async_complete(map);
index 96bc3b9c9db70c63bbe8a819ac588195a8a7dc81..b0e86e60e413492f101b919110d9c1f234f5a36b 100644 (file)
@@ -52,7 +52,6 @@ audit-don-t-take-task_lock-in-audit_exe_compare-code-path.patch
 audit-don-t-warn_on_once-current-mm-in-audit_exe_compare.patch
 hvc-xen-fix-error-path-in-xen_hvc_init-to-always-register-frontend-driver.patch
 pci-sysfs-protect-driver-s-d3cold-preference-from-user-space.patch
-regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch
 mmc-meson-gx-remove-setting-of-cmd_cfg_error.patch
 genirq-generic_chip-make-irq_remove_generic_chip-irqdomain-aware.patch
 pci-keystone-don-t-discard-.remove-callback.patch
diff --git a/queue-5.10/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch b/queue-5.10/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch
deleted file mode 100644 (file)
index 809f071..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-From 0ec7731655de196bc1e4af99e495b38778109d22 Mon Sep 17 00:00:00 2001
-From: Mark Brown <broonie@kernel.org>
-Date: Thu, 26 Oct 2023 16:49:19 +0100
-Subject: regmap: Ensure range selector registers are updated after cache sync
-
-From: Mark Brown <broonie@kernel.org>
-
-commit 0ec7731655de196bc1e4af99e495b38778109d22 upstream.
-
-When we sync the register cache we do so with the cache bypassed in order
-to avoid overhead from writing the synced values back into the cache. If
-the regmap has ranges and the selector register for those ranges is in a
-register which is cached this has the unfortunate side effect of meaning
-that the physical and cached copies of the selector register can be out of
-sync after a cache sync. The cache will have whatever the selector was when
-the sync started and the hardware will have the selector for the register
-that was synced last.
-
-Fix this by rewriting all cached selector registers after every sync,
-ensuring that the hardware and cache have the same content. This will
-result in extra writes that wouldn't otherwise be needed but is simple
-so hopefully robust. We don't read from the hardware since not all
-devices have physical read support.
-
-Given that nobody noticed this until now it is likely that we are rarely if
-ever hitting this case.
-
-Reported-by: Hector Martin <marcan@marcan.st>
-Cc: stable@vger.kernel.org
-Signed-off-by: Mark Brown <broonie@kernel.org>
-Link: https://lore.kernel.org/r/20231026-regmap-fix-selector-sync-v1-1-633ded82770d@kernel.org
-Signed-off-by: Mark Brown <broonie@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/base/regmap/regcache.c |   30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
-
---- a/drivers/base/regmap/regcache.c
-+++ b/drivers/base/regmap/regcache.c
-@@ -325,6 +325,11 @@ static int regcache_default_sync(struct
-       return 0;
- }
-+static int rbtree_all(const void *key, const struct rb_node *node)
-+{
-+      return 0;
-+}
-+
- /**
-  * regcache_sync - Sync the register cache with the hardware.
-  *
-@@ -342,6 +347,7 @@ int regcache_sync(struct regmap *map)
-       unsigned int i;
-       const char *name;
-       bool bypass;
-+      struct rb_node *node;
-       if (WARN_ON(map->cache_type == REGCACHE_NONE))
-               return -EINVAL;
-@@ -386,6 +392,30 @@ out:
-       map->async = false;
-       map->cache_bypass = bypass;
-       map->no_sync_defaults = false;
-+
-+      /*
-+       * If we did any paging with cache bypassed and a cached
-+       * paging register then the register and cache state might
-+       * have gone out of sync, force writes of all the paging
-+       * registers.
-+       */
-+      rb_for_each(node, 0, &map->range_tree, rbtree_all) {
-+              struct regmap_range_node *this =
-+                      rb_entry(node, struct regmap_range_node, node);
-+
-+              /* If there's nothing in the cache there's nothing to sync */
-+              ret = regcache_read(map, this->selector_reg, &i);
-+              if (ret != 0)
-+                      continue;
-+
-+              ret = _regmap_write(map, this->selector_reg, i);
-+              if (ret != 0) {
-+                      dev_err(map->dev, "Failed to write %x = %x: %d\n",
-+                              this->selector_reg, i, ret);
-+                      break;
-+              }
-+      }
-+
-       map->unlock(map->lock_arg);
-       regmap_async_complete(map);
index b669b69715a59be16e8167ce1611a98e4a54b9f7..d7fb0d0bf7cd9352c5c13d1f71ce03e6d4d11566 100644 (file)
@@ -104,7 +104,6 @@ hvc-xen-fix-error-path-in-xen_hvc_init-to-always-register-frontend-driver.patch
 pci-sysfs-protect-driver-s-d3cold-preference-from-user-space.patch
 watchdog-move-softlockup_panic-back-to-early_param.patch
 acpi-resource-do-irq-override-on-tongfang-gmxxgxx.patch
-regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch
 wifi-ath11k-fix-temperature-event-locking.patch
 wifi-ath11k-fix-dfs-radar-event-locking.patch
 wifi-ath11k-fix-htt-pktlog-locking.patch
diff --git a/queue-5.15/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch b/queue-5.15/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch
deleted file mode 100644 (file)
index 809f071..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-From 0ec7731655de196bc1e4af99e495b38778109d22 Mon Sep 17 00:00:00 2001
-From: Mark Brown <broonie@kernel.org>
-Date: Thu, 26 Oct 2023 16:49:19 +0100
-Subject: regmap: Ensure range selector registers are updated after cache sync
-
-From: Mark Brown <broonie@kernel.org>
-
-commit 0ec7731655de196bc1e4af99e495b38778109d22 upstream.
-
-When we sync the register cache we do so with the cache bypassed in order
-to avoid overhead from writing the synced values back into the cache. If
-the regmap has ranges and the selector register for those ranges is in a
-register which is cached this has the unfortunate side effect of meaning
-that the physical and cached copies of the selector register can be out of
-sync after a cache sync. The cache will have whatever the selector was when
-the sync started and the hardware will have the selector for the register
-that was synced last.
-
-Fix this by rewriting all cached selector registers after every sync,
-ensuring that the hardware and cache have the same content. This will
-result in extra writes that wouldn't otherwise be needed but is simple
-so hopefully robust. We don't read from the hardware since not all
-devices have physical read support.
-
-Given that nobody noticed this until now it is likely that we are rarely if
-ever hitting this case.
-
-Reported-by: Hector Martin <marcan@marcan.st>
-Cc: stable@vger.kernel.org
-Signed-off-by: Mark Brown <broonie@kernel.org>
-Link: https://lore.kernel.org/r/20231026-regmap-fix-selector-sync-v1-1-633ded82770d@kernel.org
-Signed-off-by: Mark Brown <broonie@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/base/regmap/regcache.c |   30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
-
---- a/drivers/base/regmap/regcache.c
-+++ b/drivers/base/regmap/regcache.c
-@@ -325,6 +325,11 @@ static int regcache_default_sync(struct
-       return 0;
- }
-+static int rbtree_all(const void *key, const struct rb_node *node)
-+{
-+      return 0;
-+}
-+
- /**
-  * regcache_sync - Sync the register cache with the hardware.
-  *
-@@ -342,6 +347,7 @@ int regcache_sync(struct regmap *map)
-       unsigned int i;
-       const char *name;
-       bool bypass;
-+      struct rb_node *node;
-       if (WARN_ON(map->cache_type == REGCACHE_NONE))
-               return -EINVAL;
-@@ -386,6 +392,30 @@ out:
-       map->async = false;
-       map->cache_bypass = bypass;
-       map->no_sync_defaults = false;
-+
-+      /*
-+       * If we did any paging with cache bypassed and a cached
-+       * paging register then the register and cache state might
-+       * have gone out of sync, force writes of all the paging
-+       * registers.
-+       */
-+      rb_for_each(node, 0, &map->range_tree, rbtree_all) {
-+              struct regmap_range_node *this =
-+                      rb_entry(node, struct regmap_range_node, node);
-+
-+              /* If there's nothing in the cache there's nothing to sync */
-+              ret = regcache_read(map, this->selector_reg, &i);
-+              if (ret != 0)
-+                      continue;
-+
-+              ret = _regmap_write(map, this->selector_reg, i);
-+              if (ret != 0) {
-+                      dev_err(map->dev, "Failed to write %x = %x: %d\n",
-+                              this->selector_reg, i, ret);
-+                      break;
-+              }
-+      }
-+
-       map->unlock(map->lock_arg);
-       regmap_async_complete(map);
index 15dc3ed47baa162d555b35040d3c3ccad32157e5..182fcf9f539013a97b1e8e66df1d0a3a487fd3ab 100644 (file)
@@ -179,7 +179,6 @@ hvc-xen-fix-event-channel-handling-for-secondary-consoles.patch
 pci-sysfs-protect-driver-s-d3cold-preference-from-user-space.patch
 watchdog-move-softlockup_panic-back-to-early_param.patch
 acpi-resource-do-irq-override-on-tongfang-gmxxgxx.patch
-regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch
 wifi-ath11k-fix-temperature-event-locking.patch
 wifi-ath11k-fix-dfs-radar-event-locking.patch
 wifi-ath11k-fix-htt-pktlog-locking.patch
diff --git a/queue-5.4/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch b/queue-5.4/regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch
deleted file mode 100644 (file)
index 809f071..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-From 0ec7731655de196bc1e4af99e495b38778109d22 Mon Sep 17 00:00:00 2001
-From: Mark Brown <broonie@kernel.org>
-Date: Thu, 26 Oct 2023 16:49:19 +0100
-Subject: regmap: Ensure range selector registers are updated after cache sync
-
-From: Mark Brown <broonie@kernel.org>
-
-commit 0ec7731655de196bc1e4af99e495b38778109d22 upstream.
-
-When we sync the register cache we do so with the cache bypassed in order
-to avoid overhead from writing the synced values back into the cache. If
-the regmap has ranges and the selector register for those ranges is in a
-register which is cached this has the unfortunate side effect of meaning
-that the physical and cached copies of the selector register can be out of
-sync after a cache sync. The cache will have whatever the selector was when
-the sync started and the hardware will have the selector for the register
-that was synced last.
-
-Fix this by rewriting all cached selector registers after every sync,
-ensuring that the hardware and cache have the same content. This will
-result in extra writes that wouldn't otherwise be needed but is simple
-so hopefully robust. We don't read from the hardware since not all
-devices have physical read support.
-
-Given that nobody noticed this until now it is likely that we are rarely if
-ever hitting this case.
-
-Reported-by: Hector Martin <marcan@marcan.st>
-Cc: stable@vger.kernel.org
-Signed-off-by: Mark Brown <broonie@kernel.org>
-Link: https://lore.kernel.org/r/20231026-regmap-fix-selector-sync-v1-1-633ded82770d@kernel.org
-Signed-off-by: Mark Brown <broonie@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/base/regmap/regcache.c |   30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
-
---- a/drivers/base/regmap/regcache.c
-+++ b/drivers/base/regmap/regcache.c
-@@ -325,6 +325,11 @@ static int regcache_default_sync(struct
-       return 0;
- }
-+static int rbtree_all(const void *key, const struct rb_node *node)
-+{
-+      return 0;
-+}
-+
- /**
-  * regcache_sync - Sync the register cache with the hardware.
-  *
-@@ -342,6 +347,7 @@ int regcache_sync(struct regmap *map)
-       unsigned int i;
-       const char *name;
-       bool bypass;
-+      struct rb_node *node;
-       if (WARN_ON(map->cache_type == REGCACHE_NONE))
-               return -EINVAL;
-@@ -386,6 +392,30 @@ out:
-       map->async = false;
-       map->cache_bypass = bypass;
-       map->no_sync_defaults = false;
-+
-+      /*
-+       * If we did any paging with cache bypassed and a cached
-+       * paging register then the register and cache state might
-+       * have gone out of sync, force writes of all the paging
-+       * registers.
-+       */
-+      rb_for_each(node, 0, &map->range_tree, rbtree_all) {
-+              struct regmap_range_node *this =
-+                      rb_entry(node, struct regmap_range_node, node);
-+
-+              /* If there's nothing in the cache there's nothing to sync */
-+              ret = regcache_read(map, this->selector_reg, &i);
-+              if (ret != 0)
-+                      continue;
-+
-+              ret = _regmap_write(map, this->selector_reg, i);
-+              if (ret != 0) {
-+                      dev_err(map->dev, "Failed to write %x = %x: %d\n",
-+                              this->selector_reg, i, ret);
-+                      break;
-+              }
-+      }
-+
-       map->unlock(map->lock_arg);
-       regmap_async_complete(map);
index 709b4c4714a25d0343614d5555476ba06fab7fa6..cf733c51bdb969fde273ee9c491890e0a3bd10d8 100644 (file)
@@ -76,7 +76,6 @@ audit-don-t-warn_on_once-current-mm-in-audit_exe_compare.patch
 hvc-xen-fix-error-path-in-xen_hvc_init-to-always-register-frontend-driver.patch
 pci-sysfs-protect-driver-s-d3cold-preference-from-user-space.patch
 acpi-resource-do-irq-override-on-tongfang-gmxxgxx.patch
-regmap-ensure-range-selector-registers-are-updated-after-cache-sync.patch
 mmc-meson-gx-remove-setting-of-cmd_cfg_error.patch
 genirq-generic_chip-make-irq_remove_generic_chip-irqdomain-aware.patch
 pci-keystone-don-t-discard-.remove-callback.patch