ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上

2011年9月30日 星期五

說要加上 Will Deacon 的 cpu_reset patch。
查一下,在 arch/arm/mm

誰用到?

宣告的地方:./arch/arm/include/asm/cpu-single.h #ifdef __STDC__ #define __catify_fn(name,x) name##x #else #define __catify_fn(name,x) name/**/x #endif #define __cpu_fn(name,x) __catify_fn(name,x) /* * If we are supporting multiple CPUs, then we must use a table of * function pointers for this lot. Otherwise, we can optimise the * table away. */ #define cpu_proc_init __cpu_fn(CPU_NAME,_proc_init) #define cpu_proc_fin __cpu_fn(CPU_NAME,_proc_fin) #define cpu_reset __cpu_fn(CPU_NAME,_reset) #define cpu_do_idle __cpu_fn(CPU_NAME,_do_idle) #define cpu_dcache_clean_area __cpu_fn(CPU_NAME,_dcache_clean_area) #define cpu_do_switch_mm __cpu_fn(CPU_NAME,_switch_mm) #define cpu_set_pte_ext __cpu_fn(CPU_NAME,_set_pte_ext) #include struct mm_struct; /* declare all the functions as extern */ extern void cpu_proc_init(void); extern void cpu_proc_fin(void); extern int cpu_do_idle(void); extern void cpu_dcache_clean_area(void *, int); extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); 所以 cpu_reset( ) 會變成 CPU_NAME_reset

CPU_NAME 定義在 ./arch/arm/include/asm/proc-fns.h # ifdef CONFIG_CPU_V6 # ifdef CPU_NAME # undef MULTI_CPU # define MULTI_CPU # else # define CPU_NAME cpu_v6 # endif # endif # ifdef CONFIG_CPU_V7 # ifdef CPU_NAME # undef MULTI_CPU # define MULTI_CPU # else # define CPU_NAME cpu_v7 # endif # endif 所以 cortext A8 的 kernel config 是: CONFIG_CPU_V7=y 也就是會變成 cpu_v7_reset( )

所以 assembly 的部份要看 cpu_v7_reset, c source 的部份要看 cpu_reset ().
.. 有一堆 source call cpu_reset...



ref:
  1. http://comments.gmane.org/gmane.linux.ports.arm.kernel/119552
  2. http://lists.infradead.org/pipermail/linux-arm-kernel/2011-July/057302.html

沒有留言:

標籤

網誌存檔