setup_processor()

Linux version 2.6.35 arch\arm\kernel\setup.c

static void __init setup_processor(void)

{
    struct proc_info_list *list;

    /*
     * locate processor in the list of supported processor
     * types.  The linker builds this table for us from the
     * entries in arch/arm/mm/proc-v6.S

     */

    /*

     * 搜索processpr类型,该类型在之前head.S中已经获取了, 在proc-*.S中,

extern struct processor {
    /* MISC
     * get data abort address/flags
     */
    void (*_data_abort)(unsigned long pc);
    /*
     * Retrieve prefetch fault address
     */
    unsigned long (*_prefetch_abort)(unsigned long lr);
    /*
     * Set up any processor specifics
     */
    void (*_proc_init)(void);
    /*
     * Disable any processor specifics
     */
    void (*_proc_fin)(void);
    /*
     * Special stuff for a reset
     */
    void (*reset)(unsigned long addr) __attribute__((noreturn));
    /*
     * Idle the processor
     */
    int (*_do_idle)(void);
    /*
     * Processor architecture specific
     */
    /*
     * clean a virtual address range from the
     * D-cache without flushing the cache.
     */
    void (*dcache_clean_area)(void *addr, int size);

    /*
     * Set the page table
     */
    void (*switch_mm)(unsigned long pgd_phys, struct mm_struct *mm);
    /*
     * Set a possibly extended PTE.  Non-extended PTEs should
     * ignore 'ext'.
     */
    void (*set_pte_ext)(pte_t *ptep, pte_t pte, unsigned int ext);
}processor;

ENTRY(v6_processor_functions)
    .word    v6_early_abort
    .word    v6_pabort
    .word    cpu_v6_proc_init
    .word    cpu_v6_proc_fin
    .word    cpu_v6_reset
    .word    cpu_v6_do_idle
    .word    cpu_v6_dcache_clean_area
    .word    cpu_v6_switch_mm
    .word    cpu_v6_set_pte_ext


struct proc_info_list {
    unsigned int        cpu_val;
    unsigned int        cpu_mask;
    unsigned long        __cpu_mm_mmu_flags;    /* used by head.S */
    unsigned long        __cpu_io_mmu_flags;    /* used by head.S */
    unsigned long        __cpu_flush;        /* used by head.S */
    const char        *arch_name;
    const char        *elf_name;
    unsigned int        elf_hwcap;
    const char        *cpu_name;
    struct processor    *proc;
    struct cpu_tlb_fns    *tlb;
    struct cpu_user_fns    *user;
    struct cpu_cache_fns    *cache;
};


__v6_proc_info:
    .long    0x0007b000
    .long    0x0007f000
    .long   PMD_TYPE_SECT | \
        PMD_SECT_AP_WRITE | \
        PMD_SECT_AP_READ | \
        PMD_FLAGS
    .long   PMD_TYPE_SECT | \
        PMD_SECT_XN | \
        PMD_SECT_AP_WRITE | \
        PMD_SECT_AP_READ
    b    __v6_setup
    .long    cpu_arch_name
    .long    cpu_elf_name
    .long    HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA
    .long    cpu_v6_name
    .long    v6_processor_functions
    .long    v6wbi_tlb_fns
    .long    v6_user_fns
    .long    v6_cache_fns
    .size    __v6_proc_info, . - __v6_proc_info

     */

    list = lookup_processor_type(read_cpuid_id());
    if (!list) {/* 如果没有获得 则打印错误信息 并进入死循环
        printk("CPU configuration botched (ID %08x), unable "
               "to continue.\n", read_cpuid_id());
        while (1);
    }

    cpu_name = list->cpu_name;        //cpu_arch_name

#ifdef MULTI_CPU
    processor = *list->proc;                   //v6_processor_functions
#endif
#ifdef MULTI_TLB
    cpu_tlb = *list->tlb;                            //v6wbi_tlb_fns
#endif
#ifdef MULTI_USER
    cpu_user = *list->user;                    //v6_user_fns
#endif
#ifdef MULTI_CACHE
    cpu_cache = *list->cache;               //v6_cache_fns
#endif

    printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n",
           cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
           proc_arch[cpu_architecture()], cr_alignment);

    sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS);
    sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
    elf_hwcap = list->elf_hwcap;
#ifndef CONFIG_ARM_THUMB
    elf_hwcap &= ~HWCAP_THUMB;
#endif

    cacheid_init();
    cpu_proc_init();                                   //#define cpu_proc_init()            processor._proc_init()              
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Failed cleaning build dir for numpy Failed to build numpy Installing collected packages: numpy Running setup.py install for numpy ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-h5_vrlht/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-3koy23ws-record/install-record.txt --single-version-externally-managed --compile --user --prefix=: Running from numpy source directory. Note: if you need reliable uninstall behavior, then install with pip instead of using `setup.py install`: - `pip install .` (from a git repo or downloaded source release) - `pip install numpy` (last NumPy release on PyPi) Cythonizing sources Error compiling Cython file: ------------------------------------------------------------ ... cdef sfc64_state rng_state def __init__(self, seed=None): BitGenerator.__init__(self, seed) self._bitgen.state = <void *>&self.rng_state self._bitgen.next_uint64 = &sfc64_uint64 ^ ------------------------------------------------------------ _sfc64.pyx:90:35: Cannot assign type 'uint64_t (*)(void *) except? -1 nogil' to 'uint64_t (*)(void *) noexcept nogil' numpy/random/_bounded_integers.pxd.in has not changed Processing numpy/random/_sfc64.pyx Traceback (most recent call last): File "/tmp/pip-build-h5_vrlht/numpy/tools/cythonize.py", line 235, in <module> main() File "/tmp/pip-build-h5_vrlht/numpy/tools/cythonize.py", line 231, in main find_process_files(root_dir) File "/tmp/pip-build-h5_vrlht/numpy/tools/cythonize.py", line 222, in find_process_files process(root_dir, fromfile, tofile, function, hash_db) File "/tmp/pip-build-h5_vrlht/numpy/tools/cythonize.py", line 188, in process processor_function(fromfile, tofile) File "/tmp/pip-build-h5_vrlht/numpy/tools/cythonize.py", line 78, in process_pyx [sys.executable, '-m', 'cython'] + flags + ["-o", tofile, fromfile]) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'cython', '-3', '--fast-fail', '-o', '_sfc64.c', '_sfc64.pyx']' returned non-zero exit status 1. Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-h5_vrlht/numpy/setup.py", line 508, in <module> setup_package() File "/tmp/pip-build-h5_vrlht/numpy/setup.py", line 488, in setup_package generate_cython() File "/tmp/pip-build-h5_vrlht/numpy/setup.py", line 285, in generate_cython raise RuntimeError("Running cythonize failed!") RuntimeError: Running cythonize failed! ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-h5_vrlht/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-3koy23ws-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-h5_vrlht/numpy/
最新发布
07-25

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值