Add Linux compatibility header stubs needed to compile extents_status.c: - backing-dev.h: Backing device info stub - dax.h: Direct Access (DAX) stubs - iomap.h: I/O mapping operations and structures - mman.h: Memory mapping flags - mount.h: VFS mount structures - pagevec.h: Page vector batching - pfn_t.h: Page frame number type - posix_acl_xattr.h: POSIX ACL xattr definitions - proc_fs.h: Proc filesystem stub - uio.h: User I/O vector definitions - xattr.h: Extended attributes - trace/events/ext4.h: Trace event stubs Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
32 lines
602 B
C
32 lines
602 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_PFN_T_H
|
|
#define _LINUX_PFN_T_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
/*
|
|
* pfn_t is a type that encapsulates a page frame number along with
|
|
* flags about how it should be used. For U-Boot, we just need a
|
|
* minimal definition.
|
|
*/
|
|
typedef struct {
|
|
u64 val;
|
|
} pfn_t;
|
|
|
|
#define PFN_DEV (1ULL << 56)
|
|
#define PFN_MAP (1ULL << 57)
|
|
|
|
static inline pfn_t pfn_to_pfn_t(unsigned long pfn)
|
|
{
|
|
pfn_t pfn_t = { .val = pfn };
|
|
|
|
return pfn_t;
|
|
}
|
|
|
|
static inline unsigned long pfn_t_to_pfn(pfn_t pfn)
|
|
{
|
|
return pfn.val & ~(PFN_DEV | PFN_MAP);
|
|
}
|
|
|
|
#endif /* _LINUX_PFN_T_H */
|