diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 20:11:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 20:11:17 -0400 |
commit | 18cb657ca1bafe635f368346a1676fb04c512edf (patch) | |
tree | b0eb6a4ceddf98e7bf820be7ff24bf131ff56b0c /arch/x86/kernel | |
parent | 2301b65b86df8b80e6779ce9885ad62a5c4adc38 (diff) | |
parent | e28c31a96b1570f17731b18e8efabb7308d0c22c (diff) |
Merge branch 'stable/xen-pcifront-0.8.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
and branch 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm
* 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
xen: register xen pci notifier
xen: initialize cpu masks for pv guests in xen_smp_init
xen: add a missing #include to arch/x86/pci/xen.c
xen: mask the MTRR feature from the cpuid
xen: make hvc_xen console work for dom0.
xen: add the direct mapping area for ISA bus access
xen: Initialize xenbus for dom0.
xen: use vcpu_ops to setup cpu masks
xen: map a dummy page for local apic and ioapic in xen_set_fixmap
xen: remap MSIs into pirqs when running as initial domain
xen: remap GSIs as pirqs when running as initial domain
xen: introduce XEN_DOM0 as a silent option
xen: map MSIs into pirqs
xen: support GSI -> pirq remapping in PV on HVM guests
xen: add xen hvm acpi_register_gsi variant
acpi: use indirect call to register gsi in different modes
xen: implement xen_hvm_register_pirq
xen: get the maximum number of pirqs from xen
xen: support pirq != irq
* 'stable/xen-pcifront-0.8.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (27 commits)
X86/PCI: Remove the dependency on isapnp_disable.
xen: Update Makefile with CONFIG_BLOCK dependency for biomerge.c
MAINTAINERS: Add myself to the Xen Hypervisor Interface and remove Chris Wright.
x86: xen: Sanitse irq handling (part two)
swiotlb-xen: On x86-32 builts, select SWIOTLB instead of depending on it.
MAINTAINERS: Add myself for Xen PCI and Xen SWIOTLB maintainer.
xen/pci: Request ACS when Xen-SWIOTLB is activated.
xen-pcifront: Xen PCI frontend driver.
xenbus: prevent warnings on unhandled enumeration values
xenbus: Xen paravirtualised PCI hotplug support.
xen/x86/PCI: Add support for the Xen PCI subsystem
x86: Introduce x86_msi_ops
msi: Introduce default_[teardown|setup]_msi_irqs with fallback.
x86/PCI: Export pci_walk_bus function.
x86/PCI: make sure _PAGE_IOMAP it set on pci mappings
x86/PCI: Clean up pci_cache_line_size
xen: fix shared irq device passthrough
xen: Provide a variant of xen_poll_irq with timeout.
xen: Find an unbound irq number in reverse order (high to low).
xen: statically initialize cpu_evtchn_mask_p
...
Fix up trivial conflicts in drivers/pci/Makefile
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 60 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 9 | ||||
-rw-r--r-- | arch/x86/kernel/x86_init.c | 7 |
3 files changed, 57 insertions, 19 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index c05872aa3ce0..71232b941b6c 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -513,35 +513,62 @@ int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi) | |||
513 | return 0; | 513 | return 0; |
514 | } | 514 | } |
515 | 515 | ||
516 | /* | 516 | static int acpi_register_gsi_pic(struct device *dev, u32 gsi, |
517 | * success: return IRQ number (>=0) | 517 | int trigger, int polarity) |
518 | * failure: return < 0 | ||
519 | */ | ||
520 | int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity) | ||
521 | { | 518 | { |
522 | unsigned int irq; | ||
523 | unsigned int plat_gsi = gsi; | ||
524 | |||
525 | #ifdef CONFIG_PCI | 519 | #ifdef CONFIG_PCI |
526 | /* | 520 | /* |
527 | * Make sure all (legacy) PCI IRQs are set as level-triggered. | 521 | * Make sure all (legacy) PCI IRQs are set as level-triggered. |
528 | */ | 522 | */ |
529 | if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { | 523 | if (trigger == ACPI_LEVEL_SENSITIVE) |
530 | if (trigger == ACPI_LEVEL_SENSITIVE) | 524 | eisa_set_level_irq(gsi); |
531 | eisa_set_level_irq(gsi); | ||
532 | } | ||
533 | #endif | 525 | #endif |
534 | 526 | ||
527 | return gsi; | ||
528 | } | ||
529 | |||
530 | static int acpi_register_gsi_ioapic(struct device *dev, u32 gsi, | ||
531 | int trigger, int polarity) | ||
532 | { | ||
535 | #ifdef CONFIG_X86_IO_APIC | 533 | #ifdef CONFIG_X86_IO_APIC |
536 | if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { | 534 | gsi = mp_register_gsi(dev, gsi, trigger, polarity); |
537 | plat_gsi = mp_register_gsi(dev, gsi, trigger, polarity); | ||
538 | } | ||
539 | #endif | 535 | #endif |
536 | |||
537 | return gsi; | ||
538 | } | ||
539 | |||
540 | int (*__acpi_register_gsi)(struct device *dev, u32 gsi, | ||
541 | int trigger, int polarity) = acpi_register_gsi_pic; | ||
542 | |||
543 | /* | ||
544 | * success: return IRQ number (>=0) | ||
545 | * failure: return < 0 | ||
546 | */ | ||
547 | int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity) | ||
548 | { | ||
549 | unsigned int irq; | ||
550 | unsigned int plat_gsi = gsi; | ||
551 | |||
552 | plat_gsi = (*__acpi_register_gsi)(dev, gsi, trigger, polarity); | ||
540 | irq = gsi_to_irq(plat_gsi); | 553 | irq = gsi_to_irq(plat_gsi); |
541 | 554 | ||
542 | return irq; | 555 | return irq; |
543 | } | 556 | } |
544 | 557 | ||
558 | void __init acpi_set_irq_model_pic(void) | ||
559 | { | ||
560 | acpi_irq_model = ACPI_IRQ_MODEL_PIC; | ||
561 | __acpi_register_gsi = acpi_register_gsi_pic; | ||
562 | acpi_ioapic = 0; | ||
563 | } | ||
564 | |||
565 | void __init acpi_set_irq_model_ioapic(void) | ||
566 | { | ||
567 | acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC; | ||
568 | __acpi_register_gsi = acpi_register_gsi_ioapic; | ||
569 | acpi_ioapic = 1; | ||
570 | } | ||
571 | |||
545 | /* | 572 | /* |
546 | * ACPI based hotplug support for CPU | 573 | * ACPI based hotplug support for CPU |
547 | */ | 574 | */ |
@@ -1259,8 +1286,7 @@ static void __init acpi_process_madt(void) | |||
1259 | */ | 1286 | */ |
1260 | error = acpi_parse_madt_ioapic_entries(); | 1287 | error = acpi_parse_madt_ioapic_entries(); |
1261 | if (!error) { | 1288 | if (!error) { |
1262 | acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC; | 1289 | acpi_set_irq_model_ioapic(); |
1263 | acpi_ioapic = 1; | ||
1264 | 1290 | ||
1265 | smp_found_config = 1; | 1291 | smp_found_config = 1; |
1266 | } | 1292 | } |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 8ae808d110f4..0929191d83cf 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -3331,7 +3331,7 @@ static int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int irq) | |||
3331 | return 0; | 3331 | return 0; |
3332 | } | 3332 | } |
3333 | 3333 | ||
3334 | int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) | 3334 | int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) |
3335 | { | 3335 | { |
3336 | int node, ret, sub_handle, index = 0; | 3336 | int node, ret, sub_handle, index = 0; |
3337 | unsigned int irq, irq_want; | 3337 | unsigned int irq, irq_want; |
@@ -3389,7 +3389,7 @@ error: | |||
3389 | return ret; | 3389 | return ret; |
3390 | } | 3390 | } |
3391 | 3391 | ||
3392 | void arch_teardown_msi_irq(unsigned int irq) | 3392 | void native_teardown_msi_irq(unsigned int irq) |
3393 | { | 3393 | { |
3394 | destroy_irq(irq); | 3394 | destroy_irq(irq); |
3395 | } | 3395 | } |
@@ -3650,6 +3650,11 @@ void __init probe_nr_irqs_gsi(void) | |||
3650 | printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); | 3650 | printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); |
3651 | } | 3651 | } |
3652 | 3652 | ||
3653 | int get_nr_irqs_gsi(void) | ||
3654 | { | ||
3655 | return nr_irqs_gsi; | ||
3656 | } | ||
3657 | |||
3653 | #ifdef CONFIG_SPARSE_IRQ | 3658 | #ifdef CONFIG_SPARSE_IRQ |
3654 | int __init arch_probe_nr_irqs(void) | 3659 | int __init arch_probe_nr_irqs(void) |
3655 | { | 3660 | { |
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index cd6da6bf3eca..ceb2911aa439 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c | |||
@@ -6,10 +6,12 @@ | |||
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/ioport.h> | 7 | #include <linux/ioport.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/pci.h> | ||
9 | 10 | ||
10 | #include <asm/bios_ebda.h> | 11 | #include <asm/bios_ebda.h> |
11 | #include <asm/paravirt.h> | 12 | #include <asm/paravirt.h> |
12 | #include <asm/pci_x86.h> | 13 | #include <asm/pci_x86.h> |
14 | #include <asm/pci.h> | ||
13 | #include <asm/mpspec.h> | 15 | #include <asm/mpspec.h> |
14 | #include <asm/setup.h> | 16 | #include <asm/setup.h> |
15 | #include <asm/apic.h> | 17 | #include <asm/apic.h> |
@@ -99,3 +101,8 @@ struct x86_platform_ops x86_platform = { | |||
99 | }; | 101 | }; |
100 | 102 | ||
101 | EXPORT_SYMBOL_GPL(x86_platform); | 103 | EXPORT_SYMBOL_GPL(x86_platform); |
104 | struct x86_msi_ops x86_msi = { | ||
105 | .setup_msi_irqs = native_setup_msi_irqs, | ||
106 | .teardown_msi_irq = native_teardown_msi_irq, | ||
107 | .teardown_msi_irqs = default_teardown_msi_irqs, | ||
108 | }; | ||