sparc64: Add vio_set_intr() to enable/disable Rx interrupts
PATCH 1/1 sparc64: Add vio_set_intr() to enable/disable Rx interrupts
The vio_set_intr() API should be used by VIO consumers to enable/disable Rx interrupts to facilitate deferred processing in softirq/bottom-half context.
--- arch/sparc/include/asm/vio.h | 2 ++ arch/sparc/kernel/vio.c | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-)
arch/sparc/include/asm/vio.h +2 -0
@@ -279,6 +279,7 @@ struct vio_dev {unsigned int tx_irq;unsigned int rx_irq; +u64 rx_ino;struct device dev; };
@@ -407,5 +408,6 @@ int vio_driver_init(struct vio_driver_state *vio, struct vio_dev *vdev, char *name);void vio_port_up (struct vio_driver_state *vio); +int vio_set_intr (unsigned long dev_ino,int state);#endif /* _SPARC64_VIO_H */
arch/sparc/kernel/vio.c +12 -1
@@ -180,8 +180,10 @@ static void vio_fill_channel_info(struct mdesc_handle *hp, u64 mp, vdev->tx_irq =sun4v_build_virq (cdev_cfg_handle, *irq); irq =mdesc_get_property (hp, target,"rx-ino" ,NULL ); -if (irq) +if (irq) { vdev->rx_irq =sun4v_build_virq (cdev_cfg_handle, *irq); + vdev->rx_ino = *irq; + } chan_id =mdesc_get_property (hp, target,"id" ,NULL );if (chan_id)
@@ -189,6 +191,15 @@ static void vio_fill_channel_info(struct mdesc_handle *hp, u64 mp, } } +int vio_set_intr (unsigned long dev_ino,int state) +{ +int err; + + err =sun4v_vintr_set_valid (cdev_cfg_handle, dev_ino, state); +return err; +} +EXPORT_SYMBOL (vio_set_intr); +static struct vio_dev *vio_create_one (struct mdesc_handle *hp,u64 mp,struct device *parent) {
Signature · 1 line
1.8.4.2
Quoted 5 lines · Sowmini Varadhan
Quoted 4 lines
The
vio_set_intr()API should be used by VIO consumers to enable/disable Rx interrupts to facilitate deferred processing in softirq/bottom-half context.
Hello,
what was the feedback on this patch?
Some context for these new functions: I wanted to add these functions so that they could later be used by other enhancements in sunvnet that would be targetted at netdev. I wasn't sure how inter-dependant changes to separate repos/lists are orchestrated so I figured it would be safer to get these basic functions sorted out first.
--Sowmini
David Miller
maintainerFrom: Sowmini Varadhan <[email protected]>
Date: Sat, 27 Sep 2014 17:19:58 -0400
Quoted 1 line
what was the feedback on this patch?
I'm busy working on Bob Picco's MM changes and have had zero time to look at this series.
Please be patient.
From: Sowmini Varadhan <[email protected]>
Date: Tue, 23 Sep 2014 11:37:44 -0400
Quoted 5 lines
The
vio_set_intr()API should be used by VIO consumers to enable/disable Rx interrupts to facilitate deferred processing in softirq/bottom-half context.Signed-off-by Sowmini Varadhan <[email protected]>
Applied, thanks.
Quoted 8 lines · David Miller
Quoted 6 lines
The
vio_set_intr()API should be used by VIO consumers to enable/disable Rx interrupts to facilitate deferred processing in softirq/bottom-half context.Signed-off-by Sowmini Varadhan <[email protected]>Applied, thanks.
I'm just getting ready to submit some sunvnet changes to net-next that use the above functions. Do I need to resend this patch to net-next at that time (I noticed that the Jumbo-mtu patch did that)?
I do plan to call out the dependancy in the cover-letter for the sunvnet series, of course.
--Sowmini
David Miller
maintainerFrom: Sowmini Varadhan <[email protected]>
Date: Wed, 1 Oct 2014 12:23:54 -0400
Quoted 8 lines · David Miller
Quoted 7 lines
Quoted 6 lines
The
vio_set_intr()API should be used by VIO consumers to enable/disable Rx interrupts to facilitate deferred processing in softirq/bottom-half context.Signed-off-by Sowmini Varadhan <[email protected]>
Quoted 8 lines
Quoted 1 line
Applied, thanks.
I'm just getting ready to submit some sunvnet changes to net-next that use the above functions. Do I need to resend this patch to net-next at that time (I noticed that the Jumbo-mtu patch did that)?
I do plan to call out the dependancy in the cover-letter for the sunvnet series, of course.
Simply ask me to cherry-pick that change from the sparc tree and I'll apply it to net-next before your submission, thanks.