Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162574740
D58207.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D58207.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/mmu_notifier.h b/sys/compat/linuxkpi/common/include/linux/mmu_notifier.h
--- a/sys/compat/linuxkpi/common/include/linux/mmu_notifier.h
+++ b/sys/compat/linuxkpi/common/include/linux/mmu_notifier.h
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2017 Mark Johnston <markj@FreeBSD.org>
+ * Copyright (c) 2026 The FreeBSD Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,9 +26,63 @@
*/
#ifndef _LINUXKPI_LINUX_MMU_NOTIFIER_H_
-#define _LINUXKPI_LINUX_MMU_NOTIFIER_H_
+#define _LINUXKPI_LINUX_MMU_NOTIFIER_H_
+
+/*
+ * XXX: These functions are stubbed out. This is a temporary placeholder
+ * to allow compilation. Note that these functions have no implementation;
+ * using them will result in silent failure, memory corruption, or system
+ * instability.
+*/
+#warning "linux/mmu_notifier.h is currently a stub; expect runtime issues"
+
+
+struct mm_struct;
+struct mmu_notifier;
+
+struct mmu_notifier_ops {
+ void (*release)(struct mmu_notifier *mn, struct mm_struct *mm);
+ struct mmu_notifier *(*alloc_notifier)(struct mm_struct *mm);
+ void (*free_notifier)(struct mmu_notifier *mn);
+ void (*invalidate_range_start)(struct mmu_notifier *mn, const void *range);
+ void (*invalidate_range_end)(struct mmu_notifier *mn, const void *range);
+};
struct mmu_notifier {
+ const struct mmu_notifier_ops *ops;
};
+
+static inline int
+mmu_notifier_register(struct mmu_notifier *mn, struct mm_struct *mm)
+{
+ return 0;
+}
+
+static inline void
+mmu_notifier_unregister(struct mmu_notifier *mn, struct mm_struct *mm)
+{
+}
+
+static inline struct mmu_notifier *
+mmu_notifier_get(const struct mmu_notifier_ops *ops, struct mm_struct *mm)
+{
+ if (ops && ops->alloc_notifier)
+ return ops->alloc_notifier(mm);
+
+ return NULL;
+}
+
+static inline void
+mmu_notifier_put(struct mmu_notifier *mn)
+{
+ if (mn && mn->ops && mn->ops->free_notifier)
+ mn->ops->free_notifier(mn);
+}
+
+static inline void
+mmu_notifier_synchronize(void)
+{
+}
+
#endif /* _LINUXKPI_LINUX_MMU_NOTIFIER_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 15, 4:59 PM (1 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35052456
Default Alt Text
D58207.diff (2 KB)
Attached To
Mode
D58207: LinuxKPI: Adding functions to mmu_notifier.h to satisify requirements to compile kfd_process.c in amdkfd driver
Attached
Detach File
Event Timeline
Log In to Comment