From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754210AbdLGOwM (ORCPT ); Thu, 7 Dec 2017 09:52:12 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:42962 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753926AbdLGOwK (ORCPT ); Thu, 7 Dec 2017 09:52:10 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A37296022C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH] ACPI / GED: unregister interrupts during shutdown To: "Rafael J. Wysocki" , Greg Kroah-Hartman Cc: "Rafael J. Wysocki" , ACPI Devel Maling List , Timur Tabi , linux-arm-msm@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List References: <1512507705-2411-1-git-send-email-okaya@codeaurora.org> <20171207082958.GA11882@kroah.com> <2960222.F3CtrQ5k26@aspire.rjw.lan> From: Sinan Kaya Message-ID: Date: Thu, 7 Dec 2017 09:52:06 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <2960222.F3CtrQ5k26@aspire.rjw.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rafael, On 12/7/2017 8:00 AM, Rafael J. Wysocki wrote: >> Just don't use devm_request_threaded_irq()? :) >> >> Seriously, those are just "helper" functions if your code happens to >> follow the pattern they provide, if not, then don't use them, it's not >> that hard to provide the correct code to unwind things properly by "open >> coding" this logic as needed. >> >> The devm_*irq() functions are known for not being able to be used all of >> the time for lots of shutdown and cleanup issues, this isn't the first >> time it has happened, which is why we are very careful when taking >> "cleanup" patches that use those functions. > I see, thanks for the clarification. > > OK, we'll need to rework the driver somewhat, then. Even if we got rid of devm_*irq() functions, I see that the free_irq() function requires dev_id argument. * There can be multiple actions per IRQ descriptor, find the right * one based on the dev_id: I still need to keep track of the dev_ids attached to request_irq() functions. My take away from the discussion is: 1. don't use devm family of functions for IRQ registration/free 2. still keep track of the events 3. call free_irq on shutdown. Do you have something else on your mind? Sinan -- 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.