mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[SPARC64]: Fix several bugs in MSI handling.
1) sun4{u,v}_build_msi() have improper return value handling.
We should always return negative error codes, instead of
using the magic value "0" which could in fact be a valid
MSI number.
2) sun4{u,v}_build_msi() should return -ENOMEM instead of
calling prom_prom() halt with kzalloc() of the interrupt
data fails.
3) We 'remembered' the MSI number using a singleton in the
struct device archdata area, this doesn't work for MSI-X
which can cause multiple MSIs assosciated with one device.
Delete that archdata member, and instead store the MSI
number in the IRQ chip data area.
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
6e69d6068c
commit
5f92c32936
5 changed files with 33 additions and 16 deletions
|
|
@ -16,8 +16,6 @@ struct dev_archdata {
|
|||
|
||||
struct device_node *prom_node;
|
||||
struct of_device *op;
|
||||
|
||||
unsigned int msi_num;
|
||||
};
|
||||
|
||||
#endif /* _ASM_SPARC64_DEVICE_H */
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@ extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p,
|
|||
extern void sun4v_destroy_msi(unsigned int virt_irq);
|
||||
extern unsigned int sbus_build_irq(void *sbus, unsigned int ino);
|
||||
|
||||
extern void sparc64_set_msi(unsigned int virt_irq, u32 msi);
|
||||
extern u32 sparc64_get_msi(unsigned int virt_irq);
|
||||
|
||||
extern void fixup_irqs(void);
|
||||
|
||||
static __inline__ void set_softint(unsigned long bits)
|
||||
|
|
|
|||
Loading…
Reference in a new issue