Commit d91ee521 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Linus Torvalds

[PATCH] rename CONFIG_PCI_USE_VECTOR to CONFIG_PCI_MSI

The "vector" terminology is architecture-dependent.  The PCI MSI interface
actually deals with Linux IRQ numbers (i.e., things you can pass to
request_irq()), and we shouldn't confuse things by calling them "vectors" just
because we're using MSI rather than an IOSAPIC.
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 77e3ae29
...@@ -93,7 +93,7 @@ increase scalability. ...@@ -93,7 +93,7 @@ increase scalability.
5. Configuring a driver to use MSI/MSI-X 5. Configuring a driver to use MSI/MSI-X
By default, the kernel will not enable MSI/MSI-X on all devices that By default, the kernel will not enable MSI/MSI-X on all devices that
support this capability. The CONFIG_PCI_USE_VECTOR kernel option support this capability. The CONFIG_PCI_MSI kernel option
must be selected to enable MSI/MSI-X support. must be selected to enable MSI/MSI-X support.
5.1 Including MSI/MSI-X support into the kernel 5.1 Including MSI/MSI-X support into the kernel
...@@ -101,10 +101,10 @@ must be selected to enable MSI/MSI-X support. ...@@ -101,10 +101,10 @@ must be selected to enable MSI/MSI-X support.
To allow MSI/MSI-X capable device drivers to selectively enable To allow MSI/MSI-X capable device drivers to selectively enable
MSI/MSI-X (using pci_enable_msi()/pci_enable_msix() as described MSI/MSI-X (using pci_enable_msi()/pci_enable_msix() as described
below), the VECTOR based scheme needs to be enabled by setting below), the VECTOR based scheme needs to be enabled by setting
CONFIG_PCI_USE_VECTOR during kernel config. CONFIG_PCI_MSI during kernel config.
Since the target of the inbound message is the local APIC, providing Since the target of the inbound message is the local APIC, providing
CONFIG_X86_LOCAL_APIC must be enabled as well as CONFIG_PCI_USE_VECTOR. CONFIG_X86_LOCAL_APIC must be enabled as well as CONFIG_PCI_MSI.
5.2 Configuring for MSI support 5.2 Configuring for MSI support
...@@ -410,7 +410,7 @@ system whether it runs when CONFIG_X86_LOCAL_APIC=y. ...@@ -410,7 +410,7 @@ system whether it runs when CONFIG_X86_LOCAL_APIC=y.
In SMP environment, CONFIG_X86_LOCAL_APIC is automatically set; In SMP environment, CONFIG_X86_LOCAL_APIC is automatically set;
however, in UP environment, users must manually set however, in UP environment, users must manually set
CONFIG_X86_LOCAL_APIC. Once CONFIG_X86_LOCAL_APIC=y, setting CONFIG_X86_LOCAL_APIC. Once CONFIG_X86_LOCAL_APIC=y, setting
CONFIG_PCI_USE_VECTOR enables the VECTOR based scheme and CONFIG_PCI_MSI enables the VECTOR based scheme and
the option for MSI-capable device drivers to selectively enable the option for MSI-capable device drivers to selectively enable
MSI/MSI-X. MSI/MSI-X.
......
...@@ -73,7 +73,7 @@ static struct irq_pin_list { ...@@ -73,7 +73,7 @@ static struct irq_pin_list {
} irq_2_pin[PIN_MAP_SIZE]; } irq_2_pin[PIN_MAP_SIZE];
int vector_irq[NR_VECTORS] = { [0 ... NR_VECTORS - 1] = -1}; int vector_irq[NR_VECTORS] = { [0 ... NR_VECTORS - 1] = -1};
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
#define vector_to_irq(vector) \ #define vector_to_irq(vector) \
(platform_legacy_irq(vector) ? vector : vector_irq[vector]) (platform_legacy_irq(vector) ? vector : vector_irq[vector])
#else #else
...@@ -1114,7 +1114,7 @@ static inline int IO_APIC_irq_trigger(int irq) ...@@ -1114,7 +1114,7 @@ static inline int IO_APIC_irq_trigger(int irq)
/* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */ /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 }; u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
int assign_irq_vector(int irq) int assign_irq_vector(int irq)
#else #else
int __init assign_irq_vector(int irq) int __init assign_irq_vector(int irq)
...@@ -1868,7 +1868,7 @@ static void end_level_ioapic_irq (unsigned int irq) ...@@ -1868,7 +1868,7 @@ static void end_level_ioapic_irq (unsigned int irq)
} }
} }
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
static unsigned int startup_edge_ioapic_vector(unsigned int vector) static unsigned int startup_edge_ioapic_vector(unsigned int vector)
{ {
int irq = vector_to_irq(vector); int irq = vector_to_irq(vector);
......
...@@ -817,7 +817,7 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign) ...@@ -817,7 +817,7 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
if ( dev2->irq && dev2->irq != irq && \ if ( dev2->irq && dev2->irq != irq && \
(!(pci_probe & PCI_USE_PIRQ_MASK) || \ (!(pci_probe & PCI_USE_PIRQ_MASK) || \
((1 << dev2->irq) & mask)) ) { ((1 << dev2->irq) & mask)) ) {
#ifndef CONFIG_PCI_USE_VECTOR #ifndef CONFIG_PCI_MSI
printk(KERN_INFO "IRQ routing conflict for %s, have irq %d, want irq %d\n", printk(KERN_INFO "IRQ routing conflict for %s, have irq %d, want irq %d\n",
pci_name(dev2), dev2->irq, irq); pci_name(dev2), dev2->irq, irq);
#endif #endif
...@@ -1034,7 +1034,7 @@ int pirq_enable_irq(struct pci_dev *dev) ...@@ -1034,7 +1034,7 @@ int pirq_enable_irq(struct pci_dev *dev)
} }
dev = temp_dev; dev = temp_dev;
if (irq >= 0) { if (irq >= 0) {
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
if (!platform_legacy_irq(irq)) if (!platform_legacy_irq(irq))
irq = IO_APIC_VECTOR(irq); irq = IO_APIC_VECTOR(irq);
#endif #endif
......
...@@ -75,7 +75,7 @@ BUILD_16_IRQS(0x4) BUILD_16_IRQS(0x5) BUILD_16_IRQS(0x6) BUILD_16_IRQS(0x7) ...@@ -75,7 +75,7 @@ BUILD_16_IRQS(0x4) BUILD_16_IRQS(0x5) BUILD_16_IRQS(0x6) BUILD_16_IRQS(0x7)
BUILD_16_IRQS(0x8) BUILD_16_IRQS(0x9) BUILD_16_IRQS(0xa) BUILD_16_IRQS(0xb) BUILD_16_IRQS(0x8) BUILD_16_IRQS(0x9) BUILD_16_IRQS(0xa) BUILD_16_IRQS(0xb)
BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd) BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd)
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
BUILD_14_IRQS(0xe) BUILD_14_IRQS(0xe)
#endif #endif
...@@ -110,7 +110,7 @@ void (*interrupt[NR_IRQS])(void) = { ...@@ -110,7 +110,7 @@ void (*interrupt[NR_IRQS])(void) = {
IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb), IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb),
IRQLIST_16(0xc), IRQLIST_16(0xd) IRQLIST_16(0xc), IRQLIST_16(0xd)
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
, IRQLIST_14(0xe) , IRQLIST_14(0xe)
#endif #endif
......
...@@ -68,7 +68,7 @@ static struct irq_pin_list { ...@@ -68,7 +68,7 @@ static struct irq_pin_list {
} irq_2_pin[PIN_MAP_SIZE]; } irq_2_pin[PIN_MAP_SIZE];
int vector_irq[NR_VECTORS] = { [0 ... NR_VECTORS - 1] = -1}; int vector_irq[NR_VECTORS] = { [0 ... NR_VECTORS - 1] = -1};
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
#define vector_to_irq(vector) \ #define vector_to_irq(vector) \
(platform_legacy_irq(vector) ? vector : vector_irq[vector]) (platform_legacy_irq(vector) ? vector : vector_irq[vector])
#else #else
...@@ -656,7 +656,7 @@ static inline int IO_APIC_irq_trigger(int irq) ...@@ -656,7 +656,7 @@ static inline int IO_APIC_irq_trigger(int irq)
/* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */ /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 }; u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
int assign_irq_vector(int irq) int assign_irq_vector(int irq)
#else #else
int __init assign_irq_vector(int irq) int __init assign_irq_vector(int irq)
...@@ -1406,7 +1406,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask) ...@@ -1406,7 +1406,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
spin_unlock_irqrestore(&ioapic_lock, flags); spin_unlock_irqrestore(&ioapic_lock, flags);
} }
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
static unsigned int startup_edge_ioapic_vector(unsigned int vector) static unsigned int startup_edge_ioapic_vector(unsigned int vector)
{ {
int irq = vector_to_irq(vector); int irq = vector_to_irq(vector);
......
# #
# PCI configuration # PCI configuration
# #
config PCI_USE_VECTOR config PCI_MSI
bool "Vector-based interrupt indexing (MSI)" bool "Message Signaled Interrupts (MSI and MSI-X)"
depends on (X86_LOCAL_APIC && X86_IO_APIC) || IA64 depends on (X86_LOCAL_APIC && X86_IO_APIC) || IA64
default n default n
help help
This replaces the current existing IRQ-based index interrupt scheme This allows device drivers to enable MSI (Message Signaled
with the vector-base index scheme. The advantages of vector base Interrupts). Message Signaled Interrupts enable a device to
over IRQ base are listed below: generate an interrupt using an inbound Memory Write on its
1) Support MSI implementation. PCI bus instead of asserting a device IRQ pin.
2) Support future IOxAPIC hotplug
Note that this allows the device drivers to enable MSI, Message
Signaled Interrupt, on all MSI capable device functions detected.
Message Signal Interrupt enables an MSI-capable hardware device to
send an inbound Memory Write on its PCI bus instead of asserting
IRQ signal on device IRQ pin.
If you don't know what to do here, say N. If you don't know what to do here, say N.
......
...@@ -26,7 +26,7 @@ obj-$(CONFIG_PPC32) += setup-irq.o ...@@ -26,7 +26,7 @@ obj-$(CONFIG_PPC32) += setup-irq.o
obj-$(CONFIG_PPC64) += setup-bus.o obj-$(CONFIG_PPC64) += setup-bus.o
obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o
obj-$(CONFIG_X86_VISWS) += setup-irq.o obj-$(CONFIG_X86_VISWS) += setup-irq.o
obj-$(CONFIG_PCI_USE_VECTOR) += msi.o obj-$(CONFIG_PCI_MSI) += msi.o
# Cardbus & CompactPCI use setup-bus # Cardbus & CompactPCI use setup-bus
obj-$(CONFIG_HOTPLUG) += setup-bus.o obj-$(CONFIG_HOTPLUG) += setup-bus.o
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
static inline int use_pci_vector(void) {return 1;} static inline int use_pci_vector(void) {return 1;}
static inline void disable_edge_ioapic_vector(unsigned int vector) { } static inline void disable_edge_ioapic_vector(unsigned int vector) { }
static inline void mask_and_ack_level_ioapic_vector(unsigned int vector) { } static inline void mask_and_ack_level_ioapic_vector(unsigned int vector) { }
......
#ifndef _ASM_IRQ_VECTORS_LIMITS_H #ifndef _ASM_IRQ_VECTORS_LIMITS_H
#define _ASM_IRQ_VECTORS_LIMITS_H #define _ASM_IRQ_VECTORS_LIMITS_H
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
#define NR_IRQS FIRST_SYSTEM_VECTOR #define NR_IRQS FIRST_SYSTEM_VECTOR
#define NR_IRQ_VECTORS NR_IRQS #define NR_IRQ_VECTORS NR_IRQS
#else #else
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
static inline int use_pci_vector(void) {return 1;} static inline int use_pci_vector(void) {return 1;}
static inline void disable_edge_ioapic_vector(unsigned int vector) { } static inline void disable_edge_ioapic_vector(unsigned int vector) { }
static inline void mask_and_ack_level_ioapic_vector(unsigned int vector) { } static inline void mask_and_ack_level_ioapic_vector(unsigned int vector) { }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#define FIRST_SYSTEM_VECTOR 0xef /* duplicated in hw_irq.h */ #define FIRST_SYSTEM_VECTOR 0xef /* duplicated in hw_irq.h */
#ifdef CONFIG_PCI_USE_VECTOR #ifdef CONFIG_PCI_MSI
#define NR_IRQS FIRST_SYSTEM_VECTOR #define NR_IRQS FIRST_SYSTEM_VECTOR
#define NR_IRQ_VECTORS NR_IRQS #define NR_IRQ_VECTORS NR_IRQS
#else #else
......
...@@ -836,7 +836,7 @@ struct msix_entry { ...@@ -836,7 +836,7 @@ struct msix_entry {
u16 entry; /* driver uses to specify entry, OS writes */ u16 entry; /* driver uses to specify entry, OS writes */
}; };
#ifndef CONFIG_PCI_USE_VECTOR #ifndef CONFIG_PCI_MSI
static inline void pci_scan_msi_device(struct pci_dev *dev) {} static inline void pci_scan_msi_device(struct pci_dev *dev) {}
static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} static inline int pci_enable_msi(struct pci_dev *dev) {return -1;}
static inline void pci_disable_msi(struct pci_dev *dev) {} static inline void pci_disable_msi(struct pci_dev *dev) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment