diff options
Diffstat (limited to 'sys/compat/linuxkpi')
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/pm.h | 14 | ||||
| -rw-r--r-- | sys/compat/linuxkpi/common/src/linux_page.c | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h index c8d943027909..932697e0eda8 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -97,4 +97,18 @@ pm_wakeup_event(struct device *dev __unused, unsigned int x __unused) pr_debug("%s: TODO\n", __func__); } +/* + * We do not need to specify anything here as a VT switch always happens on + * suspend/resume. + */ +static inline void +pm_vt_switch_required(struct device *dev __unused, bool required __unused) +{ +} + +static inline void +pm_vt_switch_unregister(struct device *dev __unused) +{ +} + #endif /* _LINUXKPI_LINUX_PM_H */ diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index 628af17df853..9cc981b2ba43 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -345,6 +345,10 @@ retry: page = vm_page_grab_iter(vm_obj, pindex, VM_ALLOC_NOCREAT, &pages); if (page == NULL) { page = PHYS_TO_VM_PAGE(IDX_TO_OFF(pfn)); + if (page == NULL) { + pctrie_iter_reset(&pages); + return (VM_FAULT_SIGBUS); + } if (!vm_page_busy_acquire(page, VM_ALLOC_WAITFAIL)) { pctrie_iter_reset(&pages); goto retry; |
