mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin Tůma" <tumic@gpxsee.org>
To: Lizhi Hou <lizhi.hou@amd.com>,
	vkoul@kernel.org, dmaengine@vger.kernel.org,
	linux-kernel@vger.kernel.org, trix@redhat.com
Cc: max.zhen@amd.com, sonal.santan@amd.com, larry.liu@amd.com,
	brian.xu@amd.com
Subject: Re: [PATCH V4 XDMA 2/2] dmaengine: xilinx: xdma: Add user logic interrupt support
Date: Tue, 27 Sep 2022 18:46:09 +0200	[thread overview]
Message-ID: <c0430eb7-d607-acfd-201a-db56db982309@gpxsee.org> (raw)
In-Reply-To: <64388266-1707-ee20-c3ab-edb67ada68dc@amd.com>

On 27. 09. 22 18:28, Lizhi Hou wrote:

> Okay, I got the point. How about changing request/remove APIs to 
> enable/disable APIs as below
> 
>       xdma_enable_user_irq(struct platform_device *pdev, u32 
> user_irq_index, u32 *irq)
> 
>              user_irq_index: user logic interrupt wire index. (XDMA 
> driver determines how system IRQs are mapped to DMA channels and user 
> logic wires)
> 
>              irq: IRQ number returned for registering interrupt handler 
> (request_irq()) or passing to existing platform driver.
> 
>      xdma_disable_user_irq(struct platform_device *pdev, u32 
> user_irq_index)
> 
> Does this make sense to you?
> 

I think even the "irq" parameter in the enable function is surplus as 
the parent driver (the driver of the actual PCIe card) knows* what PCI 
irq he has to allocate without XDMA providing the number.

xdma_enable_user_irq(struct platform_device *pdev, u32 user_irq_index);
xdma_disable_user_irq(struct platform_device *pdev, u32 user_irq_index);

should be all that is needed.

M.

* something like:
pci_irq_vector((pdev), PCI_BAR_ID) + NUM_C2H_CHANNELS + NUM_H2C_CHANNELS
can be used from the PCIe driver

  reply	other threads:[~2022-09-27 16:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 18:38 [PATCH V4 XDMA 0/2] xilinx XDMA driver Lizhi Hou
2022-09-22 18:38 ` [PATCH V4 XDMA 1/2] dmaengine: xilinx: xdma: Add xilinx xdma driver Lizhi Hou
2022-09-22 18:38 ` [PATCH V4 XDMA 2/2] dmaengine: xilinx: xdma: Add user logic interrupt support Lizhi Hou
2022-09-27 15:31   ` Martin Tůma
2022-09-27 16:28     ` Lizhi Hou
2022-09-27 16:46       ` Martin Tůma [this message]
2022-09-27 17:18         ` Lizhi Hou
2022-09-27 17:54           ` Martin Tůma
2022-09-27 18:14             ` Lizhi Hou

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=c0430eb7-d607-acfd-201a-db56db982309@gpxsee.org \
    --to=tumic@gpxsee.org \
    --cc=brian.xu@amd.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=larry.liu@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.hou@amd.com \
    --cc=max.zhen@amd.com \
    --cc=sonal.santan@amd.com \
    --cc=trix@redhat.com \
    --cc=vkoul@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®