kvm tools, setup: Create private directory
[linux-2.6/next.git] / arch / unicore32 / include / asm / cpu-single.h
blob0f55d1823439667e1c43372bf383f25fe7dd4b8e
1 /*
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__
15 #include <asm/page.h>
16 #include <asm/memory.h>
18 #ifdef __KERNEL__
19 #ifndef __ASSEMBLY__
21 #define cpu_switch_mm(pgd, mm) cpu_do_switch_mm(virt_to_phys(pgd), mm)
23 #define cpu_get_pgd() \
24 ({ \
25 unsigned long pg; \
26 __asm__("movc %0, p0.c2, #0" \
27 : "=r" (pg) : : "cc"); \
28 pg &= ~0x0fff; \
29 (pgd_t *)phys_to_virt(pg); \
32 struct mm_struct;
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__ */