mirror of
https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10.git
synced 2026-09-09 00:07:04 +08:00
JIRA: https://issues.redhat.com/browse/RHEL-73608 Tested: sanity only. Not even the patch submitter has a way to test this. commit 205e6d17cdf5b7f7b221bf64be9850eabce429c9 Author: Ankit Agrawal <ankita@nvidia.com> Date: Thu Jan 15 20:28:48 2026 +0000 mm: add stubs for PFNMAP memory failure registration functions Add stubs to address CONFIG_MEMORY_FAILURE disabled. Suggested-by: Alex Williamson <alex@shazbot.org> Signed-off-by: Ankit Agrawal <ankita@nvidia.com> Link: https://lore.kernel.org/r/20260115202849.2921-2-ankita@nvidia.com Signed-off-by: Alex Williamson <alex@shazbot.org> Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
29 lines
773 B
C
29 lines
773 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_MEMORY_FAILURE_H
|
|
#define _LINUX_MEMORY_FAILURE_H
|
|
|
|
#include <linux/interval_tree.h>
|
|
|
|
struct pfn_address_space {
|
|
struct interval_tree_node node;
|
|
struct address_space *mapping;
|
|
int (*pfn_to_vma_pgoff)(struct vm_area_struct *vma,
|
|
unsigned long pfn, pgoff_t *pgoff);
|
|
};
|
|
|
|
#ifdef CONFIG_MEMORY_FAILURE
|
|
int register_pfn_address_space(struct pfn_address_space *pfn_space);
|
|
void unregister_pfn_address_space(struct pfn_address_space *pfn_space);
|
|
#else
|
|
static inline int register_pfn_address_space(struct pfn_address_space *pfn_space)
|
|
{
|
|
return -EOPNOTSUPP;
|
|
}
|
|
|
|
static inline void unregister_pfn_address_space(struct pfn_address_space *pfn_space)
|
|
{
|
|
}
|
|
#endif /* CONFIG_MEMORY_FAILURE */
|
|
|
|
#endif /* _LINUX_MEMORY_FAILURE_H */
|