File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,15 @@ struct hmm;
41
41
*/
42
42
#ifdef CONFIG_HAVE_ALIGNED_STRUCT_PAGE
43
43
#define _struct_page_alignment __aligned(2 * sizeof(unsigned long))
44
+ #if defined(CONFIG_HAVE_CMPXCHG_DOUBLE )
45
+ #define _slub_counter_t unsigned long
44
46
#else
45
- #define _struct_page_alignment
47
+ #define _slub_counter_t unsigned int
46
48
#endif
49
+ #else /* !CONFIG_HAVE_ALIGNED_STRUCT_PAGE */
50
+ #define _struct_page_alignment
51
+ #define _slub_counter_t unsigned int
52
+ #endif /* !CONFIG_HAVE_ALIGNED_STRUCT_PAGE */
47
53
48
54
struct page {
49
55
/* First double word block */
@@ -66,18 +72,7 @@ struct page {
66
72
};
67
73
68
74
union {
69
- #if defined(CONFIG_HAVE_CMPXCHG_DOUBLE ) && \
70
- defined(CONFIG_HAVE_ALIGNED_STRUCT_PAGE )
71
- /* Used for cmpxchg_double in slub */
72
- unsigned long counters ;
73
- #else
74
- /*
75
- * Keep _refcount separate from slub cmpxchg_double data.
76
- * As the rest of the double word is protected by slab_lock
77
- * but _refcount is not.
78
- */
79
- unsigned counters ;
80
- #endif
75
+ _slub_counter_t counters ;
81
76
unsigned int active ; /* SLAB */
82
77
struct { /* SLUB */
83
78
unsigned inuse :16 ;
You can’t perform that action at this time.
0 commit comments