Lines Matching refs:c
366 static int __init get_model_name(struct cpuinfo_x86 *c) in get_model_name() argument
373 v = (unsigned int *) c->x86_model_id; in get_model_name()
377 c->x86_model_id[48] = 0; in get_model_name()
382 static void __init display_cacheinfo(struct cpuinfo_x86 *c) in display_cacheinfo() argument
396 c->x86_cache_size=(ecx>>24)+(edx>>24); in display_cacheinfo()
403 c->x86_cache_size = ecx_2 >> 16; in display_cacheinfo()
404 c->x86_tlbsize = ((ebx>>16)&0xff) + ((ebx_2>>16)&0xfff) + in display_cacheinfo()
408 cpuid(0x80000007, &dummy, &dummy, &dummy, &c->x86_power); in display_cacheinfo()
411 c->x86_virt_bits = (eax >> 8) & 0xff; in display_cacheinfo()
412 c->x86_phys_bits = eax & 0xff; in display_cacheinfo()
465 int select_idle_routine(struct cpuinfo_x86 *c);
467 static void __init init_intel(struct cpuinfo_x86 *c) in init_intel() argument
476 select_idle_routine(c); in init_intel()
477 if (c->cpuid_level > 1) { in init_intel()
547 c->x86_cache_size = l2 ? l2 : (l1i+l1d); in init_intel()
551 strcpy(c->x86_model_id, p); in init_intel()
554 if (test_bit(X86_FEATURE_HT, &c->x86_capability)) { in init_intel()
603 c->x86_virt_bits = (eax >> 8) & 0xff; in init_intel()
604 c->x86_phys_bits = eax & 0xff; in init_intel()
609 static int __init init_amd(struct cpuinfo_x86 *c) in init_amd() argument
615 clear_bit(0*32+31, &c->x86_capability); in init_amd()
617 r = get_model_name(c); in init_amd()
619 switch (c->x86) { in init_amd()
623 strcpy(c->x86_model_id, "Hammer"); in init_amd()
627 display_cacheinfo(c); in init_amd()
632 void __init get_cpu_vendor(struct cpuinfo_x86 *c) in get_cpu_vendor() argument
634 char *v = c->x86_vendor_id; in get_cpu_vendor()
637 c->x86_vendor = X86_VENDOR_AMD; in get_cpu_vendor()
639 c->x86_vendor = X86_VENDOR_INTEL; in get_cpu_vendor()
641 c->x86_vendor = X86_VENDOR_UNKNOWN; in get_cpu_vendor()
653 void __init identify_cpu(struct cpuinfo_x86 *c) in identify_cpu() argument
658 c->loops_per_jiffy = loops_per_jiffy; in identify_cpu()
659 c->x86_cache_size = -1; in identify_cpu()
660 c->x86_vendor = X86_VENDOR_UNKNOWN; in identify_cpu()
661 c->x86_model = c->x86_mask = 0; /* So far unknown... */ in identify_cpu()
662 c->x86_vendor_id[0] = '\0'; /* Unset */ in identify_cpu()
663 c->x86_model_id[0] = '\0'; /* Unset */ in identify_cpu()
664 memset(&c->x86_capability, 0, sizeof c->x86_capability); in identify_cpu()
667 cpuid(0x00000000, &c->cpuid_level, in identify_cpu()
668 (int *)&c->x86_vendor_id[0], in identify_cpu()
669 (int *)&c->x86_vendor_id[8], in identify_cpu()
670 (int *)&c->x86_vendor_id[4]); in identify_cpu()
672 get_cpu_vendor(c); in identify_cpu()
677 if ( c->cpuid_level >= 0x00000001 ) { in identify_cpu()
679 cpuid(0x00000001, &tfms, &misc, &c->x86_capability[4], in identify_cpu()
680 &c->x86_capability[0]); in identify_cpu()
681 c->x86 = (tfms >> 8) & 15; in identify_cpu()
682 c->x86_model = (tfms >> 4) & 15; in identify_cpu()
683 if (c->x86 == 0xf) { /* extended */ in identify_cpu()
684 c->x86 += (tfms >> 20) & 0xff; in identify_cpu()
685 c->x86_model += ((tfms >> 16) & 0xF) << 4; in identify_cpu()
687 c->x86_mask = tfms & 15; in identify_cpu()
688 if (c->x86_capability[0] & (1<<19)) in identify_cpu()
689 c->x86_clflush_size = ((misc >> 8) & 0xff) * 8; in identify_cpu()
692 c->x86 = 4; in identify_cpu()
699 c->x86_capability[1] = cpuid_edx(0x80000001); in identify_cpu()
701 get_model_name(c); /* Default name */ in identify_cpu()
708 c->x86_capability[2] = cpuid_edx(0x80860001); in identify_cpu()
722 switch ( c->x86_vendor ) { in identify_cpu()
725 init_amd(c); in identify_cpu()
729 init_intel(c); in identify_cpu()
733 display_cacheinfo(c); in identify_cpu()
748 if ( c != &boot_cpu_data ) { in identify_cpu()
751 boot_cpu_data.x86_capability[i] &= c->x86_capability[i]; in identify_cpu()
755 mcheck_init(c); in identify_cpu()
759 void __init print_cpu_info(struct cpuinfo_x86 *c) in print_cpu_info() argument
761 if (c->x86_model_id[0]) in print_cpu_info()
762 printk("%s", c->x86_model_id); in print_cpu_info()
764 if (c->x86_mask || c->cpuid_level >= 0) in print_cpu_info()
765 printk(" stepping %02x\n", c->x86_mask); in print_cpu_info()
776 struct cpuinfo_x86 *c = v; in show_cpuinfo() local
825 if (!(cpu_online_map & (1<<(c-cpu_data)))) in show_cpuinfo()
834 (unsigned)(c-cpu_data), in show_cpuinfo()
835 c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown", in show_cpuinfo()
836 c->x86, in show_cpuinfo()
837 (int)c->x86_model, in show_cpuinfo()
838 c->x86_model_id[0] ? c->x86_model_id : "unknown"); in show_cpuinfo()
840 if (c->x86_mask || c->cpuid_level >= 0) in show_cpuinfo()
841 seq_printf(m, "stepping\t: %d\n", c->x86_mask); in show_cpuinfo()
845 if ( test_bit(X86_FEATURE_TSC, &c->x86_capability) ) { in show_cpuinfo()
850 seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size); in show_cpuinfo()
853 seq_printf(m, "physical id\t: %d\n",phys_proc_id[c - cpu_data]); in show_cpuinfo()
863 c->cpuid_level); in show_cpuinfo()
868 if ( test_bit(i, &c->x86_capability) && in show_cpuinfo()
874 c->loops_per_jiffy/(500000/HZ), in show_cpuinfo()
875 (c->loops_per_jiffy/(5000/HZ)) % 100); in show_cpuinfo()
877 if (c->x86_tlbsize > 0) in show_cpuinfo()
878 seq_printf(m, "TLB size\t: %d 4K pages\n", c->x86_tlbsize); in show_cpuinfo()
879 seq_printf(m, "clflush size\t: %d\n", c->x86_clflush_size); in show_cpuinfo()
881 if (c->x86_phys_bits > 0) in show_cpuinfo()
883 c->x86_phys_bits, c->x86_virt_bits); in show_cpuinfo()
889 if (c->x86_power & (1 << i)) { in show_cpuinfo()