mirror of
https://github.com/lemonade-sdk/mac_linuxgpu.git
synced 2026-11-22 23:57:31 -10:00
Runs the unmodified upstream Linux amdgpu and amdkfd drivers on Apple Silicon Macs inside a DriverKit system extension, for AMD GPUs attached over Thunderbolt. The Linux sources come from a pinned submodule and are compiled against linuxu, a userspace implementation of the Linux kernel APIs they use. Includes the HSA runtime, the host installer app, the setup and firmware fetch scripts, and the offline test suite.
46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
/* linuxu: SHIM (third_party/linux/include/linux/fs_context.h) — minimal
|
|
* parse-option surface for drm_gem.c's tmpfs option parsing. */
|
|
#ifndef _LINUX_FS_CONTEXT_H
|
|
#define _LINUX_FS_CONTEXT_H
|
|
|
|
struct fs_context {
|
|
const struct fs_context_operations *ops;
|
|
struct file_system_type *fs_type;
|
|
void *fs_private;
|
|
void *sget_key;
|
|
struct dentry *root;
|
|
const char *source;
|
|
unsigned int sb_flags;
|
|
unsigned int sb_flags_mask;
|
|
};
|
|
struct fs_parameter {
|
|
const char *key;
|
|
union {
|
|
const char *string;
|
|
unsigned int uint;
|
|
} u;
|
|
enum { OPT_NONE, OPT_STRING, OPT_NUMBER } type;
|
|
};
|
|
#define fs_param_is_str(p) ((p)->type == OPT_STRING)
|
|
#define fs_param_is_number(p) ((p)->type == OPT_NUMBER)
|
|
#define fs_param_str(p) ((p)->u.string)
|
|
#define fs_param_num(p) ((p)->u.uint)
|
|
|
|
struct fs_param {
|
|
struct fs_parameter param;
|
|
bool consumed;
|
|
};
|
|
|
|
static inline bool fs_parse_option(struct fs_context *fc, const char *param,
|
|
const char *val,
|
|
int (*parse_one)(struct fs_context *,
|
|
const char *, const char *, void *),
|
|
void *data, bool optional)
|
|
{
|
|
(void)fc; (void)param; (void)val; (void)parse_one; (void)data;
|
|
(void)optional;
|
|
return true;
|
|
}
|
|
|
|
#endif
|