Displaying 20 results from an estimated 34 matches for "msi_msg".
2011 Sep 20
0
[PATCH 4/4] x86: split MSI IRQ chip
...r the (MSI only) non-maskable
ones.
At once the implementation of those methods gets moved from io_apic.c
to msi.c.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -312,7 +312,7 @@ static void __hpet_setup_msi_irq(struct
{
struct msi_msg msg;
- msi_compose_msg(desc->irq, &msg);
+ msi_compose_msg(desc, &msg);
hpet_msi_write(desc->action->dev_id, &msg);
}
--- a/xen/arch/x86/hvm/vmsi.c
+++ b/xen/arch/x86/hvm/vmsi.c
@@ -382,7 +382,7 @@ int msixtbl_pt_register(struct domain *d
return r;...
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...= NULL;
> + if (msi->msix_enabled) {
> + list_for_each_entry(entry, &msi->msi_list, list) {
> + if (irq == entry->irq)
> + break;
> + }
> + } else if (msi->msi_enabled) {
> + entry = irq_get_msi_desc(irq);
> + }
> +
> + if (entry)
> + write_msi_msg(irq, &entry->msg);
> +}
> +
> +void default_restore_msi_irqs(struct msi_irqs *msi)
> +{
> + struct msi_desc *entry;
> +
> + list_for_each_entry(entry, &msi->msi_list, list) {
> + default_restore_msi_irq(msi, entry->irq);
> + }
> +}
> +
> +void _...
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...= NULL;
> + if (msi->msix_enabled) {
> + list_for_each_entry(entry, &msi->msi_list, list) {
> + if (irq == entry->irq)
> + break;
> + }
> + } else if (msi->msi_enabled) {
> + entry = irq_get_msi_desc(irq);
> + }
> +
> + if (entry)
> + write_msi_msg(irq, &entry->msg);
> +}
> +
> +void default_restore_msi_irqs(struct msi_irqs *msi)
> +{
> + struct msi_desc *entry;
> +
> + list_for_each_entry(entry, &msi->msi_list, list) {
> + default_restore_msi_irq(msi, entry->irq);
> + }
> +}
> +
> +void _...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...> +++ b/arch/x86/include/asm/io_apic.h
> @@ -158,7 +158,7 @@ extern int native_setup_ioapic_entry(int, struct
> IO_APIC_route_entry *,
> struct io_apic_irq_attr *);
> extern void eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg);
>
> -extern void native_compose_msi_msg(struct pci_dev *pdev,
> +extern void native_compose_msi_msg(struct msi_irqs *msi,
> unsigned int irq, unsigned int dest,
> struct msi_msg *msg, u8 hpet_id);
> extern void native_eoi_ioapic_pin(int apic, int pin, int vector);
> diff --git a/arch/x86/include/asm/irq_re...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...> +++ b/arch/x86/include/asm/io_apic.h
> @@ -158,7 +158,7 @@ extern int native_setup_ioapic_entry(int, struct
> IO_APIC_route_entry *,
> struct io_apic_irq_attr *);
> extern void eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg);
>
> -extern void native_compose_msi_msg(struct pci_dev *pdev,
> +extern void native_compose_msi_msg(struct msi_irqs *msi,
> unsigned int irq, unsigned int dest,
> struct msi_msg *msg, u8 hpet_id);
> extern void native_eoi_ioapic_pin(int apic, int pin, int vector);
> diff --git a/arch/x86/include/asm/irq_re...
2014 Jul 26
0
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...*msi, int irq)
+{
+ struct msi_desc *entry;
+
+ entry = NULL;
+ if (msi->msix_enabled) {
+ list_for_each_entry(entry, &msi->msi_list, list) {
+ if (irq == entry->irq)
+ break;
+ }
+ } else if (msi->msi_enabled) {
+ entry = irq_get_msi_desc(irq);
+ }
+
+ if (entry)
+ write_msi_msg(irq, &entry->msg);
+}
+
+void default_restore_msi_irqs(struct msi_irqs *msi)
+{
+ struct msi_desc *entry;
+
+ list_for_each_entry(entry, &msi->msi_list, list) {
+ default_restore_msi_irq(msi, entry->irq);
+ }
+}
+
+void __weak arch_restore_msi_irqs(struct msi_irqs *msi)
+{
+ retur...
2014 Jul 26
0
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -158,7 +158,7 @@ extern int native_setup_ioapic_entry(int, struct IO_APIC_route_entry *,
struct io_apic_irq_attr *);
extern void eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg);
-extern void native_compose_msi_msg(struct pci_dev *pdev,
+extern void native_compose_msi_msg(struct msi_irqs *msi,
unsigned int irq, unsigned int dest,
struct msi_msg *msg, u8 hpet_id);
extern void native_eoi_ioapic_pin(int apic, int pin, int vector);
diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/incl...
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...(struct msi_irqs *msi, struct msi_desc *entry);
int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries);
u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag);
u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag);
void (*msi_read_message)(struct msi_desc *desc, struct msi_msg *msg);
void (*msi_write_message)(struct msi_desc *desc, struct msi_msg *msg);
void (*msi_set_intx)(struct msi_irqs *msi, int enable);
};
struct msi_ops provides several hook functions, generic MSI driver will call
the hook functions to access device specific registers. PCI devices will share
the...
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...(struct msi_irqs *msi, struct msi_desc *entry);
int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries);
u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag);
u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag);
void (*msi_read_message)(struct msi_desc *desc, struct msi_msg *msg);
void (*msi_write_message)(struct msi_desc *desc, struct msi_msg *msg);
void (*msi_set_intx)(struct msi_irqs *msi, int enable);
};
struct msi_ops provides several hook functions, generic MSI driver will call
the hook functions to access device specific registers. PCI devices will share
the...
2014 Jul 30
4
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries);
>> u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag);
>> u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag);
>> void (*msi_read_message)(struct msi_desc *desc, struct msi_msg *msg);
>> void (*msi_write_message)(struct msi_desc *desc, struct msi_msg *msg);
>> void (*msi_set_intx)(struct msi_irqs *msi, int enable);
>> };
>> struct msi_ops provides several hook functions, generic MSI driver will call
>> the hook functions to ac...
2014 Jul 30
4
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries);
>> u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag);
>> u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag);
>> void (*msi_read_message)(struct msi_desc *desc, struct msi_msg *msg);
>> void (*msi_write_message)(struct msi_desc *desc, struct msi_msg *msg);
>> void (*msi_set_intx)(struct msi_irqs *msi, int enable);
>> };
>> struct msi_ops provides several hook functions, generic MSI driver will call
>> the hook functions to ac...
2014 Jul 30
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...struct msi_irqs *msi, struct msix_entry *entries);
>>>> u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag);
>>>> u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag);
>>>> void (*msi_read_message)(struct msi_desc *desc, struct msi_msg *msg);
>>>> void (*msi_write_message)(struct msi_desc *desc, struct msi_msg *msg);
>>>> void (*msi_set_intx)(struct msi_irqs *msi, int enable);
>>>> };
>>>> struct msi_ops provides several hook functions, generic MSI driver will call
&...
2014 Jul 30
1
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...tup_entries(struct msi_irqs *msi, struct msix_entry *entries);
>>> u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag);
>>> u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag);
>>> void (*msi_read_message)(struct msi_desc *desc, struct msi_msg *msg);
>>> void (*msi_write_message)(struct msi_desc *desc, struct msi_msg *msg);
>>> void (*msi_set_intx)(struct msi_irqs *msi, int enable);
>>> };
>>> struct msi_ops provides several hook functions, generic MSI driver will call
>>> the...
2014 Jul 30
1
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...tup_entries(struct msi_irqs *msi, struct msix_entry *entries);
>>> u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag);
>>> u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag);
>>> void (*msi_read_message)(struct msi_desc *desc, struct msi_msg *msg);
>>> void (*msi_write_message)(struct msi_desc *desc, struct msi_msg *msg);
>>> void (*msi_set_intx)(struct msi_irqs *msi, int enable);
>>> };
>>> struct msi_ops provides several hook functions, generic MSI driver will call
>>> the...
2014 Jul 26
0
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...p;msi->msi_list, list) {
if (irq == entry->irq)
break;
}
- } else if (pci_dev_msi_enabled(dev, MSI_TYPE)) {
+ } else if (msi->msi_enabled) {
entry = irq_get_msi_desc(irq);
}
@@ -133,20 +135,9 @@ static void default_restore_msi_irq(struct pci_dev *dev, int irq)
write_msi_msg(irq, &entry->msg);
}
-void __weak arch_restore_msi_irqs(struct pci_dev *dev)
+void __weak arch_restore_msi_irqs(struct msi_irqs *msi)
{
- return default_restore_msi_irqs(dev);
-}
-
-static void msi_set_enable(struct pci_dev *dev, int enable)
-{
- u16 control;
-
- pci_read_config_word(dev...
2014 Jul 29
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...> int msix_setup_entries(struct msi_irqs *msi, struct msix_entry *entries);
> u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag);
> u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag);
> void (*msi_read_message)(struct msi_desc *desc, struct msi_msg *msg);
> void (*msi_write_message)(struct msi_desc *desc, struct msi_msg *msg);
> void (*msi_set_intx)(struct msi_irqs *msi, int enable);
> };
> struct msi_ops provides several hook functions, generic MSI driver will call
> the hook functions to access device specific...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...>irq)
> break;
> }
> - } else if (pci_dev_msi_enabled(dev, MSI_TYPE)) {
> + } else if (msi->msi_enabled) {
> entry = irq_get_msi_desc(irq);
> }
>
> @@ -133,20 +135,9 @@ static void default_restore_msi_irq(struct pci_dev *dev,
> int irq)
> write_msi_msg(irq, &entry->msg);
> }
>
> -void __weak arch_restore_msi_irqs(struct pci_dev *dev)
> +void __weak arch_restore_msi_irqs(struct msi_irqs *msi)
> {
> - return default_restore_msi_irqs(dev);
> -}
> -
> -static void msi_set_enable(struct pci_dev *dev, int enable)
&g...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...>irq)
> break;
> }
> - } else if (pci_dev_msi_enabled(dev, MSI_TYPE)) {
> + } else if (msi->msi_enabled) {
> entry = irq_get_msi_desc(irq);
> }
>
> @@ -133,20 +135,9 @@ static void default_restore_msi_irq(struct pci_dev *dev,
> int irq)
> write_msi_msg(irq, &entry->msg);
> }
>
> -void __weak arch_restore_msi_irqs(struct pci_dev *dev)
> +void __weak arch_restore_msi_irqs(struct msi_irqs *msi)
> {
> - return default_restore_msi_irqs(dev);
> -}
> -
> -static void msi_set_enable(struct pci_dev *dev, int enable)
&g...
2014 Jul 04
2
How to check for proper MSI support?
...s: 0000000000000000 Data: 0000
> Because the address and data is invalid, so MSI can not work.
>
> Because you said pci_enable_msi() return 0 which indicates success, so I guess the device
> current power state is not D0, because checking code in __write_msi_msi.
>
> void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
> {
> if (entry->dev->current_state != PCI_D0) {
> /* Don't touch the hardware now */
> } else if (entry->msi_attrib.is_msix) {
> void __iomem *base;
> base = entry->mask_base +
>...
2014 Aug 01
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...'struct device *'
> > as the first argument for convenience and consistency. I don't think you actually
> > need msi_read_message(), and we could avoid msi_write_message() by doing it
> > the other way round.
> >
>
> There only two functions use the read_msi_msg(), because every msi_desc has
> a struct msi_msg, and it caches the msi address and data. I will consider to
> retrieve the msg from cached msi_msg, then we can avoid the msi_read_message().
> But msi_write_message() maybe necessary, some xxx_set_affinity() functions and
> restore funct...