From: Bjorn Helgaas <helgaas@kernel.org>
To: Sinan Kaya <okaya@codeaurora.org>
Cc: linux-acpi@vger.kernel.org, timur@codeaurora.org,
cov@codeaurora.org, linux-pci@vger.kernel.org,
ravikanth.nalla@hpe.com, lenb@kernel.org, harish.k@hpe.com,
ashwin.reghunandanan@hpe.com, bhelgaas@google.com,
rjw@rjwysocki.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] acpi,pci,irq: reduce resource requirements
Date: Mon, 14 Mar 2016 16:01:47 -0500 [thread overview]
Message-ID: <20160314210147.GA11459@localhost> (raw)
In-Reply-To: <56E7211F.3070203@codeaurora.org>
On Mon, Mar 14, 2016 at 04:37:51PM -0400, Sinan Kaya wrote:
> Hi Bjorn,
>
> On 3/14/2016 2:52 PM, Bjorn Helgaas wrote:
> >> bool acpi_isa_irq_available(int irq)
> >> > @@ -840,13 +881,6 @@ bool acpi_isa_irq_available(int irq)
> >> > */
> >> > void acpi_penalize_sci_irq(int irq, int trigger, int polarity)
> >> > {
> >> > - if (irq >= 0 && irq < ARRAY_SIZE(acpi_irq_penalty)) {
> >> > - if (trigger != ACPI_MADT_TRIGGER_LEVEL ||
> >> > - polarity != ACPI_MADT_POLARITY_ACTIVE_LOW)
> >> > - acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_ALWAYS;
> >> > - else
> >> > - acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
> >> > - }
> > I think we lost the validation of trigger mode and polarity, didn't
> > we?
> >
>
> This function gets called to inform ACPI that this is the SCI interrupt
> and, trigger and polarity are their attributes.
>
> The return value is void and the caller is not interested in what ACPI thinks
> about.
>
> This function adjusts the SCI penalty based on correct attributes passed
> (ISA_ALWAYS vs. PCI_USING).
>
> I agree that we lost this validation.
>
> I can keep sci_trigger/sci_polarity somewhere and keep that into the calculation
> in get function.
>
> Like this for instance,
>
> if (irq == acpi_gbl_FADT.sci_interrupt) {
> + if (sci_trigger != ACPI_MADT_TRIGGER_LEVEL ||
> + sci_polarity != ACPI_MADT_POLARITY_ACTIVE_LOW)
> + penalty += PIRQ_PENALTY_ISA_ALWAYS;
> + else
> penalty += PIRQ_PENALTY_PCI_USING;
> }
>
> Then, we can't get rid of the function just we can reduce the contents.
I think it's important to keep that check.
I raised the possibility of using irq_get_trigger_type() for all IRQs
(not just the SCI). Did you have a chance to look into that at all?
Bjorn
next prev parent reply other threads:[~2016-03-14 21:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 0:41 [PATCH 1/4] acpi,pci,irq: reduce resource requirements Sinan Kaya
2016-03-09 0:41 ` [PATCH 2/4] acpi,pci,irq: remove redundant code in acpi_irq_penalty_init Sinan Kaya
2016-03-09 0:41 ` [PATCH 3/4] acpi,pci,irq: remove SCI penalize function Sinan Kaya
2016-03-09 0:41 ` [PATCH 4/4] Revert "Revert "ACPI, PCI, irq: remove interrupt count restriction"" Sinan Kaya
2016-03-14 18:52 ` [PATCH 1/4] acpi,pci,irq: reduce resource requirements Bjorn Helgaas
2016-03-14 20:37 ` Sinan Kaya
2016-03-14 21:01 ` Bjorn Helgaas [this message]
2016-03-14 21:50 ` Sinan Kaya
2016-03-15 1:48 ` Bjorn Helgaas
2016-03-15 2:28 ` Sinan Kaya
2016-03-15 2:36 ` Bjorn Helgaas
2016-03-15 13:33 ` Sinan Kaya
2016-03-20 18:17 ` Sinan Kaya
2016-04-05 23:21 ` Bjorn Helgaas
2016-04-09 1:28 ` Sinan Kaya
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=20160314210147.GA11459@localhost \
--to=helgaas@kernel.org \
--cc=ashwin.reghunandanan@hpe.com \
--cc=bhelgaas@google.com \
--cc=cov@codeaurora.org \
--cc=harish.k@hpe.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=okaya@codeaurora.org \
--cc=ravikanth.nalla@hpe.com \
--cc=rjw@rjwysocki.net \
--cc=timur@codeaurora.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).