mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 12:55:04 +07:00
97fb5e8d9b
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 and only version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 294 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141900.825281744@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
34 lines
623 B
C
34 lines
623 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* Copyright (c) 2010, 2014 The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#include <asm/barrier.h>
|
|
|
|
static inline u32 __dcc_getstatus(void)
|
|
{
|
|
u32 __ret;
|
|
asm volatile("mrc p14, 0, %0, c0, c1, 0 @ read comms ctrl reg"
|
|
: "=r" (__ret) : : "cc");
|
|
|
|
return __ret;
|
|
}
|
|
|
|
static inline char __dcc_getchar(void)
|
|
{
|
|
char __c;
|
|
|
|
asm volatile("mrc p14, 0, %0, c0, c5, 0 @ read comms data reg"
|
|
: "=r" (__c));
|
|
isb();
|
|
|
|
return __c;
|
|
}
|
|
|
|
static inline void __dcc_putchar(char c)
|
|
{
|
|
asm volatile("mcr p14, 0, %0, c0, c5, 0 @ write a char"
|
|
: /* no output register */
|
|
: "r" (c));
|
|
isb();
|
|
}
|