aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/circular-buffers.txt
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-01-30 09:00:02 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-01-30 09:00:02 +0100
commit858a0d7eb5300b5f620d98ab3c4b96c9d5f19131 (patch)
tree79ad2ecb357183384b172155e44df71c86e24e49 /Documentation/circular-buffers.txt
parentRevert "PM / sleep / ACPI: Use the ACPI_FADT_LOW_POWER_S0 flag" (diff)
parentPM / Hibernate: Use rb_entry() instead of container_of() (diff)
downloadlinux-dev-858a0d7eb5300b5f620d98ab3c4b96c9d5f19131.tar.xz
linux-dev-858a0d7eb5300b5f620d98ab3c4b96c9d5f19131.zip
Merge back earlier suspend/hibernation changes for v4.11.
Diffstat (limited to 'Documentation/circular-buffers.txt')
-rw-r--r--Documentation/circular-buffers.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/circular-buffers.txt b/Documentation/circular-buffers.txt
index 88951b179262..4a824d232472 100644
--- a/Documentation/circular-buffers.txt
+++ b/Documentation/circular-buffers.txt
@@ -161,7 +161,7 @@ The producer will look something like this:
unsigned long head = buffer->head;
/* The spin_unlock() and next spin_lock() provide needed ordering. */
- unsigned long tail = ACCESS_ONCE(buffer->tail);
+ unsigned long tail = READ_ONCE(buffer->tail);
if (CIRC_SPACE(head, tail, buffer->size) >= 1) {
/* insert one item into the buffer */
@@ -222,7 +222,7 @@ This will instruct the CPU to make sure the index is up to date before reading
the new item, and then it shall make sure the CPU has finished reading the item
before it writes the new tail pointer, which will erase the item.
-Note the use of ACCESS_ONCE() and smp_load_acquire() to read the
+Note the use of READ_ONCE() and smp_load_acquire() to read the
opposition index. This prevents the compiler from discarding and
reloading its cached value - which some compilers will do across
smp_read_barrier_depends(). This isn't strictly needed if you can