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.
19 lines
665 B
C
19 lines
665 B
C
/* linuxu: SHIM (third_party/linux/include/linux/byteorder/generic.h) */
|
|
#ifndef __LINUX_BYTEORDER_GENERIC_H
|
|
#define __LINUX_BYTEORDER_GENERIC_H
|
|
#include <linux/types.h>
|
|
#include <stdint.h>
|
|
#define cpu_to_le16(x) ((u16)(x))
|
|
#define cpu_to_le32(x) ((u32)(x))
|
|
#define cpu_to_le64(x) ((u64)(x))
|
|
#define le16_to_cpu(x) ((u16)(x))
|
|
#define le32_to_cpu(x) ((u32)(x))
|
|
#define le64_to_cpu(x) ((u64)(x))
|
|
#define cpu_to_be16(x) __builtin_bswap16(x)
|
|
#define cpu_to_be32(x) __builtin_bswap32(x)
|
|
#define cpu_to_be64(x) __builtin_bswap64(x)
|
|
#define be16_to_cpu(x) __builtin_bswap16(x)
|
|
#define be32_to_cpu(x) __builtin_bswap32(x)
|
|
#define be64_to_cpu(x) __builtin_bswap64(x)
|
|
#endif
|