1/* SPDX-License-Identifier: GPL-2.0 */ 2// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 3 4#ifndef __ABI_REG_OPS_H 5#define __ABI_REG_OPS_H 6#include <asm/reg_ops.h> 7 8#define cprcr(reg) \ 9({ \ 10 unsigned int tmp; \ 11 asm volatile("cprcr %0, "reg"\n":"=b"(tmp)); \ 12 tmp; \ 13}) 14 15#define cpwcr(reg, val) \ 16({ \ 17 asm volatile("cpwcr %0, "reg"\n"::"b"(val)); \ 18}) 19 20static inline unsigned int mfcr_hint(void) 21{ 22 return mfcr("cr30"); 23} 24 25static inline unsigned int mfcr_ccr2(void) { return 0; } 26 27#endif /* __ABI_REG_OPS_H */ 28