Use an unsigned field for flags other than blockable and convert the blockable field to be one of those flags.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -25,11 +25,13 @@ struct mmu_notifier_mm { · 24 unmodified lines | |||
| 25 | spinlock_t lock; | 25 | spinlock_t lock; |
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| 28 | #define MMU_NOTIFIER_RANGE_BLOCKABLE (1 << 0) | ||
| 29 | |||
| 28 | struct mmu_notifier_range { | 30 | struct mmu_notifier_range { |
| 29 | struct mm_struct *mm; | 31 | struct mm_struct *mm; |
| 30 | unsigned long start; | 32 | unsigned long start; |
| 31 | unsigned long end; | 33 | unsigned long end; |
| 32 | bool blockable; | 34 | unsigned flags; |
| 33 | }; | 35 | }; |
| 34 | 36 | ||
| 35 | struct mmu_notifier_ops { | 37 | struct mmu_notifier_ops { |
| @@ -229,7 +231,7 @@ extern void __mmu_notifier_invalidate_range(struct mm_struct *mm, · 193 unmodified lines | |||
| 229 | static inline bool | 231 | static inline bool |
| 230 | mmu_notifier_range_blockable(const struct mmu_notifier_range *range) | 232 | mmu_notifier_range_blockable(const struct mmu_notifier_range *range) |
| 231 | { | 233 | { |
| 232 | return range->blockable; | 234 | return (range->flags & MMU_NOTIFIER_RANGE_BLOCKABLE); |
| 233 | } | 235 | } |
| 234 | 236 | ||
| 235 | static inline void mmu_notifier_release(struct mm_struct *mm) | 237 | static inline void mmu_notifier_release(struct mm_struct *mm) |
| @@ -275,7 +277,7 @@ static inline void · 39 unmodified lines | |||
| 275 | mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range) | 277 | mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range) |
| 276 | { | 278 | { |
| 277 | if (mm_has_notifiers(range->mm)) { | 279 | if (mm_has_notifiers(range->mm)) { |
| 278 | range->blockable = true; | 280 | range->flags |= MMU_NOTIFIER_RANGE_BLOCKABLE; |
| 279 | __mmu_notifier_invalidate_range_start(range); | 281 | __mmu_notifier_invalidate_range_start(range); |
| 280 | } | 282 | } |
| 281 | } | 283 | } |
| @@ -284,7 +286,7 @@ static inline int · 2 unmodified lines | |||
| 284 | mmu_notifier_invalidate_range_start_nonblock(struct mmu_notifier_range *range) | 286 | mmu_notifier_invalidate_range_start_nonblock(struct mmu_notifier_range *range) |
| 285 | { | 287 | { |
| 286 | if (mm_has_notifiers(range->mm)) { | 288 | if (mm_has_notifiers(range->mm)) { |
| 287 | range->blockable = false; | 289 | range->flags &= ~MMU_NOTIFIER_RANGE_BLOCKABLE; |
| 288 | return __mmu_notifier_invalidate_range_start(range); | 290 | return __mmu_notifier_invalidate_range_start(range); |
| 289 | } | 291 | } |
| 290 | return 0; | 292 | return 0; |
| @@ -331,6 +333,7 @@ static inline void mmu_notifier_range_init(struct mmu_notifier_range *range, · 40 unmodified lines | |||
| 331 | range->mm = mm; | 333 | range->mm = mm; |
| 332 | range->start = start; | 334 | range->start = start; |
| 333 | range->end = end; | 335 | range->end = end; |
| 336 | range->flags = 0; | ||
| 334 | } | 337 | } |
| 335 | 338 | ||
| 336 | #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \ | 339 | #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \ |