Function report |
Source Code:arch\x86\kernel\cpu\cacheinfo.c |
Create Date:2022-07-28 07:54:01 |
Last Modify:2020-03-16 20:07:28 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:init_intel_cacheinfo
Proto:void init_intel_cacheinfo(struct cpuinfo_x86 *c)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct cpuinfo_x86 * | c |
732 | If Maximum supported CPUID level, -1=no CPUID: > 3 Then |
735 | If is_initialized == 0 Then |
738 | is_initialized++ |
745 | When i < num_cache_leaves cycle |
746 | struct _cpuid4_info_regs this_leaf = {} |
749 | retval = cpuid4_cache_lookup_regs(i, & this_leaf) |
750 | If retval < 0 Then Continue |
754 | Case level == 1 |
755 | If type == CTYPE_DATA Then new_l1d = size / 1024 |
757 | Else if type == CTYPE_INST Then new_l1i = size / 1024 |
759 | Break |
760 | Case level == 2 |
762 | num_threads_sharing = 1 + num_threads_sharing |
765 | Break |
766 | Case level == 3 |
768 | num_threads_sharing = 1 + num_threads_sharing |
771 | Break |
772 | Default |
773 | Break |
781 | If ( num_cache_leaves == 0 || CPU family == 15 ) && Maximum supported CPUID level, -1=no CPUID: > 1 Then |
786 | only_trace = 0 |
788 | If num_cache_leaves != 0 && CPU family == 15 Then only_trace = 1 |
792 | n = CPUID functions returning a single datum & 0xFF |
805 | k = 0 |
808 | When descriptor != 0 cycle |
809 | If descriptor == des Then |
810 | If only_trace && cache_type != LVL_TRACE Then Break |
813 | Case cache_type == LVL_1_INST |
816 | Case cache_type == LVL_1_DATA |
819 | Case cache_type == LVL_2 |
822 | Case cache_type == LVL_3 |
825 | Case cache_type == LVL_TRACE |
830 | Break |
833 | k++ |
845 | If new_l2 Then |
852 | If new_l3 Then |
873 | If Not l2 Then cpu_detect_cache_sizes(c) |
Name | Describe |
---|---|
init_intel | |
init_centaur | |
init_zhaoxin |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |