From d4bbfe863b8d7f0018e1b1a35034f783293926ea Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 27 Oct 2015 16:48:36 -0500 Subject: mainboard: Convert #ifdef to IS_ENABLED in get_bus_conf.c Change-Id: I254e9e9e65519edcf4d3f1ecc385af16d18c2367 Signed-off-by: Timothy Pearson Reviewed-on: http://review.coreboot.org/12208 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Martin Roth Reviewed-by: Patrick Georgi --- src/mainboard/advansus/a785e-i/get_bus_conf.c | 11 ++++------- src/mainboard/amd/bimini_fam10/get_bus_conf.c | 11 ++++------- src/mainboard/amd/dbm690t/get_bus_conf.c | 11 ++++------- src/mainboard/amd/mahogany/get_bus_conf.c | 11 ++++------- src/mainboard/amd/mahogany_fam10/get_bus_conf.c | 11 ++++------- src/mainboard/amd/pistachio/get_bus_conf.c | 11 ++++------- src/mainboard/amd/serengeti_cheetah/get_bus_conf.c | 11 ++++------- src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c | 2 -- src/mainboard/amd/tilapia_fam10/get_bus_conf.c | 11 ++++------- src/mainboard/asrock/939a785gmh/get_bus_conf.c | 11 ++++------- src/mainboard/asus/a8n_e/get_bus_conf.c | 11 ++++------- src/mainboard/asus/kfsn4-dre/get_bus_conf.c | 2 -- src/mainboard/asus/m2n-e/get_bus_conf.c | 11 ++++------- src/mainboard/asus/m4a78-em/get_bus_conf.c | 11 ++++------- src/mainboard/asus/m4a785-m/get_bus_conf.c | 11 ++++------- src/mainboard/asus/m5a88-v/get_bus_conf.c | 11 ++++------- src/mainboard/avalue/eax-785e/get_bus_conf.c | 11 ++++------- src/mainboard/broadcom/blast/get_bus_conf.c | 11 ++++------- src/mainboard/gigabyte/ga_2761gxdk/get_bus_conf.c | 11 ++++------- src/mainboard/gigabyte/m57sli/get_bus_conf.c | 11 ++++------- src/mainboard/gigabyte/ma785gm/get_bus_conf.c | 11 ++++------- src/mainboard/gigabyte/ma785gmt/get_bus_conf.c | 11 ++++------- src/mainboard/gigabyte/ma78gm/get_bus_conf.c | 11 ++++------- src/mainboard/hp/dl145_g1/get_bus_conf.c | 11 ++++------- src/mainboard/hp/dl145_g3/get_bus_conf.c | 11 ++++------- src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c | 2 -- src/mainboard/iei/kino-780am2-fam10/get_bus_conf.c | 11 ++++------- src/mainboard/iwill/dk8_htx/get_bus_conf.c | 11 ++++------- src/mainboard/jetway/pa78vm5/get_bus_conf.c | 11 ++++------- src/mainboard/kontron/kt690/get_bus_conf.c | 11 ++++------- src/mainboard/msi/ms7135/get_bus_conf.c | 11 ++++------- src/mainboard/msi/ms7260/get_bus_conf.c | 11 ++++------- src/mainboard/msi/ms9185/get_bus_conf.c | 11 ++++------- src/mainboard/msi/ms9282/get_bus_conf.c | 11 ++++------- src/mainboard/msi/ms9652_fam10/get_bus_conf.c | 16 +++++++--------- src/mainboard/nvidia/l1_2pvv/get_bus_conf.c | 11 ++++------- src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c | 11 ++++------- src/mainboard/sunw/ultra40/get_bus_conf.c | 11 ++++------- src/mainboard/supermicro/h8dme/get_bus_conf.c | 11 ++++------- src/mainboard/supermicro/h8dmr/get_bus_conf.c | 11 ++++------- src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c | 11 ++++------- src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c | 11 ++++------- src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c | 11 ++++------- src/mainboard/technexion/tim5690/get_bus_conf.c | 11 ++++------- src/mainboard/technexion/tim8690/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2881/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2885/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2891/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2892/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2895/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2912/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2912_fam10/get_bus_conf.c | 11 ++++------- 52 files changed, 199 insertions(+), 351 deletions(-) diff --git a/src/mainboard/advansus/a785e-i/get_bus_conf.c b/src/mainboard/advansus/a785e-i/get_bus_conf.c index ed33c22140e9..391872aa8ec5 100644 --- a/src/mainboard/advansus/a785e-i/get_bus_conf.c +++ b/src/mainboard/advansus/a785e-i/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #if CONFIG_AMD_SB_CIMX #include @@ -128,11 +126,10 @@ void get_bus_conf(void) /* I/O APICs: APIC ID Version State Address */ bus_isa = 10; -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb800 = apicid_base + 0; #if CONFIG_AMD_SB_CIMX diff --git a/src/mainboard/amd/bimini_fam10/get_bus_conf.c b/src/mainboard/amd/bimini_fam10/get_bus_conf.c index 4a4cbbda27ab..e494ab156cc3 100644 --- a/src/mainboard/amd/bimini_fam10/get_bus_conf.c +++ b/src/mainboard/amd/bimini_fam10/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include /* Global variables for MB layouts and these will be shared by irqtable mptable @@ -124,10 +122,9 @@ void get_bus_conf(void) /* I/O APICs: APIC ID Version State Address */ bus_isa = 10; -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb800 = apicid_base + 0; } diff --git a/src/mainboard/amd/dbm690t/get_bus_conf.c b/src/mainboard/amd/dbm690t/get_bus_conf.c index d35083c071c1..992f3066775b 100644 --- a/src/mainboard/amd/dbm690t/get_bus_conf.c +++ b/src/mainboard/amd/dbm690t/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb600 = apicid_base + 0; } diff --git a/src/mainboard/amd/mahogany/get_bus_conf.c b/src/mainboard/amd/mahogany/get_bus_conf.c index ae96179ec007..86ba189bf0e2 100644 --- a/src/mainboard/amd/mahogany/get_bus_conf.c +++ b/src/mainboard/amd/mahogany/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb700 = apicid_base + 0; } diff --git a/src/mainboard/amd/mahogany_fam10/get_bus_conf.c b/src/mainboard/amd/mahogany_fam10/get_bus_conf.c index 3c274a887fd1..babc8422c739 100644 --- a/src/mainboard/amd/mahogany_fam10/get_bus_conf.c +++ b/src/mainboard/amd/mahogany_fam10/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb700 = apicid_base + 0; } diff --git a/src/mainboard/amd/pistachio/get_bus_conf.c b/src/mainboard/amd/pistachio/get_bus_conf.c index d35083c071c1..992f3066775b 100644 --- a/src/mainboard/amd/pistachio/get_bus_conf.c +++ b/src/mainboard/amd/pistachio/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb600 = apicid_base + 0; } diff --git a/src/mainboard/amd/serengeti_cheetah/get_bus_conf.c b/src/mainboard/amd/serengeti_cheetah/get_bus_conf.c index f5cd846183a7..51fa1162fa8b 100644 --- a/src/mainboard/amd/serengeti_cheetah/get_bus_conf.c +++ b/src/mainboard/amd/serengeti_cheetah/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -205,11 +203,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; m->apicid_8111 = apicid_base + 0; m->apicid_8132_1 = apicid_base + 1; m->apicid_8132_2 = apicid_base + 2; diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c b/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c index 9b9c9089645a..9afa084b21ab 100644 --- a/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c +++ b/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c @@ -22,9 +22,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include diff --git a/src/mainboard/amd/tilapia_fam10/get_bus_conf.c b/src/mainboard/amd/tilapia_fam10/get_bus_conf.c index 3c274a887fd1..babc8422c739 100644 --- a/src/mainboard/amd/tilapia_fam10/get_bus_conf.c +++ b/src/mainboard/amd/tilapia_fam10/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb700 = apicid_base + 0; } diff --git a/src/mainboard/asrock/939a785gmh/get_bus_conf.c b/src/mainboard/asrock/939a785gmh/get_bus_conf.c index ae96179ec007..86ba189bf0e2 100644 --- a/src/mainboard/asrock/939a785gmh/get_bus_conf.c +++ b/src/mainboard/asrock/939a785gmh/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb700 = apicid_base + 0; } diff --git a/src/mainboard/asus/a8n_e/get_bus_conf.c b/src/mainboard/asus/a8n_e/get_bus_conf.c index aff5edd08989..5559b4228425 100644 --- a/src/mainboard/asus/a8n_e/get_bus_conf.c +++ b/src/mainboard/asus/a8n_e/get_bus_conf.c @@ -27,9 +27,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -114,10 +112,9 @@ void get_bus_conf(void) } } -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_ck804 = apicid_base + 0; } diff --git a/src/mainboard/asus/kfsn4-dre/get_bus_conf.c b/src/mainboard/asus/kfsn4-dre/get_bus_conf.c index 3003bb611e51..91dafb02e410 100644 --- a/src/mainboard/asus/kfsn4-dre/get_bus_conf.c +++ b/src/mainboard/asus/kfsn4-dre/get_bus_conf.c @@ -28,9 +28,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include diff --git a/src/mainboard/asus/m2n-e/get_bus_conf.c b/src/mainboard/asus/m2n-e/get_bus_conf.c index a1661c0dea05..1cbdda0b087b 100644 --- a/src/mainboard/asus/m2n-e/get_bus_conf.c +++ b/src/mainboard/asus/m2n-e/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -112,10 +110,9 @@ void get_bus_conf(void) bus_mcp55[i] = pci_read_config8(dev, PCI_SECONDARY_BUS); } -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_mcp55 = apicid_base + 0; } diff --git a/src/mainboard/asus/m4a78-em/get_bus_conf.c b/src/mainboard/asus/m4a78-em/get_bus_conf.c index 3c274a887fd1..babc8422c739 100644 --- a/src/mainboard/asus/m4a78-em/get_bus_conf.c +++ b/src/mainboard/asus/m4a78-em/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb700 = apicid_base + 0; } diff --git a/src/mainboard/asus/m4a785-m/get_bus_conf.c b/src/mainboard/asus/m4a785-m/get_bus_conf.c index 3c274a887fd1..babc8422c739 100644 --- a/src/mainboard/asus/m4a785-m/get_bus_conf.c +++ b/src/mainboard/asus/m4a785-m/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb700 = apicid_base + 0; } diff --git a/src/mainboard/asus/m5a88-v/get_bus_conf.c b/src/mainboard/asus/m5a88-v/get_bus_conf.c index 830905e79976..36a3a08622fa 100644 --- a/src/mainboard/asus/m5a88-v/get_bus_conf.c +++ b/src/mainboard/asus/m5a88-v/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #if CONFIG_AMD_SB_CIMX #include @@ -128,11 +126,10 @@ void get_bus_conf(void) /* I/O APICs: APIC ID Version State Address */ bus_isa = 10; -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb800 = apicid_base + 0; #if CONFIG_AMD_SB_CIMX diff --git a/src/mainboard/avalue/eax-785e/get_bus_conf.c b/src/mainboard/avalue/eax-785e/get_bus_conf.c index 830905e79976..36a3a08622fa 100644 --- a/src/mainboard/avalue/eax-785e/get_bus_conf.c +++ b/src/mainboard/avalue/eax-785e/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #if CONFIG_AMD_SB_CIMX #include @@ -128,11 +126,10 @@ void get_bus_conf(void) /* I/O APICs: APIC ID Version State Address */ bus_isa = 10; -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb800 = apicid_base + 0; #if CONFIG_AMD_SB_CIMX diff --git a/src/mainboard/broadcom/blast/get_bus_conf.c b/src/mainboard/broadcom/blast/get_bus_conf.c index 5de8952dc2b0..c344ea3281ea 100644 --- a/src/mainboard/broadcom/blast/get_bus_conf.c +++ b/src/mainboard/broadcom/blast/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -102,11 +100,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; for (i = 0; i < 3; i++) apicid_bcm5785[i] = apicid_base + i; } diff --git a/src/mainboard/gigabyte/ga_2761gxdk/get_bus_conf.c b/src/mainboard/gigabyte/ga_2761gxdk/get_bus_conf.c index 19caa53a9d66..5776564273da 100644 --- a/src/mainboard/gigabyte/ga_2761gxdk/get_bus_conf.c +++ b/src/mainboard/gigabyte/ga_2761gxdk/get_bus_conf.c @@ -26,9 +26,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -120,11 +118,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sis966 = apicid_base + 0; } diff --git a/src/mainboard/gigabyte/m57sli/get_bus_conf.c b/src/mainboard/gigabyte/m57sli/get_bus_conf.c index 15cc8acfc711..175375c1be3a 100644 --- a/src/mainboard/gigabyte/m57sli/get_bus_conf.c +++ b/src/mainboard/gigabyte/m57sli/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -117,11 +115,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_mcp55 = apicid_base + 0; } diff --git a/src/mainboard/gigabyte/ma785gm/get_bus_conf.c b/src/mainboard/gigabyte/ma785gm/get_bus_conf.c index 3c274a887fd1..babc8422c739 100644 --- a/src/mainboard/gigabyte/ma785gm/get_bus_conf.c +++ b/src/mainboard/gigabyte/ma785gm/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb700 = apicid_base + 0; } diff --git a/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c b/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c index 3c274a887fd1..babc8422c739 100644 --- a/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c +++ b/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb700 = apicid_base + 0; } diff --git a/src/mainboard/gigabyte/ma78gm/get_bus_conf.c b/src/mainboard/gigabyte/ma78gm/get_bus_conf.c index 3c274a887fd1..babc8422c739 100644 --- a/src/mainboard/gigabyte/ma78gm/get_bus_conf.c +++ b/src/mainboard/gigabyte/ma78gm/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb700 = apicid_base + 0; } diff --git a/src/mainboard/hp/dl145_g1/get_bus_conf.c b/src/mainboard/hp/dl145_g1/get_bus_conf.c index acfa02320dad..9c35814f0322 100644 --- a/src/mainboard/hp/dl145_g1/get_bus_conf.c +++ b/src/mainboard/hp/dl145_g1/get_bus_conf.c @@ -7,9 +7,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -104,11 +102,10 @@ void get_bus_conf(void) /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; m->apicid_8111 = apicid_base+0; m->apicid_8131_1 = apicid_base+1; m->apicid_8131_2 = apicid_base+2; diff --git a/src/mainboard/hp/dl145_g3/get_bus_conf.c b/src/mainboard/hp/dl145_g3/get_bus_conf.c index 944d3287a899..f22bd74a7356 100644 --- a/src/mainboard/hp/dl145_g3/get_bus_conf.c +++ b/src/mainboard/hp/dl145_g3/get_bus_conf.c @@ -26,9 +26,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -127,11 +125,10 @@ void get_bus_conf(void) /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; for(i=0;i<3;i++) m->apicid_bcm5785[i] = apicid_base+i; } diff --git a/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c b/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c index 395c612e6c21..2f3c1ac0437b 100644 --- a/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c +++ b/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include diff --git a/src/mainboard/iei/kino-780am2-fam10/get_bus_conf.c b/src/mainboard/iei/kino-780am2-fam10/get_bus_conf.c index 3c274a887fd1..babc8422c739 100644 --- a/src/mainboard/iei/kino-780am2-fam10/get_bus_conf.c +++ b/src/mainboard/iei/kino-780am2-fam10/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb700 = apicid_base + 0; } diff --git a/src/mainboard/iwill/dk8_htx/get_bus_conf.c b/src/mainboard/iwill/dk8_htx/get_bus_conf.c index 8868f462d7eb..19255fafcd7e 100644 --- a/src/mainboard/iwill/dk8_htx/get_bus_conf.c +++ b/src/mainboard/iwill/dk8_htx/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -204,11 +202,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; m->apicid_8111 = apicid_base + 0; m->apicid_8132_1 = apicid_base + 1; m->apicid_8132_2 = apicid_base + 2; diff --git a/src/mainboard/jetway/pa78vm5/get_bus_conf.c b/src/mainboard/jetway/pa78vm5/get_bus_conf.c index 3c274a887fd1..babc8422c739 100644 --- a/src/mainboard/jetway/pa78vm5/get_bus_conf.c +++ b/src/mainboard/jetway/pa78vm5/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb700 = apicid_base + 0; } diff --git a/src/mainboard/kontron/kt690/get_bus_conf.c b/src/mainboard/kontron/kt690/get_bus_conf.c index d35083c071c1..992f3066775b 100644 --- a/src/mainboard/kontron/kt690/get_bus_conf.c +++ b/src/mainboard/kontron/kt690/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb600 = apicid_base + 0; } diff --git a/src/mainboard/msi/ms7135/get_bus_conf.c b/src/mainboard/msi/ms7135/get_bus_conf.c index 5feab463e778..71e79d815416 100644 --- a/src/mainboard/msi/ms7135/get_bus_conf.c +++ b/src/mainboard/msi/ms7135/get_bus_conf.c @@ -27,9 +27,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -98,10 +96,9 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_ck804 = apicid_base + 0; } diff --git a/src/mainboard/msi/ms7260/get_bus_conf.c b/src/mainboard/msi/ms7260/get_bus_conf.c index 8a7da11928b0..b484f74db41f 100644 --- a/src/mainboard/msi/ms7260/get_bus_conf.c +++ b/src/mainboard/msi/ms7260/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -117,10 +115,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_mcp55 = apicid_base + 0; } diff --git a/src/mainboard/msi/ms9185/get_bus_conf.c b/src/mainboard/msi/ms9185/get_bus_conf.c index dd6e2c1768fa..67ddefe64ca6 100644 --- a/src/mainboard/msi/ms9185/get_bus_conf.c +++ b/src/mainboard/msi/ms9185/get_bus_conf.c @@ -26,9 +26,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -127,11 +125,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; for (i = 0; i < 3; i++) m->apicid_bcm5785[i] = apicid_base + i; } diff --git a/src/mainboard/msi/ms9282/get_bus_conf.c b/src/mainboard/msi/ms9282/get_bus_conf.c index 14c63d59d58e..5253e0854067 100644 --- a/src/mainboard/msi/ms9282/get_bus_conf.c +++ b/src/mainboard/msi/ms9282/get_bus_conf.c @@ -27,9 +27,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -120,11 +118,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; m->apicid_mcp55 = apicid_base + 0; } diff --git a/src/mainboard/msi/ms9652_fam10/get_bus_conf.c b/src/mainboard/msi/ms9652_fam10/get_bus_conf.c index 3956ce5a9b27..62817e3a1b05 100644 --- a/src/mainboard/msi/ms9652_fam10/get_bus_conf.c +++ b/src/mainboard/msi/ms9652_fam10/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -116,12 +114,12 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); - printk(BIOS_SPEW, "CONFIG_LOGICAL_CPUS==1: apicid_base: %08x\n", apicid_base); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; - printk(BIOS_SPEW, "CONFIG_LOGICAL_CPUS==0: apicid_base: %08x\n", apicid_base); -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) { + apicid_base = get_apicid_base(1); + printk(BIOS_SPEW, "CONFIG_LOGICAL_CPUS==1: apicid_base: %08x\n", apicid_base); + } else { + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; + printk(BIOS_SPEW, "CONFIG_LOGICAL_CPUS==0: apicid_base: %08x\n", apicid_base); + } m->apicid_mcp55 = apicid_base+0; } diff --git a/src/mainboard/nvidia/l1_2pvv/get_bus_conf.c b/src/mainboard/nvidia/l1_2pvv/get_bus_conf.c index 09d4a64410b6..f46ebf53cf0b 100644 --- a/src/mainboard/nvidia/l1_2pvv/get_bus_conf.c +++ b/src/mainboard/nvidia/l1_2pvv/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -134,11 +132,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(2); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(2); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; m->apicid_mcp55 = apicid_base+0; m->apicid_mcp55b = apicid_base+1; } diff --git a/src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c b/src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c index d35083c071c1..992f3066775b 100644 --- a/src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c +++ b/src/mainboard/siemens/sitemp_g1p1/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb600 = apicid_base + 0; } diff --git a/src/mainboard/sunw/ultra40/get_bus_conf.c b/src/mainboard/sunw/ultra40/get_bus_conf.c index f57719a773ad..a74048b3ca2e 100644 --- a/src/mainboard/sunw/ultra40/get_bus_conf.c +++ b/src/mainboard/sunw/ultra40/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -266,11 +264,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(4); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(4); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_ck804 = apicid_base + 0; apicid_8131_1 = apicid_base + 1; apicid_8131_2 = apicid_base + 2; diff --git a/src/mainboard/supermicro/h8dme/get_bus_conf.c b/src/mainboard/supermicro/h8dme/get_bus_conf.c index c00000079107..4e57f06974a3 100644 --- a/src/mainboard/supermicro/h8dme/get_bus_conf.c +++ b/src/mainboard/supermicro/h8dme/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -142,11 +140,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_mcp55 = apicid_base + 0; } diff --git a/src/mainboard/supermicro/h8dmr/get_bus_conf.c b/src/mainboard/supermicro/h8dmr/get_bus_conf.c index c00000079107..4e57f06974a3 100644 --- a/src/mainboard/supermicro/h8dmr/get_bus_conf.c +++ b/src/mainboard/supermicro/h8dmr/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -142,11 +140,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_mcp55 = apicid_base + 0; } diff --git a/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c b/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c index 6b1d1b8115e7..48b0a0a3e45e 100644 --- a/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c +++ b/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -115,11 +113,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; m->apicid_mcp55 = apicid_base+0; } diff --git a/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c b/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c index bcdd0fd6dd3f..7e9d4b86daec 100644 --- a/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c +++ b/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -132,11 +130,10 @@ void get_bus_conf(void) m->bus_8132_2 = pci_read_config8(dev, PCI_SECONDARY_BUS); /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; m->apicid_mcp55 = apicid_base+0; m->apicid_8132_1 = apicid_base+1; m->apicid_8132_2 = apicid_base+2; diff --git a/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c b/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c index 8e1a8ab44456..ae119421ad0f 100644 --- a/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c +++ b/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -118,10 +116,9 @@ void get_bus_conf(void) /* I/O APICs: APIC ID Version State Address */ bus_isa = 10; -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sp5100 = apicid_base + 0; } diff --git a/src/mainboard/technexion/tim5690/get_bus_conf.c b/src/mainboard/technexion/tim5690/get_bus_conf.c index d35083c071c1..992f3066775b 100644 --- a/src/mainboard/technexion/tim5690/get_bus_conf.c +++ b/src/mainboard/technexion/tim5690/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb600 = apicid_base + 0; } diff --git a/src/mainboard/technexion/tim8690/get_bus_conf.c b/src/mainboard/technexion/tim8690/get_bus_conf.c index d35083c071c1..992f3066775b 100644 --- a/src/mainboard/technexion/tim8690/get_bus_conf.c +++ b/src/mainboard/technexion/tim8690/get_bus_conf.c @@ -23,9 +23,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -107,10 +105,9 @@ void get_bus_conf(void) } /* I/O APICs: APIC ID Version State Address */ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_sb600 = apicid_base + 0; } diff --git a/src/mainboard/tyan/s2881/get_bus_conf.c b/src/mainboard/tyan/s2881/get_bus_conf.c index 332e5782960c..5bedef607535 100644 --- a/src/mainboard/tyan/s2881/get_bus_conf.c +++ b/src/mainboard/tyan/s2881/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -106,11 +104,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_8111 = apicid_base + 0; apicid_8131_1 = apicid_base + 1; apicid_8131_2 = apicid_base + 2; diff --git a/src/mainboard/tyan/s2885/get_bus_conf.c b/src/mainboard/tyan/s2885/get_bus_conf.c index 88706c0bd59f..2df51a08cdcd 100644 --- a/src/mainboard/tyan/s2885/get_bus_conf.c +++ b/src/mainboard/tyan/s2885/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -121,11 +119,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_8111 = apicid_base + 0; apicid_8131_1 = apicid_base + 1; apicid_8131_2 = apicid_base + 2; diff --git a/src/mainboard/tyan/s2891/get_bus_conf.c b/src/mainboard/tyan/s2891/get_bus_conf.c index e94c608cc7ba..1691ce83768d 100644 --- a/src/mainboard/tyan/s2891/get_bus_conf.c +++ b/src/mainboard/tyan/s2891/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -153,11 +151,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_ck804 = apicid_base + 0; apicid_8131_1 = apicid_base + 1; apicid_8131_2 = apicid_base + 2; diff --git a/src/mainboard/tyan/s2892/get_bus_conf.c b/src/mainboard/tyan/s2892/get_bus_conf.c index 0ead8544486c..b49b1ad21b81 100644 --- a/src/mainboard/tyan/s2892/get_bus_conf.c +++ b/src/mainboard/tyan/s2892/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -146,11 +144,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_ck804 = apicid_base + 0; apicid_8131_1 = apicid_base + 1; apicid_8131_2 = apicid_base + 2; diff --git a/src/mainboard/tyan/s2895/get_bus_conf.c b/src/mainboard/tyan/s2895/get_bus_conf.c index 11b1bc211e10..b8881f507865 100644 --- a/src/mainboard/tyan/s2895/get_bus_conf.c +++ b/src/mainboard/tyan/s2895/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -159,11 +157,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(4); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(4); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_ck804 = apicid_base + 0; apicid_8131_1 = apicid_base + 1; apicid_8131_2 = apicid_base + 2; diff --git a/src/mainboard/tyan/s2912/get_bus_conf.c b/src/mainboard/tyan/s2912/get_bus_conf.c index 281d66781d84..cc305a198cc8 100644 --- a/src/mainboard/tyan/s2912/get_bus_conf.c +++ b/src/mainboard/tyan/s2912/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include #include "mb_sysconf.h" @@ -112,10 +110,9 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; m->apicid_mcp55 = apicid_base+0; } diff --git a/src/mainboard/tyan/s2912_fam10/get_bus_conf.c b/src/mainboard/tyan/s2912_fam10/get_bus_conf.c index 919b37db1c00..1c1b201c3d47 100644 --- a/src/mainboard/tyan/s2912_fam10/get_bus_conf.c +++ b/src/mainboard/tyan/s2912_fam10/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -114,10 +112,9 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; m->apicid_mcp55 = apicid_base+0; } -- cgit v1.2.3