Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1357611

Re: [PATCH 1/4] acpi,pci,irq: reduce resource requirements

From Sinan Kaya <okaya@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] acpi,pci,irq: reduce resource requirements
Date 2016-03-14 21:40 +0100
Message-ID <rcHrt-lZ-35@gated-at.bofh.it> (permalink)
References <raAu8-eg-43@gated-at.bofh.it> <rcFSG-7FX-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

-- 
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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] acpi,pci,irq: reduce resource requirements Sinan Kaya <okaya@codeaurora.org> - 2016-03-09 01:50 +0100
  [PATCH 3/4] acpi,pci,irq: remove SCI penalize function Sinan Kaya <okaya@codeaurora.org> - 2016-03-09 01:50 +0100
  Re: [PATCH 1/4] acpi,pci,irq: reduce resource requirements Bjorn Helgaas <helgaas@kernel.org> - 2016-03-14 20:00 +0100
    Re: [PATCH 1/4] acpi,pci,irq: reduce resource requirements Sinan Kaya <okaya@codeaurora.org> - 2016-03-14 21:40 +0100
      Re: [PATCH 1/4] acpi,pci,irq: reduce resource requirements Bjorn Helgaas <helgaas@kernel.org> - 2016-03-14 22:10 +0100
        Re: [PATCH 1/4] acpi,pci,irq: reduce resource requirements Sinan Kaya <okaya@codeaurora.org> - 2016-03-14 23:00 +0100
          Re: [PATCH 1/4] acpi,pci,irq: reduce resource requirements Bjorn Helgaas <helgaas@kernel.org> - 2016-03-15 02:50 +0100
            Re: [PATCH 1/4] acpi,pci,irq: reduce resource requirements Sinan Kaya <okaya@codeaurora.org> - 2016-03-15 03:30 +0100
              Re: [PATCH 1/4] acpi,pci,irq: reduce resource requirements Bjorn Helgaas <helgaas@kernel.org> - 2016-03-15 03:40 +0100
                Re: [PATCH 1/4] acpi,pci,irq: reduce resource requirements Sinan Kaya <okaya@codeaurora.org> - 2016-03-15 14:40 +0100

csiph-web