cpu/intel: Use unsigned types in get_cpu_count()
Change-Id: Id95e45a3eba384a61c02016b7663ec71c3ae1865 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58917 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
ac07b03634
commit
04c497a6ba
4 changed files with 7 additions and 7 deletions
|
|
@ -588,8 +588,8 @@ static void pre_mp_init(void)
|
|||
static int get_cpu_count(void)
|
||||
{
|
||||
msr_t msr;
|
||||
int num_threads;
|
||||
int num_cores;
|
||||
unsigned int num_threads;
|
||||
unsigned int num_cores;
|
||||
|
||||
msr = rdmsr(MSR_CORE_THREAD_COUNT);
|
||||
num_threads = (msr.lo >> 0) & 0xffff;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ static void pre_mp_init(void)
|
|||
static int get_cpu_count(void)
|
||||
{
|
||||
const struct cpuid_result cpuid1 = cpuid(1);
|
||||
const char cores = (cpuid1.ebx >> 16) & 0xf;
|
||||
const unsigned int cores = (cpuid1.ebx >> 16) & 0xf;
|
||||
|
||||
printk(BIOS_DEBUG, "CPU has %u cores.\n", cores);
|
||||
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ static void pre_mp_init(void)
|
|||
static int get_cpu_count(void)
|
||||
{
|
||||
msr_t msr;
|
||||
int num_threads;
|
||||
int num_cores;
|
||||
unsigned int num_threads;
|
||||
unsigned int num_cores;
|
||||
|
||||
msr = rdmsr(MSR_CORE_THREAD_COUNT);
|
||||
num_threads = (msr.lo >> 0) & 0xffff;
|
||||
|
|
|
|||
|
|
@ -380,8 +380,8 @@ static void pre_mp_init(void)
|
|||
static int get_cpu_count(void)
|
||||
{
|
||||
msr_t msr;
|
||||
int num_threads;
|
||||
int num_cores;
|
||||
unsigned int num_threads;
|
||||
unsigned int num_cores;
|
||||
|
||||
msr = rdmsr(MSR_CORE_THREAD_COUNT);
|
||||
num_threads = (msr.lo >> 0) & 0xffff;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue