1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * Copyright (c) 2018 Linaro Limited. All rights reserved. 4 * Author: Rafael David Tinoco <rafael.tinoco@linaro.org> 5 */ 6 7 #ifndef LAPI_MEMBARRIER_H 8 #define LAPI_MEMBARRIER_H 9 10 /* 11 * Having <linux/membarrier.h> is enough to know if the test should run or 12 * not, but it might not define all needed MEMBARRIER_CMD_* being tested, 13 * since its first versions included just a few commands. 14 */ 15 16 enum membarrier_cmd { 17 MEMBARRIER_CMD_QUERY = 0, 18 MEMBARRIER_CMD_GLOBAL = (1 << 0), 19 MEMBARRIER_CMD_GLOBAL_EXPEDITED = (1 << 1), 20 MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED = (1 << 2), 21 MEMBARRIER_CMD_PRIVATE_EXPEDITED = (1 << 3), 22 MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED = (1 << 4), 23 MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 5), 24 MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 6), 25 26 /* Alias for header backward compatibility. */ 27 MEMBARRIER_CMD_SHARED = MEMBARRIER_CMD_GLOBAL, 28 }; 29 30 #endif 31