RISC-V: smb_mb() fix for 4.16-rc4

This week we have a single fix: replacing smp_mb() with __smp_mb().  We
 were the only architecture with smp_mb() and it appears to just be
 clearly wrong, so I think this is a pretty safe patch for an RC.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEAM520YNJYN/OiG3470yhUCzLq0EFAlqUQEETHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRDvTKFQLMurQciND/wJOHzf/O7aHWlt7UYvzKsqgIdxNKiH
 IWbv4jTmJGJju10Ht5jImuIxSYJ5gu24Vj5f+/XkFRZfTGrOGgByXh37RuFP51kH
 3yFqzDoBfmBHu8NTeyAb6hHtozvcVTBYynSqKBJzsCz3mrBgqobvzoii1R2TX4lc
 +cPNffv+YRPZSHdHOpaytYIYdVxbcFmsGocftjzZ9AbR87mbT1zxDJV+YHgH86vE
 2qqaWYTJChCCQo+We57+0HheMtzjvuC9wXRg7yqDOhe5mvpxNQf/RLhr4cxJtcFN
 i96ERaRg0B5PAU+Pcql0wVL9oigd7bPv4Ncc+rjPG9efkXDKeN/ueD1az9yWRqE1
 SUjJROel5tF6Yxytn2XX+MEIPEy0AO1WlD+9o23aoaKXHgSu8kMU3Zgryvs+S6W5
 VkZeeUk/VV4YIQy8HwMujgjKzLXOoBjAHOvSyyf75ERkYbQxpEjkWRZWtjsiLGbP
 lgHX59p3C2J3w/xLA+rUE3gdPm4qY45l232RJFlFS6e+wG32/Fw+Yc+PxFHhPARK
 J+mhAVswhfrC4x9KbL83y8Zf9RvJ4y4qnpJAOyze+OgARq30SLzr6ul+5nHQAkb+
 4lcPS0ROsxpa83BnGC8bfz9TGoomdYJrT8piV+lx8wTPrZQg4gfAoStSyu89V0Vz
 LBcwO6MObWcdhw==
 =ke4H
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-4.16-rc4_smp_mb' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux

Pull RISC-V fix from Palmer Dabbelt:
 "This week we have a single fix: replacing smp_mb() with __smp_mb().

  We were the only architecture with smp_mb() and it appears to just be
  clearly wrong, so I think this is a pretty safe patch for an RC"

* tag 'riscv-for-linus-4.16-rc4_smp_mb' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
  riscv/barrier: Define __smp_{mb,rmb,wmb}
This commit is contained in:
Linus Torvalds 2018-02-28 14:55:07 -08:00
commit b5e792f11a

View file

@ -34,9 +34,9 @@
#define wmb() RISCV_FENCE(ow,ow)
/* These barriers do not need to enforce ordering on devices, just memory. */
#define smp_mb() RISCV_FENCE(rw,rw)
#define smp_rmb() RISCV_FENCE(r,r)
#define smp_wmb() RISCV_FENCE(w,w)
#define __smp_mb() RISCV_FENCE(rw,rw)
#define __smp_rmb() RISCV_FENCE(r,r)
#define __smp_wmb() RISCV_FENCE(w,w)
/*
* This is a very specific barrier: it's currently only used in two places in