[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e8076081-545c-4c20-2d80-b66e9d3c8d9a@free.fr>
Date: Wed, 29 Mar 2017 17:50:52 +0200
From: Mason <slash.tmp@...e.fr>
To: Marc Zyngier <marc.zyngier@....com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Marc Gonzalez <marc_gonzalez@...madesigns.com>,
Bjorn Helgaas <helgaas@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Liviu Dudau <liviu.dudau@....com>,
David Laight <david.laight@...lab.com>,
linux-pci <linux-pci@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Thibaud Cornic <thibaud_cornic@...madesigns.com>,
Phuong Nguyen <phuong_nguyen@...madesigns.com>,
LKML <linux-kernel@...r.kernel.org>,
DT <devicetree@...r.kernel.org>
Subject: Re: [PATCH v3 1/2] PCI: Add tango MSI controller support
On 29/03/2017 15:16, Mason wrote:
> But I don't understand how to get my pcie pointer back in irq_ack
> or irq_unmask, or the relevant msi. Can you throw me a clue?
Let's see... the irq_chip call-backs receive an irq_data pointer.
struct irq_data - per irq chip data passed down to chip functions
struct irq_chip - hardware interrupt chip descriptor
irq_data contains a void *chip_data member.
Can I use chip_data to stash a struct tango_pcie pointer?
/**
* irq_set_chip_data - set irq chip data for an irq
* @irq: Interrupt number
* @data: Pointer to chip specific data
*
* Set the hardware irq chip data for an irq
*/
int irq_set_chip_data(unsigned int irq, void *data)
But where would I call it? And for which irq?
Otherwise, I found by trial-and-error that I can reach pcie through
data->domain->parent->host_data
data->domain == msi_dom
msi_dom->parent == irq_dom
irq_dom->host_data == pcie
But data->irq and data->hwirq don't hold the MSI index :-(
I suppose I have to ask for some mapping?
Regards.
Powered by blists - more mailing lists