selftests/powerpc: Dump MMCR2 as part of the EBB HW state
[linux/fpc-iii.git] / drivers / md / dm-cache-block-types.h
blobaac0e2df06bec4c2412a8ff27787e0d89b6a6c4f
1 /*
2 * Copyright (C) 2012 Red Hat, Inc.
4 * This file is released under the GPL.
5 */
7 #ifndef DM_CACHE_BLOCK_TYPES_H
8 #define DM_CACHE_BLOCK_TYPES_H
10 #include "persistent-data/dm-block-manager.h"
12 /*----------------------------------------------------------------*/
15 * It's helpful to get sparse to differentiate between indexes into the
16 * origin device, indexes into the cache device, and indexes into the
17 * discard bitset.
20 typedef dm_block_t __bitwise__ dm_oblock_t;
21 typedef uint32_t __bitwise__ dm_cblock_t;
23 static inline dm_oblock_t to_oblock(dm_block_t b)
25 return (__force dm_oblock_t) b;
28 static inline dm_block_t from_oblock(dm_oblock_t b)
30 return (__force dm_block_t) b;
33 static inline dm_cblock_t to_cblock(uint32_t b)
35 return (__force dm_cblock_t) b;
38 static inline uint32_t from_cblock(dm_cblock_t b)
40 return (__force uint32_t) b;
43 #endif /* DM_CACHE_BLOCK_TYPES_H */