Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-08 Thread Sinan Kaya
Hi Bjorn, On 3/8/2016 2:04 PM, Sinan Kaya wrote: >>> The point here is that a PCI Interrupt Link can only use an IRQ that >>> >> is level-triggered, active low. If an IRQ is already set to any other >>> >> state, whether for an ISA device or for an active-high SCI, we can't >>> >> use it for a

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-08 Thread Sinan Kaya
Hi Bjorn, On 3/8/2016 2:04 PM, Sinan Kaya wrote: >>> The point here is that a PCI Interrupt Link can only use an IRQ that >>> >> is level-triggered, active low. If an IRQ is already set to any other >>> >> state, whether for an ISA device or for an active-high SCI, we can't >>> >> use it for a

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-08 Thread Rafael J. Wysocki
On Tue, Mar 8, 2016 at 8:04 PM, Sinan Kaya wrote: > > I think there are two issues here that should be teased apart a bit > more: > > 1) Trigger settings: If the IRQ is configured as anything other than > level-triggered, active-low, we can't use it

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-08 Thread Rafael J. Wysocki
On Tue, Mar 8, 2016 at 8:04 PM, Sinan Kaya wrote: > > I think there are two issues here that should be teased apart a bit > more: > > 1) Trigger settings: If the IRQ is configured as anything other than > level-triggered, active-low, we can't use it at all for a PCI >

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-08 Thread Sinan Kaya
I think there are two issues here that should be teased apart a bit more: 1) Trigger settings: If the IRQ is configured as anything other than level-triggered, active-low, we can't use it at all for a PCI interrupt, and we should return an "infinite" penalty.

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-08 Thread Sinan Kaya
I think there are two issues here that should be teased apart a bit more: 1) Trigger settings: If the IRQ is configured as anything other than level-triggered, active-low, we can't use it at all for a PCI interrupt, and we should return an "infinite" penalty.

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-08 Thread Bjorn Helgaas
On Tue, Mar 08, 2016 at 09:22:13AM +0100, Thomas Gleixner wrote: > On Mon, 7 Mar 2016, Bjorn Helgaas wrote: > > On Mon, Mar 07, 2016 at 11:55:43AM -0500, Sinan Kaya wrote: > > > It makes sense for SCI as it is Intel specific. > > > > > > Unfortunately, this cannot be done in an arch independent

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-08 Thread Bjorn Helgaas
On Tue, Mar 08, 2016 at 09:22:13AM +0100, Thomas Gleixner wrote: > On Mon, 7 Mar 2016, Bjorn Helgaas wrote: > > On Mon, Mar 07, 2016 at 11:55:43AM -0500, Sinan Kaya wrote: > > > It makes sense for SCI as it is Intel specific. > > > > > > Unfortunately, this cannot be done in an arch independent

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-08 Thread Thomas Gleixner
On Mon, 7 Mar 2016, Bjorn Helgaas wrote: > On Mon, Mar 07, 2016 at 11:55:43AM -0500, Sinan Kaya wrote: > > It makes sense for SCI as it is Intel specific. > > > > Unfortunately, this cannot be done in an arch independent way. Of course, > > ARM had to implement its own thing. While

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-08 Thread Thomas Gleixner
On Mon, 7 Mar 2016, Bjorn Helgaas wrote: > On Mon, Mar 07, 2016 at 11:55:43AM -0500, Sinan Kaya wrote: > > It makes sense for SCI as it is Intel specific. > > > > Unfortunately, this cannot be done in an arch independent way. Of course, > > ARM had to implement its own thing. While

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-07 Thread Bjorn Helgaas
[+cc Thomas for real, sorry] On Mon, Mar 07, 2016 at 06:25:58PM -0600, Bjorn Helgaas wrote: > [+cc Thomas, irq_get_trigger_type() question below] > > On Mon, Mar 07, 2016 at 11:55:43AM -0500, Sinan Kaya wrote: > > On 3/4/2016 1:09 PM, Bjorn Helgaas wrote: > > > On Thu, Mar 03, 2016 at 12:29:01PM

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-07 Thread Bjorn Helgaas
[+cc Thomas for real, sorry] On Mon, Mar 07, 2016 at 06:25:58PM -0600, Bjorn Helgaas wrote: > [+cc Thomas, irq_get_trigger_type() question below] > > On Mon, Mar 07, 2016 at 11:55:43AM -0500, Sinan Kaya wrote: > > On 3/4/2016 1:09 PM, Bjorn Helgaas wrote: > > > On Thu, Mar 03, 2016 at 12:29:01PM

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-07 Thread Bjorn Helgaas
[+cc Thomas, irq_get_trigger_type() question below] On Mon, Mar 07, 2016 at 11:55:43AM -0500, Sinan Kaya wrote: > On 3/4/2016 1:09 PM, Bjorn Helgaas wrote: > > On Thu, Mar 03, 2016 at 12:29:01PM -0500, Sinan Kaya wrote: > >> On 3/3/2016 10:12 AM, Sinan Kaya wrote: > >>> On 3/3/2016 10:10 AM,

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-07 Thread Bjorn Helgaas
[+cc Thomas, irq_get_trigger_type() question below] On Mon, Mar 07, 2016 at 11:55:43AM -0500, Sinan Kaya wrote: > On 3/4/2016 1:09 PM, Bjorn Helgaas wrote: > > On Thu, Mar 03, 2016 at 12:29:01PM -0500, Sinan Kaya wrote: > >> On 3/3/2016 10:12 AM, Sinan Kaya wrote: > >>> On 3/3/2016 10:10 AM,

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-07 Thread Sinan Kaya
On 3/4/2016 1:09 PM, Bjorn Helgaas wrote: > On Thu, Mar 03, 2016 at 12:29:01PM -0500, Sinan Kaya wrote: >> On 3/3/2016 10:12 AM, Sinan Kaya wrote: >>> On 3/3/2016 10:10 AM, Bjorn Helgaas wrote: That was my idea, but your minimal patch from last night looks awfully attractive, and maybe

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-07 Thread Sinan Kaya
On 3/4/2016 1:09 PM, Bjorn Helgaas wrote: > On Thu, Mar 03, 2016 at 12:29:01PM -0500, Sinan Kaya wrote: >> On 3/3/2016 10:12 AM, Sinan Kaya wrote: >>> On 3/3/2016 10:10 AM, Bjorn Helgaas wrote: That was my idea, but your minimal patch from last night looks awfully attractive, and maybe

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-04 Thread Bjorn Helgaas
On Thu, Mar 03, 2016 at 12:29:01PM -0500, Sinan Kaya wrote: > On 3/3/2016 10:12 AM, Sinan Kaya wrote: > > On 3/3/2016 10:10 AM, Bjorn Helgaas wrote: > >> That was my idea, but your minimal patch from last night looks awfully > >> attractive, and maybe it's not worth moving it to arch/x86. I do

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-04 Thread Bjorn Helgaas
On Thu, Mar 03, 2016 at 12:29:01PM -0500, Sinan Kaya wrote: > On 3/3/2016 10:12 AM, Sinan Kaya wrote: > > On 3/3/2016 10:10 AM, Bjorn Helgaas wrote: > >> That was my idea, but your minimal patch from last night looks awfully > >> attractive, and maybe it's not worth moving it to arch/x86. I do

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-03 Thread Sinan Kaya
On 3/3/2016 10:12 AM, Sinan Kaya wrote: > On 3/3/2016 10:10 AM, Bjorn Helgaas wrote: >> That was my idea, but your minimal patch from last night looks awfully >> attractive, and maybe it's not worth moving it to arch/x86. I do think we >> could simplify the code significantly by getting rid of

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-03 Thread Sinan Kaya
On 3/3/2016 10:12 AM, Sinan Kaya wrote: > On 3/3/2016 10:10 AM, Bjorn Helgaas wrote: >> That was my idea, but your minimal patch from last night looks awfully >> attractive, and maybe it's not worth moving it to arch/x86. I do think we >> could simplify the code significantly by getting rid of

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-03 Thread Sinan Kaya
On 3/3/2016 10:10 AM, Bjorn Helgaas wrote: > That was my idea, but your minimal patch from last night looks awfully > attractive, and maybe it's not worth moving it to arch/x86. I do think we > could simplify the code significantly by getting rid of the kzalloc and > acpi_irq_penalty_list from

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-03 Thread Sinan Kaya
On 3/3/2016 10:10 AM, Bjorn Helgaas wrote: > That was my idea, but your minimal patch from last night looks awfully > attractive, and maybe it's not worth moving it to arch/x86. I do think we > could simplify the code significantly by getting rid of the kzalloc and > acpi_irq_penalty_list from

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-03 Thread Bjorn Helgaas
On Thu, Mar 03, 2016 at 09:48:09AM -0500, Sinan Kaya wrote: > Taking another stab at it. > > On 3/2/2016 10:14 PM, Sinan Kaya wrote: > > Taking a step back here and also some inspiration from your code, why don't > > we > > fix the actual problem instead of redesigning the whole thing? > > I

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-03 Thread Bjorn Helgaas
On Thu, Mar 03, 2016 at 09:48:09AM -0500, Sinan Kaya wrote: > Taking another stab at it. > > On 3/2/2016 10:14 PM, Sinan Kaya wrote: > > Taking a step back here and also some inspiration from your code, why don't > > we > > fix the actual problem instead of redesigning the whole thing? > > I

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-03 Thread Sinan Kaya
Taking another stab at it. On 3/2/2016 10:14 PM, Sinan Kaya wrote: > Taking a step back here and also some inspiration from your code, why don't we > fix the actual problem instead of redesigning the whole thing? I read your email multiple times. I think you want to move the x86 specific pieces

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-03 Thread Sinan Kaya
Taking another stab at it. On 3/2/2016 10:14 PM, Sinan Kaya wrote: > Taking a step back here and also some inspiration from your code, why don't we > fix the actual problem instead of redesigning the whole thing? I read your email multiple times. I think you want to move the x86 specific pieces

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-02 Thread Sinan Kaya
On 3/2/2016 1:31 PM, Sinan Kaya wrote: > I don't think there's a restriction on what the SCI IRQ can be. But >> there is only one SCI IRQ, so all we have to do is keep track of what >> it is, which only requires one word. Taking a step back here and also some inspiration from your code, why

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-02 Thread Sinan Kaya
On 3/2/2016 1:31 PM, Sinan Kaya wrote: > I don't think there's a restriction on what the SCI IRQ can be. But >> there is only one SCI IRQ, so all we have to do is keep track of what >> it is, which only requires one word. Taking a step back here and also some inspiration from your code, why

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-02 Thread Sinan Kaya
On 3/1/2016 2:43 PM, Bjorn Helgaas wrote: > On Tue, Mar 01, 2016 at 01:49:34PM -0500, Sinan Kaya wrote: >>> There's so much code there, that I think all the code obscures the >>> fact that there's almost nothing really happening. In broad outline, >>> I think we care about: >>> >>> - the legacy

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-02 Thread Sinan Kaya
On 3/1/2016 2:43 PM, Bjorn Helgaas wrote: > On Tue, Mar 01, 2016 at 01:49:34PM -0500, Sinan Kaya wrote: >>> There's so much code there, that I think all the code obscures the >>> fact that there's almost nothing really happening. In broad outline, >>> I think we care about: >>> >>> - the legacy

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-01 Thread Bjorn Helgaas
On Tue, Mar 01, 2016 at 01:49:34PM -0500, Sinan Kaya wrote: > > There's so much code there, that I think all the code obscures the > > fact that there's almost nothing really happening. In broad outline, > > I think we care about: > > > > - the legacy ISA IRQs, i.e., the contents of

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-01 Thread Bjorn Helgaas
On Tue, Mar 01, 2016 at 01:49:34PM -0500, Sinan Kaya wrote: > > There's so much code there, that I think all the code obscures the > > fact that there's almost nothing really happening. In broad outline, > > I think we care about: > > > > - the legacy ISA IRQs, i.e., the contents of

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-01 Thread Sinan Kaya
> There's so much code there, that I think all the code obscures the > fact that there's almost nothing really happening. In broad outline, > I think we care about: > > - the legacy ISA IRQs, i.e., the contents of acpi_irq_isa_penalty[] > - acpi_irq_isa= from command line > - acpi_irq_pci=

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-03-01 Thread Sinan Kaya
> There's so much code there, that I think all the code obscures the > fact that there's almost nothing really happening. In broad outline, > I think we care about: > > - the legacy ISA IRQs, i.e., the contents of acpi_irq_isa_penalty[] > - acpi_irq_isa= from command line > - acpi_irq_pci=

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-29 Thread Bjorn Helgaas
On Mon, Feb 29, 2016 at 03:08:26PM -0500, Sinan Kaya wrote: > Hi Bjorn, > > On 2/29/2016 2:24 PM, Bjorn Helgaas wrote: > > On Thu, Feb 18, 2016 at 08:19:41AM -0500, Sinan Kaya wrote: > >> A crash has been observed when assigning penalty on x86 systems. > >> > >> It looks like this problem happens

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-29 Thread Bjorn Helgaas
On Mon, Feb 29, 2016 at 03:08:26PM -0500, Sinan Kaya wrote: > Hi Bjorn, > > On 2/29/2016 2:24 PM, Bjorn Helgaas wrote: > > On Thu, Feb 18, 2016 at 08:19:41AM -0500, Sinan Kaya wrote: > >> A crash has been observed when assigning penalty on x86 systems. > >> > >> It looks like this problem happens

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-29 Thread Sinan Kaya
Hi Bjorn, On 2/29/2016 2:24 PM, Bjorn Helgaas wrote: > On Thu, Feb 18, 2016 at 08:19:41AM -0500, Sinan Kaya wrote: >> A crash has been observed when assigning penalty on x86 systems. >> >> It looks like this problem happens on x86 platforms with IOAPIC and an SCI >> interrupt override in the ACPI

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-29 Thread Sinan Kaya
Hi Bjorn, On 2/29/2016 2:24 PM, Bjorn Helgaas wrote: > On Thu, Feb 18, 2016 at 08:19:41AM -0500, Sinan Kaya wrote: >> A crash has been observed when assigning penalty on x86 systems. >> >> It looks like this problem happens on x86 platforms with IOAPIC and an SCI >> interrupt override in the ACPI

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-29 Thread Bjorn Helgaas
On Thu, Feb 18, 2016 at 08:19:41AM -0500, Sinan Kaya wrote: > A crash has been observed when assigning penalty on x86 systems. > > It looks like this problem happens on x86 platforms with IOAPIC and an SCI > interrupt override in the ACPI table with interrupt number greater than > 16. (22 in this

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-29 Thread Bjorn Helgaas
On Thu, Feb 18, 2016 at 08:19:41AM -0500, Sinan Kaya wrote: > A crash has been observed when assigning penalty on x86 systems. > > It looks like this problem happens on x86 platforms with IOAPIC and an SCI > interrupt override in the ACPI table with interrupt number greater than > 16. (22 in this

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-18 Thread Sinan Kaya
On 2/18/2016 11:39 AM, Rafael J. Wysocki wrote: >> +#define ACPI_PCI_LINK_MAX_EARLY_IRQINFO 1024 > Why do we need so many of them? > The previous code supported 1024 max interrupts before "ACPI, PCI, irq: remove interrupt count restriction" change. I added back 1024 number but the limit is

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-18 Thread Sinan Kaya
On 2/18/2016 11:39 AM, Rafael J. Wysocki wrote: >> +#define ACPI_PCI_LINK_MAX_EARLY_IRQINFO 1024 > Why do we need so many of them? > The previous code supported 1024 max interrupts before "ACPI, PCI, irq: remove interrupt count restriction" change. I added back 1024 number but the limit is

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-18 Thread Rafael J. Wysocki
On Thu, Feb 18, 2016 at 2:19 PM, Sinan Kaya wrote: > A crash has been observed when assigning penalty on x86 systems. > > It looks like this problem happens on x86 platforms with IOAPIC and an SCI > interrupt override in the ACPI table with interrupt number greater than >

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-18 Thread Rafael J. Wysocki
On Thu, Feb 18, 2016 at 2:19 PM, Sinan Kaya wrote: > A crash has been observed when assigning penalty on x86 systems. > > It looks like this problem happens on x86 platforms with IOAPIC and an SCI > interrupt override in the ACPI table with interrupt number greater than > 16. (22 in this example)

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-18 Thread Timur Tabi
Sinan Kaya wrote: @@ -968,3 +978,4 @@ void __init acpi_pci_link_init(void) register_syscore_ops(_syscore_ops); acpi_scan_add_handler(_link_handler); } + Unrelated whitespace change. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the

Re: [PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-18 Thread Timur Tabi
Sinan Kaya wrote: @@ -968,3 +978,4 @@ void __init acpi_pci_link_init(void) register_syscore_ops(_syscore_ops); acpi_scan_add_handler(_link_handler); } + Unrelated whitespace change. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the

[PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-18 Thread Sinan Kaya
A crash has been observed when assigning penalty on x86 systems. It looks like this problem happens on x86 platforms with IOAPIC and an SCI interrupt override in the ACPI table with interrupt number greater than 16. (22 in this example) The bug has been introduced by "ACPI, PCI, irq: remove

[PATCH V2] acpi, pci, irq: account for early penalty assignment

2016-02-18 Thread Sinan Kaya
A crash has been observed when assigning penalty on x86 systems. It looks like this problem happens on x86 platforms with IOAPIC and an SCI interrupt override in the ACPI table with interrupt number greater than 16. (22 in this example) The bug has been introduced by "ACPI, PCI, irq: remove