Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: ixp4xx: Guard ARM32-specific hook_fault_code()

hook_fault_code() is an ARM32-specific API. Guard it and related code with
CONFIG_ARM #ifdefs and remove the ARM arch dependency from Kconfig so the
driver can be compile tested on other architectures.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
[mani: dropped the ARM arch Kconfig dependency]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linar.org>
Link: https://patch.msgid.link/20250925202738.2202195-1-helgaas@kernel.org

authored by

Bjorn Helgaas and committed by
Manivannan Sadhasivam
d2713dfd 3a866087

+7 -1
+1 -1
drivers/pci/controller/Kconfig
··· 146 146 147 147 config PCI_IXP4XX 148 148 bool "Intel IXP4xx PCI controller" 149 - depends on ARM && OF 149 + depends on OF 150 150 depends on ARCH_IXP4XX || COMPILE_TEST 151 151 default ARCH_IXP4XX 152 152 help
+6
drivers/pci/controller/pci-ixp4xx.c
··· 214 214 return 0xffffffff; 215 215 } 216 216 217 + #ifdef CONFIG_ARM 217 218 static int ixp4xx_crp_read_config(struct ixp4xx_pci *p, int where, int size, 218 219 u32 *value) 219 220 { ··· 252 251 253 252 return PCIBIOS_SUCCESSFUL; 254 253 } 254 + #endif 255 255 256 256 static int ixp4xx_crp_write_config(struct ixp4xx_pci *p, int where, int size, 257 257 u32 value) ··· 472 470 return 0; 473 471 } 474 472 473 + #ifdef CONFIG_ARM 475 474 /* Only used to get context for abort handling */ 476 475 static struct ixp4xx_pci *ixp4xx_pci_abort_singleton; 477 476 ··· 512 509 513 510 return 0; 514 511 } 512 + #endif 515 513 516 514 static int __init ixp4xx_pci_probe(struct platform_device *pdev) 517 515 { ··· 559 555 dev_info(dev, "controller is in %s mode\n", 560 556 p->host_mode ? "host" : "option"); 561 557 558 + #ifdef CONFIG_ARM 562 559 /* Hook in our fault handler for PCI errors */ 563 560 ixp4xx_pci_abort_singleton = p; 564 561 hook_fault_code(16+6, ixp4xx_pci_abort_handler, SIGBUS, 0, 565 562 "imprecise external abort"); 563 + #endif 566 564 567 565 ret = ixp4xx_pci_parse_map_ranges(p); 568 566 if (ret)