diff options
Diffstat (limited to 'security/selinux/ss/ebitmap.h')
-rw-r--r-- | security/selinux/ss/ebitmap.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/security/selinux/ss/ebitmap.h b/security/selinux/ss/ebitmap.h index 922f8afa89dd..712c8a7b8e8b 100644 --- a/security/selinux/ss/ebitmap.h +++ b/security/selinux/ss/ebitmap.h | |||
@@ -16,7 +16,13 @@ | |||
16 | 16 | ||
17 | #include <net/netlabel.h> | 17 | #include <net/netlabel.h> |
18 | 18 | ||
19 | #define EBITMAP_UNIT_NUMS ((32 - sizeof(void *) - sizeof(u32)) \ | 19 | #ifdef CONFIG_64BIT |
20 | #define EBITMAP_NODE_SIZE 64 | ||
21 | #else | ||
22 | #define EBITMAP_NODE_SIZE 32 | ||
23 | #endif | ||
24 | |||
25 | #define EBITMAP_UNIT_NUMS ((EBITMAP_NODE_SIZE-sizeof(void *)-sizeof(u32))\ | ||
20 | / sizeof(unsigned long)) | 26 | / sizeof(unsigned long)) |
21 | #define EBITMAP_UNIT_SIZE BITS_PER_LONG | 27 | #define EBITMAP_UNIT_SIZE BITS_PER_LONG |
22 | #define EBITMAP_SIZE (EBITMAP_UNIT_NUMS * EBITMAP_UNIT_SIZE) | 28 | #define EBITMAP_SIZE (EBITMAP_UNIT_NUMS * EBITMAP_UNIT_SIZE) |
@@ -117,7 +123,7 @@ static inline void ebitmap_node_clr_bit(struct ebitmap_node *n, | |||
117 | 123 | ||
118 | int ebitmap_cmp(struct ebitmap *e1, struct ebitmap *e2); | 124 | int ebitmap_cmp(struct ebitmap *e1, struct ebitmap *e2); |
119 | int ebitmap_cpy(struct ebitmap *dst, struct ebitmap *src); | 125 | int ebitmap_cpy(struct ebitmap *dst, struct ebitmap *src); |
120 | int ebitmap_contains(struct ebitmap *e1, struct ebitmap *e2); | 126 | int ebitmap_contains(struct ebitmap *e1, struct ebitmap *e2, u32 last_e2bit); |
121 | int ebitmap_get_bit(struct ebitmap *e, unsigned long bit); | 127 | int ebitmap_get_bit(struct ebitmap *e, unsigned long bit); |
122 | int ebitmap_set_bit(struct ebitmap *e, unsigned long bit, int value); | 128 | int ebitmap_set_bit(struct ebitmap *e, unsigned long bit, int value); |
123 | void ebitmap_destroy(struct ebitmap *e); | 129 | void ebitmap_destroy(struct ebitmap *e); |