Loading Documentation/kernel-parameters.txt +6 −0 Original line number Diff line number Diff line Loading @@ -1882,6 +1882,12 @@ and is between 256 and 4096 characters. It is defined in the file shapers= [NET] Maximal number of shapers. show_msr= [x86] show boot-time MSR settings Format: { <integer> } Show boot-time (BIOS-initialized) MSR settings. The parameter means the number of CPUs to show, for example 1 means boot CPU only. sim710= [SCSI,HW] See header of drivers/scsi/sim710.c. Loading arch/x86/kernel/cpu/common_64.c +51 −0 Original line number Diff line number Diff line Loading @@ -430,6 +430,49 @@ static __init int setup_noclflush(char *arg) } __setup("noclflush", setup_noclflush); struct msr_range { unsigned min; unsigned max; }; static struct msr_range msr_range_array[] __cpuinitdata = { { 0x00000000, 0x00000418}, { 0xc0000000, 0xc000040b}, { 0xc0010000, 0xc0010142}, { 0xc0011000, 0xc001103b}, }; static void __cpuinit print_cpu_msr(void) { unsigned index; u64 val; int i; unsigned index_min, index_max; for (i = 0; i < ARRAY_SIZE(msr_range_array); i++) { index_min = msr_range_array[i].min; index_max = msr_range_array[i].max; for (index = index_min; index < index_max; index++) { if (rdmsrl_amd_safe(index, &val)) continue; printk(KERN_INFO " MSR%08x: %016llx\n", index, val); } } } static int show_msr __cpuinitdata; static __init int setup_show_msr(char *arg) { int num; get_option(&arg, &num); if (num > 0) show_msr = num; return 1; } __setup("show_msr=", setup_show_msr); void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) { if (c->x86_model_id[0]) Loading @@ -439,6 +482,14 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) printk(KERN_CONT " stepping %02x\n", c->x86_mask); else printk(KERN_CONT "\n"); #ifdef CONFIG_SMP if (c->cpu_index < show_msr) print_cpu_msr(); #else if (show_msr) print_cpu_msr(); #endif } static __init int setup_disablecpuid(char *arg) Loading arch/x86/kernel/entry_64.S +2 −2 Original line number Diff line number Diff line Loading @@ -275,9 +275,9 @@ ENTRY(native_usergs_sysret64) ENTRY(ret_from_fork) CFI_DEFAULT_STACK push kernel_eflags(%rip) CFI_ADJUST_CFA_OFFSET 4 CFI_ADJUST_CFA_OFFSET 8 popf # reset kernel eflags CFI_ADJUST_CFA_OFFSET -4 CFI_ADJUST_CFA_OFFSET -8 call schedule_tail GET_THREAD_INFO(%rcx) testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx) Loading arch/x86/kernel/paravirt.c +1 −0 Original line number Diff line number Diff line Loading @@ -330,6 +330,7 @@ struct pv_cpu_ops pv_cpu_ops = { #endif .wbinvd = native_wbinvd, .read_msr = native_read_msr_safe, .read_msr_amd = native_read_msr_amd_safe, .write_msr = native_write_msr_safe, .read_tsc = native_read_tsc, .read_pmc = native_read_pmc, Loading arch/x86/kernel/setup_percpu.c +8 −1 Original line number Diff line number Diff line Loading @@ -162,9 +162,16 @@ void __init setup_per_cpu_areas(void) printk(KERN_INFO "cpu %d has no node %d or node-local memory\n", cpu, node); if (ptr) printk(KERN_DEBUG "per cpu data for cpu%d at %016lx\n", cpu, __pa(ptr)); } else else { ptr = alloc_bootmem_pages_node(NODE_DATA(node), size); if (ptr) printk(KERN_DEBUG "per cpu data for cpu%d on node%d at %016lx\n", cpu, node, __pa(ptr)); } #endif per_cpu_offset(cpu) = ptr - __per_cpu_start; memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); Loading Loading
Documentation/kernel-parameters.txt +6 −0 Original line number Diff line number Diff line Loading @@ -1882,6 +1882,12 @@ and is between 256 and 4096 characters. It is defined in the file shapers= [NET] Maximal number of shapers. show_msr= [x86] show boot-time MSR settings Format: { <integer> } Show boot-time (BIOS-initialized) MSR settings. The parameter means the number of CPUs to show, for example 1 means boot CPU only. sim710= [SCSI,HW] See header of drivers/scsi/sim710.c. Loading
arch/x86/kernel/cpu/common_64.c +51 −0 Original line number Diff line number Diff line Loading @@ -430,6 +430,49 @@ static __init int setup_noclflush(char *arg) } __setup("noclflush", setup_noclflush); struct msr_range { unsigned min; unsigned max; }; static struct msr_range msr_range_array[] __cpuinitdata = { { 0x00000000, 0x00000418}, { 0xc0000000, 0xc000040b}, { 0xc0010000, 0xc0010142}, { 0xc0011000, 0xc001103b}, }; static void __cpuinit print_cpu_msr(void) { unsigned index; u64 val; int i; unsigned index_min, index_max; for (i = 0; i < ARRAY_SIZE(msr_range_array); i++) { index_min = msr_range_array[i].min; index_max = msr_range_array[i].max; for (index = index_min; index < index_max; index++) { if (rdmsrl_amd_safe(index, &val)) continue; printk(KERN_INFO " MSR%08x: %016llx\n", index, val); } } } static int show_msr __cpuinitdata; static __init int setup_show_msr(char *arg) { int num; get_option(&arg, &num); if (num > 0) show_msr = num; return 1; } __setup("show_msr=", setup_show_msr); void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) { if (c->x86_model_id[0]) Loading @@ -439,6 +482,14 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) printk(KERN_CONT " stepping %02x\n", c->x86_mask); else printk(KERN_CONT "\n"); #ifdef CONFIG_SMP if (c->cpu_index < show_msr) print_cpu_msr(); #else if (show_msr) print_cpu_msr(); #endif } static __init int setup_disablecpuid(char *arg) Loading
arch/x86/kernel/entry_64.S +2 −2 Original line number Diff line number Diff line Loading @@ -275,9 +275,9 @@ ENTRY(native_usergs_sysret64) ENTRY(ret_from_fork) CFI_DEFAULT_STACK push kernel_eflags(%rip) CFI_ADJUST_CFA_OFFSET 4 CFI_ADJUST_CFA_OFFSET 8 popf # reset kernel eflags CFI_ADJUST_CFA_OFFSET -4 CFI_ADJUST_CFA_OFFSET -8 call schedule_tail GET_THREAD_INFO(%rcx) testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx) Loading
arch/x86/kernel/paravirt.c +1 −0 Original line number Diff line number Diff line Loading @@ -330,6 +330,7 @@ struct pv_cpu_ops pv_cpu_ops = { #endif .wbinvd = native_wbinvd, .read_msr = native_read_msr_safe, .read_msr_amd = native_read_msr_amd_safe, .write_msr = native_write_msr_safe, .read_tsc = native_read_tsc, .read_pmc = native_read_pmc, Loading
arch/x86/kernel/setup_percpu.c +8 −1 Original line number Diff line number Diff line Loading @@ -162,9 +162,16 @@ void __init setup_per_cpu_areas(void) printk(KERN_INFO "cpu %d has no node %d or node-local memory\n", cpu, node); if (ptr) printk(KERN_DEBUG "per cpu data for cpu%d at %016lx\n", cpu, __pa(ptr)); } else else { ptr = alloc_bootmem_pages_node(NODE_DATA(node), size); if (ptr) printk(KERN_DEBUG "per cpu data for cpu%d on node%d at %016lx\n", cpu, node, __pa(ptr)); } #endif per_cpu_offset(cpu) = ptr - __per_cpu_start; memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); Loading