From: Dave Airlie Date: Wed, 25 Mar 2026 23:41:26 +0000 (+1000) Subject: BackMerge tag 'v7.0-rc4' into drm-next X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=13c072b8e91a5ccb5855ca1ba6fe3ea467dbf94d;p=thirdparty%2Fkernel%2Flinux.git BackMerge tag 'v7.0-rc4' into drm-next Linux 7.0-rc4 Needed for rust tree. Signed-off-by: Dave Airlie --- 13c072b8e91a5ccb5855ca1ba6fe3ea467dbf94d diff --cc include/linux/mmu_notifier.h index dcdfdf1e0b39d,8450e18a87c26..0da15adb4aac0 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@@ -233,33 -233,8 +233,33 @@@ struct mmu_notifier unsigned int users; }; +/** + * struct mmu_interval_notifier_finish - mmu_interval_notifier two-pass abstraction + * @link: Lockless list link for the notifiers pending pass list + * @notifier: The mmu_interval_notifier for which the finish pass is called. + * + * Allocate, typically using GFP_NOWAIT in the interval notifier's start pass. + * Note that with a large number of notifiers implementing two passes, + * allocation with GFP_NOWAIT will become increasingly likely to fail, so consider + * implementing a small pool instead of using kmalloc() allocations. + * + * If the implementation needs to pass data between the start and the finish passes, + * the recommended way is to embed struct mmu_interval_notifier_finish into a larger + * structure that also contains the data needed to be shared. Keep in mind that + * a notifier callback can be invoked in parallel, and each invocation needs its + * own struct mmu_interval_notifier_finish. + * + * If allocation fails, then the &mmu_interval_notifier_ops->invalidate_start op + * needs to implements the full notifier functionality. Please refer to its + * documentation. + */ +struct mmu_interval_notifier_finish { + struct llist_node link; + struct mmu_interval_notifier *notifier; +}; + /** - * struct mmu_interval_notifier_ops + * struct mmu_interval_notifier_ops - callback for range notification * @invalidate: Upon return the caller must stop using any SPTEs within this * range. This function can sleep. Return false only if sleeping * was required but mmu_notifier_range_blockable(range) is false.