search for: irq_handler_t

Displaying 20 results from an estimated 45 matches for "irq_handler_t".

2008 Jan 18
2
[PATCH 2/3] Make IRQ handlers typesafe.
This patch lets interrupt handler functions have their natural type (ie. exactly match the data pointer type); for transition it allows the old irq_handler_t type as well. To do this it uses a gcc extension, cast-to-union, which allows a type to be cast to any type within the union. When used in a wrapper macro, it's a simple way of allowing one of several types. (Some drivers now need to be cleaned up to compile, previous patch). Signed-off-by:...
2008 Jan 18
2
[PATCH 2/3] Make IRQ handlers typesafe.
This patch lets interrupt handler functions have their natural type (ie. exactly match the data pointer type); for transition it allows the old irq_handler_t type as well. To do this it uses a gcc extension, cast-to-union, which allows a type to be cast to any type within the union. When used in a wrapper macro, it's a simple way of allowing one of several types. (Some drivers now need to be cleaned up to compile, previous patch). Signed-off-by:...
2011 Mar 30
1
[PATCH] xen: events: fix error checks in bind_*_to_irqhandler()
...ned int evtchn, unsigned long irqflags, const char *devname, void *dev_id) { - unsigned int irq; - int retval; + int irq, retval; irq = bind_evtchn_to_irq(evtchn); if (irq < 0) @@ -955,8 +954,7 @@ int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, irq_handler_t handler, unsigned long irqflags, const char *devname, void *dev_id) { - unsigned int irq; - int retval; + int irq, retval; irq = bind_virq_to_irq(virq, cpu); if (irq < 0) -- 1.7.3.4
2011 Mar 30
1
[PATCH] xen: events: fix error checks in bind_*_to_irqhandler()
...ned int evtchn, unsigned long irqflags, const char *devname, void *dev_id) { - unsigned int irq; - int retval; + int irq, retval; irq = bind_evtchn_to_irq(evtchn); if (irq < 0) @@ -955,8 +954,7 @@ int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, irq_handler_t handler, unsigned long irqflags, const char *devname, void *dev_id) { - unsigned int irq; - int retval; + int irq, retval; irq = bind_virq_to_irq(virq, cpu); if (irq < 0) -- 1.7.3.4
2011 Mar 30
1
[PATCH] xen: events: fix error checks in bind_*_to_irqhandler()
...ned int evtchn, unsigned long irqflags, const char *devname, void *dev_id) { - unsigned int irq; - int retval; + int irq, retval; irq = bind_evtchn_to_irq(evtchn); if (irq < 0) @@ -955,8 +954,7 @@ int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, irq_handler_t handler, unsigned long irqflags, const char *devname, void *dev_id) { - unsigned int irq; - int retval; + int irq, retval; irq = bind_virq_to_irq(virq, cpu); if (irq < 0) -- 1.7.3.4
2020 Jul 17
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...drv->unsetup_vq_irq(vdev, qid); Do you need to check the existence of drv before calling unset_vq_irq()? And how can this synchronize with driver releasing and binding? > +} > + > +int vdpa_alloc_vq_irq(struct device *dev, struct vdpa_device *vdev, > + unsigned int irq, irq_handler_t handler, > + unsigned long irqflags, const char *devname, void *dev_id, > + int qid) Let's add comment as what has been done by other exported helpers. > +{ > + int ret; > + > + ret = devm_request_irq(dev, irq, handler, irqflags, devname, dev_id); > + if (...
2020 Jul 13
0
[PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core
...*drv = drv_to_vdpa(vdev->dev.driver); > + > +#ifdef CONFIG_HAVE_KVM_IRQ_BYPASS > + if (drv->unsetup_vq_irq) > + drv->unsetup_vq_irq(vdev, qid); > +#endif > +} > + > +int vdpa_alloc_vq_irq(struct device *dev, struct vdpa_device *vdev, > + unsigned int irq, irq_handler_t handler, > + unsigned long irqflags, const char *devname, void *dev_id, > + int qid) > +{ > + int ret; > + > + ret = devm_request_irq(dev, irq, handler, irqflags, devname, dev_id); > + if (ret) > + dev_err(dev, "Failed to request irq for vq %d\n", qi...
2014 Aug 04
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...to worry about it. We can add additional wrappers like that as needed. > >>> What I'd envision as the API from the device driver perspective is something > >>> as simple like this: > >>> > >>> struct msi_desc *msi_request(struct msi_chip *chip, irq_handler_t handler, > >>> unsigned long flags, const char *name, struct device *dev); > >>> > >>> which would get an msi descriptor that is valid for this device (dev) > >>> connected to a particular msi_chip, and associate a handler function > >>&gt...
2014 Aug 04
2
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...ers. > I don't think we should touch the PCI interfaces at this point. OK, I got it. >>> What I'd envision as the API from the device driver perspective is something >>> as simple like this: >>> >>> struct msi_desc *msi_request(struct msi_chip *chip, irq_handler_t handler, >>> unsigned long flags, const char *name, struct device *dev); >>> >>> which would get an msi descriptor that is valid for this device (dev) >>> connected to a particular msi_chip, and associate a handler function >>> with it. The device dri...
2014 Aug 04
2
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...ers. > I don't think we should touch the PCI interfaces at this point. OK, I got it. >>> What I'd envision as the API from the device driver perspective is something >>> as simple like this: >>> >>> struct msi_desc *msi_request(struct msi_chip *chip, irq_handler_t handler, >>> unsigned long flags, const char *name, struct device *dev); >>> >>> which would get an msi descriptor that is valid for this device (dev) >>> connected to a particular msi_chip, and associate a handler function >>> with it. The device dri...
2020 Jul 23
0
[PATCH V3 3/6] vDPA: implement vq IRQ allocate/free helpers in vDPA core
...ot expected to be changed during DRIVER_OK This can make sure the API works during driver probe, and we don't need the setup_irq and unsetup_irq method in vdpa_driver Thanks > + */ > +int vdpa_devm_request_irq(struct device *dev, struct vdpa_device *vdev, > + unsigned int irq, irq_handler_t handler, > + unsigned long irqflags, const char *devname, void *dev_id, > + int qid) > +{ > + int ret; > + > + ret = devm_request_irq(dev, irq, handler, irqflags, devname, dev_id); > + if (ret) > + dev_err(dev, "Failed to request irq for vq %d\n", qid); &g...
2014 Jul 30
4
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...sary, some xxx_set_affinity() functions and restore functions need the msi_write_message() to rewrite the address and data. > What I'd envision as the API from the device driver perspective is something > as simple like this: > > struct msi_desc *msi_request(struct msi_chip *chip, irq_handler_t handler, > unsigned long flags, const char *name, struct device *dev); > > which would get an msi descriptor that is valid for this device (dev) > connected to a particular msi_chip, and associate a handler function > with it. The device driver can call that function and retrieve...
2014 Jul 30
4
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...sary, some xxx_set_affinity() functions and restore functions need the msi_write_message() to rewrite the address and data. > What I'd envision as the API from the device driver perspective is something > as simple like this: > > struct msi_desc *msi_request(struct msi_chip *chip, irq_handler_t handler, > unsigned long flags, const char *name, struct device *dev); > > which would get an msi descriptor that is valid for this device (dev) > connected to a particular msi_chip, and associate a handler function > with it. The device driver can call that function and retrieve...
2014 Jul 29
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...nd consistency. I don't think you actually need msi_read_message(), and we could avoid msi_write_message() by doing it the other way round. What I'd envision as the API from the device driver perspective is something as simple like this: struct msi_desc *msi_request(struct msi_chip *chip, irq_handler_t handler, unsigned long flags, const char *name, struct device *dev); which would get an msi descriptor that is valid for this device (dev) connected to a particular msi_chip, and associate a handler function with it. The device driver can call that function and retrieve the address/message pair...
2010 Mar 11
1
[PATCH 1/2] xen: balloon: Fix checkpatch issues
drivers/xen/balloon.c:50: WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h> drivers/xen/balloon.c:158: ERROR: else should follow close brace '}' drivers/xen/balloon.c:277: ERROR: do not use assignment in if condition drivers/xen/balloon.c:293: ERROR: code indent should use tabs where possible drivers/xen/balloon.c:364: ERROR: that open brace { should be on the
2010 Mar 11
1
[PATCH 1/2] xen: balloon: Fix checkpatch issues
drivers/xen/balloon.c:50: WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h> drivers/xen/balloon.c:158: ERROR: else should follow close brace '}' drivers/xen/balloon.c:277: ERROR: do not use assignment in if condition drivers/xen/balloon.c:293: ERROR: code indent should use tabs where possible drivers/xen/balloon.c:364: ERROR: that open brace { should be on the
2010 Mar 11
1
[PATCH 1/2] xen: balloon: Fix checkpatch issues
drivers/xen/balloon.c:50: WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h> drivers/xen/balloon.c:158: ERROR: else should follow close brace '}' drivers/xen/balloon.c:277: ERROR: do not use assignment in if condition drivers/xen/balloon.c:293: ERROR: code indent should use tabs where possible drivers/xen/balloon.c:364: ERROR: that open brace { should be on the
2014 Aug 01
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...e. I'd have to think about it more, but I think you are right about the affinity APIs needing this. > > What I'd envision as the API from the device driver perspective is something > > as simple like this: > > > > struct msi_desc *msi_request(struct msi_chip *chip, irq_handler_t handler, > > unsigned long flags, const char *name, struct device *dev); > > > > which would get an msi descriptor that is valid for this device (dev) > > connected to a particular msi_chip, and associate a handler function > > with it. The device driver can call t...
2014 Jul 30
0
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...> restore functions need the msi_write_message() to rewrite the address and data. >> >>> What I'd envision as the API from the device driver perspective is something >>> as simple like this: >>> >>> struct msi_desc *msi_request(struct msi_chip *chip, irq_handler_t handler, >>> unsigned long flags, const char *name, struct device *dev); >>> >>> which would get an msi descriptor that is valid for this device (dev) >>> connected to a particular msi_chip, and associate a handler function >>> with it. The device dri...
2014 Jul 30
1
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
...ty() functions and > restore functions need the msi_write_message() to rewrite the address and data. > >> What I'd envision as the API from the device driver perspective is something >> as simple like this: >> >> struct msi_desc *msi_request(struct msi_chip *chip, irq_handler_t handler, >> unsigned long flags, const char *name, struct device *dev); >> >> which would get an msi descriptor that is valid for this device (dev) >> connected to a particular msi_chip, and associate a handler function >> with it. The device driver can call that fu...