@@ -5396,12 +5396,51 @@ void __weak pci_fixup_cardbus(struct pci_bus *bus)
}
EXPORT_SYMBOL(pci_fixup_cardbus);
+static __initdata const char * const pci_opt_whitelist[] = {
+ "earlydump",
+ "rom",
+ "norom",
+ "irqmask=",
+ "pcie_bus_tune_off",
+ "pcie_bus_safe",
+ "pcie_bus_perf",
+ "pcie_bus_peer2peer",
+ "cbiosize=",
+ "cbmemsize=",
+ "hpiosize=",
+ "hpmemsize=",
+ "hpbussize=",
+ "resource_alignment=",
+ "realloc",
+ "realloc=",
+};
+
+static int __init pci_opt_whitelisted(char *str)
+{
+ int i;
+ const char *opt;
+
+ for (i = 0; i < ARRAY_SIZE(pci_opt_whitelist); i++) {
+ opt = pci_opt_whitelist[i];
+ if (!strncmp(str, opt, strlen(opt)))
+ return 1;
+ }
+
+ return 0;
+}
+
static int __init pci_setup(char *str)
{
while (str) {
char *k = strchr(str, ',');
if (k)
*k++ = 0;
+ if (*str && !pci_opt_whitelisted(str)) {
+ add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
+ pr_warning("PCI: Tainting kernel because pci=%s option used\n",
+ str);
+ pr_warning("PCI: If your system requires this option, please report it so future kernels can handle this automatically\n");
+ }
if (*str && (str = pcibios_setup(str)) && *str) {
if (!strcmp(str, "nomsi")) {
pci_no_msi();