Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753892AbcJDOKT (ORCPT ); Tue, 4 Oct 2016 10:10:19 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51615 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753453AbcJDOKR (ORCPT ); Tue, 4 Oct 2016 10:10:17 -0400 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 5AAEF612CA Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH 3/3] Revert "ACPI,PCI,IRQ: remove SCI penalize function" To: Thomas Gleixner References: <1475343976-20744-1-git-send-email-okaya@codeaurora.org> <1475343976-20744-3-git-send-email-okaya@codeaurora.org> Cc: linux-acpi@vger.kernel.org, rjw@rjwysocki.net, bhelgaas@google.com, ravikanth.nalla@hpe.com, linux@rainbow-software.org, timur@codeaurora.org, cov@codeaurora.org, jcm@redhat.com, alex.williamson@redhat.com, linux-pci@vger.kernel.org, agross@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wim@djo.tudelft.nl, Len Brown , Pavel Machek , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org From: Sinan Kaya Message-ID: Date: Tue, 4 Oct 2016 10:10:12 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1914 Lines: 57 On 10/4/2016 3:23 AM, Thomas Gleixner wrote: > On Sat, 1 Oct 2016, Sinan Kaya wrote: > >> This reverts commit 9e5ed6d1fb87 ("ACPI,PCI,IRQ: remove SCI penalize >> function"). SCI penalty API was replaced by the runtime penalty calculation >> based on the value of acpi_gbl_FADT.sci_interrupt. > > This does more than only reverting said commit .... The SCI function was removed in two steps (first refactor and then remove). I was trying to do the revert at one step. I can divide into two if it makes it better. > >> acpi_gbl_FADT.sci_interrupt type does not get updated at the right time >> for some platforms and results in incorrect penalty assignment for PCI >> IRQs as irq_get_trigger_type returns the wrong type. > > And the obvious question is: Why does irq_get_trigger_type() return the > wrong type? Here is some history: I now remember that Bjorn indicated the race condition possibility in this thread here. https://lkml.org/lkml/2016/3/8/640 My understanding is that register_gsi function delivers the IRQ found in the ACPI table to the interrupt controller driver. Penalties are calculated before a link object is enabled to find out which interrupt has the least number of users. By the time penalties are calculated, the IRQ is not registered yet and it returns the wrong type. > > What's the root cause of this problem? Your changelog does not tell > anything. If you are OK with the above description, I can add this to the commit message. > > Thanks, > > tglx > -- > 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 Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.