search for: irqf_sample_random

Displaying 20 results from an estimated 37 matches for "irqf_sample_random".

2008 May 15
4
Virt RNG?
Has anyone yet written a "hw" RNG module for virt, that reads the host's random number pool? All this talk[1] about IRQF_SAMPLE_RANDOM in network drivers reminds me that virt guest instances should be grabbing random numbers from the host, especially if the host has a hardware RNG. Jeff [1] lkml&netdev thread: "[PATCH] drivers/net: remove network drivers' last few uses of IRQF_SAMPLE_RANDOM"
2008 May 15
4
Virt RNG?
Has anyone yet written a "hw" RNG module for virt, that reads the host's random number pool? All this talk[1] about IRQF_SAMPLE_RANDOM in network drivers reminds me that virt guest instances should be grabbing random numbers from the host, especially if the host has a hardware RNG. Jeff [1] lkml&netdev thread: "[PATCH] drivers/net: remove network drivers' last few uses of IRQF_SAMPLE_RANDOM"
2011 Feb 15
3
[PATCH ]:Staging: hv: Allocate the vmbus irq dynamically
...t; - unsigned int vector; + unsigned int vector, prev_irq = ~0; DPRINT_INFO(VMBUS, "+++++++ HV Driver version = %s +++++++", HV_DRV_VERSION); @@ -518,19 +534,23 @@ static int vmbus_bus_init(void) } /* Get the interrupt resource */ - ret = request_irq(vmbus_irq, vmbus_isr, IRQF_SAMPLE_RANDOM, - driver->name, NULL); - - if (ret != 0) { - DPRINT_ERR(VMBUS_DRV, "ERROR - Unable to request IRQ %d", - vmbus_irq); - +get_irq_again: + vmbus_irq = vmbus_get_irq(); + if ((vmbus_irq < 0) || (prev_irq == vmbus_irq)) { + printk(KERN_WARNING "VMBUS_DRV: Failed to allo...
2011 Feb 15
3
[PATCH ]:Staging: hv: Allocate the vmbus irq dynamically
...t; - unsigned int vector; + unsigned int vector, prev_irq = ~0; DPRINT_INFO(VMBUS, "+++++++ HV Driver version = %s +++++++", HV_DRV_VERSION); @@ -518,19 +534,23 @@ static int vmbus_bus_init(void) } /* Get the interrupt resource */ - ret = request_irq(vmbus_irq, vmbus_isr, IRQF_SAMPLE_RANDOM, - driver->name, NULL); - - if (ret != 0) { - DPRINT_ERR(VMBUS_DRV, "ERROR - Unable to request IRQ %d", - vmbus_irq); - +get_irq_again: + vmbus_irq = vmbus_get_irq(); + if ((vmbus_irq < 0) || (prev_irq == vmbus_irq)) { + printk(KERN_WARNING "VMBUS_DRV: Failed to allo...
2011 Feb 15
4
[PATCH]: Staging: hv: Allocate the vmbus irq dynamically
...igned int vector; + bool irq_assigned = false; DPRINT_INFO(VMBUS, "+++++++ HV Driver version = %s +++++++", HV_DRV_VERSION); @@ -517,20 +536,42 @@ static int vmbus_bus_init(void) goto cleanup; } - /* Get the interrupt resource */ - ret = request_irq(vmbus_irq, vmbus_isr, IRQF_SAMPLE_RANDOM, - driver->name, NULL); - - if (ret != 0) { - DPRINT_ERR(VMBUS_DRV, "ERROR - Unable to request IRQ %d", - vmbus_irq); + /* + * Get an unused interrupt line and register our handler. + * Since there is a window between getting an unused + * interrupt line and registering ou...
2011 Feb 15
4
[PATCH]: Staging: hv: Allocate the vmbus irq dynamically
...igned int vector; + bool irq_assigned = false; DPRINT_INFO(VMBUS, "+++++++ HV Driver version = %s +++++++", HV_DRV_VERSION); @@ -517,20 +536,42 @@ static int vmbus_bus_init(void) goto cleanup; } - /* Get the interrupt resource */ - ret = request_irq(vmbus_irq, vmbus_isr, IRQF_SAMPLE_RANDOM, - driver->name, NULL); - - if (ret != 0) { - DPRINT_ERR(VMBUS_DRV, "ERROR - Unable to request IRQ %d", - vmbus_irq); + /* + * Get an unused interrupt line and register our handler. + * Since there is a window between getting an unused + * interrupt line and registering ou...
2011 Aug 15
9
[PATCH 0/8] Staging: hv: vmbus: Driver cleanup
Further cleanup of the vmbus driver: 1) Cleanup the interrupt handler by inlining some code. 2) Ensure message handling is performed on the same CPU that takes the vmbus interrupt. 3) Check for events before messages (from the host). 4) Disable auto eoi for the vmbus interrupt since Linux will eoi the interrupt anyway. 5) Some general cleanup. Regards, K. Y
2011 Aug 15
9
[PATCH 0/8] Staging: hv: vmbus: Driver cleanup
Further cleanup of the vmbus driver: 1) Cleanup the interrupt handler by inlining some code. 2) Ensure message handling is performed on the same CPU that takes the vmbus interrupt. 3) Check for events before messages (from the host). 4) Disable auto eoi for the vmbus interrupt since Linux will eoi the interrupt anyway. 5) Some general cleanup. Regards, K. Y
2011 Mar 15
16
[PATCH 00/12] Staging: hv: Cleanup vmbus driver - Phase II
This patch-set fixes the following issues in the vmbus driver (vmbus_drv.c): Make vmbus driver a platform pci device and cleanup root device management and irq allocation (patches 1/12 through 3/12): 1) Make vmbus driver a platform pci driver. 2) Cleanup root device management. 3) Leverage the pci model for allocating irq. General cleanup of vmbus driver (patches 4/12 though 12/12): 1)
2011 Mar 15
16
[PATCH 00/12] Staging: hv: Cleanup vmbus driver - Phase II
This patch-set fixes the following issues in the vmbus driver (vmbus_drv.c): Make vmbus driver a platform pci device and cleanup root device management and irq allocation (patches 1/12 through 3/12): 1) Make vmbus driver a platform pci driver. 2) Cleanup root device management. 3) Leverage the pci model for allocating irq. General cleanup of vmbus driver (patches 4/12 though 12/12): 1)
2007 May 09
3
[patch 7/9] lguest: the net driver
...r future). */ + info->me = (desc->features & (info->mapsize-1)); + + err = register_netdev(dev); + if (err) { + pr_debug("lguestnet: registering device failed\n"); + goto free; + } + + if (lguest_devices[lgdev->index].features & LGUEST_DEVICE_F_RANDOMNESS) + irqf |= IRQF_SAMPLE_RANDOM; + if (request_irq(dev->irq, lguestnet_rcv, irqf, "lguestnet", dev) != 0) { + pr_debug("lguestnet: could not get net irq %i\n", dev->irq); + goto unregister; + } + + pr_debug("lguestnet: registered device %s\n", dev->name); + lgdev->private = dev; + retur...
2007 May 09
3
[patch 7/9] lguest: the net driver
...r future). */ + info->me = (desc->features & (info->mapsize-1)); + + err = register_netdev(dev); + if (err) { + pr_debug("lguestnet: registering device failed\n"); + goto free; + } + + if (lguest_devices[lgdev->index].features & LGUEST_DEVICE_F_RANDOMNESS) + irqf |= IRQF_SAMPLE_RANDOM; + if (request_irq(dev->irq, lguestnet_rcv, irqf, "lguestnet", dev) != 0) { + pr_debug("lguestnet: could not get net irq %i\n", dev->irq); + goto unregister; + } + + pr_debug("lguestnet: registered device %s\n", dev->name); + lgdev->private = dev; + retur...
2011 Nov 01
0
Patch "genirq: Add IRQF_RESUME_EARLY and resume such IRQs earlier" has been added to the 3.1-stable tree
...ng suspend * IRQF_FORCE_RESUME - Force enable it on resume even if IRQF_NO_SUSPEND is set * IRQF_NO_THREAD - Interrupt cannot be threaded + * IRQF_EARLY_RESUME - Resume IRQ early during syscore instead of at device + * resume time. */ #define IRQF_DISABLED 0x00000020 #define IRQF_SAMPLE_RANDOM 0x00000040 @@ -72,6 +74,7 @@ #define IRQF_NO_SUSPEND 0x00004000 #define IRQF_FORCE_RESUME 0x00008000 #define IRQF_NO_THREAD 0x00010000 +#define IRQF_EARLY_RESUME 0x00020000 #define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD) --- a/kernel/irq/pm.c +++ b/kernel/irq/pm.c @@...
2011 Jun 06
51
[PATCH 00/49] Staging: hv: Driver cleanup
Further cleanup of the hv drivers: 1) Continue to cleanup our drivers to conform to the Linux Driver Model. 2) Fix some long standing bugs with regards to unloading and reloading the drivers - block, net and stor. 3) VMBUS is an ACPI enumerated device; make VMBUS an ACPI bus driver. 4) Get rid of channel polling code; instead the channel receive paths will be purely interrupt
2011 Jun 06
51
[PATCH 00/49] Staging: hv: Driver cleanup
Further cleanup of the hv drivers: 1) Continue to cleanup our drivers to conform to the Linux Driver Model. 2) Fix some long standing bugs with regards to unloading and reloading the drivers - block, net and stor. 3) VMBUS is an ACPI enumerated device; make VMBUS an ACPI bus driver. 4) Get rid of channel polling code; instead the channel receive paths will be purely interrupt
2008 Jan 18
2
[PATCH 2/3] Make IRQ handlers typesafe.
..._request_irq); +EXPORT_SYMBOL(__devm_request_irq); /** * devm_free_irq - free an interrupt diff -r 0fe1a980708b kernel/irq/manage.c --- a/kernel/irq/manage.c Thu Jan 17 14:48:56 2008 +1100 +++ b/kernel/irq/manage.c Thu Jan 17 15:42:01 2008 +1100 @@ -514,8 +514,8 @@ EXPORT_SYMBOL(free_irq); * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy * */ -int request_irq(unsigned int irq, irq_handler_t handler, - unsigned long irqflags, const char *devname, void *dev_id) +int __request_irq(unsigned int irq, irq_handler_t handler, + unsigned long irqflags, const char *devname, void *dev_id) { str...
2008 Jan 18
2
[PATCH 2/3] Make IRQ handlers typesafe.
..._request_irq); +EXPORT_SYMBOL(__devm_request_irq); /** * devm_free_irq - free an interrupt diff -r 0fe1a980708b kernel/irq/manage.c --- a/kernel/irq/manage.c Thu Jan 17 14:48:56 2008 +1100 +++ b/kernel/irq/manage.c Thu Jan 17 15:42:01 2008 +1100 @@ -514,8 +514,8 @@ EXPORT_SYMBOL(free_irq); * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy * */ -int request_irq(unsigned int irq, irq_handler_t handler, - unsigned long irqflags, const char *devname, void *dev_id) +int __request_irq(unsigned int irq, irq_handler_t handler, + unsigned long irqflags, const char *devname, void *dev_id) { str...
2007 May 09
3
[patch 8/9] lguest: the block driver
..._SECTIONS); + /* Buffers must not cross page boundaries */ + blk_queue_segment_boundary(bd->disk->queue, PAGE_SIZE-1); + + sprintf(bd->disk->disk_name, "lgb%c", next_block_index++); + if (lguest_devices[lgdev->index].features & LGUEST_DEVICE_F_RANDOMNESS) + irqflags |= IRQF_SAMPLE_RANDOM; + err = request_irq(bd->irq, lgb_irq, irqflags, bd->disk->disk_name, bd); + if (err) + goto out_cleanup_queue; + + hcall(LHCALL_BIND_DMA, bd->phys_addr, __pa(&bd->dma), (1<<8)+bd->irq); + + bd->disk->major = bd->major; + bd->disk->first_minor = 0; + bd-&...
2007 May 09
3
[patch 8/9] lguest: the block driver
..._SECTIONS); + /* Buffers must not cross page boundaries */ + blk_queue_segment_boundary(bd->disk->queue, PAGE_SIZE-1); + + sprintf(bd->disk->disk_name, "lgb%c", next_block_index++); + if (lguest_devices[lgdev->index].features & LGUEST_DEVICE_F_RANDOMNESS) + irqflags |= IRQF_SAMPLE_RANDOM; + err = request_irq(bd->irq, lgb_irq, irqflags, bd->disk->disk_name, bd); + if (err) + goto out_cleanup_queue; + + hcall(LHCALL_BIND_DMA, bd->phys_addr, __pa(&bd->dma), (1<<8)+bd->irq); + + bd->disk->major = bd->major; + bd->disk->first_minor = 0; + bd-&...
2011 Aug 27
46
[PATCH 0000/0046] Staging: hv: Driver cleanup
Further cleanup of the hv drivers. 1) Cleanup reference counting. 2) Handle all block devices using the storvsc driver. I have modified the implementation here based on Christoph's feedback on my earlier implementation. 3) Fix bugs. 4) Accomodate some host side scsi emulation bugs. 5) In case of scsi errors off-line the device. This patch-set further reduces the size of