The patch titled Subject: mm/mmu_notifier: convert mmu_notifier_range->blockable to a flags has been added to the -mm tree. Its filename is mm-mmu_notifier-convert-mmu_notifier_range-blockable-to-a-flags.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-mmu_notifier-convert-mmu_notifier_range-blockable-to-a-flags.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-mmu_notifier-convert-mmu_notifier_range-blockable-to-a-flags.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jérôme Glisse <jglisse@xxxxxxxxxx> Subject: mm/mmu_notifier: convert mmu_notifier_range->blockable to a flags Use an unsigned field for flags other than blockable and convert the blockable field to be one of those flags. Link: http://lkml.kernel.org/r/20190326164747.24405-4-jglisse@xxxxxxxxxx Signed-off-by: Jérôme Glisse <jglisse@xxxxxxxxxx> Cc: Christian König <christian.koenig@xxxxxxx> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> Cc: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Peter Xu <peterx@xxxxxxxxxx> Cc: Felix Kuehling <Felix.Kuehling@xxxxxxx> Cc: Jason Gunthorpe <jgg@xxxxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Ross Zwisler <zwisler@xxxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx> Cc: Radim Krcmar <rkrcmar@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Christian Koenig <christian.koenig@xxxxxxx> Cc: Ralph Campbell <rcampbell@xxxxxxxxxx> Cc: John Hubbard <jhubbard@xxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/mmu_notifier.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) --- a/include/linux/mmu_notifier.h~mm-mmu_notifier-convert-mmu_notifier_range-blockable-to-a-flags +++ a/include/linux/mmu_notifier.h @@ -25,11 +25,13 @@ struct mmu_notifier_mm { spinlock_t lock; }; +#define MMU_NOTIFIER_RANGE_BLOCKABLE (1 << 0) + struct mmu_notifier_range { struct mm_struct *mm; unsigned long start; unsigned long end; - bool blockable; + unsigned flags; }; struct mmu_notifier_ops { @@ -229,7 +231,7 @@ extern void __mmu_notifier_invalidate_ra static inline bool mmu_notifier_range_blockable(const struct mmu_notifier_range *range) { - return range->blockable; + return (range->flags & MMU_NOTIFIER_RANGE_BLOCKABLE); } static inline void mmu_notifier_release(struct mm_struct *mm) @@ -275,7 +277,7 @@ static inline void mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range) { if (mm_has_notifiers(range->mm)) { - range->blockable = true; + range->flags |= MMU_NOTIFIER_RANGE_BLOCKABLE; __mmu_notifier_invalidate_range_start(range); } } @@ -284,7 +286,7 @@ static inline int mmu_notifier_invalidate_range_start_nonblock(struct mmu_notifier_range *range) { if (mm_has_notifiers(range->mm)) { - range->blockable = false; + range->flags &= ~MMU_NOTIFIER_RANGE_BLOCKABLE; return __mmu_notifier_invalidate_range_start(range); } return 0; @@ -331,6 +333,7 @@ static inline void mmu_notifier_range_in range->mm = mm; range->start = start; range->end = end; + range->flags = 0; } #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \ _ Patches currently in -mm which might be from jglisse@xxxxxxxxxx are mm-hmm-select-mmu-notifier-when-selecting-hmm-v2.patch mm-hmm-use-reference-counting-for-hmm-struct-v3.patch mm-hmm-do-not-erase-snapshot-when-a-range-is-invalidated.patch mm-hmm-improve-and-rename-hmm_vma_get_pfns-to-hmm_range_snapshot-v2.patch mm-hmm-improve-and-rename-hmm_vma_fault-to-hmm_range_fault-v3.patch mm-hmm-improve-driver-api-to-work-and-wait-over-a-range-v3.patch mm-hmm-add-default-fault-flags-to-avoid-the-need-to-pre-fill-pfns-arrays-v2.patch mm-hmm-mirror-hugetlbfs-snapshoting-faulting-and-dma-mapping-v3.patch mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-v3.patch mm-hmm-add-helpers-to-test-if-mm-is-still-alive-or-not.patch mm-hmm-add-an-helper-function-that-fault-pages-and-map-them-to-a-device-v3.patch mm-hmm-add-an-helper-function-that-fault-pages-and-map-them-to-a-device-v3-fix.patch mm-hmm-convert-various-hmm_pfn_-to-device_entry-which-is-a-better-name.patch mm-mmu_notifier-helper-to-test-if-a-range-invalidation-is-blockable.patch mm-mmu_notifier-convert-user-range-blockable-to-helper-function.patch mm-mmu_notifier-convert-mmu_notifier_range-blockable-to-a-flags.patch mm-mmu_notifier-contextual-information-for-event-enums.patch mm-mmu_notifier-contextual-information-for-event-triggering-invalidation-v2.patch mm-mmu_notifier-use-correct-mmu_notifier-events-for-each-invalidation.patch mm-mmu_notifier-pass-down-vma-and-reasons-why-mmu-notifier-is-happening-v2.patch mm-mmu_notifier-mmu_notifier_range_update_to_read_only-helper.patch