summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2017-11-20 01:56:44 +0100
committerMartin Roth <martinroth@google.com>2017-11-23 05:00:17 +0000
commit8f06ce35125869f631a3c7a072503103feca227c (patch)
treefa092f519f8b8fdbc300ce98584d1271420ea0c5 /src
parent46234ea36be69b89c42b550838092ecc0f0bf972 (diff)
downloadcoreboot-8f06ce35125869f631a3c7a072503103feca227c.tar.xz
Constify struct cpu_device_id instances
There is currently no case where a struct cpu_device_id instance needs to be modified. Thus, declare all instances as const. Change-Id: I5ec7460b56d75d255b3451d76a46df76a51d6365 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/22526 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/arch/arm/include/armv7/arch/cpu.h2
-rw-r--r--src/arch/mips/include/arch/cpu.h2
-rw-r--r--src/arch/power8/include/arch/cpu.h2
-rw-r--r--src/arch/riscv/include/arch/cpu.h2
-rw-r--r--src/arch/x86/cpu.c2
-rw-r--r--src/arch/x86/include/arch/cpu.h2
-rw-r--r--src/cpu/amd/agesa/family12/model_12_init.c2
-rw-r--r--src/cpu/amd/agesa/family14/model_14_init.c2
-rw-r--r--src/cpu/amd/agesa/family15/model_15_init.c2
-rw-r--r--src/cpu/amd/agesa/family15tn/model_15_init.c2
-rw-r--r--src/cpu/amd/agesa/family16kb/model_16_init.c2
-rw-r--r--src/cpu/amd/family_10h-family_15h/model_10xxx_init.c2
-rw-r--r--src/cpu/amd/geode_gx2/geode_gx2_init.c2
-rw-r--r--src/cpu/amd/geode_lx/geode_lx_init.c2
-rw-r--r--src/cpu/amd/model_fxx/model_fxx_init.c2
-rw-r--r--src/cpu/amd/pi/00630F01/model_15_init.c2
-rw-r--r--src/cpu/amd/pi/00660F01/model_15_init.c2
-rw-r--r--src/cpu/amd/pi/00730F01/model_16_init.c2
-rw-r--r--src/cpu/intel/ep80579/ep80579_init.c2
-rw-r--r--src/cpu/intel/fsp_model_206ax/model_206ax_init.c2
-rw-r--r--src/cpu/intel/fsp_model_406dx/model_406dx_init.c2
-rw-r--r--src/cpu/intel/haswell/haswell_init.c2
-rw-r--r--src/cpu/intel/model_1067x/model_1067x_init.c2
-rw-r--r--src/cpu/intel/model_106cx/model_106cx_init.c2
-rw-r--r--src/cpu/intel/model_2065x/model_2065x_init.c2
-rw-r--r--src/cpu/intel/model_206ax/model_206ax_init.c2
-rw-r--r--src/cpu/intel/model_65x/model_65x_init.c2
-rw-r--r--src/cpu/intel/model_67x/model_67x_init.c2
-rw-r--r--src/cpu/intel/model_68x/model_68x_init.c2
-rw-r--r--src/cpu/intel/model_69x/model_69x_init.c2
-rw-r--r--src/cpu/intel/model_6bx/model_6bx_init.c2
-rw-r--r--src/cpu/intel/model_6dx/model_6dx_init.c2
-rw-r--r--src/cpu/intel/model_6ex/model_6ex_init.c2
-rw-r--r--src/cpu/intel/model_6fx/model_6fx_init.c2
-rw-r--r--src/cpu/intel/model_6xx/model_6xx_init.c2
-rw-r--r--src/cpu/intel/model_f0x/model_f0x_init.c2
-rw-r--r--src/cpu/intel/model_f1x/model_f1x_init.c2
-rw-r--r--src/cpu/intel/model_f2x/model_f2x_init.c2
-rw-r--r--src/cpu/intel/model_f3x/model_f3x_init.c2
-rw-r--r--src/cpu/intel/model_f4x/model_f4x_init.c2
-rw-r--r--src/cpu/qemu-power8/qemu.c2
-rw-r--r--src/cpu/qemu-x86/qemu.c2
-rw-r--r--src/cpu/via/c3/c3_init.c2
-rw-r--r--src/cpu/via/c7/c7_init.c2
-rw-r--r--src/cpu/via/nano/nano_init.c2
-rw-r--r--src/soc/amd/stoneyridge/model_15_init.c2
-rw-r--r--src/soc/intel/apollolake/cpu.c2
-rw-r--r--src/soc/intel/baytrail/cpu.c2
-rw-r--r--src/soc/intel/braswell/cpu.c2
-rw-r--r--src/soc/intel/broadwell/cpu.c2
-rw-r--r--src/soc/intel/common/block/cpu/mp_init.c2
-rw-r--r--src/soc/intel/denverton_ns/cpu.c2
-rw-r--r--src/soc/intel/fsp_baytrail/cpu.c2
-rw-r--r--src/soc/intel/fsp_broadwell_de/cpu.c2
54 files changed, 54 insertions, 54 deletions
diff --git a/src/arch/arm/include/armv7/arch/cpu.h b/src/arch/arm/include/armv7/arch/cpu.h
index b7ef20d5d5..18d86e0969 100644
--- a/src/arch/arm/include/armv7/arch/cpu.h
+++ b/src/arch/arm/include/armv7/arch/cpu.h
@@ -25,7 +25,7 @@
struct cpu_driver {
struct device_operations *ops;
- struct cpu_device_id *id_table;
+ const struct cpu_device_id *id_table;
};
struct thread;
diff --git a/src/arch/mips/include/arch/cpu.h b/src/arch/mips/include/arch/cpu.h
index d43fd624a6..f9f619739c 100644
--- a/src/arch/mips/include/arch/cpu.h
+++ b/src/arch/mips/include/arch/cpu.h
@@ -24,7 +24,7 @@
struct cpu_driver {
struct device_operations *ops;
- struct cpu_device_id *id_table;
+ const struct cpu_device_id *id_table;
};
struct thread;
diff --git a/src/arch/power8/include/arch/cpu.h b/src/arch/power8/include/arch/cpu.h
index 9acc2a8ab2..e0fb72c29d 100644
--- a/src/arch/power8/include/arch/cpu.h
+++ b/src/arch/power8/include/arch/cpu.h
@@ -23,7 +23,7 @@
struct cpu_driver {
struct device_operations *ops;
- struct cpu_device_id *id_table;
+ const struct cpu_device_id *id_table;
};
struct thread;
diff --git a/src/arch/riscv/include/arch/cpu.h b/src/arch/riscv/include/arch/cpu.h
index ae5cbda67f..a0ca3ce534 100644
--- a/src/arch/riscv/include/arch/cpu.h
+++ b/src/arch/riscv/include/arch/cpu.h
@@ -23,7 +23,7 @@
struct cpu_driver {
struct device_operations *ops;
- struct cpu_device_id *id_table;
+ const struct cpu_device_id *id_table;
};
struct thread;
diff --git a/src/arch/x86/cpu.c b/src/arch/x86/cpu.c
index ff82661447..cfcfdbd5d2 100644
--- a/src/arch/x86/cpu.c
+++ b/src/arch/x86/cpu.c
@@ -203,7 +203,7 @@ struct cpu_driver *find_cpu_driver(struct device *cpu)
{
struct cpu_driver *driver;
for (driver = _cpu_drivers; driver < _ecpu_drivers; driver++) {
- struct cpu_device_id *id;
+ const struct cpu_device_id *id;
for (id = driver->id_table;
id->vendor != X86_VENDOR_INVALID; id++) {
if ((cpu->vendor == id->vendor) &&
diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h
index 1cba0affa9..5d44aaeb6c 100644
--- a/src/arch/x86/include/arch/cpu.h
+++ b/src/arch/x86/include/arch/cpu.h
@@ -178,7 +178,7 @@ struct cpu_device_id {
struct cpu_driver {
struct device_operations *ops;
- struct cpu_device_id *id_table;
+ const struct cpu_device_id *id_table;
struct acpi_cstate *cstates;
};
diff --git a/src/cpu/amd/agesa/family12/model_12_init.c b/src/cpu/amd/agesa/family12/model_12_init.c
index e533017ad9..1d414a242e 100644
--- a/src/cpu/amd/agesa/family12/model_12_init.c
+++ b/src/cpu/amd/agesa/family12/model_12_init.c
@@ -98,7 +98,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_12_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, 0x300f00 }, /* LN1_A0x */
{ X86_VENDOR_AMD, 0x300f01 }, /* LN1_A1x */
{ X86_VENDOR_AMD, 0x300f10 }, /* LN1_B0x */
diff --git a/src/cpu/amd/agesa/family14/model_14_init.c b/src/cpu/amd/agesa/family14/model_14_init.c
index 2cfb9090c8..a03516daaf 100644
--- a/src/cpu/amd/agesa/family14/model_14_init.c
+++ b/src/cpu/amd/agesa/family14/model_14_init.c
@@ -116,7 +116,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_14_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, 0x500f00 }, /* ON-A0 */
{ X86_VENDOR_AMD, 0x500f01 }, /* ON-A1 */
{ X86_VENDOR_AMD, 0x500f10 }, /* ON-B0 */
diff --git a/src/cpu/amd/agesa/family15/model_15_init.c b/src/cpu/amd/agesa/family15/model_15_init.c
index 7df915382a..531bf29ae9 100644
--- a/src/cpu/amd/agesa/family15/model_15_init.c
+++ b/src/cpu/amd/agesa/family15/model_15_init.c
@@ -101,7 +101,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_15_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, 0x100F80}, /* HY-D0 */
{ X86_VENDOR_AMD, 0x100F90}, /* HY-D0 */
{ X86_VENDOR_AMD, 0x100F81}, /* HY-D1 */
diff --git a/src/cpu/amd/agesa/family15tn/model_15_init.c b/src/cpu/amd/agesa/family15tn/model_15_init.c
index f569de7f80..e0bff4f4e3 100644
--- a/src/cpu/amd/agesa/family15tn/model_15_init.c
+++ b/src/cpu/amd/agesa/family15tn/model_15_init.c
@@ -128,7 +128,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_15_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, 0x610f00 }, /* TN-A0 */
{ X86_VENDOR_AMD, 0x610f31 }, /* RL-A1 (Richland) */
{ 0, 0 },
diff --git a/src/cpu/amd/agesa/family16kb/model_16_init.c b/src/cpu/amd/agesa/family16kb/model_16_init.c
index acfa3f2436..d49216a734 100644
--- a/src/cpu/amd/agesa/family16kb/model_16_init.c
+++ b/src/cpu/amd/agesa/family16kb/model_16_init.c
@@ -112,7 +112,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_16_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, 0x700f00 }, /* KB-A0 */
{ 0, 0 },
};
diff --git a/src/cpu/amd/family_10h-family_15h/model_10xxx_init.c b/src/cpu/amd/family_10h-family_15h/model_10xxx_init.c
index 1e2a467d44..f73ce038a6 100644
--- a/src/cpu/amd/family_10h-family_15h/model_10xxx_init.c
+++ b/src/cpu/amd/family_10h-family_15h/model_10xxx_init.c
@@ -240,7 +240,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_10xxx_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
//AMD_GH_SUPPORT
{ X86_VENDOR_AMD, 0x100f00 }, /* SH-F0 L1 */
{ X86_VENDOR_AMD, 0x100f10 }, /* M2 */
diff --git a/src/cpu/amd/geode_gx2/geode_gx2_init.c b/src/cpu/amd/geode_gx2/geode_gx2_init.c
index 2aa9c8d8d4..6be39257c4 100644
--- a/src/cpu/amd/geode_gx2/geode_gx2_init.c
+++ b/src/cpu/amd/geode_gx2/geode_gx2_init.c
@@ -47,7 +47,7 @@ static struct device_operations cpu_dev_ops = {
.init = geode_gx2_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_NSC, 0x0552 },
{ 0, 0 },
};
diff --git a/src/cpu/amd/geode_lx/geode_lx_init.c b/src/cpu/amd/geode_lx/geode_lx_init.c
index 8ff5848c74..8c0cef3310 100644
--- a/src/cpu/amd/geode_lx/geode_lx_init.c
+++ b/src/cpu/amd/geode_lx/geode_lx_init.c
@@ -58,7 +58,7 @@ static struct device_operations cpu_dev_ops = {
.init = geode_lx_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{X86_VENDOR_AMD, 0x05A2},
{0, 0},
};
diff --git a/src/cpu/amd/model_fxx/model_fxx_init.c b/src/cpu/amd/model_fxx/model_fxx_init.c
index c21bce69e3..f5a6773219 100644
--- a/src/cpu/amd/model_fxx/model_fxx_init.c
+++ b/src/cpu/amd/model_fxx/model_fxx_init.c
@@ -558,7 +558,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_fxx_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
#if !IS_ENABLED(CONFIG_K8_REV_F_SUPPORT)
{ X86_VENDOR_AMD, 0xf40 }, /* SH-B0 (socket 754) */
{ X86_VENDOR_AMD, 0xf50 }, /* SH-B0 (socket 940) */
diff --git a/src/cpu/amd/pi/00630F01/model_15_init.c b/src/cpu/amd/pi/00630F01/model_15_init.c
index 317aca8ea5..5299dcad30 100644
--- a/src/cpu/amd/pi/00630F01/model_15_init.c
+++ b/src/cpu/amd/pi/00630F01/model_15_init.c
@@ -124,7 +124,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_15_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, 0x630f00 }, /* KV-A0 */
{ X86_VENDOR_AMD, 0x630f01 }, /* KV-A1 */
{ 0, 0 },
diff --git a/src/cpu/amd/pi/00660F01/model_15_init.c b/src/cpu/amd/pi/00660F01/model_15_init.c
index bf4bc241eb..abe20c33f1 100644
--- a/src/cpu/amd/pi/00660F01/model_15_init.c
+++ b/src/cpu/amd/pi/00660F01/model_15_init.c
@@ -124,7 +124,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_15_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, 0x660f00 },
{ X86_VENDOR_AMD, 0x660f01 },
{ 0, 0 },
diff --git a/src/cpu/amd/pi/00730F01/model_16_init.c b/src/cpu/amd/pi/00730F01/model_16_init.c
index 0dd720266f..e0eca94c97 100644
--- a/src/cpu/amd/pi/00730F01/model_16_init.c
+++ b/src/cpu/amd/pi/00730F01/model_16_init.c
@@ -108,7 +108,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_16_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, 0x730F00 },
{ X86_VENDOR_AMD, 0x730F01 },
{ 0, 0 },
diff --git a/src/cpu/intel/ep80579/ep80579_init.c b/src/cpu/intel/ep80579/ep80579_init.c
index 78860b4cdf..d19d4e2fb7 100644
--- a/src/cpu/intel/ep80579/ep80579_init.c
+++ b/src/cpu/intel/ep80579/ep80579_init.c
@@ -42,7 +42,7 @@ static struct device_operations cpu_dev_ops = {
.init = ep80579_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x10650 }, /* EP80579 */
{ 0, 0 },
};
diff --git a/src/cpu/intel/fsp_model_206ax/model_206ax_init.c b/src/cpu/intel/fsp_model_206ax/model_206ax_init.c
index 30a8d15429..3eb07b0e7e 100644
--- a/src/cpu/intel/fsp_model_206ax/model_206ax_init.c
+++ b/src/cpu/intel/fsp_model_206ax/model_206ax_init.c
@@ -375,7 +375,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_206ax_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x206a0 }, /* Intel Sandybridge */
{ X86_VENDOR_INTEL, 0x206a6 }, /* Intel Sandybridge D1 */
{ X86_VENDOR_INTEL, 0x206a7 }, /* Intel Sandybridge D2/J1 */
diff --git a/src/cpu/intel/fsp_model_406dx/model_406dx_init.c b/src/cpu/intel/fsp_model_406dx/model_406dx_init.c
index ab3b6b330a..289305fcd3 100644
--- a/src/cpu/intel/fsp_model_406dx/model_406dx_init.c
+++ b/src/cpu/intel/fsp_model_406dx/model_406dx_init.c
@@ -161,7 +161,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_406dx_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x406d0 }, /* Intel Avoton/Rangeley A1 */
{ X86_VENDOR_INTEL, 0x406d8 }, /* Intel Avoton/Rangeley B0 */
{ 0, 0 },
diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c
index aa7711bf5c..24de43ec74 100644
--- a/src/cpu/intel/haswell/haswell_init.c
+++ b/src/cpu/intel/haswell/haswell_init.c
@@ -789,7 +789,7 @@ static struct device_operations cpu_dev_ops = {
.init = haswell_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x306c1 }, /* Intel Haswell 4+2 A0 */
{ X86_VENDOR_INTEL, 0x306c2 }, /* Intel Haswell 4+2 B0 */
{ X86_VENDOR_INTEL, 0x40650 }, /* Intel Haswell ULT B0 */
diff --git a/src/cpu/intel/model_1067x/model_1067x_init.c b/src/cpu/intel/model_1067x/model_1067x_init.c
index 01cb45d28c..0d9169b757 100644
--- a/src/cpu/intel/model_1067x/model_1067x_init.c
+++ b/src/cpu/intel/model_1067x/model_1067x_init.c
@@ -322,7 +322,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_1067x_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x10676 }, /* Intel Core 2 Solo/Core Duo */
{ X86_VENDOR_INTEL, 0x10677 },
{ X86_VENDOR_INTEL, 0x1067A },
diff --git a/src/cpu/intel/model_106cx/model_106cx_init.c b/src/cpu/intel/model_106cx/model_106cx_init.c
index b07fd0b79b..dd7bbc845b 100644
--- a/src/cpu/intel/model_106cx/model_106cx_init.c
+++ b/src/cpu/intel/model_106cx/model_106cx_init.c
@@ -118,7 +118,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_106cx_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x106c0 }, /* Intel Atom 230 */
{ X86_VENDOR_INTEL, 0x106ca }, /* Intel Atom D5xx */
{ 0, 0 },
diff --git a/src/cpu/intel/model_2065x/model_2065x_init.c b/src/cpu/intel/model_2065x/model_2065x_init.c
index 377e297435..322e814e0d 100644
--- a/src/cpu/intel/model_2065x/model_2065x_init.c
+++ b/src/cpu/intel/model_2065x/model_2065x_init.c
@@ -359,7 +359,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_2065x_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x20652 }, /* Intel Nehalem */
{ X86_VENDOR_INTEL, 0x20655 }, /* Intel Nehalem */
{ 0, 0 },
diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c
index ed5c29242d..5c60ed77b5 100644
--- a/src/cpu/intel/model_206ax/model_206ax_init.c
+++ b/src/cpu/intel/model_206ax/model_206ax_init.c
@@ -557,7 +557,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_206ax_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x206a0 }, /* Intel Sandybridge */
{ X86_VENDOR_INTEL, 0x206a6 }, /* Intel Sandybridge D1 */
{ X86_VENDOR_INTEL, 0x206a7 }, /* Intel Sandybridge D2/J1 */
diff --git a/src/cpu/intel/model_65x/model_65x_init.c b/src/cpu/intel/model_65x/model_65x_init.c
index a4e222ddf4..9eab9c7004 100644
--- a/src/cpu/intel/model_65x/model_65x_init.c
+++ b/src/cpu/intel/model_65x/model_65x_init.c
@@ -54,7 +54,7 @@ static struct device_operations cpu_dev_ops = {
* Intel Pentium II Xeon Processor Specification Update
* http://download.intel.com/support/processors/pentiumii/xeon/24377632.pdf
*/
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x0650 }, /* PII/Celeron, dA0/mdA0/A0 */
{ X86_VENDOR_INTEL, 0x0651 }, /* PII/Celeron, dA1/A1 */
{ X86_VENDOR_INTEL, 0x0652 }, /* PII/Celeron/Xeon, dB0/mdB0/B0 */
diff --git a/src/cpu/intel/model_67x/model_67x_init.c b/src/cpu/intel/model_67x/model_67x_init.c
index f4b8155f0d..4fd51d30a2 100644
--- a/src/cpu/intel/model_67x/model_67x_init.c
+++ b/src/cpu/intel/model_67x/model_67x_init.c
@@ -55,7 +55,7 @@ static struct device_operations cpu_dev_ops = {
* Intel Pentium III Processor Specification Update
* http://download.intel.com/design/intarch/specupdt/24445358.pdf
*/
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x0671 },
{ X86_VENDOR_INTEL, 0x0672 }, /* PIII, kB0 */
{ X86_VENDOR_INTEL, 0x0673 }, /* PIII, kC0 */
diff --git a/src/cpu/intel/model_68x/model_68x_init.c b/src/cpu/intel/model_68x/model_68x_init.c
index ad1f3a0791..17c9eb7a57 100644
--- a/src/cpu/intel/model_68x/model_68x_init.c
+++ b/src/cpu/intel/model_68x/model_68x_init.c
@@ -65,7 +65,7 @@ static struct device_operations cpu_dev_ops = {
* Mobile Intel Pentium III/III-M Processor Specification Update
* http://download.intel.com/design/intarch/specupdt/24530663.pdf
*/
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x0680 },
{ X86_VENDOR_INTEL, 0x0681 }, /* PIII, cA2/cA2c/A2/BA2/PA2/MA2 */
{ X86_VENDOR_INTEL, 0x0683 }, /* PIII/Celeron, cB0/cB0c/B0/BB0/PB0/MB0*/
diff --git a/src/cpu/intel/model_69x/model_69x_init.c b/src/cpu/intel/model_69x/model_69x_init.c
index ba0af24832..785c48071f 100644
--- a/src/cpu/intel/model_69x/model_69x_init.c
+++ b/src/cpu/intel/model_69x/model_69x_init.c
@@ -39,7 +39,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_69x_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x0690 }, /* Pentium M */
{ X86_VENDOR_INTEL, 0x0695 },
{ 0, 0 },
diff --git a/src/cpu/intel/model_6bx/model_6bx_init.c b/src/cpu/intel/model_6bx/model_6bx_init.c
index e52bd31c2d..ce70539bad 100644
--- a/src/cpu/intel/model_6bx/model_6bx_init.c
+++ b/src/cpu/intel/model_6bx/model_6bx_init.c
@@ -59,7 +59,7 @@ static struct device_operations cpu_dev_ops = {
* Intel Pentium III Processor Specification Update
* http://download.intel.com/design/intarch/specupdt/24445358.pdf
*/
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x06b1 }, /* Pentium III/Celeron, tA1/A1/FPA1 */
{ X86_VENDOR_INTEL, 0x06b4 }, /* Pentium III, tB1/FPB1 */
{ 0, 0 },
diff --git a/src/cpu/intel/model_6dx/model_6dx_init.c b/src/cpu/intel/model_6dx/model_6dx_init.c
index 0a5191410a..6097c33267 100644
--- a/src/cpu/intel/model_6dx/model_6dx_init.c
+++ b/src/cpu/intel/model_6dx/model_6dx_init.c
@@ -39,7 +39,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_6dx_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
/* Pentium M on 90nm with 2MiB of L2 cache */
{ X86_VENDOR_INTEL, 0x06D0 },
{ X86_VENDOR_INTEL, 0x06D6 },
diff --git a/src/cpu/intel/model_6ex/model_6ex_init.c b/src/cpu/intel/model_6ex/model_6ex_init.c
index ff9284fc5f..6e5b339444 100644
--- a/src/cpu/intel/model_6ex/model_6ex_init.c
+++ b/src/cpu/intel/model_6ex/model_6ex_init.c
@@ -156,7 +156,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_6ex_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x06e0 }, /* Intel Core Solo/Core Duo */
{ X86_VENDOR_INTEL, 0x06e8 }, /* Intel Core Solo/Core Duo */
{ X86_VENDOR_INTEL, 0x06ec }, /* Intel Core Solo/Core Duo */
diff --git a/src/cpu/intel/model_6fx/model_6fx_init.c b/src/cpu/intel/model_6fx/model_6fx_init.c
index 2a04a4e122..b5a68ccadf 100644
--- a/src/cpu/intel/model_6fx/model_6fx_init.c
+++ b/src/cpu/intel/model_6fx/model_6fx_init.c
@@ -170,7 +170,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_6fx_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x06f0 }, /* Intel Core 2 Solo/Core Duo */
{ X86_VENDOR_INTEL, 0x06f2 }, /* Intel Core 2 Solo/Core Duo */
{ X86_VENDOR_INTEL, 0x06f6 }, /* Intel Core 2 Solo/Core Duo */
diff --git a/src/cpu/intel/model_6xx/model_6xx_init.c b/src/cpu/intel/model_6xx/model_6xx_init.c
index 68c0136172..e639ed776c 100644
--- a/src/cpu/intel/model_6xx/model_6xx_init.c
+++ b/src/cpu/intel/model_6xx/model_6xx_init.c
@@ -64,7 +64,7 @@ static struct device_operations cpu_dev_ops = {
* Mobile Intel Pentium III/III-M Processor Specification Update
* http://download.intel.com/design/intarch/specupdt/24530663.pdf
*/
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x0611 }, /* Pentium Pro, B0 */
{ X86_VENDOR_INTEL, 0x0612 }, /* Pentium Pro, C0 */
{ X86_VENDOR_INTEL, 0x0616 }, /* Pentium Pro, sA0 */
diff --git a/src/cpu/intel/model_f0x/model_f0x_init.c b/src/cpu/intel/model_f0x/model_f0x_init.c
index f833a568a6..d942445dc0 100644
--- a/src/cpu/intel/model_f0x/model_f0x_init.c
+++ b/src/cpu/intel/model_f0x/model_f0x_init.c
@@ -39,7 +39,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_f0x_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x0f07 },
{ X86_VENDOR_INTEL, 0x0f0A },
{ 0, 0 },
diff --git a/src/cpu/intel/model_f1x/model_f1x_init.c b/src/cpu/intel/model_f1x/model_f1x_init.c
index 4af3934f3d..e0ef3fed28 100644
--- a/src/cpu/intel/model_f1x/model_f1x_init.c
+++ b/src/cpu/intel/model_f1x/model_f1x_init.c
@@ -39,7 +39,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_f1x_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x0f12 },
{ X86_VENDOR_INTEL, 0x0f13 },
{ 0, 0 },
diff --git a/src/cpu/intel/model_f2x/model_f2x_init.c b/src/cpu/intel/model_f2x/model_f2x_init.c
index 97c7d9ddd1..03377d87cc 100644
--- a/src/cpu/intel/model_f2x/model_f2x_init.c
+++ b/src/cpu/intel/model_f2x/model_f2x_init.c
@@ -47,7 +47,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_f2x_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x0f22 },
{ X86_VENDOR_INTEL, 0x0f24 },
{ X86_VENDOR_INTEL, 0x0f25 },
diff --git a/src/cpu/intel/model_f3x/model_f3x_init.c b/src/cpu/intel/model_f3x/model_f3x_init.c
index 8fbcaa73dc..d853a6301c 100644
--- a/src/cpu/intel/model_f3x/model_f3x_init.c
+++ b/src/cpu/intel/model_f3x/model_f3x_init.c
@@ -47,7 +47,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_f3x_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x0f34 }, /* Xeon */
{ 0, 0 },
};
diff --git a/src/cpu/intel/model_f4x/model_f4x_init.c b/src/cpu/intel/model_f4x/model_f4x_init.c
index c904b62479..9eb5115aa8 100644
--- a/src/cpu/intel/model_f4x/model_f4x_init.c
+++ b/src/cpu/intel/model_f4x/model_f4x_init.c
@@ -47,7 +47,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_f4x_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x0f41 }, /* Xeon */
{ 0, 0 },
};
diff --git a/src/cpu/qemu-power8/qemu.c b/src/cpu/qemu-power8/qemu.c
index 5518a27238..826624a386 100644
--- a/src/cpu/qemu-power8/qemu.c
+++ b/src/cpu/qemu-power8/qemu.c
@@ -23,7 +23,7 @@ static struct device_operations cpu_dev_ops = {
.init = qemu_cpu_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ 0, 0 },
};
diff --git a/src/cpu/qemu-x86/qemu.c b/src/cpu/qemu-x86/qemu.c
index 924c2fdc3b..c005bf7a1d 100644
--- a/src/cpu/qemu-x86/qemu.c
+++ b/src/cpu/qemu-x86/qemu.c
@@ -25,7 +25,7 @@ static struct device_operations cpu_dev_ops = {
.init = qemu_cpu_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_ANY, 0 },
{ 0, 0 },
};
diff --git a/src/cpu/via/c3/c3_init.c b/src/cpu/via/c3/c3_init.c
index e51c0d67e0..353cbfa4d0 100644
--- a/src/cpu/via/c3/c3_init.c
+++ b/src/cpu/via/c3/c3_init.c
@@ -35,7 +35,7 @@ static struct device_operations cpu_dev_ops = {
.init = c3_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_CENTAUR, 0x0670 }, // VIA C3 Samual 2 + Ezra
{ X86_VENDOR_CENTAUR, 0x0680 }, // VIA C3 Ezra-T
{ X86_VENDOR_CENTAUR, 0x0690 }, // VIA C3 Nehemiah
diff --git a/src/cpu/via/c7/c7_init.c b/src/cpu/via/c7/c7_init.c
index 480f61ad44..1527e64a81 100644
--- a/src/cpu/via/c7/c7_init.c
+++ b/src/cpu/via/c7/c7_init.c
@@ -213,7 +213,7 @@ static struct device_operations cpu_dev_ops = {
* allows us to keep the table significantly smaller.
*/
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{X86_VENDOR_CENTAUR, 0x06A0}, // VIA C7 Esther
{X86_VENDOR_CENTAUR, 0x06A9}, // VIA C7 Esther
{X86_VENDOR_CENTAUR, 0x06D0}, // VIA C7-M
diff --git a/src/cpu/via/nano/nano_init.c b/src/cpu/via/nano/nano_init.c
index 7d6338e6ee..62c6316d34 100644
--- a/src/cpu/via/nano/nano_init.c
+++ b/src/cpu/via/nano/nano_init.c
@@ -188,7 +188,7 @@ static struct device_operations cpu_dev_ops = {
.init = nano_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{X86_VENDOR_CENTAUR, 0x06f2}, // VIA NANO 1000/2000 Series
{X86_VENDOR_CENTAUR, 0x06f8}, // VIA NANO 3000 rev B0
{X86_VENDOR_CENTAUR, 0x06fa}, // VIA NANO 3000 rev B2
diff --git a/src/soc/amd/stoneyridge/model_15_init.c b/src/soc/amd/stoneyridge/model_15_init.c
index c3e9bf52bd..930e395507 100644
--- a/src/soc/amd/stoneyridge/model_15_init.c
+++ b/src/soc/amd/stoneyridge/model_15_init.c
@@ -87,7 +87,7 @@ static struct device_operations cpu_dev_ops = {
.init = model_15_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, 0x670f00 },
{ 0, 0 },
};
diff --git a/src/soc/intel/apollolake/cpu.c b/src/soc/intel/apollolake/cpu.c
index d2c7001ede..96c37f1518 100644
--- a/src/soc/intel/apollolake/cpu.c
+++ b/src/soc/intel/apollolake/cpu.c
@@ -103,7 +103,7 @@ static struct device_operations cpu_dev_ops = {
.init = soc_init_core,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, CPUID_APOLLOLAKE_A0 },
{ X86_VENDOR_INTEL, CPUID_APOLLOLAKE_B0 },
{ X86_VENDOR_INTEL, CPUID_APOLLOLAKE_E0 },
diff --git a/src/soc/intel/baytrail/cpu.c b/src/soc/intel/baytrail/cpu.c
index a3844047c4..ed18ce10bf 100644
--- a/src/soc/intel/baytrail/cpu.c
+++ b/src/soc/intel/baytrail/cpu.c
@@ -66,7 +66,7 @@ static struct device_operations cpu_dev_ops = {
.init = baytrail_core_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x30673 },
{ X86_VENDOR_INTEL, 0x30678 },
{ 0, 0 },
diff --git a/src/soc/intel/braswell/cpu.c b/src/soc/intel/braswell/cpu.c
index a2bd180da5..ed7e2faac8 100644
--- a/src/soc/intel/braswell/cpu.c
+++ b/src/soc/intel/braswell/cpu.c
@@ -71,7 +71,7 @@ static struct device_operations cpu_dev_ops = {
.init = soc_core_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x406C4 },
{ X86_VENDOR_INTEL, 0x406C3 },
{ X86_VENDOR_INTEL, 0x406C2 },
diff --git a/src/soc/intel/broadwell/cpu.c b/src/soc/intel/broadwell/cpu.c
index 7b56db17fc..ecb7247900 100644
--- a/src/soc/intel/broadwell/cpu.c
+++ b/src/soc/intel/broadwell/cpu.c
@@ -684,7 +684,7 @@ static struct device_operations cpu_dev_ops = {
.init = cpu_core_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, CPUID_HASWELL_ULT },
{ X86_VENDOR_INTEL, CPUID_BROADWELL_C0 },
{ X86_VENDOR_INTEL, CPUID_BROADWELL_D0 },
diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c
index e301c24447..e19127c1b3 100644
--- a/src/soc/intel/common/block/cpu/mp_init.c
+++ b/src/soc/intel/common/block/cpu/mp_init.c
@@ -50,7 +50,7 @@ static struct device_operations cpu_dev_ops = {
.init = init_one_cpu,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, CPUID_SKYLAKE_C0 },
{ X86_VENDOR_INTEL, CPUID_SKYLAKE_D0 },
{ X86_VENDOR_INTEL, CPUID_SKYLAKE_HQ0 },
diff --git a/src/soc/intel/denverton_ns/cpu.c b/src/soc/intel/denverton_ns/cpu.c
index b6c05e754c..528d2e5ae6 100644
--- a/src/soc/intel/denverton_ns/cpu.c
+++ b/src/soc/intel/denverton_ns/cpu.c
@@ -54,7 +54,7 @@ static struct device_operations cpu_dev_ops = {
.init = denverton_core_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{X86_VENDOR_INTEL,
CPUID_DENVERTON_A0_A1}, /* Denverton-NS A0/A1 CPUID */
{X86_VENDOR_INTEL, CPUID_DENVERTON_B0}, /* Denverton-NS B0 CPUID */
diff --git a/src/soc/intel/fsp_baytrail/cpu.c b/src/soc/intel/fsp_baytrail/cpu.c
index c3879e1f95..38c4446e01 100644
--- a/src/soc/intel/fsp_baytrail/cpu.c
+++ b/src/soc/intel/fsp_baytrail/cpu.c
@@ -64,7 +64,7 @@ static struct device_operations cpu_dev_ops = {
.init = baytrail_core_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x30671 },
{ X86_VENDOR_INTEL, 0x30672 },
{ X86_VENDOR_INTEL, 0x30673 },
diff --git a/src/soc/intel/fsp_broadwell_de/cpu.c b/src/soc/intel/fsp_broadwell_de/cpu.c
index 68825a365f..d89ae87b1d 100644
--- a/src/soc/intel/fsp_broadwell_de/cpu.c
+++ b/src/soc/intel/fsp_broadwell_de/cpu.c
@@ -160,7 +160,7 @@ static struct device_operations cpu_dev_ops = {
.init = broadwell_de_core_init,
};
-static struct cpu_device_id cpu_table[] = {
+static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x50661 },
{ X86_VENDOR_INTEL, 0x50662 },
{ X86_VENDOR_INTEL, 0x50663 },