compiler.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __LINUX_COMPILER_H
  3. #define __LINUX_COMPILER_H
  4. #ifndef __ASSEMBLY__
  5. #ifdef __CHECKER__
  6. # define __user __attribute__((noderef, address_space(1)))
  7. # define __kernel __attribute__((address_space(0)))
  8. # define __safe __attribute__((safe))
  9. # define __force __attribute__((force))
  10. # define __nocast __attribute__((nocast))
  11. # define __iomem __attribute__((noderef, address_space(2)))
  12. # define __must_hold(x) __attribute__((context(x,1,1)))
  13. # define __acquires(x) __attribute__((context(x,0,1)))
  14. # define __releases(x) __attribute__((context(x,1,0)))
  15. # define __acquire(x) __context__(x,1)
  16. # define __release(x) __context__(x,-1)
  17. # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)
  18. # define __percpu __attribute__((noderef, address_space(3)))
  19. # define __rcu __attribute__((noderef, address_space(4)))
  20. # define __private __attribute__((noderef))
  21. extern void __chk_user_ptr(const volatile void __user *);
  22. extern void __chk_io_ptr(const volatile void __iomem *);
  23. # define ACCESS_PRIVATE(p, member) (*((typeof((p)->member) __force *) &(p)->member))
  24. #else /* __CHECKER__ */
  25. # ifdef STRUCTLEAK_PLUGIN
  26. # define __user __attribute__((user))
  27. # else
  28. # define __user
  29. # endif
  30. # define __kernel
  31. # define __safe
  32. # define __force
  33. # define __nocast
  34. # define __iomem
  35. # define __chk_user_ptr(x) (void)0
  36. # define __chk_io_ptr(x) (void)0
  37. # define __builtin_warning(x, y...) (1)
  38. # define __must_hold(x)
  39. # define __acquires(x)
  40. # define __releases(x)
  41. # define __acquire(x) (void)0
  42. # define __release(x) (void)0
  43. # define __cond_lock(x,c) (c)
  44. # define __percpu
  45. # define __rcu
  46. # define __private
  47. # define ACCESS_PRIVATE(p, member) ((p)->member)
  48. #endif /* __CHECKER__ */
  49. /* Indirect macros required for expanded argument pasting, eg. __LINE__. */
  50. #define ___PASTE(a,b) a##b
  51. #define __PASTE(a,b) ___PASTE(a,b)
  52. #ifdef __KERNEL__
  53. #ifdef __GNUC__
  54. #include <linux/compiler-gcc.h>
  55. #endif
  56. #if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__)
  57. #define notrace __attribute__((hotpatch(0,0)))
  58. #else
  59. #define notrace __attribute__((no_instrument_function))
  60. #endif
  61. /* Intel compiler defines __GNUC__. So we will overwrite implementations
  62. * coming from above header files here
  63. */
  64. #ifdef __INTEL_COMPILER
  65. # include <linux/compiler-intel.h>
  66. #endif
  67. /* Clang compiler defines __GNUC__. So we will overwrite implementations
  68. * coming from above header files here
  69. */
  70. #ifdef __clang__
  71. #include <linux/compiler-clang.h>
  72. #endif
  73. /*
  74. * Generic compiler-dependent macros required for kernel
  75. * build go below this comment. Actual compiler/compiler version
  76. * specific implementations come from the above header files
  77. */
  78. struct ftrace_branch_data {
  79. const char *func;
  80. const char *file;
  81. unsigned line;
  82. union {
  83. struct {
  84. unsigned long correct;
  85. unsigned long incorrect;
  86. };
  87. struct {
  88. unsigned long miss;
  89. unsigned long hit;
  90. };
  91. unsigned long miss_hit[2];
  92. };
  93. };
  94. struct ftrace_likely_data {
  95. struct ftrace_branch_data data;
  96. unsigned long constant;
  97. };
  98. /*
  99. * Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code
  100. * to disable branch tracing on a per file basis.
  101. */
  102. #if defined(CONFIG_TRACE_BRANCH_PROFILING) \
  103. && !defined(DISABLE_BRANCH_PROFILING) && !defined(__CHECKER__)
  104. void ftrace_likely_update(struct ftrace_likely_data *f, int val,
  105. int expect, int is_constant);
  106. #define likely_notrace(x) __builtin_expect(!!(x), 1)
  107. #define unlikely_notrace(x) __builtin_expect(!!(x), 0)
  108. #define __branch_check__(x, expect, is_constant) ({ \
  109. int ______r; \
  110. static struct ftrace_likely_data \
  111. __attribute__((__aligned__(4))) \
  112. __attribute__((section("_ftrace_annotated_branch"))) \
  113. ______f = { \
  114. .data.func = __func__, \
  115. .data.file = __FILE__, \
  116. .data.line = __LINE__, \
  117. }; \
  118. ______r = __builtin_expect(!!(x), expect); \
  119. ftrace_likely_update(&______f, ______r, \
  120. expect, is_constant); \
  121. ______r; \
  122. })
  123. /*
  124. * Using __builtin_constant_p(x) to ignore cases where the return
  125. * value is always the same. This idea is taken from a similar patch
  126. * written by Daniel Walker.
  127. */
  128. # ifndef likely
  129. # define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
  130. # endif
  131. # ifndef unlikely
  132. # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
  133. # endif
  134. #ifdef CONFIG_PROFILE_ALL_BRANCHES
  135. /*
  136. * "Define 'is'", Bill Clinton
  137. * "Define 'if'", Steven Rostedt
  138. */
  139. #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  140. #define __trace_if(cond) \
  141. if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
  142. ({ \
  143. int ______r; \
  144. static struct ftrace_branch_data \
  145. __attribute__((__aligned__(4))) \
  146. __attribute__((section("_ftrace_branch"))) \
  147. ______f = { \
  148. .func = __func__, \
  149. .file = __FILE__, \
  150. .line = __LINE__, \
  151. }; \
  152. ______r = !!(cond); \
  153. ______f.miss_hit[______r]++; \
  154. ______r; \
  155. }))
  156. #endif /* CONFIG_PROFILE_ALL_BRANCHES */
  157. #else
  158. # define likely(x) __builtin_expect(!!(x), 1)
  159. # define unlikely(x) __builtin_expect(!!(x), 0)
  160. #endif
  161. /* Optimization barrier */
  162. #ifndef barrier
  163. # define barrier() __memory_barrier()
  164. #endif
  165. #ifndef barrier_data
  166. # define barrier_data(ptr) barrier()
  167. #endif
  168. /* Unreachable code */
  169. #ifdef CONFIG_STACK_VALIDATION
  170. #define annotate_reachable() ({ \
  171. asm("%c0:\n\t" \
  172. ".pushsection .discard.reachable\n\t" \
  173. ".long %c0b - .\n\t" \
  174. ".popsection\n\t" : : "i" (__COUNTER__)); \
  175. })
  176. #define annotate_unreachable() ({ \
  177. asm("%c0:\n\t" \
  178. ".pushsection .discard.unreachable\n\t" \
  179. ".long %c0b - .\n\t" \
  180. ".popsection\n\t" : : "i" (__COUNTER__)); \
  181. })
  182. #define ASM_UNREACHABLE \
  183. "999:\n\t" \
  184. ".pushsection .discard.unreachable\n\t" \
  185. ".long 999b - .\n\t" \
  186. ".popsection\n\t"
  187. #else
  188. #define annotate_reachable()
  189. #define annotate_unreachable()
  190. #endif
  191. #ifndef ASM_UNREACHABLE
  192. # define ASM_UNREACHABLE
  193. #endif
  194. #ifndef unreachable
  195. # define unreachable() do { annotate_reachable(); do { } while (1); } while (0)
  196. #endif
  197. /*
  198. * KENTRY - kernel entry point
  199. * This can be used to annotate symbols (functions or data) that are used
  200. * without their linker symbol being referenced explicitly. For example,
  201. * interrupt vector handlers, or functions in the kernel image that are found
  202. * programatically.
  203. *
  204. * Not required for symbols exported with EXPORT_SYMBOL, or initcalls. Those
  205. * are handled in their own way (with KEEP() in linker scripts).
  206. *
  207. * KENTRY can be avoided if the symbols in question are marked as KEEP() in the
  208. * linker script. For example an architecture could KEEP() its entire
  209. * boot/exception vector code rather than annotate each function and data.
  210. */
  211. #ifndef KENTRY
  212. # define KENTRY(sym) \
  213. extern typeof(sym) sym; \
  214. static const unsigned long __kentry_##sym \
  215. __used \
  216. __attribute__((section("___kentry" "+" #sym ), used)) \
  217. = (unsigned long)&sym;
  218. #endif
  219. #ifndef RELOC_HIDE
  220. # define RELOC_HIDE(ptr, off) \
  221. ({ unsigned long __ptr; \
  222. __ptr = (unsigned long) (ptr); \
  223. (typeof(ptr)) (__ptr + (off)); })
  224. #endif
  225. #ifndef OPTIMIZER_HIDE_VAR
  226. #define OPTIMIZER_HIDE_VAR(var) barrier()
  227. #endif
  228. /* Not-quite-unique ID. */
  229. #ifndef __UNIQUE_ID
  230. # define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__)
  231. #endif
  232. #include <uapi/linux/types.h>
  233. #define __READ_ONCE_SIZE \
  234. ({ \
  235. switch (size) { \
  236. case 1: *(__u8 *)res = *(volatile __u8 *)p; break; \
  237. case 2: *(__u16 *)res = *(volatile __u16 *)p; break; \
  238. case 4: *(__u32 *)res = *(volatile __u32 *)p; break; \
  239. case 8: *(__u64 *)res = *(volatile __u64 *)p; break; \
  240. default: \
  241. barrier(); \
  242. __builtin_memcpy((void *)res, (const void *)p, size); \
  243. barrier(); \
  244. } \
  245. })
  246. static __always_inline
  247. void __read_once_size(const volatile void *p, void *res, int size)
  248. {
  249. __READ_ONCE_SIZE;
  250. }
  251. #ifdef CONFIG_KASAN
  252. /*
  253. * This function is not 'inline' because __no_sanitize_address confilcts
  254. * with inlining. Attempt to inline it may cause a build failure.
  255. * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
  256. * '__maybe_unused' allows us to avoid defined-but-not-used warnings.
  257. */
  258. static __no_sanitize_address __maybe_unused
  259. void __read_once_size_nocheck(const volatile void *p, void *res, int size)
  260. {
  261. __READ_ONCE_SIZE;
  262. }
  263. #else
  264. static __always_inline
  265. void __read_once_size_nocheck(const volatile void *p, void *res, int size)
  266. {
  267. __READ_ONCE_SIZE;
  268. }
  269. #endif
  270. static __always_inline void __write_once_size(volatile void *p, void *res, int size)
  271. {
  272. switch (size) {
  273. case 1: *(volatile __u8 *)p = *(__u8 *)res; break;
  274. case 2: *(volatile __u16 *)p = *(__u16 *)res; break;
  275. case 4: *(volatile __u32 *)p = *(__u32 *)res; break;
  276. case 8: *(volatile __u64 *)p = *(__u64 *)res; break;
  277. default:
  278. barrier();
  279. __builtin_memcpy((void *)p, (const void *)res, size);
  280. barrier();
  281. }
  282. }
  283. /*
  284. * Prevent the compiler from merging or refetching reads or writes. The
  285. * compiler is also forbidden from reordering successive instances of
  286. * READ_ONCE, WRITE_ONCE and ACCESS_ONCE (see below), but only when the
  287. * compiler is aware of some particular ordering. One way to make the
  288. * compiler aware of ordering is to put the two invocations of READ_ONCE,
  289. * WRITE_ONCE or ACCESS_ONCE() in different C statements.
  290. *
  291. * In contrast to ACCESS_ONCE these two macros will also work on aggregate
  292. * data types like structs or unions. If the size of the accessed data
  293. * type exceeds the word size of the machine (e.g., 32 bits or 64 bits)
  294. * READ_ONCE() and WRITE_ONCE() will fall back to memcpy(). There's at
  295. * least two memcpy()s: one for the __builtin_memcpy() and then one for
  296. * the macro doing the copy of variable - '__u' allocated on the stack.
  297. *
  298. * Their two major use cases are: (1) Mediating communication between
  299. * process-level code and irq/NMI handlers, all running on the same CPU,
  300. * and (2) Ensuring that the compiler does not fold, spindle, or otherwise
  301. * mutilate accesses that either do not require ordering or that interact
  302. * with an explicit memory barrier or atomic instruction that provides the
  303. * required ordering.
  304. */
  305. #define __READ_ONCE(x, check) \
  306. ({ \
  307. union { typeof(x) __val; char __c[1]; } __u; \
  308. if (check) \
  309. __read_once_size(&(x), __u.__c, sizeof(x)); \
  310. else \
  311. __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
  312. __u.__val; \
  313. })
  314. #define READ_ONCE(x) __READ_ONCE(x, 1)
  315. /*
  316. * Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need
  317. * to hide memory access from KASAN.
  318. */
  319. #define READ_ONCE_NOCHECK(x) __READ_ONCE(x, 0)
  320. #define WRITE_ONCE(x, val) \
  321. ({ \
  322. union { typeof(x) __val; char __c[1]; } __u = \
  323. { .__val = (__force typeof(x)) (val) }; \
  324. __write_once_size(&(x), __u.__c, sizeof(x)); \
  325. __u.__val; \
  326. })
  327. #endif /* __KERNEL__ */
  328. #endif /* __ASSEMBLY__ */
  329. #ifdef __KERNEL__
  330. /*
  331. * Allow us to mark functions as 'deprecated' and have gcc emit a nice
  332. * warning for each use, in hopes of speeding the functions removal.
  333. * Usage is:
  334. * int __deprecated foo(void)
  335. */
  336. #ifndef __deprecated
  337. # define __deprecated /* unimplemented */
  338. #endif
  339. #ifdef MODULE
  340. #define __deprecated_for_modules __deprecated
  341. #else
  342. #define __deprecated_for_modules
  343. #endif
  344. #ifndef __must_check
  345. #define __must_check
  346. #endif
  347. #ifndef CONFIG_ENABLE_MUST_CHECK
  348. #undef __must_check
  349. #define __must_check
  350. #endif
  351. #ifndef CONFIG_ENABLE_WARN_DEPRECATED
  352. #undef __deprecated
  353. #undef __deprecated_for_modules
  354. #define __deprecated
  355. #define __deprecated_for_modules
  356. #endif
  357. #ifndef __malloc
  358. #define __malloc
  359. #endif
  360. /*
  361. * Allow us to avoid 'defined but not used' warnings on functions and data,
  362. * as well as force them to be emitted to the assembly file.
  363. *
  364. * As of gcc 3.4, static functions that are not marked with attribute((used))
  365. * may be elided from the assembly file. As of gcc 3.4, static data not so
  366. * marked will not be elided, but this may change in a future gcc version.
  367. *
  368. * NOTE: Because distributions shipped with a backported unit-at-a-time
  369. * compiler in gcc 3.3, we must define __used to be __attribute__((used))
  370. * for gcc >=3.3 instead of 3.4.
  371. *
  372. * In prior versions of gcc, such functions and data would be emitted, but
  373. * would be warned about except with attribute((unused)).
  374. *
  375. * Mark functions that are referenced only in inline assembly as __used so
  376. * the code is emitted even though it appears to be unreferenced.
  377. */
  378. #ifndef __used
  379. # define __used /* unimplemented */
  380. #endif
  381. #ifndef __maybe_unused
  382. # define __maybe_unused /* unimplemented */
  383. #endif
  384. #ifndef __always_unused
  385. # define __always_unused /* unimplemented */
  386. #endif
  387. #ifndef noinline
  388. #define noinline
  389. #endif
  390. /*
  391. * Rather then using noinline to prevent stack consumption, use
  392. * noinline_for_stack instead. For documentation reasons.
  393. */
  394. #define noinline_for_stack noinline
  395. #ifndef __always_inline
  396. #define __always_inline inline
  397. #endif
  398. #endif /* __KERNEL__ */
  399. /*
  400. * From the GCC manual:
  401. *
  402. * Many functions do not examine any values except their arguments,
  403. * and have no effects except the return value. Basically this is
  404. * just slightly more strict class than the `pure' attribute above,
  405. * since function is not allowed to read global memory.
  406. *
  407. * Note that a function that has pointer arguments and examines the
  408. * data pointed to must _not_ be declared `const'. Likewise, a
  409. * function that calls a non-`const' function usually must not be
  410. * `const'. It does not make sense for a `const' function to return
  411. * `void'.
  412. */
  413. #ifndef __attribute_const__
  414. # define __attribute_const__ /* unimplemented */
  415. #endif
  416. #ifndef __designated_init
  417. # define __designated_init
  418. #endif
  419. #ifndef __latent_entropy
  420. # define __latent_entropy
  421. #endif
  422. #ifndef __randomize_layout
  423. # define __randomize_layout __designated_init
  424. #endif
  425. #ifndef __no_randomize_layout
  426. # define __no_randomize_layout
  427. #endif
  428. #ifndef randomized_struct_fields_start
  429. # define randomized_struct_fields_start
  430. # define randomized_struct_fields_end
  431. #endif
  432. /*
  433. * Tell gcc if a function is cold. The compiler will assume any path
  434. * directly leading to the call is unlikely.
  435. */
  436. #ifndef __cold
  437. #define __cold
  438. #endif
  439. /* Simple shorthand for a section definition */
  440. #ifndef __section
  441. # define __section(S) __attribute__ ((__section__(#S)))
  442. #endif
  443. #ifndef __visible
  444. #define __visible
  445. #endif
  446. #ifndef __nostackprotector
  447. # define __nostackprotector
  448. #endif
  449. /*
  450. * Assume alignment of return value.
  451. */
  452. #ifndef __assume_aligned
  453. #define __assume_aligned(a, ...)
  454. #endif
  455. /* Are two types/vars the same type (ignoring qualifiers)? */
  456. #ifndef __same_type
  457. # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
  458. #endif
  459. /* Is this type a native word size -- useful for atomic operations */
  460. #ifndef __native_word
  461. # define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
  462. #endif
  463. /* Compile time object size, -1 for unknown */
  464. #ifndef __compiletime_object_size
  465. # define __compiletime_object_size(obj) -1
  466. #endif
  467. #ifndef __compiletime_warning
  468. # define __compiletime_warning(message)
  469. #endif
  470. #ifndef __compiletime_error
  471. # define __compiletime_error(message)
  472. /*
  473. * Sparse complains of variable sized arrays due to the temporary variable in
  474. * __compiletime_assert. Unfortunately we can't just expand it out to make
  475. * sparse see a constant array size without breaking compiletime_assert on old
  476. * versions of GCC (e.g. 4.2.4), so hide the array from sparse altogether.
  477. */
  478. # ifndef __CHECKER__
  479. # define __compiletime_error_fallback(condition) \
  480. do { ((void)sizeof(char[1 - 2 * condition])); } while (0)
  481. # endif
  482. #endif
  483. #ifndef __compiletime_error_fallback
  484. # define __compiletime_error_fallback(condition) do { } while (0)
  485. #endif
  486. #ifdef __OPTIMIZE__
  487. # define __compiletime_assert(condition, msg, prefix, suffix) \
  488. do { \
  489. bool __cond = !(condition); \
  490. extern void prefix ## suffix(void) __compiletime_error(msg); \
  491. if (__cond) \
  492. prefix ## suffix(); \
  493. __compiletime_error_fallback(__cond); \
  494. } while (0)
  495. #else
  496. # define __compiletime_assert(condition, msg, prefix, suffix) do { } while (0)
  497. #endif
  498. #define _compiletime_assert(condition, msg, prefix, suffix) \
  499. __compiletime_assert(condition, msg, prefix, suffix)
  500. /**
  501. * compiletime_assert - break build and emit msg if condition is false
  502. * @condition: a compile-time constant condition to check
  503. * @msg: a message to emit if condition is false
  504. *
  505. * In tradition of POSIX assert, this macro will break the build if the
  506. * supplied condition is *false*, emitting the supplied error message if the
  507. * compiler has support to do so.
  508. */
  509. #define compiletime_assert(condition, msg) \
  510. _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  511. #define compiletime_assert_atomic_type(t) \
  512. compiletime_assert(__native_word(t), \
  513. "Need native word sized stores/loads for atomicity.")
  514. /*
  515. * Prevent the compiler from merging or refetching accesses. The compiler
  516. * is also forbidden from reordering successive instances of ACCESS_ONCE(),
  517. * but only when the compiler is aware of some particular ordering. One way
  518. * to make the compiler aware of ordering is to put the two invocations of
  519. * ACCESS_ONCE() in different C statements.
  520. *
  521. * ACCESS_ONCE will only work on scalar types. For union types, ACCESS_ONCE
  522. * on a union member will work as long as the size of the member matches the
  523. * size of the union and the size is smaller than word size.
  524. *
  525. * The major use cases of ACCESS_ONCE used to be (1) Mediating communication
  526. * between process-level code and irq/NMI handlers, all running on the same CPU,
  527. * and (2) Ensuring that the compiler does not fold, spindle, or otherwise
  528. * mutilate accesses that either do not require ordering or that interact
  529. * with an explicit memory barrier or atomic instruction that provides the
  530. * required ordering.
  531. *
  532. * If possible use READ_ONCE()/WRITE_ONCE() instead.
  533. */
  534. #define __ACCESS_ONCE(x) ({ \
  535. __maybe_unused typeof(x) __var = (__force typeof(x)) 0; \
  536. (volatile typeof(x) *)&(x); })
  537. #define ACCESS_ONCE(x) (*__ACCESS_ONCE(x))
  538. /**
  539. * lockless_dereference() - safely load a pointer for later dereference
  540. * @p: The pointer to load
  541. *
  542. * Similar to rcu_dereference(), but for situations where the pointed-to
  543. * object's lifetime is managed by something other than RCU. That
  544. * "something other" might be reference counting or simple immortality.
  545. *
  546. * The seemingly unused variable ___typecheck_p validates that @p is
  547. * indeed a pointer type by using a pointer to typeof(*p) as the type.
  548. * Taking a pointer to typeof(*p) again is needed in case p is void *.
  549. */
  550. #define lockless_dereference(p) \
  551. ({ \
  552. typeof(p) _________p1 = READ_ONCE(p); \
  553. typeof(*(p)) *___typecheck_p __maybe_unused; \
  554. smp_read_barrier_depends(); /* Dependency order vs. p above. */ \
  555. (_________p1); \
  556. })
  557. #endif /* __LINUX_COMPILER_H */