]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/compiler-intel.h
mm/hotplug: invalid PFNs from pfn_to_online_page()
[mirror_ubuntu-bionic-kernel.git] / include / linux / compiler-intel.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
d1515582 2#ifndef __LINUX_COMPILER_TYPES_H
94f582f8
RD
3#error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead."
4#endif
1da177e4
LT
5
6#ifdef __ECC
7
8/* Some compiler specific definitions are overwritten here
9 * for Intel ECC compiler
10 */
11
12#include <asm/intrinsics.h>
13
14/* Intel ECC compiler doesn't support gcc specific asm stmts.
15 * It uses intrinsics to do the equivalent things.
16 */
b86a50c3 17#undef barrier
7829fb09 18#undef barrier_data
1da177e4 19#undef RELOC_HIDE
fe8c8a12 20#undef OPTIMIZER_HIDE_VAR
1da177e4 21
b86a50c3 22#define barrier() __memory_barrier()
7829fb09
DB
23#define barrier_data(ptr) barrier()
24
1da177e4
LT
25#define RELOC_HIDE(ptr, off) \
26 ({ unsigned long __ptr; \
27 __ptr = (unsigned long) (ptr); \
28 (typeof(ptr)) (__ptr + (off)); })
29
fe8c8a12
CEB
30/* This should act as an optimization barrier on var.
31 * Given that this compiler does not have inline assembly, a compiler barrier
32 * is the best we can do.
33 */
34#define OPTIMIZER_HIDE_VAR(var) barrier()
35
c5e631cf
RR
36/* Intel ECC compiler doesn't support __builtin_types_compatible_p() */
37#define __must_be_array(a) 0
38
1da177e4 39#endif
94909914 40
cf66bb93
DW
41#ifndef __HAVE_BUILTIN_BSWAP16__
42/* icc has this, but it's called _bswap16 */
43#define __HAVE_BUILTIN_BSWAP16__
44#define __builtin_bswap16 _bswap16
45#endif
46
a8b18c24
RV
47/*
48 * icc defines __GNUC__, but does not implement the builtin overflow checkers.
49 */
50#undef COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW