1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/unicore32/include/asm/cpu-single.h
5 * Code specific to PKUnity SoC and UniCore ISA
7 * Copyright (C) 2001-2010 GUAN Xue-tao
9 #ifndef __UNICORE_CPU_SINGLE_H__
10 #define __UNICORE_CPU_SINGLE_H__
13 #include <asm/memory.h>
18 #define cpu_switch_mm(pgd, mm) cpu_do_switch_mm(virt_to_phys(pgd), mm)
20 #define cpu_get_pgd() \
23 __asm__("movc %0, p0.c2, #0" \
24 : "=r" (pg) : : "cc"); \
26 (pgd_t *)phys_to_virt(pg); \
31 /* declare all the functions as extern */
32 extern void cpu_proc_fin(void);
33 extern int cpu_do_idle(void);
34 extern void cpu_dcache_clean_area(void *, int);
35 extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
36 extern void cpu_set_pte(pte_t *ptep, pte_t pte);
37 extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
39 #endif /* __ASSEMBLY__ */
40 #endif /* __KERNEL__ */
42 #endif /* __UNICORE_CPU_SINGLE_H__ */