cpu/amd/agesa/family1*: Use IS_ENABLED() macro

Change-Id: I54d6871597121392625293027a794d52cf28dd4c
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7542
Reviewed-by: Bruce Griffith <Bruce.Griffith@se-eng.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Edward O'Callaghan 2014-11-21 12:34:00 +11:00
parent b32e1f4149
commit 3b8bfeba43
6 changed files with 12 additions and 15 deletions

View File

@ -40,7 +40,7 @@ static void model_10_init(device_t dev)
u8 i; u8 i;
msr_t msr; msr_t msr;
#if CONFIG_LOGICAL_CPUS #if IS_ENABLED(CONFIG_LOGICAL_CPUS)
u32 siblings; u32 siblings;
#endif #endif
@ -66,8 +66,7 @@ static void model_10_init(device_t dev)
/* Set the processor name string */ /* Set the processor name string */
// init_processor_name(); // init_processor_name();
#if IS_ENABLED(CONFIG_LOGICAL_CPUS)
#if CONFIG_LOGICAL_CPUS
siblings = cpuid_ecx(0x80000008) & 0xff; siblings = cpuid_ecx(0x80000008) & 0xff;
if (siblings > 0) { if (siblings > 0) {

View File

@ -42,7 +42,7 @@ static void model_12_init(device_t dev)
u8 i; u8 i;
msr_t msr; msr_t msr;
#if CONFIG_LOGICAL_CPUS #if IS_ENABLED(CONFIG_LOGICAL_CPUS)
u32 siblings; u32 siblings;
#endif #endif
@ -72,8 +72,7 @@ static void model_12_init(device_t dev)
/* Set the processor name string */ /* Set the processor name string */
// init_processor_name(); // init_processor_name();
#if IS_ENABLED(CONFIG_LOGICAL_CPUS)
#if CONFIG_LOGICAL_CPUS
siblings = cpuid_ecx(0x80000008) & 0xff; siblings = cpuid_ecx(0x80000008) & 0xff;
if (siblings > 0) { if (siblings > 0) {

View File

@ -40,7 +40,7 @@ static void model_14_init(device_t dev)
{ {
u32 i; u32 i;
msr_t msr; msr_t msr;
#if CONFIG_LOGICAL_CPUS #if IS_ENABLED(CONFIG_LOGICAL_CPUS)
u32 siblings; u32 siblings;
#endif #endif
printk(BIOS_DEBUG, "Model 14 Init.\n"); printk(BIOS_DEBUG, "Model 14 Init.\n");
@ -89,7 +89,7 @@ static void model_14_init(device_t dev)
/* Enable the local cpu apics */ /* Enable the local cpu apics */
setup_lapic(); setup_lapic();
#if CONFIG_LOGICAL_CPUS #if IS_ENABLED(CONFIG_LOGICAL_CPUS)
siblings = cpuid_ecx(0x80000008) & 0xff; siblings = cpuid_ecx(0x80000008) & 0xff;
if (siblings > 0) { if (siblings > 0) {

View File

@ -38,7 +38,7 @@ static void model_15_init(device_t dev)
u8 i; u8 i;
msr_t msr; msr_t msr;
int msrno; int msrno;
#if CONFIG_LOGICAL_CPUS #if IS_ENABLED(CONFIG_LOGICAL_CPUS)
u32 siblings; u32 siblings;
#endif #endif
@ -74,7 +74,7 @@ static void model_15_init(device_t dev)
/* Enable the local cpu apics */ /* Enable the local cpu apics */
setup_lapic(); setup_lapic();
#if CONFIG_LOGICAL_CPUS #if IS_ENABLED(CONFIG_LOGICAL_CPUS)
siblings = cpuid_ecx(0x80000008) & 0xff; siblings = cpuid_ecx(0x80000008) & 0xff;
if (siblings > 0) { if (siblings > 0) {

View File

@ -43,7 +43,7 @@ static void model_15_init(device_t dev)
msr_t msr; msr_t msr;
int msrno; int msrno;
unsigned int cpu_idx; unsigned int cpu_idx;
#if CONFIG_LOGICAL_CPUS #if IS_ENABLED(CONFIG_LOGICAL_CPUS)
u32 siblings; u32 siblings;
#endif #endif
@ -84,11 +84,10 @@ static void model_15_init(device_t dev)
wrmsr(MCI_STATUS + (i * 4), msr); wrmsr(MCI_STATUS + (i * 4), msr);
} }
/* Enable the local cpu apics */ /* Enable the local cpu apics */
setup_lapic(); setup_lapic();
#if CONFIG_LOGICAL_CPUS #if IS_ENABLED(CONFIG_LOGICAL_CPUS)
siblings = cpuid_ecx(0x80000008) & 0xff; siblings = cpuid_ecx(0x80000008) & 0xff;
if (siblings > 0) { if (siblings > 0) {

View File

@ -41,7 +41,7 @@ static void model_16_init(device_t dev)
u8 i; u8 i;
msr_t msr; msr_t msr;
int msrno; int msrno;
#if CONFIG_LOGICAL_CPUS #if IS_ENABLED(CONFIG_LOGICAL_CPUS)
u32 siblings; u32 siblings;
#endif #endif
@ -86,7 +86,7 @@ static void model_16_init(device_t dev)
/* Enable the local cpu apics */ /* Enable the local cpu apics */
setup_lapic(); setup_lapic();
#if CONFIG_LOGICAL_CPUS #if IS_ENABLED(CONFIG_LOGICAL_CPUS)
siblings = cpuid_ecx(0x80000008) & 0xff; siblings = cpuid_ecx(0x80000008) & 0xff;
if (siblings > 0) { if (siblings > 0) {