hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/ptr_ring.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Definitions for the 'struct ptr_ring' datastructure.
34 *
....@@ -5,11 +6,6 @@
56 * Michael S. Tsirkin <mst@redhat.com>
67 *
78 * Copyright (C) 2016 Red Hat, Inc.
8
- *
9
- * This program is free software; you can redistribute it and/or modify it
10
- * under the terms of the GNU General Public License as published by the
11
- * Free Software Foundation; either version 2 of the License, or (at your
12
- * option) any later version.
139 *
1410 * This is a limited-size FIFO maintaining pointers in FIFO order, with
1511 * one CPU producing entries and another consuming entries from a FIFO.
....@@ -26,8 +22,8 @@
2622 #include <linux/cache.h>
2723 #include <linux/types.h>
2824 #include <linux/compiler.h>
29
-#include <linux/cache.h>
3025 #include <linux/slab.h>
26
+#include <linux/mm.h>
3127 #include <asm/errno.h>
3228 #endif
3329
....@@ -111,7 +107,7 @@
111107 return -ENOSPC;
112108
113109 /* Make sure the pointer we are storing points to a valid data. */
114
- /* Pairs with smp_read_barrier_depends in __ptr_ring_consume. */
110
+ /* Pairs with the dependency ordering in __ptr_ring_consume. */
115111 smp_wmb();
116112
117113 WRITE_ONCE(r->queue[r->producer++], ptr);