Commit ab3b3793 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by H. Peter Anvin
Browse files

x86: Add pci_init_irq to x86_init



Moorestown wants to reuse pcibios_init_irq but needs to provide its
own implementation of pci_enable_irq. After we distangled the init we
can move the init_irq call to x86_init and remove the pci_enable_irq
!= NULL check in pcibios_init_irq. pci_enable_irq is compile time
initialized to pirq_enable_irq and the special cases which override it
(visws and acpi) set the x86_init function pointer to noop. That
allows MSRT to override pci_enable_irq and otherwise run
pcibios_init_irq unmodified.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
LKML-Reference: <43F901BD926A4E43B106BF17856F07559FB80CFF@orsmsx508.amr.corp.intel.com>
Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarJacob Pan <jacob.jun.pan@intel.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent b72d0db9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ extern void __init dmi_check_skip_isa_align(void);

/* some common used subsys_initcalls */
extern int __init pci_acpi_init(void);
extern int __init pcibios_irq_init(void);
extern void __init pcibios_irq_init(void);
extern int __init pcibios_init(void);
extern int pci_legacy_init(void);

@@ -187,6 +187,8 @@ static inline void mmio_config_writel(void __iomem *pos, u32 val)
# else
#  define x86_default_pci_init		pci_legacy_init
# endif
# define x86_default_pci_init_irq	pcibios_irq_init
#else
# define x86_default_pci_init		NULL
# define x86_default_pci_init_irq	NULL
#endif
+2 −0
Original line number Diff line number Diff line
@@ -101,9 +101,11 @@ struct x86_init_iommu {
 /*
  * struct x86_init_pci - platform specific pci init functions
 * @init:			platform specific pci init
 * @init_irq:			platform specific pci irq init
 */
struct x86_init_pci {
	int (*init)(void);
	void (*init_irq)(void);
};

/**
+1 −0
Original line number Diff line number Diff line
@@ -238,6 +238,7 @@ void __init visws_early_detect(void)
	x86_init.irqs.trap_init = visws_trap_init;
	x86_init.timers.timer_init = visws_time_init;
	x86_init.pci.init = pci_visws_init;
	x86_init.pci.init_irq = x86_init_noop;

	/*
	 * Install reboot quirks:
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ struct x86_init_ops x86_init __initdata = {

	.pci = {
		.init			= x86_default_pci_init,
		.init_irq		= x86_default_pci_init_irq,
	},
};

+1 −0
Original line number Diff line number Diff line
@@ -289,6 +289,7 @@ int __init pci_acpi_init(void)
	acpi_irq_penalty_init();
	pcibios_enable_irq = acpi_pci_irq_enable;
	pcibios_disable_irq = acpi_pci_irq_disable;
	x86_init.pci.init_irq = x86_init_noop;

	if (pci_routeirq) {
		/*
Loading