b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _ASM_POWERPC_UNALIGNED_H |
| 3 | #define _ASM_POWERPC_UNALIGNED_H |
| 4 | |
| 5 | #ifdef __KERNEL__ |
| 6 | |
| 7 | /* |
| 8 | * The PowerPC can do unaligned accesses itself based on its endian mode. |
| 9 | */ |
| 10 | #include <linux/unaligned/access_ok.h> |
| 11 | #include <linux/unaligned/generic.h> |
| 12 | |
| 13 | #ifdef __LITTLE_ENDIAN__ |
| 14 | #define get_unaligned __get_unaligned_le |
| 15 | #define put_unaligned __put_unaligned_le |
| 16 | #else |
| 17 | #define get_unaligned __get_unaligned_be |
| 18 | #define put_unaligned __put_unaligned_be |
| 19 | #endif |
| 20 | |
| 21 | #endif /* __KERNEL__ */ |
| 22 | #endif /* _ASM_POWERPC_UNALIGNED_H */ |