2 * PCI Frontend Stub - puts some "dummy" functions in to the Linux x86 PCI core
3 * to support the Xen PCI Frontend's operation
5 * Author: Ryan Wilson <hap9@epoch.ncsc.mil>
7 #include <linux/module.h>
8 #include <linux/init.h>
13 static int pcifront_enable_irq(struct pci_dev *dev)
16 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
22 extern u8 pci_cache_line_size;
24 static int __init pcifront_x86_stub_init(void)
26 struct cpuinfo_x86 *c = &boot_cpu_data;
28 /* Only install our method if we haven't found real hardware already */
32 printk(KERN_INFO "PCI: setting up Xen PCI frontend stub\n");
34 /* Copied from arch/i386/pci/common.c */
35 pci_cache_line_size = 32 >> 2;
36 if (c->x86 >= 6 && c->x86_vendor == X86_VENDOR_AMD)
37 pci_cache_line_size = 64 >> 2; /* K7 & K8 */
38 else if (c->x86 > 6 && c->x86_vendor == X86_VENDOR_INTEL)
39 pci_cache_line_size = 128 >> 2; /* P4 */
41 /* On x86, we need to disable the normal IRQ routing table and
42 * just ask the backend
44 pcibios_enable_irq = pcifront_enable_irq;
45 pcibios_disable_irq = NULL;
48 /* Keep ACPI out of the picture */
55 arch_initcall(pcifront_x86_stub_init);