Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / arm / include / asm / dcc.h
blobd24c4be724e382f0e50f68e3cc0c2086ccafd70d
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright (c) 2010, 2014 The Linux Foundation. All rights reserved.
3 */
5 #include <asm/barrier.h>
7 static inline u32 __dcc_getstatus(void)
9 u32 __ret;
10 asm volatile("mrc p14, 0, %0, c0, c1, 0 @ read comms ctrl reg"
11 : "=r" (__ret) : : "cc");
13 return __ret;
16 static inline char __dcc_getchar(void)
18 char __c;
20 asm volatile("mrc p14, 0, %0, c0, c5, 0 @ read comms data reg"
21 : "=r" (__c));
22 isb();
24 return __c;
27 static inline void __dcc_putchar(char c)
29 asm volatile("mcr p14, 0, %0, c0, c5, 0 @ write a char"
30 : /* no output register */
31 : "r" (c));
32 isb();