aboutsummaryrefslogtreecommitdiff
path: root/include/asm-generic/unaligned.h
blob: 3d33a5a063e8fa676039f567fb3a1f4b77e66f25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef _GENERIC_UNALIGNED_H
#define _GENERIC_UNALIGNED_H

#include <asm/byteorder.h>

#include <linux/unaligned/le_byteshift.h>
#include <linux/unaligned/be_byteshift.h>
#include <linux/unaligned/generic.h>

/*
 * Select endianness
 */
#if defined(__LITTLE_ENDIAN)
#define get_unaligned	__get_unaligned_le
#define put_unaligned	__put_unaligned_le
#elif defined(__BIG_ENDIAN)
#define get_unaligned	__get_unaligned_be
#define put_unaligned	__put_unaligned_be
#else
#error invalid endian
#endif

/* Allow unaligned memory access */
void allow_unaligned(void);

#endif