1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
8 /* Use r21 for fast access */
9 register unsigned long __my_cpu_offset __asm__("$r21");
11 static inline void set_my_cpu_offset(unsigned long off)
13 __my_cpu_offset = off;
14 csr_write64(off, PERCPU_BASE_KS);
16 #define __my_cpu_offset __my_cpu_offset
18 #include <asm-generic/percpu.h>
20 #endif /* __ASM_PERCPU_H */