All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sinan Kaya <okaya@codeaurora.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Timur Tabi <timur@codeaurora.org>,
	Christopher Covington <cov@codeaurora.org>,
	Jon Masters <jcm@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	eric.auger@redhat.com, Linux PCI <linux-pci@vger.kernel.org>,
	Andy Gross <agross@codeaurora.org>,
	linux-arm-msm@vger.kernel.org,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	wim@djo.tudelft.nl, perex@perex.cz, tiwai@suse.com,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 1/4] ACPI,PCI,IRQ: factor in PCI possible
Date: Wed, 29 Jun 2016 14:47:02 -0400	[thread overview]
Message-ID: <8a40e242-fca4-5681-e480-e29ec05354ac@codeaurora.org> (raw)
In-Reply-To: <CAJZ5v0j1m4oGJfdOC8uerKc-3ksq6k2e9RdjEnk0sWmsq4RHRQ@mail.gmail.com>

On 6/29/2016 9:13 AM, Rafael J. Wysocki wrote:
> On Wed, Jun 29, 2016 at 10:27 AM, Sinan Kaya <okaya@codeaurora.org> wrote:
>> The change introduced in commit 103544d86976 ("ACPI,PCI,IRQ: reduce
>> resource requirements") omitted the initially assigned POSSIBLE penalty
>> when the IRQ is active.
> 
> It would be good to say what can go wrong with that here.
> 

I can add more description. Here is a first attempt.

Incorrect calculation of penalty leads to ACPI code assigning the wrong
interrupt number to PCI INTx interrupts.

This would not be as bad as it sounds in theory. You would just cause the
interrupts to be shared and observe performance penalty.

However, some drivers like parallel port driver doesn't like interrupt
sharing as in this example and causes all other PCI drivers sharing the interrupt
to malfunction.

The issue has not been caught because the behavior is platform specific
and depends on the peripheral drivers sharing the IRQ. 

I can claim that this could be a BIOS bug. if interrupt 7 is not good for PCI,
it shouldn't have been listed in the possible PCI interrupts to begin with. 
Given this is an existing platform, I don't think we have the luxury to request
all BIOS to be updated. This bugfix is needed to support existing platforms.


Feel free to request more information if the above description is not clear.


>> The original code would assign the POSSIBLE value divided by the number
>> of possible IRQs during initialization.
>>
>> Later, if the IRQ is chosen as the active IRQ or if the IRQ is in use
>> by ISA; additional penalties get added.
> 
> Thanks,
> Rafael
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

WARNING: multiple messages have this Message-ID (diff)
From: okaya@codeaurora.org (Sinan Kaya)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 1/4] ACPI,PCI,IRQ: factor in PCI possible
Date: Wed, 29 Jun 2016 14:47:02 -0400	[thread overview]
Message-ID: <8a40e242-fca4-5681-e480-e29ec05354ac@codeaurora.org> (raw)
In-Reply-To: <CAJZ5v0j1m4oGJfdOC8uerKc-3ksq6k2e9RdjEnk0sWmsq4RHRQ@mail.gmail.com>

