Path: blob/master/arch/unicore32/include/asm/cpu-single.h
10818 views
/*1* linux/arch/unicore32/include/asm/cpu-single.h2*3* Code specific to PKUnity SoC and UniCore ISA4*5* Copyright (C) 2001-2010 GUAN Xue-tao6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License version 2 as9* published by the Free Software Foundation.10*/11#ifndef __UNICORE_CPU_SINGLE_H__12#define __UNICORE_CPU_SINGLE_H__1314#include <asm/page.h>15#include <asm/memory.h>1617#ifdef __KERNEL__18#ifndef __ASSEMBLY__1920#define cpu_switch_mm(pgd, mm) cpu_do_switch_mm(virt_to_phys(pgd), mm)2122#define cpu_get_pgd() \23({ \24unsigned long pg; \25__asm__("movc %0, p0.c2, #0" \26: "=r" (pg) : : "cc"); \27pg &= ~0x0fff; \28(pgd_t *)phys_to_virt(pg); \29})3031struct mm_struct;3233/* declare all the functions as extern */34extern void cpu_proc_fin(void);35extern int cpu_do_idle(void);36extern void cpu_dcache_clean_area(void *, int);37extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);38extern void cpu_set_pte(pte_t *ptep, pte_t pte);39extern void cpu_reset(unsigned long addr) __attribute__((noreturn));4041#endif /* __ASSEMBLY__ */42#endif /* __KERNEL__ */4344#endif /* __UNICORE_CPU_SINGLE_H__ */454647