mirror of https://lore.kernel.org/lkml/
 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>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-arm-msm@vger.kernel.org,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPI / GED: unregister interrupts during shutdown
Date: Wed, 6 Dec 2017 11:55:41 -0500	[thread overview]
Message-ID: <e0f77da3-93d8-d474-3531-488f8f5f6108@codeaurora.org> (raw)
In-Reply-To: <CAJZ5v0iifeFpJsSwXO1AGLW3rn1cG7t3V6ZAnu34-K=D_DavBA@mail.gmail.com>

On 12/6/2017 11:41 AM, Rafael J. Wysocki wrote:
> On Wed, Dec 6, 2017 at 5:11 PM, Sinan Kaya <okaya@codeaurora.org> wrote:
>> On 12/6/2017 9:57 AM, Sinan Kaya wrote:
>>>> Yes, it should, so I'm not sure why you need the list in the first place.
>>>>
>>>> Also it looks like something along the lines of devres_release_all()
>>>> should be sufficient.
>>> Good suggestion, let me test this.
>>>
>>
>> I tried to pull the code into GED but the API is not public. I also looked
>> at how it is used. I was afraid to mess up with the internals of base.c by
>> calling devres_release_all() externally first and by the driver framework
>> next. I moved away from this approach.
> 
> Are you sure it is called by the core in the shutdown path?

Sorry, I was thinking about a general case not the shutdown path. If we open
this API and have device drivers call it from arbitrary places; then we could
be opening a new can of worms that show up during device driver removal.

If you feel confident (I'm not), I can pursue this approach too.

> 
>> I just fixed the function rename and changed the dev_info() to dev_dbg().
> 
> And why do you need the list?
> 
> ged_shutdown() will be called for every device for which ged_probe()
> has been called.

The problem I had here is that =the last argument is the context pointer when I
call devm_free_irq().

If I don't pass the same context I used during IRQ registration, then the IRQ
free API fails. That's why, I needed to keep the event pointer around until the
IRQ free is called.


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

  reply	other threads:[~2017-12-06 16:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05 21:01 Sinan Kaya
2017-12-05 22:18 ` Rafael J. Wysocki
2017-12-06 13:24   ` Sinan Kaya
2017-12-06 13:37     ` Rafael J. Wysocki
2017-12-06 14:57       ` Sinan Kaya
2017-12-06 16:11         ` Sinan Kaya
2017-12-06 16:41           ` Rafael J. Wysocki
2017-12-06 16:55             ` Sinan Kaya [this message]
2017-12-06 17:16               ` Rafael J. Wysocki
2017-12-06 23:19                 ` Rafael J. Wysocki
2017-12-07  8:29                   ` Greg Kroah-Hartman
2017-12-07 13:00                     ` Rafael J. Wysocki
2017-12-07 14:52                       ` Sinan Kaya
2017-12-07 17:10                         ` Rafael J. Wysocki
2017-12-07 17:18                           ` 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=e0f77da3-93d8-d474-3531-488f8f5f6108@codeaurora.org \
    --to=okaya@codeaurora.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=rafael@kernel.org \
    --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

Powered by JetHome