Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34864 )
Change subject: cpu/intel: Replace bsp_init_and_start_aps() ......................................................................
cpu/intel: Replace bsp_init_and_start_aps()
Change-Id: I7176efdd1000789a093a1b4e243b4b150e6bb06f Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/cpu/intel/haswell/haswell.h M src/cpu/intel/haswell/haswell_init.c M src/cpu/intel/model_1067x/mp_init.c M src/cpu/intel/model_2065x/model_2065x_init.c M src/cpu/intel/model_206ax/model_206ax_init.c M src/cpu/intel/smm/gen1/smi.h M src/include/device/device.h M src/northbridge/intel/gm45/northbridge.c M src/northbridge/intel/haswell/northbridge.c M src/northbridge/intel/i945/northbridge.c M src/northbridge/intel/nehalem/northbridge.c M src/northbridge/intel/pineview/northbridge.c M src/northbridge/intel/sandybridge/northbridge.c M src/northbridge/intel/x4x/northbridge.c 14 files changed, 17 insertions(+), 54 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/34864/1
diff --git a/src/cpu/intel/haswell/haswell.h b/src/cpu/intel/haswell/haswell.h index cfd9d45..7b3a203 100644 --- a/src/cpu/intel/haswell/haswell.h +++ b/src/cpu/intel/haswell/haswell.h @@ -161,8 +161,6 @@ void smm_initialize(void); void smm_relocate(void); void smm_lock(void); -struct bus; -void bsp_init_and_start_aps(struct bus *cpu_bus); /* Determine if HyperThreading is disabled. The variable is not valid until * setup_ap_init() has been called. */ #endif diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c index 95d719c..0449235 100644 --- a/src/cpu/intel/haswell/haswell_init.c +++ b/src/cpu/intel/haswell/haswell_init.c @@ -778,7 +778,7 @@ .post_mp_init = post_mp_init, };
-void bsp_init_and_start_aps(struct bus *cpu_bus) +void mp_init_cpus(struct bus *cpu_bus) { if (mp_init_with_smm(cpu_bus, &mp_ops)) printk(BIOS_ERR, "MP initialization failure.\n"); diff --git a/src/cpu/intel/model_1067x/mp_init.c b/src/cpu/intel/model_1067x/mp_init.c index ea2d838..a876816 100644 --- a/src/cpu/intel/model_1067x/mp_init.c +++ b/src/cpu/intel/model_1067x/mp_init.c @@ -110,7 +110,7 @@ .post_mp_init = post_mp_init, };
-void bsp_init_and_start_aps(struct bus *cpu_bus) +void mp_init_cpus(struct bus *cpu_bus) { microcode_patch = intel_microcode_find();
diff --git a/src/cpu/intel/model_2065x/model_2065x_init.c b/src/cpu/intel/model_2065x/model_2065x_init.c index 289d447..2f10945 100644 --- a/src/cpu/intel/model_2065x/model_2065x_init.c +++ b/src/cpu/intel/model_2065x/model_2065x_init.c @@ -334,7 +334,7 @@ .post_mp_init = post_mp_init, };
-void bsp_init_and_start_aps(struct bus *cpu_bus) +void mp_init_cpus(struct bus *cpu_bus) { if (mp_init_with_smm(cpu_bus, &mp_ops)) printk(BIOS_ERR, "MP initialization failure.\n"); diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c index 80d85f3..d3aa52c 100644 --- a/src/cpu/intel/model_206ax/model_206ax_init.c +++ b/src/cpu/intel/model_206ax/model_206ax_init.c @@ -560,7 +560,7 @@ .post_mp_init = post_mp_init, };
-void bsp_init_and_start_aps(struct bus *cpu_bus) +void mp_init_cpus(struct bus *cpu_bus) { if (mp_init_with_smm(cpu_bus, &mp_ops)) printk(BIOS_ERR, "MP initialization failure.\n"); diff --git a/src/cpu/intel/smm/gen1/smi.h b/src/cpu/intel/smm/gen1/smi.h index 961a6ec..53f9345 100644 --- a/src/cpu/intel/smm/gen1/smi.h +++ b/src/cpu/intel/smm/gen1/smi.h @@ -13,8 +13,6 @@
#include <device/device.h>
-void bsp_init_and_start_aps(struct bus *cpu_bus); - /* These helpers are for performing SMM relocation. */ void southbridge_smm_init(void); void northbridge_write_smram(u8 smram); diff --git a/src/include/device/device.h b/src/include/device/device.h index 8e1e62a..ebf8314 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -220,6 +220,12 @@ #define intel_cpu_topology(cpu, package, core, thread) \ set_cpu_topology(cpu, 0, package, core, thread)
+void mp_init_cpus(DEVTREE_CONST struct bus *cpu_bus); +static inline void mp_cpu_bus_init(struct device *dev) +{ + mp_init_cpus(dev->link_list); +} + /* Debug functions */ void print_resource_tree(const struct device *root, int debug_level, const char *msg); diff --git a/src/northbridge/intel/gm45/northbridge.c b/src/northbridge/intel/gm45/northbridge.c index f011cce..1c01d30 100644 --- a/src/northbridge/intel/gm45/northbridge.c +++ b/src/northbridge/intel/gm45/northbridge.c @@ -240,17 +240,11 @@ .acpi_name = northbridge_acpi_name, };
- -static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, .scan_bus = 0, };
diff --git a/src/northbridge/intel/haswell/northbridge.c b/src/northbridge/intel/haswell/northbridge.c index 2fd5959..c047c39 100644 --- a/src/northbridge/intel/haswell/northbridge.c +++ b/src/northbridge/intel/haswell/northbridge.c @@ -525,16 +525,11 @@ .devices = mc_pci_device_ids, };
-static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, .scan_bus = 0, };
diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c index e9867d9..cd16958 100644 --- a/src/northbridge/intel/i945/northbridge.c +++ b/src/northbridge/intel/i945/northbridge.c @@ -215,16 +215,11 @@ .devices = pci_device_ids, };
-static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, .scan_bus = 0, };
diff --git a/src/northbridge/intel/nehalem/northbridge.c b/src/northbridge/intel/nehalem/northbridge.c index a058d3f..b6741a8 100644 --- a/src/northbridge/intel/nehalem/northbridge.c +++ b/src/northbridge/intel/nehalem/northbridge.c @@ -297,16 +297,11 @@ .device = 0x0044, /* Nehalem */ };
-static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, .scan_bus = 0, };
diff --git a/src/northbridge/intel/pineview/northbridge.c b/src/northbridge/intel/pineview/northbridge.c index 4b67cfd..5a4eec6 100644 --- a/src/northbridge/intel/pineview/northbridge.c +++ b/src/northbridge/intel/pineview/northbridge.c @@ -195,19 +195,13 @@ .acpi_name = northbridge_acpi_name, };
-static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, };
- static void enable_dev(struct device *dev) { /* Set the operations if it is a special bus type */ diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c index 233384c..32b7a4c 100644 --- a/src/northbridge/intel/sandybridge/northbridge.c +++ b/src/northbridge/intel/sandybridge/northbridge.c @@ -493,16 +493,11 @@ .device = 0x0158, /* Ivy bridge */ };
-static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, .scan_bus = 0, };
diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c index b6616e1..f541e3a 100644 --- a/src/northbridge/intel/x4x/northbridge.c +++ b/src/northbridge/intel/x4x/northbridge.c @@ -191,20 +191,13 @@ .acpi_name = northbridge_acpi_name, };
- -static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, };
- static void enable_dev(struct device *dev) { /* Set the operations if it is a special bus type */
Hello Patrick Rudolph, build bot (Jenkins), Damien Zammit,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34864
to look at the new patch set (#2).
Change subject: cpu/intel: Replace bsp_init_and_start_aps() ......................................................................
cpu/intel: Replace bsp_init_and_start_aps()
Change-Id: I7176efdd1000789a093a1b4e243b4b150e6bb06f Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/cpu/intel/haswell/haswell.h M src/cpu/intel/haswell/haswell_init.c M src/cpu/intel/model_1067x/mp_init.c M src/cpu/intel/model_2065x/model_2065x_init.c M src/cpu/intel/model_206ax/model_206ax_init.c M src/cpu/intel/smm/gen1/smi.h M src/include/device/device.h M src/northbridge/intel/gm45/northbridge.c M src/northbridge/intel/haswell/northbridge.c M src/northbridge/intel/i945/northbridge.c M src/northbridge/intel/nehalem/northbridge.c M src/northbridge/intel/pineview/northbridge.c M src/northbridge/intel/sandybridge/northbridge.c M src/northbridge/intel/x4x/northbridge.c 14 files changed, 18 insertions(+), 54 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/34864/2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34864 )
Change subject: cpu/intel: Replace bsp_init_and_start_aps() ......................................................................
Patch Set 3: Code-Review+2
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34864 )
Change subject: cpu/intel: Replace bsp_init_and_start_aps() ......................................................................
Patch Set 3: Code-Review+2
Kyösti Mälkki has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34864 )
Change subject: cpu/intel: Replace bsp_init_and_start_aps() ......................................................................
cpu/intel: Replace bsp_init_and_start_aps()
Change-Id: I7176efdd1000789a093a1b4e243b4b150e6bb06f Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/34864 Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Aaron Durbin adurbin@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/cpu/intel/haswell/haswell.h M src/cpu/intel/haswell/haswell_init.c M src/cpu/intel/model_1067x/mp_init.c M src/cpu/intel/model_2065x/model_2065x_init.c M src/cpu/intel/model_206ax/model_206ax_init.c M src/cpu/intel/smm/gen1/smi.h M src/include/device/device.h M src/northbridge/intel/gm45/northbridge.c M src/northbridge/intel/haswell/northbridge.c M src/northbridge/intel/i945/northbridge.c M src/northbridge/intel/nehalem/northbridge.c M src/northbridge/intel/pineview/northbridge.c M src/northbridge/intel/sandybridge/northbridge.c M src/northbridge/intel/x4x/northbridge.c 14 files changed, 18 insertions(+), 54 deletions(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/cpu/intel/haswell/haswell.h b/src/cpu/intel/haswell/haswell.h index cfd9d45..7b3a203 100644 --- a/src/cpu/intel/haswell/haswell.h +++ b/src/cpu/intel/haswell/haswell.h @@ -161,8 +161,6 @@ void smm_initialize(void); void smm_relocate(void); void smm_lock(void); -struct bus; -void bsp_init_and_start_aps(struct bus *cpu_bus); /* Determine if HyperThreading is disabled. The variable is not valid until * setup_ap_init() has been called. */ #endif diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c index 95d719c..0449235 100644 --- a/src/cpu/intel/haswell/haswell_init.c +++ b/src/cpu/intel/haswell/haswell_init.c @@ -778,7 +778,7 @@ .post_mp_init = post_mp_init, };
-void bsp_init_and_start_aps(struct bus *cpu_bus) +void mp_init_cpus(struct bus *cpu_bus) { if (mp_init_with_smm(cpu_bus, &mp_ops)) printk(BIOS_ERR, "MP initialization failure.\n"); diff --git a/src/cpu/intel/model_1067x/mp_init.c b/src/cpu/intel/model_1067x/mp_init.c index ea2d838..73c9a47 100644 --- a/src/cpu/intel/model_1067x/mp_init.c +++ b/src/cpu/intel/model_1067x/mp_init.c @@ -21,6 +21,7 @@ #include <cpu/intel/microcode.h> #include <cpu/intel/smm/gen1/smi.h> #include <cpu/intel/common/common.h> +#include <device/device.h>
/* Parallel MP initialization support. */ static const void *microcode_patch; @@ -110,7 +111,7 @@ .post_mp_init = post_mp_init, };
-void bsp_init_and_start_aps(struct bus *cpu_bus) +void mp_init_cpus(struct bus *cpu_bus) { microcode_patch = intel_microcode_find();
diff --git a/src/cpu/intel/model_2065x/model_2065x_init.c b/src/cpu/intel/model_2065x/model_2065x_init.c index 289d447..2f10945 100644 --- a/src/cpu/intel/model_2065x/model_2065x_init.c +++ b/src/cpu/intel/model_2065x/model_2065x_init.c @@ -334,7 +334,7 @@ .post_mp_init = post_mp_init, };
-void bsp_init_and_start_aps(struct bus *cpu_bus) +void mp_init_cpus(struct bus *cpu_bus) { if (mp_init_with_smm(cpu_bus, &mp_ops)) printk(BIOS_ERR, "MP initialization failure.\n"); diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c index 80d85f3..d3aa52c 100644 --- a/src/cpu/intel/model_206ax/model_206ax_init.c +++ b/src/cpu/intel/model_206ax/model_206ax_init.c @@ -560,7 +560,7 @@ .post_mp_init = post_mp_init, };
-void bsp_init_and_start_aps(struct bus *cpu_bus) +void mp_init_cpus(struct bus *cpu_bus) { if (mp_init_with_smm(cpu_bus, &mp_ops)) printk(BIOS_ERR, "MP initialization failure.\n"); diff --git a/src/cpu/intel/smm/gen1/smi.h b/src/cpu/intel/smm/gen1/smi.h index 3d5149a..6623bcc 100644 --- a/src/cpu/intel/smm/gen1/smi.h +++ b/src/cpu/intel/smm/gen1/smi.h @@ -13,8 +13,6 @@
#include <device/device.h>
-void bsp_init_and_start_aps(struct bus *cpu_bus); - /* These helpers are for performing SMM relocation. */ void southbridge_smm_init(void); u32 northbridge_get_tseg_base(void); diff --git a/src/include/device/device.h b/src/include/device/device.h index 8e1e62a..ebf8314 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -220,6 +220,12 @@ #define intel_cpu_topology(cpu, package, core, thread) \ set_cpu_topology(cpu, 0, package, core, thread)
+void mp_init_cpus(DEVTREE_CONST struct bus *cpu_bus); +static inline void mp_cpu_bus_init(struct device *dev) +{ + mp_init_cpus(dev->link_list); +} + /* Debug functions */ void print_resource_tree(const struct device *root, int debug_level, const char *msg); diff --git a/src/northbridge/intel/gm45/northbridge.c b/src/northbridge/intel/gm45/northbridge.c index f011cce..1c01d30 100644 --- a/src/northbridge/intel/gm45/northbridge.c +++ b/src/northbridge/intel/gm45/northbridge.c @@ -240,17 +240,11 @@ .acpi_name = northbridge_acpi_name, };
- -static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, .scan_bus = 0, };
diff --git a/src/northbridge/intel/haswell/northbridge.c b/src/northbridge/intel/haswell/northbridge.c index 2fd5959..c047c39 100644 --- a/src/northbridge/intel/haswell/northbridge.c +++ b/src/northbridge/intel/haswell/northbridge.c @@ -525,16 +525,11 @@ .devices = mc_pci_device_ids, };
-static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, .scan_bus = 0, };
diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c index e9867d9..cd16958 100644 --- a/src/northbridge/intel/i945/northbridge.c +++ b/src/northbridge/intel/i945/northbridge.c @@ -215,16 +215,11 @@ .devices = pci_device_ids, };
-static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, .scan_bus = 0, };
diff --git a/src/northbridge/intel/nehalem/northbridge.c b/src/northbridge/intel/nehalem/northbridge.c index a058d3f..b6741a8 100644 --- a/src/northbridge/intel/nehalem/northbridge.c +++ b/src/northbridge/intel/nehalem/northbridge.c @@ -297,16 +297,11 @@ .device = 0x0044, /* Nehalem */ };
-static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, .scan_bus = 0, };
diff --git a/src/northbridge/intel/pineview/northbridge.c b/src/northbridge/intel/pineview/northbridge.c index 4b67cfd..5a4eec6 100644 --- a/src/northbridge/intel/pineview/northbridge.c +++ b/src/northbridge/intel/pineview/northbridge.c @@ -195,19 +195,13 @@ .acpi_name = northbridge_acpi_name, };
-static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, };
- static void enable_dev(struct device *dev) { /* Set the operations if it is a special bus type */ diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c index 233384c..32b7a4c 100644 --- a/src/northbridge/intel/sandybridge/northbridge.c +++ b/src/northbridge/intel/sandybridge/northbridge.c @@ -493,16 +493,11 @@ .device = 0x0158, /* Ivy bridge */ };
-static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, .scan_bus = 0, };
diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c index b6616e1..f541e3a 100644 --- a/src/northbridge/intel/x4x/northbridge.c +++ b/src/northbridge/intel/x4x/northbridge.c @@ -191,20 +191,13 @@ .acpi_name = northbridge_acpi_name, };
- -static void cpu_bus_init(struct device *dev) -{ - bsp_init_and_start_aps(dev->link_list); -} - static struct device_operations cpu_bus_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, };
- static void enable_dev(struct device *dev) { /* Set the operations if it is a special bus type */