On 6/29/2016 9:13 AM, Rafael J. Wysocki wrote:
> On Wed, Jun 29, 2016 at 10:27 AM, Sinan Kaya <okaya@codeaurora.org> wrote:
>> The change introduced in commit 103544d86976 ("ACPI,PCI,IRQ: reduce
>> resource requirements") omitted the initially assigned POSSIBLE penalty
>> when the IRQ is active.
> 
> It would be good to say what can go wrong with that here.
> 

I can add more description. Here is a first attempt.

Incorrect calculation of penalty leads to ACPI code assigning the wrong
interrupt number to PCI INTx interrupts.

This would not be as bad as it sounds in theory. You would just cause the
interrupts to be shared and observe performance penalty.

However, some drivers like parallel port driver doesn't like interrupt
sharing as in this example and causes all other PCI drivers sharing the interrupt
to malfunction.

The issue has not been caught because the behavior is platform specific
and depends on the peripheral drivers sharing the IRQ. 

I can claim that this could be a BIOS bug. if interrupt 7 is not good for PCI,
it shouldn't have been listed in the possible PCI interrupts to begin with. 
Given this is an existing platform, I don't think we have the luxury to request
all BIOS to be updated. This bugfix is needed to support existing platforms.


Feel free to request more information if the above description is not clear.


>> The original code would assign the POSSIBLE value divided by the number
>> of possible IRQs during initialization.
>>
>> Later, if the IRQ is chosen as the active IRQ or if the IRQ is in use
>> by ISA; additional penalties get added.
> 
> Thanks,
> Rafael
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

  reply	other threads:[~2016-06-29 18:47 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29  8:27 [PATCH V2 0/4] ACPI,PCI,IRQ: correct ISA penalty calculation Sinan Kaya
2016-06-29  8:27 ` Sinan Kaya
2016-06-29  8:27 ` [PATCH V2 1/4] ACPI,PCI,IRQ: factor in PCI possible Sinan Kaya
2016-06-29  8:27   ` Sinan Kaya
2016-06-29 13:13   ` Rafael J. Wysocki
2016-06-29 13:13     ` Rafael J. Wysocki
2016-06-29 18:47     ` Sinan Kaya [this message]
2016-06-29 18:47       ` Sinan Kaya
2016-06-29 21:19       ` Rafael J. Wysocki
2016-06-29 21:19         ` Rafael J. Wysocki
2016-06-29 21:21         ` Sinan Kaya
2016-06-29 21:21           ` Sinan Kaya
2016-06-29 21:21           ` Sinan Kaya
2016-06-29 21:21           ` Sinan Kaya
2016-06-29 21:25           ` Rafael J. Wysocki
2016-06-29 21:25             ` Rafael J. Wysocki
2016-06-29 21:26           ` Rafael J. Wysocki
2016-06-29 21:26             ` Rafael J. Wysocki
2016-06-29 21:26             ` Rafael J. Wysocki
2016-06-29 21:26             ` Rafael J. Wysocki
2016-06-29  8:27 ` [PATCH V2 2/4] Revert "ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init()" Sinan Kaya
2016-06-29  8:27   ` [PATCH V2 2/4] Revert "ACPI, PCI, IRQ: " Sinan Kaya
2016-06-29  8:27 ` [PATCH V2 3/4] ACPI,PCI,IRQ: separate ISA penalty calculation Sinan Kaya
2016-06-29  8:27   ` Sinan Kaya
2016-10-18 10:46   ` Bjorn Helgaas
2016-10-18 10:46     ` Bjorn Helgaas
2016-10-18 16:10     ` Sinan Kaya
2016-10-18 16:10       ` Sinan Kaya
2016-06-29  8:27 ` [PATCH V2 4/4] ACPI,PCI,IRQ: correct operator precedence Sinan Kaya
2016-06-29  8:27   ` Sinan Kaya
2016-06-29  8:27   ` Sinan Kaya
2016-06-29 13:16   ` Rafael J. Wysocki
2016-06-29 13:16     ` Rafael J. Wysocki
2016-06-29 18:29     ` Sinan Kaya
2016-06-29 18:29       ` Sinan Kaya
2016-06-29 21:14       ` Rafael J. Wysocki
2016-06-29 21:14         ` Rafael J. Wysocki
2016-06-29 21:14         ` Rafael J. Wysocki
2016-06-29 21:19         ` Sinan Kaya
2016-06-29 21:19           ` Sinan Kaya
2016-06-29 21:40           ` Rafael J. Wysocki
2016-06-29 21:40             ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a40e242-fca4-5681-e480-e29ec05354ac@codeaurora.org \
    --to=okaya@codeaurora.org \
    --cc=agross@codeaurora.org \
    --cc=alex.williamson@redhat.com \
    --cc=cov@codeaurora.org \
    --cc=eric.auger@redhat.com \
    --cc=jcm@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=timur@codeaurora.org \
    --cc=tiwai@suse.com \
    --cc=wim@djo.tudelft.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.