All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jeroen Van den Keybus <jeroen.vandenkeybus@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Handling PCI MSI interrupts
Date: Fri, 17 Feb 2006 17:07:42 +0100	[thread overview]
Message-ID: <43F5F4CE.2000501@domain.hid> (raw)
In-Reply-To: <fd6a47a90602170757q15fed14x@domain.hid>

Jeroen Van den Keybus wrote:
>     Could you post the patch you are successfully using to boot your
>     box? TIA,
> 
> 
> 
> --- linux-2.6.15/drivers/pci/msi.c      2006-01-03 04:21:10.000000000 +0100
> +++ linux-2.6.15-ipipe/drivers/pci/msi.c        2006-02-17 
> 16:48:21.000000000 +0100
> @@ -185,10 +185,20 @@
>         spin_unlock_irqrestore(&msi_lock, flags);
>  }
> 
> +#if defined(CONFIG_IPIPE)
> +/* Attention: only MSI without maskbits is currently fixed for I-PIPE */
> +static void ack_msi_irq_wo_maskbit(unsigned int vector)
> +{
> +       __ack_APIC_irq();
> +}
> +#endif /* CONFIG_IPIPE */
> +
>  static void end_msi_irq_wo_maskbit(unsigned int vector)
>  {
>         move_native_irq(vector);
> +#if !defined(CONFIG_IPIPE)
>         ack_APIC_irq();
> +#endif /* !CONFIG_IPIPE */

ack_APIC_irq() is nullified when CONFIG_IPIPE is enabled, and __ack_APIC_irq() 
stands for the actual APIC acknowledging code. So the change above is not needed.

>  }
> 
>  static void end_msi_irq_w_maskbit(unsigned int vector)
> @@ -244,7 +254,11 @@
>         .shutdown       = shutdown_msi_irq,
>         .enable         = do_nothing,
>         .disable        = do_nothing,
> +#if defined(CONFIG_IPIPE)
> +       .ack            = ack_msi_irq_wo_maskbit,
> +#else /* CONFIG_IPIPE */
>         .ack            = do_nothing,
> +#endif /* !CONFIG_IPIPE */
>         .end            = end_msi_irq_wo_maskbit,
>         .set_affinity   = set_msi_irq_affinity
>  };
> 

Ok; unless my brain is completely toast, the last patch I recently posted does the 
same, but extends the support to the "MSI and MSI-X with masking bit" cases. Could 
you test in on your box with a vanilla 2.6.15 when time allows? If it works, then 
I will roll out a new Adeos/x86 patch including this fix. TIA,

--- 2.6.15/drivers/pci/msi.c    2006-01-03 04:21:10.000000000 +0100
+++ 2.6.15-ipipe/drivers/pci/msi.c    2006-02-16 10:30:27.000000000 +0100
@@ -149,6 +149,21 @@
      msi_set_mask_bit(vector, 0);
  }

+#ifdef CONFIG_IPIPE
+static void ack_MSI_irq_w_maskbits(unsigned int vector)
+{
+    mask_MSI_irq(vector);
+    __ack_APIC_irq();
+}
+static void ack_MSI_irq_wo_maskbits(unsigned int vector)
+{
+    __ack_APIC_irq();
+}
+#else /* !CONFIG_IPIPE */
+#define ack_MSI_irq_wo_maskbits  do_nothing
+#define ack_MSI_irq_w_maskbits   mask_MSI_irq
+#endif /* CONFIG_IPIPE */
+
  static unsigned int startup_msi_irq_wo_maskbit(unsigned int vector)
  {
      struct msi_desc *entry;
@@ -212,7 +227,7 @@
      .shutdown    = shutdown_msi_irq,
      .enable        = unmask_MSI_irq,
      .disable    = mask_MSI_irq,
-    .ack        = mask_MSI_irq,
+    .ack        = ack_MSI_irq_w_maskbits,
      .end        = end_msi_irq_w_maskbit,
      .set_affinity    = set_msi_irq_affinity
  };
@@ -228,7 +243,7 @@
      .shutdown    = shutdown_msi_irq,
      .enable        = unmask_MSI_irq,
      .disable    = mask_MSI_irq,
-    .ack        = mask_MSI_irq,
+    .ack        = ack_MSI_irq_w_maskbits,
      .end        = end_msi_irq_w_maskbit,
      .set_affinity    = set_msi_irq_affinity
  };
@@ -244,7 +259,7 @@
      .shutdown    = shutdown_msi_irq,
      .enable        = do_nothing,
      .disable    = do_nothing,
-    .ack        = do_nothing,
+    .ack        = ack_MSI_irq_wo_maskbits,
      .end        = end_msi_irq_wo_maskbit,
      .set_affinity    = set_msi_irq_affinity
  };
-- 

Philippe.


  reply	other threads:[~2006-02-17 16:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-14 15:44 [Xenomai-core] Handling PCI MSI interrupts Jeroen Van den Keybus
2006-02-14 17:50 ` Philippe Gerum
2006-02-14 18:07   ` Jeroen Van den Keybus
2006-02-14 18:17     ` Jan Kiszka
2006-02-14 18:26       ` Philippe Gerum
2006-02-14 18:52         ` Jeroen Van den Keybus
2006-02-14 19:22           ` Jeroen Van den Keybus
2006-02-14 19:33           ` Jeroen Van den Keybus
2006-02-14 21:41             ` Jeroen Van den Keybus
2006-02-14 21:56               ` Philippe Gerum
2006-02-15 11:00                 ` Jeroen Van den Keybus
2006-02-15 18:02                   ` Jeroen Van den Keybus
2006-02-15 18:34                     ` Jeroen Van den Keybus
2006-02-15 20:09                       ` Philippe Gerum
2006-02-15 20:50                         ` Jeroen Van den Keybus
2006-02-15 22:48                           ` Philippe Gerum
2006-02-15 22:58                           ` Jeroen Van den Keybus
2006-02-15 23:09                         ` Russell Johnson
2006-02-16  9:36                           ` Philippe Gerum
2006-02-16 14:23                             ` Russell Johnson
2006-02-17 12:54                               ` Jeroen Van den Keybus
2006-02-17 13:08                                 ` Philippe Gerum
2006-02-17 14:43                                   ` Russell Johnson
2006-02-17 15:45                                     ` Philippe Gerum
2006-02-17 15:57                                   ` Jeroen Van den Keybus
2006-02-17 16:07                                     ` Philippe Gerum [this message]
2006-02-17 16:49                                       ` Jeroen Van den Keybus
2006-02-17 18:37                                         ` Jeroen Van den Keybus
2006-02-17 18:39                                           ` Philippe Gerum
2006-02-19 18:50                                             ` Philippe Gerum
2006-02-14 18:23     ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43F5F4CE.2000501@domain.hid \
    --to=rpm@xenomai.org \
    --cc=jeroen.vandenkeybus@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.