Lines Matching +full:8 +full:- +full:cpu
1 // SPDX-License-Identifier: GPL-2.0-only
3 * (C) 2003 - 2004 Dominik Brodowski <[email protected]>
6 * linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
9 * USAGE: simply run it to decode the current settings on CPU 0,
10 * or pass the CPU number as argument, or pass the MSR content
28 static int rdmsr(unsigned int cpu, unsigned int msr, in rdmsr() argument
34 int retval = -1; in rdmsr()
38 if (cpu > MCPU) in rdmsr()
41 sprintf(file, "/dev/cpu/%d/msr", cpu); in rdmsr()
47 if (lseek(fd, msr, SEEK_CUR) == -1) in rdmsr()
50 if (read(fd, &val, 8) != 8) in rdmsr()
68 multiplier = ((msr >> 8) & 0xFF); in decode()
75 static int decode_live(unsigned int cpu) in decode_live() argument
80 err = rdmsr(cpu, MSR_IA32_PERF_STATUS, &lo, &hi); in decode_live()
83 printf("can't get MSR_IA32_PERF_STATUS for cpu %d\n", cpu); in decode_live()
84 printf("Possible trouble: you don't run an Enhanced SpeedStep capable cpu\n"); in decode_live()
96 unsigned int cpu, mode = 0; in main() local
99 cpu = 0; in main()
101 cpu = strtoul(argv[1], NULL, 0); in main()
102 if (cpu >= MCPU) in main()
107 decode(cpu); in main()
109 decode_live(cpu); in main()