Duy Truong | 790f06d | 2013-02-13 16:38:12 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
Chintan Pandya | 862bb89 | 2011-11-22 14:51:20 +0530 | [diff] [blame] | 13 | #include <mach/memory.h> |
| 14 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 15 | #define mb() do \ |
| 16 | { \ |
| 17 | dsb();\ |
| 18 | outer_sync(); \ |
| 19 | write_to_strongly_ordered_memory(); \ |
| 20 | } while (0) |
| 21 | #define rmb() do { dmb(); write_to_strongly_ordered_memory(); } while (0) |
| 22 | #define wmb() mb() |