2 * linux/arch/unicore32/include/asm/cpu-single.h
4 * Code specific to PKUnity SoC and UniCore ISA
6 * Copyright (C) 2001-2010 GUAN Xue-tao
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 #ifndef __UNICORE_CPU_SINGLE_H__
13 #define __UNICORE_CPU_SINGLE_H__
16 #include <asm/memory.h>
21 #define cpu_switch_mm(pgd, mm) cpu_do_switch_mm(virt_to_phys(pgd), mm)
23 #define cpu_get_pgd() \
26 __asm__("movc %0, p0.c2, #0" \
27 : "=r" (pg) : : "cc"); \
29 (pgd_t *)phys_to_virt(pg); \
34 /* declare all the functions as extern */
35 extern void cpu_proc_fin(void);
36 extern int cpu_do_idle(void);
37 extern void cpu_dcache_clean_area(void *, int);
38 extern void cpu_do_switch_mm(unsigned long pgd_phys
, struct mm_struct
*mm
);
39 extern void cpu_set_pte(pte_t
*ptep
, pte_t pte
);
40 extern void cpu_reset(unsigned long addr
) __attribute__((noreturn
));
42 #endif /* __ASSEMBLY__ */
43 #endif /* __KERNEL__ */
45 #endif /* __UNICORE_CPU_SINGLE_H__ */