diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-12 19:11:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-12 19:11:12 -0500 |
commit | f96fe225677b3efb74346ebd56fafe3997b02afa (patch) | |
tree | 75afbbfd687d678587de244b075a6f836c206425 /arch/mips | |
parent | 55437989bd4725a8d3371924babe2cb7ea882bfb (diff) | |
parent | eea3e8fde92999248863e4de93f325fcf3833a14 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull another networking update from David Miller:
"Small follow-up to the main merge pull from the other day:
1) Alexander Duyck's DMA memory barrier patch set.
2) cxgb4 driver fixes from Karen Xie.
3) Add missing export of fixed_phy_register() to modules, from Mark
Salter.
4) DSA bug fixes from Florian Fainelli"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (24 commits)
net/macb: add TX multiqueue support for gem
linux/interrupt.h: remove the definition of unused tasklet_hi_enable
jme: replace calls to redundant function
net: ethernet: davicom: Allow to select DM9000 for nios2
net: ethernet: smsc: Allow to select SMC91X for nios2
cxgb4: Add support for QSA modules
libcxgbi: fix freeing skb prematurely
cxgb4i: use set_wr_txq() to set tx queues
cxgb4i: handle non-pdu-aligned rx data
cxgb4i: additional types of negative advice
cxgb4/cxgb4i: set the max. pdu length in firmware
cxgb4i: fix credit check for tx_data_wr
cxgb4i: fix tx immediate data credit check
net: phy: export fixed_phy_register()
fib_trie: Fix trie balancing issue if new node pushes down existing node
vlan: Add ability to always enable TSO/UFO
r8169:update rtl8168g pcie ephy parameter
net: dsa: bcm_sf2: force link for all fixed PHY devices
fm10k/igb/ixgbe: Use dma_rmb on Rx descriptor reads
r8169: Use dma_rmb() and dma_wmb() for DescOwn checks
...
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/barrier.h | 61 |
1 files changed, 5 insertions, 56 deletions
diff --git a/arch/mips/include/asm/barrier.h b/arch/mips/include/asm/barrier.h index d0101dd0575e..2b8bbbcb9be0 100644 --- a/arch/mips/include/asm/barrier.h +++ b/arch/mips/include/asm/barrier.h | |||
@@ -10,58 +10,6 @@ | |||
10 | 10 | ||
11 | #include <asm/addrspace.h> | 11 | #include <asm/addrspace.h> |
12 | 12 | ||
13 | /* | ||
14 | * read_barrier_depends - Flush all pending reads that subsequents reads | ||
15 | * depend on. | ||
16 | * | ||
17 | * No data-dependent reads from memory-like regions are ever reordered | ||
18 | * over this barrier. All reads preceding this primitive are guaranteed | ||
19 | * to access memory (but not necessarily other CPUs' caches) before any | ||
20 | * reads following this primitive that depend on the data return by | ||
21 | * any of the preceding reads. This primitive is much lighter weight than | ||
22 | * rmb() on most CPUs, and is never heavier weight than is | ||
23 | * rmb(). | ||
24 | * | ||
25 | * These ordering constraints are respected by both the local CPU | ||
26 | * and the compiler. | ||
27 | * | ||
28 | * Ordering is not guaranteed by anything other than these primitives, | ||
29 | * not even by data dependencies. See the documentation for | ||
30 | * memory_barrier() for examples and URLs to more information. | ||
31 | * | ||
32 | * For example, the following code would force ordering (the initial | ||
33 | * value of "a" is zero, "b" is one, and "p" is "&a"): | ||
34 | * | ||
35 | * <programlisting> | ||
36 | * CPU 0 CPU 1 | ||
37 | * | ||
38 | * b = 2; | ||
39 | * memory_barrier(); | ||
40 | * p = &b; q = p; | ||
41 | * read_barrier_depends(); | ||
42 | * d = *q; | ||
43 | * </programlisting> | ||
44 | * | ||
45 | * because the read of "*q" depends on the read of "p" and these | ||
46 | * two reads are separated by a read_barrier_depends(). However, | ||
47 | * the following code, with the same initial values for "a" and "b": | ||
48 | * | ||
49 | * <programlisting> | ||
50 | * CPU 0 CPU 1 | ||
51 | * | ||
52 | * a = 2; | ||
53 | * memory_barrier(); | ||
54 | * b = 3; y = b; | ||
55 | * read_barrier_depends(); | ||
56 | * x = a; | ||
57 | * </programlisting> | ||
58 | * | ||
59 | * does not enforce ordering, since there is no data dependency between | ||
60 | * the read of "a" and the read of "b". Therefore, on some CPUs, such | ||
61 | * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() | ||
62 | * in cases like this where there are no data dependencies. | ||
63 | */ | ||
64 | |||
65 | #define read_barrier_depends() do { } while(0) | 13 | #define read_barrier_depends() do { } while(0) |
66 | #define smp_read_barrier_depends() do { } while(0) | 14 | #define smp_read_barrier_depends() do { } while(0) |
67 | 15 | ||
@@ -127,20 +75,21 @@ | |||
127 | 75 | ||
128 | #include <asm/wbflush.h> | 76 | #include <asm/wbflush.h> |
129 | 77 | ||
130 | #define wmb() fast_wmb() | ||
131 | #define rmb() fast_rmb() | ||
132 | #define mb() wbflush() | 78 | #define mb() wbflush() |
133 | #define iob() wbflush() | 79 | #define iob() wbflush() |
134 | 80 | ||
135 | #else /* !CONFIG_CPU_HAS_WB */ | 81 | #else /* !CONFIG_CPU_HAS_WB */ |
136 | 82 | ||
137 | #define wmb() fast_wmb() | ||
138 | #define rmb() fast_rmb() | ||
139 | #define mb() fast_mb() | 83 | #define mb() fast_mb() |
140 | #define iob() fast_iob() | 84 | #define iob() fast_iob() |
141 | 85 | ||
142 | #endif /* !CONFIG_CPU_HAS_WB */ | 86 | #endif /* !CONFIG_CPU_HAS_WB */ |
143 | 87 | ||
88 | #define wmb() fast_wmb() | ||
89 | #define rmb() fast_rmb() | ||
90 | #define dma_wmb() fast_wmb() | ||
91 | #define dma_rmb() fast_rmb() | ||
92 | |||
144 | #if defined(CONFIG_WEAK_ORDERING) && defined(CONFIG_SMP) | 93 | #if defined(CONFIG_WEAK_ORDERING) && defined(CONFIG_SMP) |
145 | # ifdef CONFIG_CPU_CAVIUM_OCTEON | 94 | # ifdef CONFIG_CPU_CAVIUM_OCTEON |
146 | # define smp_mb() __sync() | 95 | # define smp_mb() __sync() |