Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-23 Thread Greg KH
On Mon, Feb 21, 2011 at 03:51:56PM +0100, Thomas Gleixner wrote: On Mon, 21 Feb 2011, KY Srinivasan wrote: There are various ways to solve that proper. - You can provide the interrupt number from ACPI/PCI or whatever your HV provides as enumeration. - Use

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread KY Srinivasan
: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically On Mon, 21 Feb 2011, KY Srinivasan wrote: Like most virtualization platforms, Hyper-V also emulates the full PC platform. So, it is possible that the driver of some other emulated devices might register for the IRQ line we

Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread Greg KH
On Mon, Feb 21, 2011 at 03:51:56PM +0100, Thomas Gleixner wrote: On Mon, 21 Feb 2011, KY Srinivasan wrote: There are various ways to solve that proper. - You can provide the interrupt number from ACPI/PCI or whatever your HV provides as enumeration. - Use

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread Thomas Gleixner
On Mon, 21 Feb 2011, KY Srinivasan wrote: Like most virtualization platforms, Hyper-V also emulates the full PC platform. So, it is possible that the driver of some other emulated devices might register for the IRQ line we might have selected. That is the race this code addresses. For

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread Thomas Gleixner
On Sat, 19 Feb 2011, KY Srinivasan wrote: When grabbing some random irq from the PIC is not an issue, then what's the point of this probing, retry loop and the comments about racing ? What races here? That does not make sense at all. Like most virtualization platforms, Hyper-V also

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread Thomas Gleixner
On Sat, 19 Feb 2011, KY Srinivasan wrote: From: Thomas Gleixner [mailto:t...@linutronix.de] Please do not use probe_irq_on for dynamic irq allocation. Highjacking the lower PIC irqs is really not a good idea. Depending on when this runs, you might grab an irq required by a driver which

Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread Thomas Gleixner
On Tue, 15 Feb 2011, K. Y. Srinivasan wrote: -/* FIXME! We need to do this dynamically for PIC and APIC system */ -#define VMBUS_IRQ0x5 -#define VMBUS_IRQ_VECTOR IRQ5_VECTOR +static int vmbus_irq; /* Main vmbus driver data structure */ struct vmbus_driver_context { @@

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-21 Thread Thomas Gleixner
On Mon, 21 Feb 2011, KY Srinivasan wrote: There are various ways to solve that proper. - You can provide the interrupt number from ACPI/PCI or whatever your HV provides as enumeration. - Use a fixed vector like XEN does for the event channel - Use dynamic

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-20 Thread KY Srinivasan
: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically On Sat, 19 Feb 2011, KY Srinivasan wrote: When grabbing some random irq from the PIC is not an issue, then what's the point of this probing, retry loop and the comments about racing ? What races here? That does not make sense

Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-20 Thread Greg KH
On Mon, Feb 21, 2011 at 03:43:58AM +, KY Srinivasan wrote: I am not claiming that what I have done here is the best possible solution. However, I will submit to you that it is better than what we had here prior to this patch. I will address this and a whole lot of other issues in future

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-19 Thread KY Srinivasan
: Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically On Tue, 15 Feb 2011, K. Y. Srinivasan wrote: -/* FIXME! We need to do this dynamically for PIC and APIC system */ -#define VMBUS_IRQ 0x5 -#define VMBUS_IRQ_VECTOR IRQ5_VECTOR +static int vmbus_irq; /* Main vmbus

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-19 Thread KY Srinivasan
: RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically On Sat, 19 Feb 2011, KY Srinivasan wrote: From: Thomas Gleixner [mailto:t...@linutronix.de] Please do not use probe_irq_on for dynamic irq allocation. Highjacking the lower PIC irqs is really not a good idea. Depending on when

Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-18 Thread Greg KH
...@lists.osdl.org Subject: Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically On Tue, Feb 15, 2011 at 11:55:35AM -0800, K. Y. Srinivasan wrote: Signed-off-by: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Haiyang Zhang haiya...@microsoft.com Signed-off-by: Hank Janssen

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-18 Thread KY Srinivasan
; virtualizat...@lists.osdl.org Subject: Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically On Tue, Feb 15, 2011 at 11:55:35AM -0800, K. Y. Srinivasan wrote: Signed-off-by: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Haiyang Zhang haiya...@microsoft.com Signed

Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-18 Thread Greg KH
...@lists.osdl.org Subject: Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically On Fri, Feb 18, 2011 at 10:00:04PM +, KY Srinivasan wrote: -Original Message- From: Greg KH [mailto:g...@kroah.com] Sent: Friday, February 18, 2011 4:14 PM To: KY Srinivasan Cc

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-18 Thread KY Srinivasan
; virtualizat...@lists.osdl.org Subject: Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically On Fri, Feb 18, 2011 at 10:00:04PM +, KY Srinivasan wrote: -Original Message- From: Greg KH [mailto:g...@kroah.com] Sent: Friday, February 18, 2011 4:14 PM

Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-18 Thread Greg KH
...@lists.osdl.org Subject: Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically On Fri, Feb 18, 2011 at 10:16:05PM +, KY Srinivasan wrote: -Original Message- From: Greg KH [mailto:gre...@suse.de] Sent: Friday, February 18, 2011 5:07 PM To: KY Srinivasan Cc

