* Nodes in the tree point to their parent unless bit 0 is set.
*/
#if defined(CONFIG_64BIT) || defined(BUILD_VDSO32_64)
+/* 64bit sizes */
#define MAPLE_NODE_SLOTS 31 /* 256 bytes including ->parent */
#define MAPLE_RANGE64_SLOTS 16 /* 256 bytes */
#define MAPLE_ARANGE64_SLOTS 10 /* 240 bytes */
#define MAPLE_ARANGE64_META_MAX 15 /* Out of range for metadata */
-#define MAPLE_NODE_MASK 255UL
+#define MAPLE_ALLOC_SLOTS (MAPLE_NODE_SLOTS - 1)
#else
-/* Need to do corresponding calculations for 32-bit kernels */
-#endif
+/* 32bit sizes */
+#define MAPLE_NODE_SLOTS 63 /* 256 bytes including ->parent */
+#define MAPLE_RANGE64_SLOTS 32 /* 256 bytes */
+#define MAPLE_ARANGE64_SLOTS 21 /* 240 bytes */
+#define MAPLE_ARANGE64_META_MAX 22 /* Out of range for metadata */
+#define MAPLE_ALLOC_SLOTS (MAPLE_NODE_SLOTS - 2)
+#endif /* defined(CONFIG_64BIT) || defined(BUILD_VDSO32_64) */
+
+#define MAPLE_NODE_MASK 255UL
typedef struct maple_enode *maple_enode; // encoded node.
typedef struct maple_pnode *maple_pnode; // parent node.
unsigned char meta;
};
-#define MAPLE_ALLOC_SLOTS (MAPLE_NODE_SLOTS - 1)
struct maple_alloc {
unsigned long total;
unsigned char node_count;