summaryrefslogtreecommitdiffstats
path: root/samples/trace_printk
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2019-06-26 15:38:44 -0700
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-07-02 18:41:16 +0300
commit8fbfb6fc67819c1274584ff902f7d03aafe38dab (patch)
treef0ffe79f841eaecffcac98d9423c5096f2da7368 /samples/trace_printk
parent35f2c14d2a076b063a76c5bf275c46c0743ba3a0 (diff)
downloadlinux-8fbfb6fc67819c1274584ff902f7d03aafe38dab.tar.gz
linux-8fbfb6fc67819c1274584ff902f7d03aafe38dab.tar.bz2
linux-8fbfb6fc67819c1274584ff902f7d03aafe38dab.zip
platform/x86: ISST: Store per CPU information
There are two per CPU data needs to be stored and cached to avoid repeated MSR readings for accessing them later: - Physical to logical CPU conversion The PUNIT uses a different CPU numbering scheme which is not APIC id based. So we need to establish relationship between PUNIT CPU number and Linux logical CPU numbering which is based on APIC id. There is an MSR 0x53 (MSR_THREAD_ID), which gets physical CPU number for the local CPU where it is read. Also the CPU mask in some messages will inform which CPUs needs to be online/offline for a TDP level. During TDP switch if user offlined some CPUs, then the physical CPU mask can't be converted as we can't read MSR on an offlined CPU to go to a lower TDP level by onlining more CPUs. So the mapping needs to be established at the boot up time. - Bus number corresponding to a CPU A group of CPUs are in a control of a PUNIT. The PUNIT device is exported as PCI device. To do operation on a PUNIT for a CPU, we need to find out to which PCI device it is related to. This is done by reading MSR 0x128 (MSR_CPU_BUS_NUMBER). So during CPU online stages the above MSRs are read and stored. Later this stored information is used to process IOCTLs request from the user space. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'samples/trace_printk')
0 files changed, 0 insertions, 0 deletions