RE: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically

2011-02-18 Thread KY Srinivasan
; virtualizat...@lists.osdl.org Subject: Re: [PATCH]: Staging: hv: Allocate the vmbus irq dynamically On Fri, Feb 18, 2011 at 10:16:05PM +, KY Srinivasan wrote: -Original Message- From: Greg KH [mailto:gre...@suse.de] Sent: Friday, February 18, 2011 5:07 PM

Re: [PATCH ]:Staging: hv: Allocate the vmbus irq dynamically

2011-02-16 Thread Greg KH
On Tue, Feb 15, 2011 at 07:15:37AM -0800, K. Y. Srinivasan wrote: Signed-off-by: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Haiyang Zhang haiya...@microsoft.com Signed-off-by: Hank Janssen hjans...@microsoft.com --- drivers/staging/hv/vmbus_drv.c | 49

RE: [PATCH ]:Staging: hv: Allocate the vmbus irq dynamically

2011-02-16 Thread KY Srinivasan
-Original Message- From: Greg KH [mailto:gre...@suse.de] Sent: Tuesday, February 15, 2011 11:00 AM To: KY Srinivasan Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; virtualizat...@lists.osdl.org; Haiyang Zhang; Hank Janssen Subject: Re: [PATCH ]:Staging: hv

RE: [PATCH ]:Staging: hv: Allocate the vmbus irq dynamically

2011-02-16 Thread Hank Janssen
; virtualizat...@lists.osdl.org; Haiyang Zhang; Hank Janssen Subject: Re: [PATCH ]:Staging: hv: Allocate the vmbus irq dynamically And why are you still printing this out for the whole world to see? Greg, this patch addressed a specific comment with regards dynamically allocate the irq. Hank

Re: [PATCH ]:Staging: hv: Allocate the vmbus irq dynamically

2011-02-16 Thread Greg KH
On Tue, Feb 15, 2011 at 04:53:41PM +, KY Srinivasan wrote: @@ -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 !=

Re: [PATCH ]:Staging: hv: Allocate the vmbus irq dynamically

2011-02-16 Thread Greg KH
Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; virtualizat...@lists.osdl.org; Haiyang Zhang; Hank Janssen Subject: Re: [PATCH ]:Staging: hv: Allocate the vmbus irq dynamically And why are you still printing this out for the whole world to see? Greg, this patch

RE: [PATCH ]:Staging: hv: Allocate the vmbus irq dynamically

2011-02-16 Thread Hank Janssen
-Original Message- From: Greg KH [mailto:gre...@suse.de] Sent: Tuesday, February 15, 2011 9:23 AM Before the end of the week I will submit two patches for this; Remove DPRINT and change it to printk No, use dev_dbg() and friends instead of raw printk() calls. Will do,

RE: [PATCH ]:Staging: hv: Allocate the vmbus irq dynamically

2011-02-16 Thread Hank Janssen
-Original Message- From: Greg KH [mailto:gre...@suse.de] Sent: Tuesday, February 15, 2011 9:23 AM Before the end of the week I will submit two patches for this; Remove DPRINT and change it to printk No, use dev_dbg() and friends instead of raw printk() calls.