mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
x86/htirq: Use hierarchical irqdomain to manage Hypertransport interrupts
We have slightly changed the architecture interfaces to support htirq PCI driver. It's safe because currently Hypertransport interrupt is only enabled on x86 platforms. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: David Cohen <david.a.cohen@linux.intel.com> Cc: Sander Eikelenboom <linux@eikelenboom.it> Cc: David Vrabel <david.vrabel@citrix.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Dimitri Sivanich <sivanich@sgi.com> Link: http://lkml.kernel.org/r/1428905519-23704-22-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
0921f1da64
commit
49e07d8f28
5 changed files with 161 additions and 91 deletions
|
@ -1,26 +1,38 @@
|
|||
#ifndef LINUX_HTIRQ_H
|
||||
#define LINUX_HTIRQ_H
|
||||
|
||||
struct pci_dev;
|
||||
struct irq_data;
|
||||
|
||||
struct ht_irq_msg {
|
||||
u32 address_lo; /* low 32 bits of the ht irq message */
|
||||
u32 address_hi; /* high 32 bits of the it irq message */
|
||||
};
|
||||
|
||||
typedef void (ht_irq_update_t)(struct pci_dev *dev, int irq,
|
||||
struct ht_irq_msg *msg);
|
||||
|
||||
struct ht_irq_cfg {
|
||||
struct pci_dev *dev;
|
||||
/* Update callback used to cope with buggy hardware */
|
||||
ht_irq_update_t *update;
|
||||
unsigned pos;
|
||||
unsigned idx;
|
||||
struct ht_irq_msg msg;
|
||||
};
|
||||
|
||||
/* Helper functions.. */
|
||||
void fetch_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
|
||||
void write_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
|
||||
struct irq_data;
|
||||
void mask_ht_irq(struct irq_data *data);
|
||||
void unmask_ht_irq(struct irq_data *data);
|
||||
|
||||
/* The arch hook for getting things started */
|
||||
int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev);
|
||||
int arch_alloc_ht_irq(struct pci_dev *dev);
|
||||
void arch_free_ht_irq(int irq);
|
||||
int arch_setup_ht_irq(int idx, int pos, struct pci_dev *dev,
|
||||
ht_irq_update_t *update);
|
||||
void arch_teardown_ht_irq(unsigned int irq);
|
||||
|
||||
/* For drivers of buggy hardware */
|
||||
typedef void (ht_irq_update_t)(struct pci_dev *dev, int irq,
|
||||
struct ht_irq_msg *msg);
|
||||
int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update);
|
||||
|
||||
#endif /* LINUX_HTIRQ_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue